Leapfrog integration
In numerical analysis, leapfrog integration is a method for numerically integrating differential equations of the form \ddot x = \frac{d^2 x}{dt^2} = A(x), or equivalently of the form \dot v = \frac{dv}{dt} = A(x), \qquad \dot x = \frac{dx}{dt} = v, particularly in the case of a dynamical system of classical mechanics.[src] The method is known by different names in different disciplines.[src] In particular, it is similar to the velocity Verlet method, which is a variant of Verlet integration.[src] Leapfrog integration is equivalent to updating positions x(t) and velocities v(t)=\dot x(t) at different interleaved time points, staggered in such a way that they "leapfrog" over each other.[src] 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.[src] Unlike Euler integration, it is stable for oscillatory motion, as long as the time-step \Delta t is constant, and \Delta t .[src] Using Yoshida coefficients, applying the leapfrog integrator multiple times with the correct timesteps, a much higher order integrator can be generated.[src]
In numerical analysis, leapfrog integration is a method for numerically integrating differential equations of the form \ddot x = \frac{d^2 x}{dt^2} = A(x), or equivalently of the form \dot v = \frac{dv}{dt} = A(x), \qquad \dot x = \frac{dx}{dt} = v, particularly in the case of a dynamical system of classical mechanics.[src] The method is known by different names in different disciplines.[src] In particular, it is similar to the velocity Verlet method, which is a variant of Verlet integration.[src] Leapfrog integration is equivalent to updating positions x(t) and velocities v(t)=\dot x(t) at different interleaved time points, staggered in such a way that they "leapfrog" over each other.[src] 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.[src] Unlike Euler integration, it is stable for oscillatory motion, as long as the time-step \Delta t is constant, and \Delta t .[src] Using Yoshida coefficients, applying the leapfrog integrator multiple times with the correct timesteps, a much higher order integrator can be generated.[src] ==Algorithm== In leapfrog integration, the equations for updating position and velocity are \begin{align} a_i &= A(x_i), \\ v_{i+1/2} &= v_{i-1/2} + a_{i}\, \Delta t, \\ x_{i+1} &= x_{i} + v_{i+1/2}\, \Delta t, \end{align} where x_i is position at step i , v_{i+1/2\,} is the velocity, or first derivative of x , at step i+1/2\, , a_{i}=A(x_i) is the acceleration, or second derivative of x , at step i , and \Delta t is the size of each time step.[src] These equations can be expressed in a form that gives velocity at integer steps as well: \begin{align} x_{i+1} &= x_i + v_i\, \Delta t + \tfrac{1}{2}\,a_i\, \Delta t^{\,2}, \\ v_{i+1} &= v_i + \tfrac{1}{2}(a_i + a_{i+1})\,\Delta t.[src] \end{align} However, in this synchronized form, the time-step \Delta t must be constant to maintain stability.[src] The synchronised form can be re-arranged to the 'kick-drift-kick' form; \begin{align} v_{i+1/2} &= v_i + \tfrac{1}{2} a_i \Delta t, \\[2pt] x_{i+1} &= x_i +v_{i+1/2} \Delta t,\\[2pt] v_{i+1} &= v_{i+1/2} + \tfrac{1}{2} a_{i+1} \Delta t, \end{align} which is primarily used where variable time-steps are required.[src] The separation of the acceleration calculation onto the beginning and end of a step means that if time resolution is increased by a factor of two ( \Delta t \rightarrow \Delta t/2 ), then only one extra (computationally expensive) acceleration calculation is required.[src] One use of this equation is in Newtonian gravity simulations, since in that case the acceleration depends only on the positions of the gravitating masses (and not on their velocities).[src] There are two primary strengths to leapfrog integration when applied to mechanics problems.[src] The first is the time-reversibility of the Leapfrog method.[src] 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.[src] The second strength is its symplectic nature, which implies that it conserves the (slightly modified; see symplectic integrator) energy of a Hamiltonian dynamical system.[src] 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.[src] 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.[src] ==Yoshida algorithms== The leapfrog integrator can be converted into higher order integrators using techniques due to Haruo Yoshida.[src] In this approach, the leapfrog is applied over a number of different timesteps.[src] It turns out that when the correct timesteps are used in sequence, the errors cancel and far higher order integrators can be easily produced.[src] ===4th order Yoshida integrator=== One step under the 4th order Yoshida integrator requires four intermediary steps.[src] The position and velocity are computed at different times.[src] Only three (computationally expensive) acceleration calculations are required.[src] The equations for the 4th order integrator to update position and velocity are \begin{align} x_i^1 &= x_i + c_1\, v_i\, \Delta t, & v_i^1 &= v_i + d_1\, a(x_i^1)\, \Delta t, \\ x_i^2 &= x_i^1 + c_2\, v_i^1\, \Delta t, & v_i^2 &= v_i^1 + d_2\, a(x_i^2)\, \Delta t, \\ x_i^3 &= x_i^2 + c_3\, v_i^2\, \Delta t, & v_i^3 &= v_i^2 + d_3\, a(x_i^3)\, \Delta t, \\ x_{i+1} &\equiv x_i^4 = x_i^3 + c_4\, v_i^3\, \Delta t, & v_{i+1} &\equiv v_i^4 = v_i^3 \\ \end{align} where x_i, v_i are the starting position and velocity, x_i^n, v_i^n are intermediary position and velocity at intermediary step n , a(x_i^n) is the acceleration at the position x_i^n , and x_{i+1},v_{i+1} are the final position and velocity under one 4th order Yoshida step.[src] Coefficients (c_1, c_2, c_3, c_4) and (d_1, d_2, d_3) are derived in (see the equation (4.6)) \begin{align} w_0 &\equiv - \frac{\sqrt[3]{2}}{2-\sqrt[3]{2}}, & w_1 &\equiv \frac{1}{2-\sqrt[3]{2}}, \\[1ex] c_1 &= c_4 \equiv \frac{w_1}{2}, & c_2 = c_3 &\equiv \frac{w_0+w_1}{2}, \\[1ex] d_1 &= d_3 \equiv w_1, & d_2 &\equiv w_0 \\ \end{align} All intermediary steps form one \Delta t step which implies that coefficients sum up to one: \sum_{i=1}^{4} c_i = 1 and \sum_{i=1}^{3} d_i = 1 .[src] Note that position and velocity are computed at different times and some intermediary steps are backwards in time.[src] To illustrate this, we give the numerical values of c_n coefficients: c_1=0.6756 , c_2=-0.1756 , c_3 = -0.1756 , c_4 = 0.6756.[src] ==See also== Numerical methods for ordinary differential equations Symplectic integration Euler integration Verlet integration Runge–Kutta integration ==References== ==External links== , Drexel University Physics[src]
37 sentences · 37 cited inline · 0 references stored
References
No reference rows published for this article.
Cite this article
MLA
"Leapfrog integration." encyclopegia.org, 2025, https://encyclopegia.org/wiki/leapfrog-integration. Accessed 04 December 2026.
Chicago
"Leapfrog integration." encyclopegia.org. Accessed December 4, 2026. https://encyclopegia.org/wiki/leapfrog-integration.
APA
encyclopegia.org. (2025). Leapfrog integration. Retrieved December 4, 2026, from https://encyclopegia.org/wiki/leapfrog-integration
Accessed December 4, 2026 · CC BY-SA 4.0 · citation page · JSON