Predictor-Corrector Method
Predictor-Corrector Method
N u m e r i c a l
395
ty+X y(0)=-1.
d dy
given
(0-1) given
y(0-1) 2x +y,
25. Find x(01),y dt dt X-given x (0)=0, y(0) =0-5,
26. Solve
-x+y" =0 using R.K. method forz=0:
()=0, taking h = 02. given
(0)=1,y
yFind v(0-1) given y"=y', y (0) =10,y (0)=5 by R.K. method,
27.
28. Find y (0-1), y (0-2) given y-xy-2xy=1, y (0)=1 y (0)=0.
29. Find y(0-1) given +21ry'-4y=0, y (0) = 0:2, y (0) = 0-5.
30. Obtain the value of x
(0 1) given
_ 4x, x (0) = 3,x (0) = 0.
dt
d
value of y (0-2) given
31. Compute the
y - y.y 0) = 1,y (0) =0.
11-16. Predictor-Corrector methods
The methods which we have discussed so far are called
methods because they use only the information from the_ingle-step
last step
computed. The methods of Milne's predictor-corrector,
predictor corrector formulae are multi-step methods. Adams-Bashforth
2)
In the equation (2), to
get the value of yi+1 We require
R.H.S. To overcome this difficulty, we calculate yi usingyi+1 on the
Euler's
formula (1) and then we use it
the R.H.S. of (2), to get the L..H.S. of
on
(2). This Yi+1 canbe used further to get refined
yi4 on the L.HS. Here,
we
predict a value of yi+ from the rough tormula (1) and use in (2) to
correct the value. Every time, we improve using (2). Hence equation (1)
uler's formula is a predictor and (2) is a corrector. A predictor ronud
used to predict the value of y at X41 and a corrector formula is used
to correct the error and to improve that value of yi+
I117. Milne's Predictor Corrector Formulae
1)
Suppose our aim is to solve=f, y). y )=Yo
numerically.
396
have to estimate successively
Starting from yo=y (g), we
y=otuAyo+
u(4-2yot
2!
u(u-i)3! (a-2) yot
"(u-i)(u-2)
.
o +usyo+ u(u-
2!
yd+d
y4-oh ou+Ayo
+
= 4+8 Ayo+ 8 y+a'y (64-64+ 16)+
=h 4+8 y+yAy A
'=h 4 +8(E-1)>+E-1?'yd+E-1 v
=h 4y+86'-%)+0-2+o)+0-3y+3
14 ay
Numeru
y =o(2»1-»'+2y 4)
4h
(3) becomes,
y = Y o + ( 2 - + 2 y , ) +1 4 h E)
5)
In general,
4h
Yn+1a-3t -2 -Ya-1 +2y,)+* G) ..(6)
where-3< +
is called Milne's predictor formula.
Equation (6)
To get Milne's corrector formula, integrate equation (2) betwéen the
limits x to o+ 2h.
Therefore
o+ 2h o t 2h/
o +u Ayo+
uu-
y dx= 2
YtuAy+ ldu
-Yo=hJ
a + 2 - + - 2 J a - v " ' i
398
+ 2 0 - % ) + 0 - 2 ' + ) 0
4
=h 2yo 7)
bo +4+y1-4
third order,
account only upto
Taking into 8)
y=oto+4+1
=-04o+
in (8) is
and the error
5
where x<<2
be proved to be =-n
90
" G),
and this can
(7) becomes,
= o t + 4 y ' + ) - 0 )
9
In general,
E) .(10)
ya t - +4 +ya1)a
where -1<2K+l formula.
called Milne's corrector
Equation (10) is
from
Hence we predict
4h -y-1 +2y (11)
Ya 1.p Ya-3t(2-2
i.e., 4h
Yap =Ya-3t(21,-2-f-1+2)
and correct using
i.e., n+1,eY-1t-1+4,+fa+1
Note: Knowing 4 consecutive values of y namely, yn-3» Y-2» Yn-1 a
Yn We calculate yn+1 using predictor formula. Use this yn+1 on the
R.H.S. of corrector formula to get yn +1 after correction. To refine the
value further, we can use this latest yn+1 On the R.H.S. of (12) and ger
a better Yn+1
Numerical
s 6 ) = j a + )= y
.(1)
predictor
formula,
M i l n e ' s
By 4h
3 - 2 -y-1 +2y)
Y,l.p-Yn-3t
4h ( 2 - + 2 y , )
YaYot3 (2)
From (1),
=+)-505+4968=32340
By (2),
4.p2+12(1-5680)-
3
(2-2975)+2 (3-2340)]
68710
v=td=52+68710)=44355
Using (3), we get
YA=3-595+22975+4 (3-2340)+443551
= 6-8732
. Corrected value of y at x = 2 is 6-8732.
=43
Solution. y =
Sx
=4, x, =4-1, =42, I
10145.
1-0049, y, =1-0097, y3
=
X444, Yo= 1, y, =
2- 2-(1-0049) = 00493
5 (4-1)
00
2-(1097
2-(109=00467
5x2 5(4-2)
2-2-(1:0143 = 00452
5 (43)
By Milne's predictor formula,
4h
= 1+-
4 2(0-0493)-00467+2
(0-1) (0-0452)]
= 1-01897
2-2-(101897)00437
y5 (x 544)
using
YaY»+ +4 +«) 2)
0.1
= 1-0097+0-0467+4 (0-0452) +0-0437)
Ya,101874.
Note: Use this corrected ya,c and find y4,c and again use (2)
2-_2-(1-018742
0-043735
Y4,c5) 5(44)
Now using (2),
=othy +o+"+
3!0
Ordinary
of Ord
hution of Diferential
Numerical
S o l u t i o n
Equations
401
0-001
I+(01)(1)+(3)+ x I0+.
y(0-1)=11167.
Xy+ 2y +2y1y+20
= 16-4131
=1-1167+(13587)+(4-2871)+ 6
(16-4131
y (0-2) =1-2767
=x+2+2y"+0,1=28-6875
0-01
=
1-2767+(01) (1-8853) + (6-4677) +0-001(28-6875)
6
= 15023
y (0:3)=15023.
Now, knowing yo» Y1» 2» Y3 we will find y4
By Milne's predictor formula,
y (0-4)=183698.
Note: We can use
this y (0-4) on the R.H.S. of (2) and
of y4 get an
improved yalvaly
Example 4. Given
y (0-2) 1-12, y
=
51+r)y
(0-3) /21, evaluate y (0-4) by Milne's
=
and
y()=1,y (0-1)=1
tor method. predictor corte
Solution. X =0, x1 (Nov. 199
=01,x^=02, x =03, x4=04
Yo1,y =1-06, y2 =112,y =
1-21, h =01
y-fa,y)=1+)
=1+pi=;0+0)1=1/2
=14 þi-50+°1 1-06=05674
-1+-1+(02112/-06522
-1+)-;u+osh02=07979
By Milne's method,
Ys,p ot 4h 2-+21
=1+ 2[2 (0-5674)-06522+2(07979)]
12771
-1+10
=1 +016] [12771=0-9460
By corrector method,
..(2)
Y4,eY2t »+4s'+Y,
=1-12+[0-6522+4 (0-7979) +09460]
Solution of Ordinary Differential Equations
ul
Numeri 403
12797
the R.H.S. of (2) and get
Now use ya,.e
vh + 016] (12797)=09498
Again using (2),
= 01+(0-1)
=0-1)+(0-1 1-01+-01)||
0-1855
By improved Euler method:
=0-1855+1-+1-»-hfl»)1
0-1
=0-1855+2-2-h(1->)1
=0-1855+1-2-h)
0-2629
Now knowing yo» Y1» Y2» Y3, we will find y4
By Milne's method:
404
2Unod
4 (01)
= 0+
3
[2 (1-)-(1-) +2(1-y)]
13-2y,
3
+y2-2sl
3 - 2 (0-1) + (0-1855) -2 (0-2629) ]
3
= 0-3280
ya=1-y4=1 -0-3280=06720
Y4 2t y+4y++Yp
0-1
= 0-1855+[1-y+4
3 (1 -y)+1-Ya,pl
=0-1855+6-2-4y -Va,pl
y(0-4)=03333.