Attached is my implementation (and explanation, partly for my own sake) of RK4. I ran out of time to do anything particularly interesting with it, but it works.
Looks good.
If you want to try RK4 on something meaty ... perhaps as a lead in to another topic, check out https://en.wikipedia.org/wiki/Double_pendulum .
Or trajectories in the potential that I did my PhD thesis on :
$$ V(x,y) = \left( y - \frac{x^2}{2} \right)^2 + \frac{\mu \, x^2}{2} $$
where \( \mu = 0.1 \).
See
Tangentially related to that : Pollack and fractal dimensions
Chaos : An Introduction to Dynamical Systems - Alligood, Sauer, & Yorke
last modified | size | ||
runge_kutta.html | Tue Dec 03 2024 05:12 pm | 300K | |
runge_kutta.ipynb | Tue Dec 03 2024 05:12 pm | 42K |