Mathematical Methods for Physics and Engineering : A Comprehensive Guide

(lu) #1

NUMERICAL METHODS


xy(estim.) y(exact)
0 1.0000 1.0000
0.1 1.2346 1.2346
0.2 1.5619 1.5625
0.3 2.0331 2.0408
0.4 2.7254 2.7778
0.5 3.7500 4.0000

Table 27.12 The solutionof differential equation(27.71) using a Taylor series.

Find the numerical solution of the equation
dy
dx

=2y^3 /^2 ,y(0) = 1, (27.71)

forx=0. 1 to 0. 5 in steps of 0. 1. Compare it with the exact solution obtained analytically.

Since the right-hand side of the equation does not containxexplicitly, (27.70) is greatly
simplified and the calculation becomes a repeated application of


y(in+1)=

∂y(n)
∂y

dy
dx

=f

∂y(n)
∂y

.


The necessary derivatives and their values atx=0,wherey= 1, are given below:


y(0) = 1 1

y′=2y^3 /^22
y′′=(3/2)(2y^1 /^2 )(2y^3 /^2 )=6y^26

y(3)=(12y)2y^3 /^2 =24y^5 /^224

y(4)=(60y^3 /^2 )2y^3 /^2 = 120y^3120
y(5)= (360y^2 )2y^3 /^2 = 720y^7 /^2720

Thus the Taylor expansion of the solution about the origin (in fact a Maclaurin series) is


y(x)=1+2x+

6


2!


x^2 +

24


3!


x^3 +

120


4!


x^4 +

720


5!


x^5 +···.

Hence,y(estim.) = 1 + 2x+3x^2 +4x^3 +5x^4 +6x^5. Values calculated from this are given
in table 27.12. Comparison with the exact valuesshows that using the first six terms gives
a value that is correct to one part in 100, up tox=0.3.


27.6.3 Prediction and correction

An improvement in the accuracy obtainable using difference methods is possible


if steps are taken, sometimes retrospectively, to allow for inaccuracies in approx-


imating derivatives by differences. We will describe only the simplest schemes of


this kind and begin with apredictionmethod, usually called theAdams method.

Free download pdf