Brief
Implement four integrators (step-by-step solvers for the equations of motion): explicit Euler, semi-implicit Euler, RK4 and leapfrog/velocity-Verlet. Run them on Kepler orbits (one planet around a sun) and on the three-body figure-eight (three equal masses chasing each other along one figure-eight path), with your own step-size controller. Track energy and angular-momentum drift over 10^6 steps. Explain the results through symplecticity (a property of some integrators that preserves the geometric structure of the physics, so energy errors stay bounded instead of growing) and backward error analysis (the idea that a good integrator solves a slightly different problem exactly).
VICTORY CONDITIONS
- Leapfrog keeps |dE/E| < 1e-5 and bounded over 1000 orbits, while RK45 at equal evaluations drifts >= 10x more. The figure-eight stays stable for >= 100 periods. (Relative energy error after 1000 orbits, at an equal number of force evaluations; how long the figure-eight survives).
- A public repository with a README that shows your result and how to reproduce it.
Terms in plain words
- Symplectic integrator
- A solver for physical motion that preserves phase-space structure, so its energy error oscillates within a bound instead of drifting away.
- Backward error analysis
- Explaining a numerical method's behaviour by finding the slightly modified problem that it solves exactly.
- RK4
- The classic fourth-order Runge-Kutta method, which takes four force evaluations per step to get a very accurate step.
- Leapfrog / velocity-Verlet
- A simple integrator that updates position and velocity in alternating half-steps; it is symplectic and time-reversible.
Why it rates ★★☆☆☆
A classic demo. It builds the intuition you will need later for HMC leapfrog and adjoint ODEs.