Mathematical Methods for Physics and Engineering : A Comprehensive Guide

(Darren Dugan) #1

27.6 DIFFERENTIAL EQUATIONS


The forward difference estimate ofyi+1, namely

yi+1=yi+h

(
dy
dx

)

i

=yi+hf(xi,yi), (27.72)

would give exact results ifywere a linear function ofxin the rangexi≤x≤xi+h.


The idea behind the Adams method is to allow some relaxation of this and


suppose thatycan be adequately approximated by a parabola over the interval


xi− 1 ≤x≤xi+1. In the same interval,dy/dxcan then be approximated by a linear


function:


f(x, y)=

dy
dx

≈a+b(x−xi)forxi−h≤x≤xi+h.

The values ofaandbare fixed by the calculated values offatxi− 1 andxi,which


we may denote byfi− 1 andfi:


a=fi,b=

fi−fi− 1
h

.

Thus


yi+1−yi≈

∫xi+h

xi

[
fi+

(fi−fi− 1 )
h

(x−xi)

]
dx,

which yields


yi+1=yi+hfi+^12 h(fi−fi− 1 ). (27.73)

The last term of this expression is seen to be a correction to result (27.72). That


it is, in some sense, the second-order correction,


1
2 h

(^2) y(2)
i− 1 / 2 ,
to a first-order formula is apparent.
Such a procedure requires, in addition to a value fory 0 , a value for eithery 1 or
y− 1 ,sothatf 1 orf− 1 can be used to initiate the iteration. This has to be obtained
by other methods, e.g. a Taylor series expansion.
Improvements to simple difference formulae can also be obtained by using
correctionmethods. In these, a rough prediction of the valueyi+1is made first,
and then this is used in a better formula, not originally usable since it, in turn,
requires a value ofyi+1for its evaluation. The value ofyi+1is then recalculated,
using this better formula.
Such a scheme based on the forward difference formula might be as follows:
(i) predictyi+1usingyi+1=yi+hfi;
(ii) calculatefi+1using this value;
(iii) recalculateyi+1usingyi+1=yi+h(fi+fi+1)/2. Here (fi+fi+1)/2has
replaced thefiused in (i), since it better represents the average value of
dy/dxin the intervalxi≤x≤xi+h.

Free download pdf