or equivalently of the form
The method is known by different names in different disciplines. In particular, it is similar to the Velocity Verlet method, which is a variant of Verlet integration. Leapfrog integration is equivalent to updating positions and velocities at interleaved time points, staggered in such a way that they 'leapfrog' over each other. For example, the position is updated at integer time steps and the velocity is updated at integer-plus-a-half time steps.
Leapfrog integration is a second order method, in contrast to Euler integration, which is only first order, yet requires the same number of function evaluations per step. Unlike Euler integration, it is stable for oscillatory motion, as long as the time-step is constant, and .
In leapfrog integration, the equations for updating position and velocity are
where is position at step , is the velocity, or first derivative of , at step , is the acceleration, or second derivative of , at step and is the size of each time step. These equations can be expressed in a form which gives velocity at integer steps as well. However, even in this synchronized form, the time-step must be constant to maintain stability.
One use of this equation is in gravity simulations, since in that case the acceleration depends only on the positions of the gravitating masses (and not on their velocities), although higher order integrators (such as Runge–Kutta methods) are more frequently used.
There are two primary strengths to Leapfrog integration when applied to mechanics problems. The first is the time-reversibility of the Leapfrog method. One can integrate forward n steps, and then reverse the direction of integration and integrate backwards n steps to arrive at the same starting position. The second strength of Leapfrog integration is its symplectic nature, which implies that it conserves the (slightly modified) energy of dynamical systems. This is especially useful when computing orbital dynamics, as many other integration schemes, such as the (order 4) Runge-Kutta method, do not conserve energy and allow the system to drift substantially over time.
Because of its time-reversibility, and because it is a symplectic integrator, leapfrog integration is also used in Hamiltonian Monte Carlo, a method for drawing random samples from a probability distribution whose overall normalization is unknown.
- Numerical ordinary differential equations
- Symplectic integration
- Euler integration
- Verlet integration
- Runge–Kutta integration
- C. K. Birdsall and A. B. Langdon, Plasma Physics via Computer Simulations, McGraw-Hill Book Company, 1985, p. 56
- 4.1 Two Ways to Write the Leapfrog
- [Skeel, R. D., "Variable Step Size Destabilizes the Stömer/Leapfrog/Verlet Method," BIT Numerical Mathematics, Vol. 33, 1993, pp. 172-175.]
- Bishop, Christopher (2006). Pattern Recognition and Machine Learning. New York: Springer-Verlag. pp. 548–554. ISBN 978-0-387-31073-2.
- The Leapfrog Integrator, Drexel University Physics