Mathematical Methods for Physics and Engineering : A Comprehensive Guide

(lu) #1

NUMERICAL METHODS


xy(estim.) y(exact)
− 0 .5 (1.648) —
0 (1.000) (1.000)
0 .5 0.648 0.607
1 .0 0.352 0.368
1 .5 0.296 0.223
2 .0 0.056 0.135
2 .5 0.240 0.082
3. 0 − 0. 184 0.050

Table 27.11 The solution of differential equation (27.61) using the Milne
central difference method withh=0.5 and accurate starting values.

more accurate, but of course still approximate, central difference. A more accurate


method based on central differences (Milne’s method) gives the recurrence relation


yi+1=yi− 1 +2h

(
dy
dx

)

i

(27.64)

in general and, in this particular case,


yi+1=yi− 1 − 2 hyi. (27.65)

An additional difficulty now arises, since two initial values ofyare needed.

The second must be estimated by other means (e.g. by using a Taylor series,


as discussed later), but for illustration purposes we will take the accurate value,


y(−h)=exph, as the value ofy− 1 .Ifhis taken as, say, 0.5 and (27.65) is applied


repeatedly, then the results shown in table 27.11 are obtained.


Although some improvement in the early values of the calculatedy(x)is

noticeable, as compared with the corresponding (h=0.5) column of table 27.10,


this scheme soon runs into difficulties, as is obvious from the last two rows of the


table.


Some part of this poor performance is not really attributable to the approxi-

mations made in estimatingdy/dxbut to the form of the equation itself and


hence of its solution.Anyrounding error occurring in the evaluation effectively


introduces intoysome contamination by the solution of


dy
dx

=+y.

This equation has the solutiony(x)=expxand so grows without limit; ultimately


it will dominate the sought-for solution and thus render the calculations totally


inaccurate.


We have only illustrated, rather than analysed, some of the difficulties associated

with simple finite-difference iteration schemes for first-order differential equations,

Free download pdf