In numerical analysis, leapfrog integration is a method for numerically integrating differential equations of the form or equivalently of the form particularly in the case of a dynamical system of classical mechanics.

Comparison of Euler's and Leapfrog integration energy conserving properties for N bodies orbiting a point source mass. Same time-step used in both simulations.

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 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 is constant, and .[1]

Using Yoshida coefficients, applying the leapfrog integrator multiple times with the correct timesteps, a much higher order integrator can be generated.

Algorithm

edit

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 that gives velocity at integer steps as well:[2] However, in this synchronized form, the time-step must be constant to maintain stability.[3]

The synchronised form can be re-arranged to the 'kick-drift-kick' form; 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 (), then only one extra (computationally expensive) acceleration calculation is required.

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).

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 is its symplectic nature, which implies that it conserves the (slightly modified; see symplectic integrator) energy of a Hamiltonian dynamical system.[4] 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.[5]

Yoshida algorithms

edit

The leapfrog integrator can be converted into higher order integrators using techniques due to Haruo Yoshida. 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.[6][7]

4th order Yoshida integrator

edit

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

where are the starting position and velocity, are intermediary position and velocity at intermediary step , is the acceleration at the position , and are the final position and velocity under one 4th order Yoshida step.

Coefficients and are derived in [7] (see the equation (4.6))

All intermediary steps form one step which implies that coefficients sum up to one: and . 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 coefficients: , , ,

See also

edit

References

edit
  1. ^ C. K. Birdsall and A. B. Langdon, Plasma Physics via Computer Simulations, McGraw-Hill Book Company, 1985, p. 56.
  2. ^ "4.1 Two Ways to Write the Leapfrog". Archived from the original on 2023-04-03.
  3. ^ Skeel, R. D., "Variable Step Size Destabilizes the Stömer/Leapfrog/Verlet Method", BIT Numerical Mathematics, Vol. 33, 1993, p. 172–175.
  4. ^ Tuckerman, Mark E. (2010). Statistical Mechanics: Theory and Molecular Simulation (1 ed.). Oxford University Press. pp. 121–124. ISBN 9780198525264.
  5. ^ Bishop, Christopher (2006). Pattern Recognition and Machine Learning. New York: Springer-Verlag. pp. 548–554. ISBN 978-0-387-31073-2.
  6. ^ "./Ch07.HTML". Archived from the original on 2022-03-31. Retrieved 2017-12-21.
  7. ^ a b Yoshida, Haruo (1990). "Construction of higher order symplectic integrators". Physics Letters A. 150 (5–7): 262–268. doi:10.1016/0375-9601(90)90092-3.
edit

📚 Artikel Terkait di Wikipedia

Leapfrog

Leapfrog is a children's game of physical movement of the body in which players vault over each other's stooped backs. The term has also become a verb

Verlet integration

similar to the leapfrog method, except that the velocity and position are calculated at the same value of the time variable (leapfrog does not, as the

Numerical methods for ordinary differential equations

more past values. This yields a so-called multistep method. Perhaps the simplest is the leapfrog method which is second order and (roughly speaking) relies

Scientific method

The scientific method is an empirical method for acquiring knowledge through careful observation, rigorous skepticism, hypothesis testing, and experimental

Leapfrogging

Leapfrogging is a concept used in many domains of the economics and business fields, and was originally developed in the area of industrial organization

Discrete element method

integration methods used in a discrete element method are: the Verlet algorithm, velocity Verlet, symplectic integrators, the leapfrog method. The discrete

Particle-in-cell

require a smaller time step. In PIC simulation the leapfrog method is used, a second-order explicit method. Also the Boris algorithm is used which cancels

Midpoint method

Euler method in the determination of k {\displaystyle k} results again in the explicit midpoint method. Rectangle method Heun's method Leapfrog integration