Mathematical Methods for Physics and Engineering : A Comprehensive Guide

(lu) #1

NUMERICAL METHODS


Steps (ii) and (iii) can be iterated to improve further the approximation to the


average value ofdy/dx, but this will not compensate for the omission of higher-


order derivatives in the forward difference formula.


Many more complex schemes of prediction and correction, in most cases

combining the two in the same process, have been devised, but the reader is


referred to more specialist texts for discussions of them. However, because it


offers some clear advantages, one group of methods will be set out explicitly in


the next subsection. This is the general class of schemes known as Runge–Kutta


methods.


27.6.4 Runge–Kutta methods

The Runge–Kutta method of integrating


dy
dx

=f(x, y) (27.74)

is a step-by-step process of obtaining an approximation foryi+1by starting from


the value ofyi. Among its advantages are that no functions other thanfare used,


no subsidiary differentiation is needed and no additional starting values need be


calculated.


To be set against these advantages is the fact thatfis evaluated using somewhat

complicated arguments and that this has to be done several times for each increase


in the value ofi. However, once a procedure has been established, for example


on a computer, the method usually gives good results.


The basis of the method is to simulate the (accurate) Taylor series fory(xi+h),

not by calculating all the higher derivatives ofyat the pointxibut by taking


a particular combination of the values of the first derivative ofyevaluated at


a number of carefully chosen points. Equation (27.74) is used to evaluate these


derivatives. The accuracy can be made to be up to whatever power ofhis desired,


but, naturally, the greater the accuracy, the more complex the calculation, and,


in any case, rounding errors cannot ultimately be avoided.


The setting up of the calculational scheme may be illustrated by considering

the particular case in which second-order accuracy inhis required. To second


order, the Taylor expansion is


yi+1=yi+hfi+

h^2
2

(
df
dx

)

xi

, (27.75)

where
(
df
dx


)

xi

=

(
∂f
∂x

+f

∂f
∂y

)

xi


∂fi
∂x

+fi

∂fi
∂y

,

the last step being merely the definition of an abbreviated notation.

Free download pdf