Computational Physics

(Rick Simeone) #1
A7 Differential equations 573

we may reformulate the Verlet algorithm in theleap-frogform:


v(h/ 2 )=v(−h/ 2 )+hF[x( 0 ),0] (A.46a)
x(h)=x( 0 )+hv(h/ 2 ). (A.46b)

Note that this form is exactly equivalent to the Verlet form, so the error in the
positions is stillO(h^4 ). This form is less sensitive to errors resulting from finite
precision arithmetic in the computer than the Verlet form(A.42).
Note that the time step is not easily adapted in the Verlet/leap-frog algorithm.
This is, however, possible, either by changing the coefficients of the various terms
in the equation, or by reconstructing the starting values with the new time step by
interpolation.
Consider the Verlet solution for the harmonic oscillator ̈x=−Cx:


x(t+h)= 2 x(t)−x(t−h)−h^2 Cx(t). (A.47)

The analytic solution to this algorithm (not the exact solution to the continuum
differential equation) can be written in the formx(t)=exp(iωt), withωsatisfying


2 −2 cos(ωh)=h^2 C. (A.48)

Ifh^2 C>4,ωbecomes imaginary, and the analytical solution becomes unstable.
Of course we would not takehthat large in actual applications, as we always take
it substantially smaller than the period of the continuum solution. It is, however,
useful to be aware of this instability, especially when integrating systems of second
order differential equations, which reduce to a set of coupled harmonic equations
close to the stationary solutions. High-frequency degrees of variables are then often
easily overlooked.


Numerov’s method

This is an efficient method for solving equations of the type


̈x(t)=f(t)x(t) (A.49)

ofwhichthestationarySchrödingerequationisanexample[ 10 ].Numerov’s method
makes use of the special structure of this equation in order to have the fourth
order contribution tox(h)cancel, leading to a form similar to the Verlet algorithm,
but accurate to orderh^6 (only even orders ofhoccur because of time-reversal
symmetry). The Verlet algorithm (see above) was derived by expandingx(t)up to
second order aroundt=0 and adding the resulting expression fort=hand for
t=−h. If we do the same forEq. (A.49)but now expandx(t)to order six int,we

Free download pdf