Symplectic Integrator: Störmer-Verlet vs Euler

Kepler orbit — energy conservation over long integration times

Euler (energy drifts) Störmer-Verlet (energy conserved)
Step: 0
Euler ΔE: 0.000%
Verlet ΔE: 0.000%
dt: 0.02
Störmer-Verlet is symplectic: it exactly conserves a modified Hamiltonian near the true one, so energy errors stay bounded forever. Euler is not symplectic — energy drifts monotonically, eventually causing orbital collapse or escape. The Poincaré section (orbit traces) reveals the qualitative difference clearly. Verlet: xn+1 = 2xn − xn-1 + h²∇V.