Course: Numerical Solution of Ordinary Differential Equations Module 2: Multi-Step Methods
Course: Numerical Solution of Ordinary Differential Equations Module 2: Multi-Step Methods
Lecture
Content
Hours
Adams-Moulton method.
Module 2
Lecture 1
Consider I VP
y f(t,y);
t 0 t b with y(t 0 ) y 0
(2.1)
One step methods for solving IVP (2.1) are those methods in which the solution yj+1 at
the j+1th grid point involves only one previous grid point where the solution is already
known. Accordingly, a general one step method may be written as
y j+1=y j +h(t j ,y j ,h)
The increment function depends on solution yj at previous grid point tj and step size h.
If yj+1 can be determined simply by evaluating right hand side then the method is explicit
method. The methods developed in the module 1 are one step methods. These
methods might use additional functional evaluations at number of points between tj and
tj+1. These functional evaluations are not used in further computations at advanced grid
points. In these methods step size can be changed according to the requirement.
It may be reasonable to develop methods that use more information about the solution
(functional values and derivatives) at previously known values while computing solution
at the next grid point. Such methods using information at more than one previous grid
points are known as multi-step methods and are expected to give better results than
one step methods.
To determine solution yj+1, a multi-step method or k-step method uses values of y(t) and
f(t,y(t)) at k previous grid points tj-k, k=0,1,2,k-1,. yj is called the initial point while yj-k
are starting points. The starting points are computed using some suitable one step
method. Thus multi-step methods are not self starting methods.
Integrating (2.1) over an interval (tj-k, tj+1) yields
t j1
y j1 y j
t jk
t j1
f(t,y(t))dt y j
a t dt
t j k j 0
(2.2)
value of yj+1. The predictor-corrector methods form a large class of general methods for
numerical integration of ordinary differential equations. A popular predictor-corrector
scheme is known as the Milne-Simpson method.
Milne-Simpson method
Its predictor is based on integration of f (t, y(t)) over the interval [tj3, tj+1] with k=3 and
r=3. The interpolating polynomial is considered to match the function at three points tj2,
tj1, and tj and the function is extrapolated at both the ends in the interval [tj3, tj-2] and [tj,
tj+1] as shown in the Fig 2.2(a). Since the end points are not used, an open integration
formula is used for the integral in (2.2):
p j1 y j1 y j
4h
14
2f(t j ,y j ) f(t j1,y j1 ) 2f(t j2 ,y j2 ) h5 f (4) (); in(t j3 ,t j1 ) (2.3)
3
45
The explicit predictor formula is of O(h4) and requires starting values. These starting
values should also be of same order of accuracy. Accordingly, if the initial point is y0
then the starting values y1, y2 and y3 are computed by fourth order Runge kutta method.
Then predictor formula (2.3) predicts the approximate solution y4 as p4 at next grid point.
The predictor formula (2.3) is found to be unstable (proof not included) and the solution
so obtained may grow exponentially.
The predicted value is then improved using a corrector formula. The corrector formula is
developed similarly. For this, a second polynomial for f (t, y(t)) is constructed, which is
based on the points (tj1, fj1), (tj, fj) and the predicted point (tj+1, fj+1). The closed
integration of the interpolating polynomial over the interval [tj, tj+1] is carried out [See Fig
2.2 (b)]. The result is the familiar Simpsons rule:
y j1 y j
h
1 5 ( 4)
f(t j1,y j1 ) 4f(t j ,y j ) f(t j1,y j1 )
h f ( ); in(t j1,t j1 )
3
90
fj-1
(2.4)
fj-3
fj-2
fj-k
tj-k
fj
fj+1
tj-3
tj
tj+1
tj-1
x
x
xj-1
t
tj-3
(a)
tj-2 tj-1
tj
tj+1
t
tj-3
tj-1 tj-1
tj+1
tj
(b)
Fig 2.2 (a) Open Scheme for Predictor (b) Closed integration for Corrector
In the corrector formula fj+1 is computed from the predicted value pj+1 as obtained from
(2.3).
Denoting f j f(t j , y j ) , the equations (2.3) and (2.4) gives the following predictor corrector
formulae, respectively, for solving IVP (2.1) at equi-spaced discrete points t4,t5,
p j1 y j1 y j3
y j1 y j1
4h
2fj fj1 2fj2
3
(2.5)
h
fj1 4f j f j1
3
The solution at initial point t0 is given in the initial condition and t1, t2 and t3 are the
starting points where solution is to be computed using some other suitable method such
as Runge Kutta method. This is illustrated in the example 2.1
Example 2.1: Solve IVP y=y+3t-t2 with y(0)=1; using Milnes predictor corrector method
take h=0.1
Solution: The following table 2.1 computes Starting values using fourth order Runge
Kutta method.
k y k1= t+ y+
k2 y+
k3
t
f(t,y) h/2 h/2*k
h/2*k2
1
0 0
1
1 0.05 1.05 1.197 1.05987 1.2074
5
5
1 0.1 1.1203 1.410 0.15 1.190 0.222 1.13147 1.559
34
859
7
7
2 0.2 1.2338 1.793 0.25 1.323 0.321 1.24993 1.9374
84
533
8
1
3 0.2 1.3763
y+
t+h h*k3
k4
y+h(k1+2k
2+2k3+k4)
/6
0.1 1.1207 1.41074 1.1203415
0.2 1.2762 1.83624 1.2338409
0.3 1.4276 2.23758 1.3763387
Using initial value and starting values at t=0, 0.1, 0.2 and 0.3, the predictor formula
predicts the solution at t=0.4 as 1.7199359. It is used in corrector formula to give the
corrected value. The solution is continued at advanced grid points [see table 2.2].
MilnePredictorcorrector1
f(t,p)
k
t
y
f(t,y)
corrector
0
0
1
1
rk4
Milne pc exact
1
0.1 1.1203415 1.410341
2
0.2 1.2338409 1.793841 startingpoints
3
0.3 1.3763387 2.186339
4
0.4 1.7199359 2.759936 1.67714525 2.717145
5
0.5 2.0317593 3.281759 1.920894708 3.170895
Table 2.2: Example 2.1 using predictor corrector method with h=0.1
The exact solution is possible in this example; however it may not be possible for other
equations. Table 2.3 compares the solution with the exact solution of given equation.
Clearly the accuracy is better in predictor corrector method than the Runge-Kutta
method.
rk4
Milnepc exact
0.1 1.120341
1.120342
0.2 1.233841
1.282806
0.3 1.376339
1.489718
0.4
1.5452 1.6771453 1.743649
0.5
1.7369 1.9208947 2.047443
Table 2.3: Comparison of solution of example 2.1
Milne
Predictor
corrector1
f(t,p)
f(t,y)
0.05
1.055042
1.202542
starting point1
0.1
1.120342
1.410342
starting point2
0.15
1.196169
1.623669
starting point3
0.2
1.282805
1.842805
1.282805
1.842805
0.25
1.380551
2.068051
1.380551
2.068051
Table 2.4: Example 2.1 using predictor corrector method with h=0.05
The exercise 2.1 is repeated with h=0.5 in table 2.4.The table 2.5 clearly indicates that
the better accuracy is achieved with h=0.05 [see table 2.5]
0.05
1.055042
1.055042
0.1
1.120342
1.120342
0.15
1.196169
1.196168
0.2
1.282805 1.282806
0.25
1.380551 1.380551
Predictor Corrector methods are preferred over Runge-Kutta as it requires only two
functional evaluations per integration step while the corresponding fourth order RungeKutta requires four evaluations. The starting points are the weakness of predictorcorrector methods. In Runge kutta methods the step size can be changed easily.