Computational Physics

(Rick Simeone) #1

574 Appendix A


obtain


x(h)+x(−h)− 2 x( 0 )=h^2 f( 0 )x( 0 )+

h^4
12

x(^4 )( 0 )+

h^6
360

x(^6 )( 0 )+O(h^8 )

(A.50)

withx(^4 )being the fourth andx(^6 )the sixth derivative ofxwith respect tot.As
these derivatives are not known, this formula is not useful as such. However, we
can evaluate the fourth derivative as the discrete second derivative of the second
derivative ofx(t)taken att=0. Using the differential equation (A.49) we then
obtain


x(^4 )( 0 )=

x(h)f(h)+x(−h)f(−h)− 2 x( 0 )f( 0 )
h^2

, (A.51)


and then, after switching to another variablew(t) =[ 1 −(h^2 / 12 )f(t)]x(t),
Eq. (A.50) becomes


w(h)+w(−h)− 2 w( 0 )=h^2 f( 0 )x( 0 )+O(h^6 ). (A.52)

Now we see that, using a second order integration scheme forw(i.e. using only two
values of the solution to predict the next one),x(h)is known to orderh^6. Whenever
x(t)is required, it can be calculated asx(t)=[ 1 −(h^2 / 12 )f(t)]−^1 w(t). Note that
the integration error over a fixed interval scales ash^4 , that is, two orders less than
the single-step error – see the analysis in Problem A.3.
The implementation of the initial conditions is not straightforward: when not dealt
with carefully enough, we might obtain errors which at the end of the integration
interval scale worse thanO(h^4 ). Usually the initial valuex( 0 )and the derivative
x ̇( 0 )are known. From these, we need to predict the value atx(h)with an accuracy of
at leastO(h^6 ). This can be done by first subtracting the Taylor expansions forx(h)
andx(−h)rather than adding them as was done in the derivation of the Numerov
algorithm. The result is


2 h ̇x( 0 )=[ 1 −h^2 f(h)/ 6 ]x(h)−[ 1 −h^2 f(−h)/ 6 ]x(−h)+O(h^5 ). (A.53)

The derivative ̇x( 0 )is known: together with the Numerov algorithm, we have two
equations forx(h)andx(−h). Eliminating the latter, we are left with


x(h)=
[ 2 + 5 h^2 f( 0 )/ 6 ][ 1 −h^2 f(−h)/ 12 ]x( 0 )+ 2 hx ̇( 0 )[ 1 −h^2 f(−h)/ 6 ]
[ 1 −h^2 f(h)/ 12 ][ 1 −h^2 f(−h)/ 6 ]+[ 1 −h^2 f(−h)/ 12 ][ 1 −h^2 f(h)/ 6 ]

.


(A.54)


Starting withx( 0 )andx(h), the Numerov algorithm can be applied straightfor-
wardly.
MoredetailsaboutthismethodanditsapplicationscanbefoundinRef.[ 11 ].

Free download pdf