Cover image for Introduction to numerical programming : a practical guide for scientists and engineers using Python and C/C++
Title:
Introduction to numerical programming : a practical guide for scientists and engineers using Python and C/C++
Personal Author:
Series:
Series in computational physics
Publication Information:
Boca Raton : CRC Press, Taylor & Francis Group, 2015
Physical Description:
xix, 653 pages : illustrations ; 26 cm.
ISBN:
9781466569676
Abstract:
"This book introduces numerical programming using Python and C/C++, emphasizing methods used in physics and engineering. Its helps readers develop the ability to navigate relevant algorithms, knowledge of coding design, and efficient scientific programming skills. It requires minimal background in mathematics, leading readers from elementary methods to complex algorithms useful in modern programming. It incorporates examples and real code throughout, as well as problem sets, to facilitate a hands-on learning experience. "--provided by publisher

Available:*

Library
Item Barcode
Call Number
Material Type
Item Category 1
Status
Searching...
30000010343224 QC52 B48 2015 Open Access Book Book
Searching...

On Order

Summary

Summary

Makes Numerical Programming More Accessible to a Wider Audience

Bearing in mind the evolution of modern programming, most specifically emergent programming languages that reflect modern practice, Numerical Programming: A Practical Guide for Scientists and Engineers Using Python and C/C++ utilizes the author's many years of practical research and teaching experience to offer a systematic approach to relevant programming concepts. Adopting a practical, broad appeal, this user-friendly book offers guidance to anyone interested in using numerical programming to solve science and engineering problems. Emphasizing methods generally used in physics and engineering--from elementary methods to complex algorithms--it gradually incorporates algorithmic elements with increasing complexity.

Develop a Combination of Theoretical Knowledge, Efficient Analysis Skills, and Code Design Know-How

The book encourages algorithmic thinking, which is essential to numerical analysis. Establishing the fundamental numerical methods, application numerical behavior and graphical output needed to foster algorithmic reasoning, coding dexterity, and a scientific programming style, it enables readers to successfully navigate relevant algorithms, understand coding design, and develop efficient programming skills. The book incorporates real code, and includes examples and problem sets to assist in hands-on learning.

Begins with an overview on approximate numbers and programming in Python and C/C++, followed by discussion of basic sorting and indexing methods, as well as portable graphic functionality Contains methods for function evaluation, solving algebraic and transcendental equations, systems of linear algebraic equations, ordinary differential equations, and eigenvalue problems Addresses approximation of tabulated functions, regression, integration of one- and multi-dimensional functions by classical and Gaussian quadratures, Monte Carlo integration techniques, generation of random variables, discretization methods for ordinary and partial differential equations, and stability analysis

This text introduces platform-independent numerical programming using Python and C/C++, and appeals to advanced undergraduate and graduate students in natural sciences and engineering, researchers involved in scientific computing, and engineers carrying out applicative calculations.


Author Notes

Titus Adrian Beu, professor of theoretical and computational physics at the University "Babes-Bolyai" from Cluj-Napoca, Romania, has been active in the broader field of computational physics for more than 30 years. His research topics have evolved from Tokamak plasma and nuclear reactor calculations in the 1980s, collision theory and molecular cluster spectroscopy in the 1990s, to fullerenes and nanofluidics simulations in recent years. Development of ample computer codes has been at the core of all research projects the author has conducted. In parallel, he has lectured on general programming techniques and advanced numerical methods, general simulation methods, and advanced molecular dynamics.


Table of Contents

Series Prefacep. xi
Prefacep. xiii
Authorp. xvii
Acknowledgmentsp. xix
1 Approximate Numbersp. 1
1.1 Sources of Errors in Numerical Calculationsp. 1
1.2 Absolute and Relative Errorsp. 2
1.3 Representation of Numbersp. 4
1.4 Significant Digitsp. 5
1.5 Errors of Elementary Operationsp. 7
References and Suggested Further Readingp. 10
2 Basic Programming Techniquesp. 11
2.1 Programming Conceptsp. 11
2.2 Functions and Parametersp. 12
2.3 Passing Arguments to Python Functionsp. 15
2.4 Passing Arguments to C/C++ Functionsp. 17
2.5 Arrays in Pythonp. 19
2.6 Dynamic Array Allocation in C/C++p. 19
2.7 Basic Matrix Operationsp. 24
References and Suggested Further Readingp. 30
3 Elements of Scientific Graphicsp. 31
3.1 The Tkinter Packagep. 31
3.2 The Canvas Widgetp. 32
3.3 Simple Tkinter Applicationsp. 35
3.4 Plotting Functions of One Variablep. 39
3.5 Graphics Library graphlib.pyp. 44
3.6 Creating Plots in C++ Using the Library graphlib.pyp. 57
References and Suggested Further Readingp. 61
4 Sorting and Indexingp. 63
4.1 Introductionp. 63
4.2 Bubble Sortp. 64
4.3 Insertion Sortp. 66
4.4 Quicksortp. 70
4.5 Indexing and Rankingp. 71
4.6 Implementations in C/C++p. 75
4.7 Problemsp. 78
References and Suggested Further Readingp. 84
5 Evaluation of Functionsp. 85
5.1 Evaluation of Polynomials by Horner's Schemep. 85
5.2 Evaluation of Analytic Functionsp. 88
5.3 Continued Fractionsp. 91
5.4 Orthogonal Polynomialsp. 94
5.5 Spherical Harmonics-Associated Legendre Functionsp. 98
5.6 Spherical Bessel Functionsp. 102
5.7 Implementations in C/C++p. 105
5.8 Problemsp. 113
References and Suggested Further Readingp. 125
6 Algebraic and Transcendental Equationsp. 127
6.1 Root Separationp. 127
6.2 Bisection Methodp. 129
6.3 Method of False Positionp. 132
6.4 Method of Successive Approximationsp. 134
6.5 Newton's Methodp. 139
6.6 Secant Methodp. 142
6.7 Birge-Vieta Methodp. 144
6.8 Newton's Method for Systems of Nonlinear Equationsp. 147
6.9 Implementations in C/C++p. 151
6.10 Problemsp. 157
References and Suggested Further Readingp. 168
7 Systems of Linear Equationsp. 169
7.1 Introductionp. 169
7.2 Gaussian Elimination with Backward Substitutionp. 169
7.3 Gauss-Jordan Eliminationp. 179
7.4 LU Factorizationp. 187
7.5 Inversion of Triangular Matricesp. 195
7.6 Cholesky Factorizationp. 197
7.7 Tridiagonal Systems of Linear Equationsp. 203
7.8 Block Tridiagonal Systems of Linear Equationsp. 207
7.9 Complex Matrix Equationsp. 208
7.10 Jacobi and Gauss-Seidel Iterative Methodsp. 209
7.11 Implementations in C/C++p. 213
7.12 Problemsp. 223
References and Suggested Further Readingp. 231
8 Eigenvalue Problemsp. 233
8.1 Introductionp. 233
8.2 Diagonalization of Matrices by Similarity Transformationsp. 234
8.3 Jacobi Methodp. 235
8.4 Generalized Eigenvalue Problems for Symmetric Matricesp. 243
8.5 Implementations in C/C++p. 246
8.6 Problemsp. 249
References and Suggested Further Readingp. 264
9 Modeling of Tabulated Functionsp. 265
9.1 Interpolation and Regressionp. 265
9.2 Lagrange Interpolation Polynomialp. 268
9.3 Neville's Interpolation Methodp. 273
9.4 Cubic Spline Interpolationp. 276
9.5 Linear Regressionp. 283
9.6 Multilinear Regression Modelsp. 287
9.7 Nonlinear Regression: The Levenberg-Marquardt Methodp. 293
9.8 Implementations in C/C++p. 301
9.9 Problemsp. 309
References and Suggested Further Readingp. 331
10 Integration of Functionsp. 333
10.1 Introductionp. 333
10.2 Trapezoidal Rule; A Heuristic Approachp. 333
10.3 The Newton-Cotes Quadrature Formulasp. 335
10.4 Trapezoidal Rulep. 337
10.5 Simpson's Rulep. 339
10.6 Adaptive Quadrature Methodsp. 341
10.7 Romberg's Methodp. 344
10.8 Improper Integrals: Open Formulasp. 348
10.9 Midpoint Rulep. 352
10.10 Gaussian Quadraturesp. 354
10.11 Multidimensional Integrationp. 361
10.12 Adaptive Multidimensional Integrationp. 369
10.13 Implementations in C/C++p. 372
10.14 Problemsp. 384
References and Suggested Further Readingp. 393
11 Monte Carlo Methodp. 395
11.1 Introductionp. 395
11.2 Integration of Functionsp. 396
11.3 Importance Samplingp. 399
11.4 Multidimensional Integralsp. 402
11.5 Generation of Random Numbersp. 408
11.6 Implementations in C/C++p. 415
11.7 Problemsp. 417
References and Suggested Further Readingp. 426
12 Ordinary Differential Equationsp. 427
12.1 Introductionp. 427
12.2 Taylor Series Methodp. 429
12.3 Euler's Methodp. 431
12.4 Runge-Kutta Methodsp. 434
12.5 Adaptive Step Size Controlp. 440
12.6 Methods for Second-Order ODEsp. 447
12.7 Numerov's Methodp. 454
12.8 Shooting Methods for Two-Point Problemsp. 457
12.9 Finite-Difference Methods for Linear Two-Point Problemsp. 466
12.10 Implementations in C/C++p. 471
12.11 Problemsp. 481
References and Suggested Further Readingp. 507
13 Partial Differential Equationsp. 509
13.1 Introductionp. 509
13.2 Boundary-Value Problems for Elliptic Differential Equationsp. 511
13.3 Initial-Value Problems for Parabolic Differential Equationsp. 525
13.4 Time-Dependent Schrodinger Equationp. 542
13.5 Initial-Value Problems for Hyperbolic Differential Equationsp. 553
13.6 Implementations in C/C++p. 559
13.7 Problemsp. 567
References and Suggested Further Readingp. 585
Appendix A Dynamic Array Allocation in C/C++p. 587
Appendix B Basic Operations with Vectors and Matricesp. 591
Appendix C Embedding Python in C/C++p. 599
Appendix D The Numerical Libraries numxlib.py and numxlib. hp. 605
Appendix E The Graphics Library graphlib.py Based on Tkinterp. 611
Appendix F The C++ Interface to the Graphics Library graphlib.pyp. 627
Appendix G List of Programs by Chapterp. 637
Indexp. 641