Python Numerical Methods
Python Programming And Numerical Methods: A Guide For Engineers And Scientists
Preface
Acknowledgment
Chapter 1. Python Basics
Getting Started with Python
Python as a Calculator
Managing Packages
Introduction to Jupyter Notebook
Logical Expressions and Operators
Summary
Problems
Chapter 2. Variables and Basic Data Structures
Variables and Assignment
Data Structure - Strings
Data Structure - Lists
Data Structure - Tuples
Data Structure - Sets
Data Structure - Dictionaries
Introducing Numpy Arrays
Summary
Problems
Chapter 3. Functions
Function Basics
Local Variables and Global Variables
Nested functions
Lambda Functions
Functions as Arguments to Functions
Summary
Problems
Chapter 4. Branching Statements
If-Else Statements
Ternary Operators
Summary
Problems
Chapter 5. Iteration
For-Loops
While Loops
Comprehensions
Summary
Problems
Chapter 6. Recursion
Recursive Functions
Divide and Conquer
Summary
Problems
Chapter 7. Object Oriented Programming (OOP)
Introduction to OOP
Class and Object
Inheritance, Encapsulation and Polymorphism
Summary
Problems
Chapter 8. Complexity
Complexity and Big-O Notation
Complexity Matters
The Profiler
Summary
Problems
Chapter 9. Representation of Numbers
Base-N and Binary
Floating Point Numbers
Round-off Errors
Summary
Problems
Chapter 10. Errors, Good Programming Practices, and Debugging
Error Types
Avoid Errors
Try/Except
Type Checking
Debugging
Summary
Problems
Chapter 11. Reading and Writing Data
TXT Files
CSV Files
Pickle Files
JSON Files
HDF5 Files
Summary
Problems
Chapter 12. Visualization and Plotting
2D Plotting
3D Plotting
Working with Maps
Animations and Movies
Summary
Problems
Chapter 13. Parallel Your Python
Parallel Computing Basics
Multiprocessing
Use joblib
Summary
Problems
Chapter 14. Linear Algebra and Systems of Linear Equations
Basics of Linear Algebra
Linear Transformations
Systems of Linear Equations
Solutions to Systems of Linear Equations
Solve Systems of Linear Equations in Python
Matrix Inversion
Summary
Problems
Chapter 15. Eigenvalues and Eigenvectors
Eigenvalues and Eigenvectors Problem Statement
The Power Method
The QR Method
Eigenvalues and Eigenvectors in Python
Summary
Problems
Chapter 16. Least Squares Regression
Least Squares Regression Problem Statement
Least Squares Regression Derivation (Linear Algebra)
Least Squares Regression Derivation (Multivariable Calculus)
Least Squares Regression in Python
Least Square Regression for Nonlinear Functions
Summary
Problems
Chapter 17. Interpolation
Interpolation Problem Statement
Linear Interpolation
Cubic Spline Interpolation
Lagrange Polynomial Interpolation
Newton’s Polynomial Interpolation
Summary
Problems
Chapter 18. Series
Expressing Functions with Taylor Series
Approximations with Taylor Series
Discussion on Errors
Summary
Problems
Chapter 19. Root Finding
Root Finding Problem Statement
Tolerance
Bisection Method
Newton-Raphson Method
Root Finding in Python
Summary
Problems
Chapter 20. Numerical Differentiation
Numerical Differentiation Problem Statement
Finite Difference Approximating Derivatives
Approximating of Higher Order Derivatives
Numerical Differentiation with Noise
Summary
Problems
Chapter 21. Numerical Integration
Numerical Integration Problem Statement
Riemanns Integral
Trapezoid Rule
Simpson’s Rule
Computing Integrals in Python
Summary
Problems
Chapter 22. Ordinary Differential Equation - Initial Value Problems
ODE Initial Value Problem Statement
Reduction of Order
The Euler Method
Numerical Error and Instability
Predictor-Corrector and Runge Kutta Methods
Python ODE Solvers
Advanced Topics
Summary
Problems
Chapter 23. Ordinary Differential Equation - Boundary Value Problems
ODE Boundary Value Problem Statement
The Shooting Methods
Finite Difference Method
Numerical Error and Instability (BVP)
Python ODE Solvers (BVP)
Summary
Problems
Chapter 24. Fourier Transform
The Basics of Waves
Discrete Fourier Transform (DFT)
Fast Fourier Transform (FFT)
FFT in Python
Summary
Problems
Chapter 25. Introduction to Machine Learning
Concept of Machine Learning
Classification
Regression
Clustering
Summary
Problems
Appendix A. Getting Started with Python on Windows
repository
Index