← Back to Labs

Symplectic Integrators – Hamiltonian Dynamics

0.000
ΔE (Euler) %
0.000
ΔE (RK4) %
0.000
ΔE (Verlet) %
0
Time Steps
0.15
0.30

Symplectic Integration & Energy Conservation

For Hamiltonian systems H(q,p), symplectic integrators preserve the symplectic structure (phase-space volume, Liouville's theorem) and produce bounded energy errors over long times.

H = p²/2 − 1/|q| (Kepler orbit, gravitational units)
Störmer-Verlet: q_{n+1} = 2q_n − q_{n-1} + dt²∇V(q_n)
Leapfrog: p_{n+1/2} = p_n − dt/2 · ∇V(q_n), q_{n+1} = q_n + dt · p_{n+1/2}

Euler integration accumulates energy systematically (orbit spirals out). RK4 is accurate short-term but non-symplectic (orbit slowly decays). Verlet/leapfrog preserves a shadow Hamiltonian exactly — energy oscillates but never drifts. This is why symplectic methods are essential in molecular dynamics and celestial mechanics.