Integrator Arena
Learning goal
See the defining pathologies of each time integrator on the cross-field benchmark: forward Euler spiraling out, backward Euler spiraling in, leapfrog locked on the cycloid, and RK4 near-exact.
Things to try
- Slide steps-per-period down to ~10. Watch Euler's spiral blow up while leapfrog merely lags in phase — stability vs accuracy, dissociated before your eyes.
- Increase the number of periods. First-order errors compound; the gap between methods widens with simulation length.
- Turn on RK4 at very coarse steps. Even 4th-order accuracy eventually loses the phase — high order is not a substitute for resolving the gyration.
- Compare backward Euler and forward Euler at the same settings — mirror-image energy errors, exactly as the averaging argument predicts.
Related
ODE integration · Convergence & error · Leapfrog update equations