Home

Welcome to the companion website for the textbook “Numerical Methods in Physics with Python” by Alex Gezerlis, published by Cambridge University Press (2nd ed., July 2023).

This is a textbook for courses on computational physics, discussing subjects such as linear algebra, differential equations, root-finding, interpolation, and integration; each chapter is rounded out by a physics project and a problem set. The book carefully explains, using actual derivations and code, topics which often appear mysterious, e.g., rounding error, ill-conditioning, automatic differentiation, the QR eigenvalue method, the singular-value decomposition, Lagrange interpolation, the fast Fourier Transform, Bayesian linear regression, Gauss–Legendre and Monte Carlo quadrature .

If you would like to learn more about what’s covered in the book, you can have a look at the table of contents or the preface (which also discusses the new features in the second edition).

Through the menu above, you can access Python and NumPy tutorials, all the code listings from the book, endorsements, and more.