Took something similar in undergrad and the big unlock was chapter 8 on ODEs. Most intro physics teaches you to solve equations analytically, but computational physics flips that. You just integrate forward numerically and suddenly problems that were unsolvable in closed form become tractable. Euler's method breaks down fast tho, and working through why, basically step size sensitivity and accumulated error, gives you intuition for why RK4 is the standard workhorse.
One thing worth noting if you come from a programming background: the Python in the early chapters will feel basic, but the real payoff is in the exercises. The later chapters on PDEs and Monte Carlo have some genuinely meaty problems. The Laplace equation solver via relaxation methods is one of those exercises where you feel the underlying physics in a way pure analytic work doesnt give you.
The Numerical Recipes recommendation above is solid if you want more rigorous algorithm coverage. Alot of computational physicists are now moving toward JAX or Julia, where differentiable simulations are essentially free and hot loops can be JIT compiled. But for building foundations and physical intuition, a course structured like this is hard to beat.
I took Mark Newman’s course some years ago. It was fantastic! Geared at sophomore/ junior year physics major — someone who had completed the basic intro sequence. I am sure this book is also great.
I read most of the 1st edition (busy), I'm sure it hasn't changed much to the 2nd. I would say it's rather good at an introductory level to the subject!
It definitely targets physics undergrads who have never programmed so if that's not you then you may feel friction during some chapters. If, like me, you are much more developed in programming than physics you might just want to do the exercises in the first few chapters to check your knowledge and move on to the good bits.
If you're looking for something more rigorous I would bet [Numerical Recipes](https://numerical.recipes/) is better (I haven't read it but I want to; see "busy").
Looks like not much. The book is about using Python to implement numerical methods, mainly about teaching the Python part, and that's all explained. You might be missing motivation if you don't know any physics, but even so, basic mechanics using differential equations seems to be enough to give context, at least for the earlier parts
I did a few courses across academic years that were based around this book and it's very handy skills to learn. Whilst perhaps not in the moment, it's a good introduction to implementing functions and equations, before you lead on to the next steps of specific functions and methods of analysis alongside hpc with parallelization.
I think the course by Richard Fitzpatrick is a much better selection of content if you want to actually do computational physics: https://farside.ph.utexas.edu/teaching/329/329.pdf
Took something similar in undergrad and the big unlock was chapter 8 on ODEs. Most intro physics teaches you to solve equations analytically, but computational physics flips that. You just integrate forward numerically and suddenly problems that were unsolvable in closed form become tractable. Euler's method breaks down fast tho, and working through why, basically step size sensitivity and accumulated error, gives you intuition for why RK4 is the standard workhorse.
One thing worth noting if you come from a programming background: the Python in the early chapters will feel basic, but the real payoff is in the exercises. The later chapters on PDEs and Monte Carlo have some genuinely meaty problems. The Laplace equation solver via relaxation methods is one of those exercises where you feel the underlying physics in a way pure analytic work doesnt give you.
The Numerical Recipes recommendation above is solid if you want more rigorous algorithm coverage. Alot of computational physicists are now moving toward JAX or Julia, where differentiable simulations are essentially free and hot loops can be JIT compiled. But for building foundations and physical intuition, a course structured like this is hard to beat.
The matplotlib chapter seems fairly barebones but I remain in awe at this gorgeous latex work
Isn't it a pretty standard book/memoir template?
He could have invested in a Python syntax highlighter. I use minted, myself, but I'm sure there are many alternatives.
I took Mark Newman’s course some years ago. It was fantastic! Geared at sophomore/ junior year physics major — someone who had completed the basic intro sequence. I am sure this book is also great.
Could somebody provide some opinion on the book and/or accompanying course?
I read most of the 1st edition (busy), I'm sure it hasn't changed much to the 2nd. I would say it's rather good at an introductory level to the subject!
It definitely targets physics undergrads who have never programmed so if that's not you then you may feel friction during some chapters. If, like me, you are much more developed in programming than physics you might just want to do the exercises in the first few chapters to check your knowledge and move on to the good bits.
If you're looking for something more rigorous I would bet [Numerical Recipes](https://numerical.recipes/) is better (I haven't read it but I want to; see "busy").
What physics do I need to know to follow this book?
Looks like not much. The book is about using Python to implement numerical methods, mainly about teaching the Python part, and that's all explained. You might be missing motivation if you don't know any physics, but even so, basic mechanics using differential equations seems to be enough to give context, at least for the earlier parts
> Exercises by chapter
Click on a chapter to download:
Chapter 2: Python programming for physicists
Chapter 3: Graphics and visualization
Chapter 4: Accuracy and speed
Chapter 5: Integrals and derivatives
Chapter 6: Solution of linear and nonlinear equations
Chapter 7: Fourier transforms
Chapter 8: Ordinary differential equations
Chapter 9: Partial differential equations
Chapter 10: Random processes and Monte Carlo methods
Chapter 11: Data science
Weber's Electrodynamics.
computation will revolutionize physics.
I did a few courses across academic years that were based around this book and it's very handy skills to learn. Whilst perhaps not in the moment, it's a good introduction to implementing functions and equations, before you lead on to the next steps of specific functions and methods of analysis alongside hpc with parallelization.
good book