Professional Documents
Culture Documents
Predictor Corrector Methods
Predictor Corrector Methods
GOAL:
Numerically approximate the solution y(t) to the well-posed initial-value problem (IVP) y (t) = f (t, y(t)), y(a) = y0 on
the interval [a, b].
Recall:
Let [a, b] be the interval over which we want to find the solution y(t) to the well-posed IVP y (t) = f (t, y(t)), y(a) = y0 .
Divide the interval [a, b] into M subintervals, each of length h = ba
M . Select the mesh points tk = a + hk for k = 0, 1, . . . , M .
1. Eulers Method
yk+1 = yk + hf (tk , yk ) for k = 0, 1, . . . , M 1
2. Heuns Method
h
yk+1 = yk + [f (tk , yk ) + f (tk+1 , pk+1 )], pk+1 = yk + hf (tk , yk ) for k = 0, 1, . . . , M 1
2
Observe that in Heuns Method, pk+1 = yk + hf (tk , yk ) is already an approximation/prediction of y(tk+1 ) given by Eu-
lers Method, but we dont stop here. We want to improve this initial approximation/prediction, so we use the corrector
yk+1 = yk + h2 [f (tk , yk ) + f (tk+1 , pk+1 )] which can be derived from the Fundamental Theorem of Calculus (FTC) and the
Trapezoidal Rule applied to the nodes tk and tk+1 . Heuns Method is an example of what are called PredictorCorrector
Methods. In a PredictorCorrector Method, we first predict/approximate y(tk+1 ) using a predictor function, then we improve
this prediction/approximation using a corrector function.
ADAMSBASHFORTHMOULTON METHOD
The AdamsBashforthMoulton Method is a four-step method which requires yk3 , yk2 , yk1 , and yk in the calculation
of yk+1 . It is not self-starting; four initial points (t0 , y0 ), (t1 , y1 ), (t2 , y2 ), and (t3 , y3 ) must be given in advance in order to
generate the points {(tk , yk ) : k 4}.
To find a predictor for the AdamsBashforthMoulton Method, we must establish a relation that involves yk+1 , yk , yk1 ,
yk2 , and yk3 . Consider the interval [tk , tk+1 ]. From the IVP, we have y (t) = f (t, y(t)). By the FTC,
tk+1 tk+1
y (t) dt = y(t)|tk+1
t
f (t, y(t)) dt = k
= y(tk+1 ) y(tk )
tk tk
tk+1
y(tk+1 ) = y(tk ) + f (t, y(t)) dt (1)
tk
How do we introduce yk3 , yk2 , yk1 , and yk into the scene? We approximate f (t, y(t)) using the Lagrange
(1)
interpolatory polynomial P3 (t) based on the points (tk3 , fk3 ), (tk2 , fk2 ), (tk1 , fk1 ), and (tk , fk ). We then have
tk+1 tk+1
(1)
f (t, y(t)) dt P3 (t) dt.
tk tk
tk+1 1
(1) hfk3 hfk2 1 3
P3 (t) dt = 3 2
(p + 3p + 2p) dp + (p + 4p2 + 3p) dp
tk 6 0 2 0
1
hfk1 hfk 1 3
(p3 + 5p2 + 6p) dp + (p + 6p2 + 11p + 6) dp
2 0 6 0
tk+1
(1) 9h 37h 59h 55h
P3 (t) dt = fk3 + fk2 fk1 + fk
tk 24 24 24 24
h
= (9fk3 + 37fk2 59fk1 + 55fk )
24
tk+1
h
f (t, y(t)) dt (9fk3 + 37fk2 59fk1 + 55fk )
tk 24
h
y(tk+1 ) y(tk ) +
(9fk3 + 37fk2 59fk1 + 55fk )
24
The result above suggests that the AdamsBashforth predictor be
h
pk+1 = yk + (9fk3 + 37fk2 59fk1 + 55fk ). (2)
24
Our next task is to determine the corrector which will improve the predicted value pk+1 . The derivation of the corrector
h
yk+1 = yk + [fk2 5fk1 + 19fk + 9f (tk+1 , pk+1 )] (3)
24
(2)
is left to the reader as an exercise. [Hint: A second Lagrange interpolatory polynomial P3 (t) for f (t, y(t)) is constructed
based on the points (tk2 , fk2 ), (tk1 , fk1 ), (tk , fk ), and the new point (tk+1 , fk+1 ) = (tk+1 , f (tk+1 , pk+1 )).]
Theorem 1. The local truncation error (LTE) for the predictor and corrector of the AdamsBashforthMoulton Method
are of the order O(h5 ).
Proof. For the predictor, note that if f (x) C N +1 [a, b], where [a, b] is an interval containing xk , k = 0, 1, . . . , N , then x
[a, b],
f (x) = PN (x) + EN (x),
(x x0 )(x x1 ) (x xN ) N +1
EN (x) = f ((x)), (x) [x0 , xN ].
(N + 1)!
In particular, for f (t, y(t)),
(1) (t tk3 )(t tk2 )(t tk1 )(t tk ) (3+1)
E3 (t) = f (1 (t)).
(3 + 1)!
From (1),
tk+1
(1) (1)
y(tk+1 ) = y(tk ) + [P3 (t) + E3 (t)] dt.
tk
Hence, the LTE for the predictor is given by
tk+1 tk+1
(1) (t tk3 )(t tk2 )(t tk1 )(t tk ) (3+1)
E3 (t) dt = f (1 (t)) dt
tk tk (3 + 1)!
19 (5)
It is left as an exercise to show that the error for the corrector is y (2 (t))h5 .
720
Corollary 1. If h is small enough, then y (5) (t) is nearly constant and thus we have
19
y(tk+1 ) yk+1 (yk+1 pk+1 ).
270
Proof. From the proof of Theorem 1, we have
251 (5)
y(tk+1 ) pk+1 = y (1 (t))h5 (4)
720
19 (5)
y(tk+1 ) yk+1 = y (2 (t))h5 (5)
720
where (4) and (5) are the LTE for the predictor and corrector, respectively. Let x = y (5) (2 (t))h5 . Then y (5) (1 (t))h5 x.
251 (5)
(4) y(tk+1 ) = pk+1 + y (1 (t))h5 (6)
720
19
(5) y(tk+1 ) yk+1 = x
720
(6) 251 (5) 19
pk+1 + y (1 (t))h5 yk+1 = x
720 720
251 19
pk+1 + yk+1 x
720 720
270
yk+1 pk+1 x
720
720
(yk+1 pk+1 ) x
270
MILNESIMPSON METHOD
The MilneSimpson Method is a four-step method which requires yk3 , yk2 , yk1 , and yk in the calculation of yk+1 .
To find a predictor for the MilneSimpson Method, we must establish a relation that involves yk+1 , yk , yk1 , yk2 , and yk3 .
Consider the interval [tk3 , tk+1 ]. From the IVP, we have y (t) = f (t, y(t)). By the FTC,
tk+1 tk+1
y (t) dt = y(t)|tk+1
t
f (t, y(t)) dt = k3
= y(tk+1 ) y(tk3 )
tk3 tk3
tk+1
y(tk+1 ) = y(tk3 ) + f (t, y(t)) dt (7)
tk3
How do we introduce yk3 , yk2 , yk1 , and yk into the scene? We approximate f (t, y(t)) using the Lagrange
(1)
interpolatory polynomial Q3 (t) based on the points (tk3 , fk3 ), (tk2 , fk2 ), (tk1 , fk1 ), and (tk , fk ). We then have
tk+1 tk+1
(1)
f (t, y(t)) dt Q3 (t) dt.
tk3 tk3
tk+1 1
(1) hfk3 hfk2 1 3
Q3 (t) dt = (p3 + 3p2 + 2p) dp + (p + 4p2 + 3p) dp
tk3 6 3 2 3
1 1
hfk1 hfk
(p3 + 5p2 + 6p) dp + (p3 + 6p2 + 11p + 6) dp
2 3 6 3
tk+1
(1) 8h 4h 8h
Q3 (t) dt = fk2 fk1 + fk
tk3 3 3 3
h
= (8fk2 4fk1 + 8fk )
3
tk+1
h
f (t, y(t)) dt (9fk3 + 37fk2 59fk1 + 55fk )
tk3 24
h
y(tk+1 ) y(tk3 ) +
(8fk2 4fk1 + 8fk )
3
The result above suggests that the MilneSimpson predictor be
4h
pk+1 = yk3 + (2fk2 fk1 + 2fk ). (8)
3
Our next task is to determine the corrector which will improve the predicted value pk+1 . The derivation of the corrector
h
yk+1 = yk1 + [(fk1 + 4fk + fk+1 )] (9)
3
is left to the reader as an exercise. [Hint: A second Lagrange interpolatory polynomial Q2 (t) for f (t, y(t)) is constructed
based on the points (tk1 , fk1 ), (tk , fk ), and the new point (tk+1 , fk+1 ) = (tk+1 , f (tk+1 , pk+1 )).]
4h
pk+1 = yk3 + (2fk2 fk1 + 2fk )
3
h
yk+1 = yk1 + [(fk1 + 4fk + fk+1 )]
3
28
mk+1 = pk+1 + (yk pk )
29
fk+1 = f (tk+1 , mk+1 )
When a predictorcorrector method is used to solve the IVP y (t) = f (t, y), where y(t0 ) = y0 , over a large interval,
diculties sometimes occur. If fy (t, y) < 0 and the step size is too large, a predictorcorrector method might be unstable.
As a rule of thumb, stability exists when a small error is propagated as a decreasing error, and instability exists when a small
error is propagated as an increasing error. When too large a step size is used over a large interval, instability will result and
sometimes manifest by oscillations in the computed solutions. They can be attenuated by changing to a smaller step size.
When step-size control is included, the following error estimate(s) should be used:
19
y(tk ) yk (pk yk )(AdamsBashforthMoulton Method)
270
pk yk
y(tk ) yk 29 (MilneSimpson Method)
y(tk ) yk 9
121 (p k yk ) (Hamming Method)