Symplectic Integrator — Kepler Orbit
Störmer-Verlet / leapfrog is a symplectic integrator — it preserves the symplectic 2-form dq∧dp exactly, keeping the orbit on an invariant torus. Energy oscillates but never drifts. The update is:
pn+1/2 = pn + (Δt/2)F(qn), qn+1 = qn + Δt·pn+1/2, pn+1 = pn+1/2 + (Δt/2)F(qn+1)
Forward Euler (non-symplectic) spirals outward — area in phase space is not preserved and energy grows secularly. The energy error plot shows oscillating (symplectic) vs. drifting (Euler) behavior clearly.
Symplectic geometryStörmer-VerletKepler problemEnergy conservationHamiltonian mechanics