Mathematical Methods for Physics and Engineering : A Comprehensive Guide

(lu) #1

NUMERICAL METHODS


These can then be treated in the way indicated in the previous paragraph. The


extension to more than one dependent variable is straightforward.


In practical problems it often happens that boundary conditions applicable

to a higher-order equation consist not of the values of the function and all its


derivatives at one particular point but of, say, the values of the function at two


separate end-points. In these cases a solution cannot be found using an explicit


step-by-step ‘marching’ scheme, in which the solutions at successive values of the


independent variable are calculated using solution values previously found. Other


methods have to be tried.


One obvious method is to treat the problem as a ‘marching one’, but to use a

number of (intelligently guessed) initial values for the derivatives at the starting


point. The aim is then to find, by interpolation or some other form of iteration,


those starting values for the derivatives that will produce the given value of the


function at the finishing point.


In some cases the problem can be reduced by a differencing scheme to a matrix

equation. Such a case is that of a second-order equation fory(x) with constant


coefficients and given values ofyat the two end-points. Consider the second-order


equation


y′′+2ky′+μy=f(x), (27.85)

with the boundary conditions


y(0) =A, y(1) =B.

If (27.85) is replaced by a central difference equation,


yi+1− 2 yi+yi− 1
h^2

+2k

yi+1−yi− 1
2 h

+μyi=f(xi),

we obtain from it the recurrence relation


(1 +kh)yi+1+(μh^2 −2)yi+(1−kh)yi− 1 =h^2 f(xi).

Forh=1/(N−1) this is in exactly the form of theN×Ntridiagonal matrix


equation (27.30), with


b 1 =bN=1,c 1 =aN=0,

ai=1−kh, bi=μh^2 − 2 ,ci=1+kh, i=2, 3 ,...,N− 1 ,

andy 1 replaced byA,yNbyBandyibyh^2 f(xi)fori=2, 3 ,...,N−1. The


solutions can be obtained as in (27.31) and (27.32).


27.8 Partial differential equations

The extension of previous methods to partial differential equations, thus involving


two or more independent variables, proceeds in a more or less obvious way. Rather

Free download pdf