Computing Library › Solvers Methods
Solvers Methods

Leapfrog Integration

Leapfrog integration staggers positions and velocities in time, giving a cheap, time-reversible, second-order scheme with excellent long-term behavior.

Staggering position and velocity

The leapfrog method integrates second-order dynamics, such as Newton's equations of motion, by evaluating positions and velocities at interleaved (staggered) time levels. Positions are known at whole steps and velocities at half steps, so each quantity is updated using the other evaluated half a step away, and they leap over one another in time. The scheme uses one force evaluation per step and is second-order accurate despite its simplicity.

This staggering is not a mere bookkeeping trick: it is what gives leapfrog its favorable structural properties, distinguishing it from a naive forward-Euler treatment of the same equations.

Kronos motion — confinement time

Time reversibility and energy behavior

Leapfrog is time-reversible: running it backward from the final state recovers the initial state (in exact arithmetic). It is also symplectic for Hamiltonian systems, meaning it preserves phase-space volume. As a consequence, the energy error does not drift over time but oscillates around the true value with bounded amplitude, even over millions of steps. This makes leapfrog ideal for long-time dynamical simulations where energy conservation matters.

Variants and use

The velocity-Verlet form is algebraically equivalent to leapfrog but keeps positions and velocities at the same time level, which is convenient when both are needed simultaneously. The Boris particle pusher is a leapfrog scheme specialized for the magnetic Lorentz force. The main caveat is that the staggered start requires a careful half-step initialization, and variable time steps break the reversibility that gives the method its edge.

Leapfrog and velocity-Verlet underpin molecular dynamics and particle-orbit integration, and their symplectic character is why particle-in-cell plasma simulations trust them for long-time kinetic evolution.