HOME

TheInfoList



OR:

In
numerical analysis Numerical analysis is the study of algorithms that use numerical approximation (as opposed to symbolic computation, symbolic manipulations) for the problems of mathematical analysis (as distinguished from discrete mathematics). It is the study of ...
, leapfrog integration is a
method Method ( grc, μέθοδος, methodos) literally means a pursuit of knowledge, investigation, mode of prosecuting such inquiry, or system. In recent centuries it more often means a prescribed process for completing a task. It may refer to: *Scien ...
for numerically integrating
differential equation In mathematics, a differential equation is an equation that relates one or more unknown functions and their derivatives. In applications, the functions generally represent physical quantities, the derivatives represent their rates of change, an ...
s of the form \ddot x = \frac = A(x), or equivalently of the form \dot v = \frac = A(x), \;\dot x = \frac = v, particularly in the case of a
dynamical system In mathematics, a dynamical system is a system in which a Function (mathematics), function describes the time dependence of a Point (geometry), point in an ambient space. Examples include the mathematical models that describe the swinging of a ...
of
classical mechanics Classical mechanics is a physical theory describing the motion of macroscopic objects, from projectiles to parts of machinery, and astronomical objects, such as spacecraft, planets, stars, and galaxies. For objects governed by classical ...
. 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 Verlet integration () is a numerical method used to integrate Newton's equations of motion. It is frequently used to calculate trajectories of particles in molecular dynamics simulations and computer graphics. The algorithm was first used in 1791 ...
. Leapfrog integration is equivalent to updating positions x(t) and velocities v(t)=\dot x(t) at interleaved time points, staggered in such a way that they "
leapfrog Leapfrog is a children's game in which players vault over each other's stooped backs. History Games of this sort have been called by this name since at least the late sixteenth century.Euler integration In mathematics and computational science, the Euler method (also called forward Euler method) is a first-order numerical analysis, numerical procedure for solving ordinary differential equations (ODEs) with a given Initial value problem, initia ...
, 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 \Delta t is constant, and \Delta t \leq 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 :\begin a_i &= A(x_i), \\ v_ &= v_ + a_\, \Delta t, \\ x_ &= x_ + v_\, \Delta t, \end where x_i is position at step i, v_ is the velocity, or first derivative of x, at step i+1/2\,, a_=A(x_i) is the acceleration, or second derivative of x, at step i, and \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: :\begin x_ &= x_i + v_i\, \Delta t + \tfrac\,a_i\, \Delta t^, \\ v_ &= v_i + \tfrac(a_i + a_)\,\Delta t. \end However, in this synchronized form, the time-step \Delta t must be constant to maintain stability. The synchronised form can be re-arranged to the 'kick-drift-kick' form; :\begin v_ &= v_i + a_i \frac, \\ x_ &= x_i +v_\Delta t,\\ v_ &= v_ + a_ \frac, \end which is primarily used where variable time-steps are required. 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. 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 In numerical analysis, the Runge–Kutta methods ( ) are a family of implicit and explicit iterative methods, which include the Euler method, used in temporal discretization for the approximate solutions of simultaneous nonlinear equations. The ...
) are more frequently used. There are two primary strengths to leapfrog integration when applied to mechanics problems. The first is the
time-reversibility A mathematical or physical process is time-reversible if the dynamics of the process remain well-defined when the sequence of time-states is reversed. A deterministic process is time-reversible if the time-reversed process satisfies the same dyn ...
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 is its symplectic nature, which sometimes allows for the conservation of a (slightly modified) energy of a dynamical system (only true for certain simple 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 In mathematics, a symplectic integrator (SI) is a numerical integration scheme for Hamiltonian systems. Symplectic integrators form the subclass of geometric integrators which, by definition, are canonical transformations. They are widely used in n ...
, leapfrog integration is also used in
Hamiltonian Monte Carlo The Hamiltonian Monte Carlo algorithm (originally known as hybrid Monte Carlo) is a Markov chain Monte Carlo method for obtaining a sequence of random samples which converge to being distributed according to a target probability distribution for whi ...
, a method for drawing random samples from a probability distribution whose overall normalization is unknown.


Yoshida algorithms

The leapfrog integrator can be converted into higher order integrators using techniques due to
Haruo Yoshida Haruo (written: 春雄, 春生, 春男, 春夫, 晴生, 晴男, 晴夫, 暎夫, 治夫 or 治夫) is a masculine Japanese given name. Notable people with the name include: *, Japanese footballer *, Japanese chemist *, Japanese film director *, Jap ...
. In this approach, the leapfrog is applied over a number of different timesteps. It turns out that when the correct timesteps are used in sequence, the errors cancel and far higher order integrators can be easily produced.Haruo Yoshida (National Astronomical Observatory, Mitaka, Tokyo), Construction of higher order symplectic integrators, PHYSICS LETTERS A 12, Volume 150, number 5,6,7, November 1990.


4th order Yoshida integrator

One step under the 4th order Yoshida integrator requires four intermediary steps. The position and velocity are computed at different times. Only three (computationally expensive) acceleration calculations are required. The equations for the 4th order integrator to update position and velocity are :\begin 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_ &\equiv x_i^4 = x_i^3 + c_4\, v_i^3\, \Delta t, \\ v_ &\equiv v_i^4 = v_i^3 \\ \end 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_,v_ are the final position and velocity under one 4th order Yoshida step. 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 w_0 &\equiv - \frac, \\ w_1 &\equiv \frac, \\ c_1 &= c_4 \equiv \frac, c_2 = c_3 \equiv \frac, \\ d_1 &= d_3 \equiv w_1, d_2 \equiv w_0 \\ \end All intermediary steps form one \Delta t step which implies that coefficients sum up to one: \sum_^ c_i = 1 and \sum_^ d_i = 1. Please note that position and velocity are computed at different times and some intermediary steps are backwards in time. To illustrate this, we give the numerical values of c_ coefficients: c_1=0.6756, c_2=-0.1756, c_3=-0.1756, c_4=0.6756.


See also

*
Numerical methods for ordinary differential equations Numerical methods for ordinary differential equations are methods used to find numerical approximations to the solutions of ordinary differential equations (ODEs). Their use is also known as "numerical integration", although this term can also ...
* Symplectic integration *
Euler integration In mathematics and computational science, the Euler method (also called forward Euler method) is a first-order numerical analysis, numerical procedure for solving ordinary differential equations (ODEs) with a given Initial value problem, initia ...
*
Verlet integration Verlet integration () is a numerical method used to integrate Newton's equations of motion. It is frequently used to calculate trajectories of particles in molecular dynamics simulations and computer graphics. The algorithm was first used in 1791 ...
* Runge–Kutta integration


References


External links



Drexel University Physics {{Numerical integrators Numerical differential equations