In numerical analysis, leapfrog integration is a method for numerically integrating differential equations of the form
x ¨ = d 2 x d t 2 = A ( x ) , {\displaystyle {\ddot {x}}={\frac {d^{2}x}{dt^{2}}}=A(x),}
or equivalently of the form
v ˙ = d v d t = A ( x ) , x ˙ = d x d t = v , {\displaystyle {\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.
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 x ( t ) {\displaystyle x(t)} and velocities v ( t ) = x ˙ ( t ) {\displaystyle v(t)={\dot {x}}(t)} at different interleaved time points, staggered in such a way that they "leapfrog" over each other. 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 Δ t {\displaystyle \Delta t} is constant, and Δ t < 2 / ω {\displaystyle \Delta t<2/\omega } . Using Yoshida coefficients, applying the leapfrog integrator multiple times with the correct timesteps, a much higher order integrator can be generated.
Algorithm In leapfrog integration, the equations for updating position and velocity are
a i = A ( x i ) , v i + 1 / 2 = v i − 1 / 2 + a i Δ t , x i + 1 = x i + v i + 1 / 2 Δ t , {\displaystyle {\begin{aligned}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{aligned}}}
where x i {\displaystyle x_{i}} is position at step i {\displaystyle i} , v i + 1 / 2 {\displaystyle v_{i+1/2\,}} is the velocity, or first derivative of x {\displaystyle x} , at step i + 1 / 2 {\displaystyle i+1/2\,} , a i = A ( x i ) {\displaystyle a_{i}=A(x_{i})} is the acceleration, or second derivative of x {\displaystyle x} , at step i {\displaystyle i} , and Δ t {\displaystyle \Delta t} is the size of each time step. These equations can be expressed in a form that gives velocity at integer steps as well:
… excerpt ends here. Continue reading the full article.


