Mathematical Methods for Physics and Engineering : A Comprehensive Guide

(lu) #1

NUMERICAL METHODS


derivatives beyond a particular one will vanish and there is no error in taking


the differences to obtain the derivatives.


The following is copied from the tabulation of a second-degree polynomialf(x)at values
ofxfrom 1 to 12 inclusive:
2 , 2 ,?, 8 , 14 , 22 , 32 , 46 ,?, 74 , 92 , 112.
The entries marked?were illegible and in addition one error was made in transcription.
Complete and correct the table. Would your procedure have worked if the copying error
had been inf(6)?

Write out the entries again in row (a) below, and where possible calculate first differences
in row (b) and second differences in row (c). Denote thejth entry in row (n)by(n)j.


(a) 2 2? 8 14 22 32 46? 74 92 112
(b) 0?? 6 8 10 14?? 18 20
(c) ???224???2


Because the polynomial is second-degree, the second differences (c)j, which are proportional
tod^2 f/dx^2 , should be constant, and clearly the constant should be 2. That is, (c) 6 should
equal 2 and (b) 7 should equal 12 (not 14). Since all the (c)j= 2, we can conclude that
(b) 2 =2,(b) 3 =4,(b) 8 = 14, and (b) 9 = 16. Working these changes back to row (a) shows
that (a) 3 =4,(a) 8 = 44 (not 46), and (a) 9 = 58.
The entries therefore should read


(a) 2, 2 , 4 , 8 , 14 , 22 , 32 , 44 , 58 , 74 , 92 , 112 ,

where the amended entries are shown in bold type.
It is easily verified that if the error were inf(6) no two computable entries in row (c)
would be equal, and it would not be clear what the correct common entry should be.
Nevertheless, trial and error might arrive at a self-consistent scheme.


27.6 Differential equations

For the remaining sections of this chapter our attention will be on the solution


of differential equations by numerical methods. Some of the general difficulties


of applying numerical methods to differential equations will be all too apparent.


Initially we consider only the simplest kind of equation – one of first order,


typically represented by


dy
dx

=f(x, y), (27.60)

whereyis taken as the dependent variable andxthe independent one. If this


equation can be solved analytically then that is the best course to adopt. But


sometimes it is not possible to do so and a numerical approach becomes the


only one available. In fact, most of the examples that we will use can be solved


easily by an explicit integration, but, for the purposes of illustration, this is an


advantage rather than the reverse since useful comparisons can then be made


between the numerically derived solution and the exact one.

Free download pdf