Verlet integration (French pronunciation: [vɛʁˈlɛ]) 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 by Jean Baptiste Delambre and has been rediscovered many times since then, most recently by Loup Verlet in the 1960s for use in molecular dynamics. It was also used by P. H. Cowell and A. C. C. Crommelin in 1909 to compute the orbit of Halley's Comet, and by Carl Størmer in 1907 to study the trajectories of electrical particles in a magnetic field (hence it is also called Størmer's method). The Verlet integrator provides good numerical stability, as well as other properties that are important in physical systems such as time reversibility and preservation of the symplectic form on phase space, at no significant additional computational cost over the simple Euler method.
Basic Størmer–Verlet For a second-order differential equation of the type 𝐱¨(t)=𝐀(𝐱(t)) with initial conditions 𝐱(t0)=𝐱0 and 𝐱˙(t0)=𝐯0, an approximate numerical solution 𝐱n≈𝐱(tn) at the times tn=t0+nΔt with step size Δt>0 can be obtained by the following method:
set 𝐱1=𝐱0+𝐯0Δt+12𝐀(𝐱0)Δt2, for n = 1, 2, ... iterate 𝐱n+1=2𝐱n−𝐱n−1+𝐀(𝐱n)Δt2.
Equations of motion Newton's equation of motion for conservative physical systems is 𝑴𝐱¨(t)=F(𝐱(t))=−∇V(𝐱(t)), or individually mk𝐱¨k(t)=Fk(𝐱(t))=−∇𝐱kV(𝐱(t)), where
t is the time, 𝐱(t)=(𝐱1(t),…,𝐱N(t)) is the ensemble of the position vector of N objects, V is the scalar potential function, F is the negative gradient of the potential, giving the ensemble of forces on the particles, 𝑴 is the mass matrix, typically diagonal with blocks with mass mk for every particle. This equation, for various choices of the potential function V, can be used to describe the evolution of diverse physical systems, from the motion of interacting molecules to the orbit of the planets. After a transformation to bring the mass to the right side and forgetting the structure of multiple particles, the equation may be simplified to 𝐱¨(t)=𝐀(𝐱(t)) with some suitable vector-valued function 𝐀(𝐱) representing the position-dependent acceleration. Typically, an initial position 𝐱(0)=𝐱0 and an initial velocity 𝐯(0)=𝐱˙(0)=𝐯0 are also given.
Verlet integration (without velocities) To discretize and numerically solve this initial value problem, a time step Δt>0 is chosen, and the sampling-point sequence tn=nΔt considered. The task is to construct a sequence of points 𝐱n that closely follow the points 𝐱(tn) on the trajectory of the exact solution. Where Euler's method uses the forward difference approximation to the first derivative in differential equations of order one, Verlet integration can be seen as using the central difference approximation to the second derivative: Δ2𝐱nΔt2=𝐱n+1−𝐱nΔt−𝐱n−𝐱n−1ΔtΔt=𝐱n+1−2𝐱n+𝐱n−1Δt2=𝐚n=𝐀(𝐱n). Verlet integration in the form used as the Størmer method uses this equation to obtain the next position vector from the previous two without using the velocity as 𝐱n+1=2𝐱n−𝐱n−1+𝐚nΔt2,𝐚n=𝐀(𝐱n).
Discretisation error The time symmetry inherent in the method reduces the level of local errors introduced into the integration by the discretization by removing all odd-degree terms, here the terms in Δt of degree three. The local error is quantified by inserting the exact values 𝐱(tn−1),𝐱(tn),𝐱(tn+1) into the iteration and computing the Taylor expansions at time t=tn of the position vector 𝐱(t±Δt) in different time directions: 𝐱(t+Δt)=𝐱(t)+𝐯(t)Δt+𝐚(t)Δt22+𝐛(t)Δt36+𝒪(Δt4)𝐱(t−Δt)=𝐱(t)−𝐯(t)Δt+𝐚(t)Δt22−𝐛(t)Δt36+𝒪(Δt4), where 𝐱 is the position, 𝐯=𝐱˙ the velocity, 𝐚=𝐱¨ the acceleration, and 𝐛=𝐚˙=𝐱… the jerk (third derivative of the position with respect to the time). Adding these two expansions gives 𝐱(t+Δt)=2𝐱(t)−𝐱(t−Δt)+𝐚(t)Δt2+𝒪(Δt4). We can see that the first- and third-order terms from the Taylor expansion cancel out, thus making the Verlet integrator an order more accurate than integration by simple Taylor expansion alone. Caution should be applied to the fact that the acceleration here is computed from the exact solution, 𝐚(t)=𝐀(𝐱(t)), whereas in the iteration it is computed at the central iteration point, 𝐚n=𝐀(𝐱n). In computing the global error, that is the distance between exact solution and approximation sequence, those two terms do not cancel exactly, influencing the order of the global error.
A simple example To gain insight into the relation of local and global errors, it is helpful to examine simple examples where the exact solution, as well as the approximate solution, can be expressed in explicit formulas. The standard example for this task is the exponential function. Consider the linear differential equation x¨(t)=w2x(t) with a constant w. Its exact basis solutions are ewt and e−wt. The Størmer method applied to this differential equation leads to a linear recurrence relation xn+1−2xn+xn−1=h2w2xn, or xn+1−2(1+12(wh)2)xn+xn−1=0. It can be solved by finding the roots of its characteristic polynomial q2−2(1+12(wh)2)q+1=0. These are q±=1+12(wh)2±wh1+14(wh)2. The basis solutions of the linear recurrence are xn=q+n and xn=q−n. To compare them with the exact solutions, Taylor expansions are computed: q+=1+12(wh)2+wh(1+18(wh)2−3128(wh)4+𝒪(h6))=1+(wh)+12(wh)2+18(wh)3−3128(wh)5+𝒪(h7). The quotient of this series with the exponential ewh starts with 1−124(wh)3+𝒪(h5), so q+=(1−124(wh)3+𝒪(h5))ewh=e−124(wh)3+𝒪(h5)ewh. From there it follows that for the first basis solution the error can be computed as xn=q+n=e−124(wh)2wtn+𝒪(h4)ewtn=ewtn(1−124(wh)2wtn+𝒪(h4))=ewtn+𝒪(h2tnewtn). That is, although the local discretization error is of order 4, due to the second order of the differential equation the global error is of order 2, with a constant that grows exponentially in time.
… excerpt ends here. Continue reading the full article.