a symplectic integrator
/ sim-PLEK-tik /
Track a planet's orbit for a million years with an ordinary high-accuracy solver and something disturbing happens: the orbit slowly spirals in or drifts out, and the planet's energy creeps steadily up or down. The true orbit does neither — energy is conserved exactly, forever. A symplectic integrator is a special method designed for such conservative systems that keeps this long-term structure intact, trading a little short-term accuracy for astonishing long-term fidelity.
Symplectic methods are built for HAMILTONIAN systems — the equations of frictionless mechanics, where position q and momentum p evolve so as to conserve energy and preserve phase-space volume (Liouville's theorem). A symplectic integrator is one whose discrete step exactly preserves this phase-space (symplectic) structure, even though it does not exactly conserve the energy. The simplest example is the symplectic Euler / leapfrog (Stoermer-Verlet) method: update momentum using the force at the current position, then update position using the new momentum, in a staggered leapfrog. Crucially, a symplectic method does not conserve the true energy H, but it EXACTLY conserves a nearby 'shadow' energy that stays within a bounded distance of H for exponentially long times — so the computed energy oscillates within a fixed band instead of drifting away.
This is why symplectic integrators dominate long-time simulations: planetary dynamics over billions of years, molecular dynamics over millions of steps, particle accelerators. A standard RK4 of higher per-step accuracy will actually do WORSE over the long haul because its energy error accumulates secularly (drifts without bound), whereas a humble second-order symplectic method keeps energy bounded indefinitely. The honest trade-offs: symplectic methods shine only for conservative (Hamiltonian) problems — they offer no benefit for dissipative or generic ODEs; they are happiest with a FIXED step (adaptive step-size control breaks the symplectic structure and must be done with care); and they prioritize qualitative long-term behavior (bounded energy, no artificial drift) over the smallest possible error at any single instant.
Simulate a frictionless pendulum (or a planet) for a million periods. Plain RK4 gives a tiny error per step but its energy drifts steadily, so after long enough the orbit visibly decays or grows. The Verlet (leapfrog) symplectic method, though only second order per step, keeps the energy oscillating in a fixed narrow band forever — the orbit stays a closed loop. For long-time fidelity, structure beats raw per-step accuracy.
Conserves phase-space structure: energy stays bounded for ages instead of drifting.
A symplectic method does NOT conserve the exact energy — it conserves a nearby shadow energy, so the true energy oscillates within a bounded band rather than drifting. The benefit applies only to conservative (Hamiltonian) systems and usually requires a fixed step; adaptive stepping silently destroys the symplectic property.