Mathematical Methods for Physics and Engineering : A Comprehensive Guide

(Darren Dugan) #1

NUMERICAL METHODS


(b) Substitute them into the predictor equation and, by making that expression
for ̄yn+1coincide with the true Taylor series foryn+1up to orderh^3 , establish
simultaneous equations that determine the values ofa 1 ,a 2 anda 3.
(c) Find the Taylor series forfn+1and substitute it and that forfn− 1 into the
corrector equation. Make the corrected prediction foryn+1coincide with the
true Taylor series by choosing the weightsb 1 ,b 2 andb 3 appropriately.
(d) The values of the numerical solution of the differential equation

dy
dx

=


2(1 +x)y+x^3 /^2
2 x(1 +x)
at three values ofxare given in the following table:

x 0.1 0.2 0.3
y(x) 0.030 628 0.084 107 0.150 328

Use the above predictor–corrector scheme to find the value ofy(0.4) and
compare your answer with the accurate value, 0.225 577.

27.18 Ifdy/dx=f(x, y) then show that


d^2 f
dx^2

=


∂^2 f
∂x^2

+2f

∂^2 f
∂x∂y

+f^2

∂^2 f
∂y^2

+


∂f
∂x

∂f
∂y

+f

(


∂f
∂y

) 2


.


Hence verify, by substitution and the subsequent expansion of arguments in
Taylor series of their own, that the scheme given in (27.79) coincides with the
Taylor expansion (27.68), i.e.

yi+1=yi+hy(1)i +

h^2
2!

y(2)i +

h^3
3!

y(3)i +···,

up to terms inh^3.
27.19 To solve the ordinary differential equation


du
dt

=f(u, t)

forf=f(t), the explicit two-step finite difference scheme
un+1=αun+βun− 1 +h(μfn+νfn− 1 )

may be used. Here, in the usual notation,his the time step,tn=nh,un=u(tn)
andfn=f(un,tn);α,β,μ,andνare constants.

(a) A particular scheme hasα=1,β=0,μ=3/2andν=− 1 /2. By considering
Taylor expansions aboutt=tnfor bothun+jandfn+j, show that this scheme
gives errors of orderh^3.
(b) Find the values ofα,β,μandνthat will give the greatest accuracy.

27.20 Set up a finite difference scheme to solve the ordinary differential equation


x

d^2 φ
dx^2

+



dx

=0


in the range 1≤x≤4, subject to the boundary conditionsφ(1) = 2 and
dφ/dx=2atx=4.UsingNequal increments, ∆x,inx, obtain the general
difference equation and state how the boundary conditions are incorporated
into the scheme. Setting ∆xequal to the (crude) value 1, obtain the relevant
simultaneous equations and so obtain rough estimates forφ(2),φ(3) andφ(4).
Finally, solve the original equation analytically and compare your numerical
estimates with the accurate values.
Free download pdf