Docsity

Predictor Corrector Method-Numerical Analysis-Lecture Handouts, Lecture notes of Mathematical Methods for Numerical Analysis and Optimization

Toggle sidebar
bg1
Numerical Analysis –MTH603 VU
© Copyright Virtual University of Pakistan 1
P
PR
RE
ED
DI
IC
CT
TO
OR
R
–
–
C
CO
OR
RR
RE
EC
CT
TO
OR
R
M
ME
ET
TH
HO
OD
D
T
Th
he
e
m
me
et
th
ho
od
ds
s
p
pr
re
es
se
en
nt
te
ed
d
s
so
o
f
fa
ar
r
a
ar
re
e
c
ca
al
ll
le
ed
d
s
si
in
ng
gl
le
e-
-s
st
te
ep
p
m
me
et
th
ho
od
ds
s,
,
w
wh
he
er
re
e
w
we
e
h
ha
av
ve
e
s
se
ee
en
n
t
th
ha
at
t
t
th
he
e
c
co
om
mp
pu
ut
ta
at
ti
io
on
n
o
of
f
y
y
a
at
t
t
tn
n+
+1
1
t
th
ha
at
t
i
is
s
y
yn
n+
+1
1
r
re
eq
qu
ui
ir
re
es
s
t
th
he
e
k
kn
no
ow
wl
le
ed
dg
ge
e
o
of
f
y
yn
n
o
on
nl
ly
y.
.
I
In
n
p
pr
re
ed
di
ic
ct
to
or
r-
-c
co
or
rr
re
ec
ct
to
or
r
m
me
et
th
ho
od
ds
s
w
wh
hi
ic
ch
h
w
we
e
w
wi
il
ll
l
d
di
is
sc
cu
us
ss
s
n
no
ow
w,
,
i
is
s
a
al
ls
so
o
k
kn
no
ow
wn
n
a
as
s
m
mu
ul
lt
ti
i-
-s
st
te
ep
p
m
me
et
th
ho
od
ds
s.
.
T
To
o
c
co
om
mp
pu
ut
te
e
t
th
he
e
v
va
al
lu
ue
e
o
of
f
y
y
a
at
t
t
tn
n+
+1
1,
,
w
we
e
m
mu
us
st
t
k
kn
no
ow
w
t
th
he
e
s
so
ol
lu
ut
ti
io
on
n
y
y
a
at
t
t
tn
n,
,
t
tn
n-
-1
1,
,
t
tn
n-
-2
2,
,
e
et
tc
c.
.
T
Th
hu
us
s,
,
a
a
p
pr
re
ed
di
ic
ct
to
or
r
f
fo
or
rm
mu
ul
la
a
i
is
s
u
us
se
ed
d
t
to
o
p
pr
re
ed
di
ic
ct
t
t
th
he
e
v
va
al
lu
ue
e
o
of
f
y
y
a
at
t
t
tn
n+
+1
1
a
an
nd
d
t
th
he
en
n
a
a
c
co
or
rr
re
ec
ct
to
or
r
f
fo
or
rm
mu
ul
la
a
i
is
s
u
us
se
ed
d
t
to
o
i
im
mp
pr
ro
ov
ve
e
t
th
he
e
v
va
al
lu
ue
e
o
of
f
y
yn
n+
+1
1.
.
L
Le
et
t
u
us
s
c
co
on
ns
si
id
de
er
r
a
an
n
I
IV
VP
P
(, ), ( )
nn
dy
f
ty yt y
dt ==
U
Us
si
in
ng
g
s
si
im
mp
pl
le
e
E
Eu
ul
le
er
r’
’s
s
a
an
nd
d
m
mo
od
di
if
fi
ie
ed
d
E
Eu
ul
le
er
r’
’s
s
m
me
et
th
ho
od
d,
,
w
we
e
c
ca
an
n
w
wr
ri
it
te
e
d
do
ow
wn
n
a
a
s
si
im
mp
pl
le
e
p
pr
re
ed
di
ic
ct
to
or
r-
-c
co
or
rr
re
ec
ct
to
or
r
p
pa
ai
ir
r
(
(P
P
–
–
C
C)
)
a
as
s
(0)
1
(1) (0 )
111
:(,)
:(,)(,)
2
nn nn
nn nn nn
Py y hft y
h
Cy y ft y ft y
+
+++
=+

=+ +

H
He
er
re
e,
,
y
yn
n+
+1
1
(
(1
1)
)
i
is
s
t
th
he
e
f
fi
ir
rs
st
t
c
co
or
rr
re
ec
ct
te
ed
d
v
va
al
lu
ue
e
o
of
f
y
yn
n+
+1
1.
.
T
Th
he
e
c
co
or
rr
re
ec
ct
to
or
r
f
fo
or
rm
mu
ul
la
a
m
ma
ay
y
b
be
e
u
us
se
ed
d
i
it
te
er
ra
at
ti
iv
ve
el
ly
y
a
as
s
d
de
ef
fi
in
ne
ed
d
b
be
el
lo
ow
w:
:
() ( 1)
111
(, ) ( , ), 1,2,
2
rr
nn nn nn
h
yy ftyfty r
−
+++

=+ + =

…
T
Th
he
e
i
it
te
er
ra
at
ti
io
on
n
i
is
s
t
te
er
rm
mi
in
na
at
te
ed
d
w
wh
he
en
n
t
tw
wo
o
s
su
uc
cc
ce
es
ss
si
iv
ve
e
i
it
te
er
ra
at
te
es
s
a
ag
gr
re
ee
e
t
to
o
t
th
he
e
d
de
es
si
ir
re
ed
d
a
ac
cc
cu
ur
ra
ac
cy
y
I
In
n
t
th
hi
is
s
p
pa
ai
ir
r,
,
t
to
o
e
ex
xt
tr
ra
ap
po
ol
la
at
te
e
t
th
he
e
v
va
al
lu
ue
e
o
of
f
y
yn
n+
+1
1,
,
w
we
e
h
ha
av
ve
e
a
ap
pp
pr
ro
ox
xi
im
ma
at
te
ed
d
t
th
he
e
s
so
ol
lu
ut
ti
io
on
n
c
cu
ur
rv
ve
e
i
in
n
t
th
he
e
i
in
nt
te
er
rv
va
al
l
(
(t
tn
n,
,
t
tn
n+
+1
1)
)
b
by
y
a
a
s
st
tr
ra
ai
ig
gh
ht
t
l
li
in
ne
e
p
pa
as
ss
si
in
ng
g
t
th
hr
ro
ou
ug
gh
h
(
(t
tn
n,
,
y
yn
n)
)
a
an
nd
d
(
(t
tn
n+
+1
1,
,
y
yn
n+
+1
1)
).
.
T
Th
he
e
a
ac
cc
cu
ur
ra
ac
cy
y
o
of
f
t
th
he
e
p
pr
re
ed
di
ic
ct
to
or
r
f
fo
or
rm
mu
ul
la
a
c
ca
an
n
b
be
e
i
im
mp
pr
ro
ov
ve
ed
d
b
by
y
c
co
on
ns
si
id
de
er
ri
in
ng
g
a
a
q
qu
ua
ad
dr
ra
at
ti
ic
c
c
cu
ur
rv
ve
e
t
th
hr
ro
ou
ug
gh
h
t
th
he
e
e
eq
qu
ua
al
ll
ly
y
s
sp
pa
ac
ce
ed
d
p
po
oi
in
nt
ts
s
(
(t
tn
n-
-1
1,
,
y
yn
n-
-1
1)
),
,
(
(t
tn
n,
,
y
yn
n)
),
,
(
(t
tn
n+
+1
1,
,
y
yn
n+
+1
1)
)
S
Su
up
pp
po
os
se
e
w
we
e
f
fi
it
t
a
a
q
qu
ua
ad
dr
ra
at
ti
ic
c
c
cu
ur
rv
ve
e
o
of
f
t
th
he
e
f
fo
or
rm
m
11
()()()
nnn
yabtt ctttt
−
−
=+ − + − −
w
wh
he
er
re
e
a
a,
,
b
b,
,
c
c
a
ar
re
e
c
co
on
ns
st
ta
an
nt
ts
s
t
to
o
b
be
e
d
de
et
te
er
rm
mi
in
ne
ed
d
A
As
s
t
th
he
e
c
cu
ur
rv
ve
e
p
pa
as
ss
se
es
s
t
th
hr
ro
ou
ug
gh
h
(
(t
tn
n-
-1
1,
,
y
yn
n-
-1
1)
)
a
an
nd
d
(
(t
tn
n,
,
y
yn
n)
)
a
an
nd
d
s
sa
at
ti
is
sf
fi
ie
es
s
(, )
(, )
nn
nn
ty
dy
f
ty
dt
 =


We obtain 11
,
nnn
ya yabhybh
−−
==+=+
Therefore
1nn
yy
bh
−
−
=
and
docsity.com
pf3
pf4
pf5
pf8
Discount

On special offer

Partial preview of the text

Download Predictor Corrector Method-Numerical Analysis-Lecture Handouts and more Lecture notes Mathematical Methods for Numerical Analysis and Optimization in PDF only on Docsity!

PRPREEDDIICCTTOORR –– CCOORRRREECCTTOORR MMEETTHHOODD

TThhee mmeetthhooddss pprreesseenntteedd ssoo ffaarr aarree ccaalllleedd ssiinnggllee--sstteepp mmeetthhooddss,, wwhheerree wwee hhaavvee sseeeenn tthhaatt tthhee

ccoommppuuttaattiioonn ooff^ yy^ atat^ tt n+n+1 1

ththaatt iiss yy nn++1 1

rreeqquuiirreess tthhee kknnoowwlleeddggee ooff^ yy nn

ononllyy..

IInn pprreeddiiccttoorr--ccoorrrreeccttoorr mmeetthhooddss wwhhiicchh wwee wwiillll ddiissccuussss nnooww,, iiss aallssoo kknnoowwnn aass mmuullttii--sstteepp

mmeetthhooddss..

TToo ccoommppuuttee tthhee vvaalluuee ooff yy aatt tt n+n+1 1

, w,wee mmuusstt kknnooww tthhee ssoolluuttiioonn yy atat tt nn

,, tt n-n-1 1

,, tt nn--2^2

,, eettcc..

TThhuuss,, aa pprreeddiiccttoorr ffoorrmmuullaa iiss uusseedd ttoo pprreeddiicctt tthhee vvaalluuee ooff^ yy^ atat^ tt n+n+1 1

aanndd tthheenn aa ccoorrrreeccttoorr

ffoorrmmuullaa iiss uusseedd ttoo iimmpprroovvee tthhee vvaalluuee ooff yy n+n+1 1

LLeett uuss ccoonnssiiddeerr aann IIVVPP

( , ), ( (^) n ) n

dy f t y y t y dt

UUssiinngg ssiimmppllee EEuulleerr’’ss aanndd mmooddiiffiieedd EEuulleerr’’ss mmeetthhoodd,, wwee ccaann wwrriittee ddoowwnn aa ssiimmppllee

pprreeddiiccttoorr--ccoorrrreeccttoorr ppaaiirr

((PP –– CC)) aass^

(0) 1

(1) (0) 1 1 1

n n n n

n n n n n n

P y y hf t y

h C y y f t y f t y

= + ^ + 

HHeerree,, yy n+n+1 1

isis tthhee ffiirrsstt ccoorrrreecctteedd vvaalluuee ooff yy nn++1^1

. T.Thhee ccoorrrreeccttoorr ffoorrmmuullaa mmaayy bbee

uusseedd iitteerraattiivveellyy aass ddeeffiinneedd bbeellooww::

( ) ( 1) 1 (^ ,^ )^ (^1 ,^1 ) ,^ 1, 2, 2

r r n n n n n n

h y y f t y f t y r

−

= + ^ +  =

TThhee iitteerraattiioonn iiss tteerrmmiinnaatteedd wwhheenn ttwwoo ssuucccceessssiivvee iitteerraatteess aaggrreeee ttoo tthhee ddeessiirreedd aaccccuurraaccyy

IInn tthhiiss ppaaiirr,, ttoo eexxttrraappoollaattee tthhee vvaalluuee ooff^ yy nn++1^1

, w,wee hhaavvee aapppprrooxxiimmaatteedd tthhee ssoolluuttiioonn ccuurrvvee iinn

tthhee iinntteerrvvaall (( tt nn

,,^ tt nn++1^1

)) bbyy aa ssttrraaiigghhtt lliinnee ppaassssiinngg tthhrroouugghh (( tt nn

,,^ yy nn

)) aanndd^ (( tt nn++1^1

,, yy nn++1^1

TThhee aaccccuurraaccyy ooff tthhee pprreeddiiccttoorr ffoorrmmuullaa ccaann bbee iimmpprroovveedd bbyy ccoonnssiiddeerriinngg aa qquuaaddrraattiicc ccuurrvvee

tthhrroouugghh tthhee eeqquuaallllyy ssppaacceedd ppooiinnttss (t(t nn--1^1

,, yy nn--1^1

)),, ((tt nn

, y,y nn

)),, ((tt nn++1^1

,, yy n+n+1 1

SSuuppppoossee wwee ffiitt aa qquuaaddrraattiicc ccuurrvvee ooff tthhee ffoorrmm

y = a + b t ( − tn (^) − 1 ) + c t ( − tn )( t − tn − 1 )

wwhheerree a,a, bb,, cc aarree ccoonnssttaannttss ttoo bbee ddeetteerrmmiinneedd AAss tthhee ccuurrvvee ppaasssseess tthhrroouugghh

(( tt n-n-1 1

,, yy nn--1^1

)) aanndd (( tt nn

,, yy nn

)) aanndd ssaattiissffiieess

( , )

n n

n n t y

dy f t y dt

We obtain yn (^) − 1 = a , yn = a + bh = yn (^) − 1 + bh

Therefore

yn yn 1 b h

and docsity.com

1 ( , ) ( , )

( , ) { [( ) ( )]}

n n n n

n n n n t y t y

dy f t y b c t t t t dt

−

  =^ =^ +^ −^ +^ −

Which give

f t ( (^) n , y (^) n ) = b + c t ( (^) n − t (^) n − 1 )= b + ch

or

1 2

f t ( (^) n , yn ) ( yn yn ) c h h

SSuubbssttiittuuttiinngg tthheessee vvaalluueess ooff a,a, bb anandd cc iinnttoo tthhee qquuaaddrraattiicc eeqquuaattiioonn,, wwee ggeett

yn (^) + 1 = yn (^) − 1 + 2( yn − yn (^) − 1 ) + 2[ hf t ( (^) n , yn ) − ( yn − yn − 1 )]

That is

yn (^) + 1 = yn (^) − 1 + 2 hf t ( (^) n , yn )

TThhuuss,, iinnsstteeaadd ooff ccoonnssiiddeerriinngg tthhee PP--CC ppaaiirr,, wwee mmaayy ccoonnssiiddeerr tthhee PP--CC ppaaiirr ggiivveenn bbyy

1 1

1 1 1

: [ ( , ) ( , )]

n n n n

n n n n n n

P y y hf t y

h C y y f t y f t y

  • −

TThhee eesssseennttiiaall ddiiffffeerreennccee bbeettwweeeenn tthheemm iiss,, tthhee oonnee ggiivveenn aabboovvee iiss mmoorree aaccccuurraattee

HHoowweevveerr,, tthhiiss oonnee ccaann nnoott bbee uusseedd ttoo pprreeddiicctt^ yy nn++1 1

ffoorr aa ggiivveenn IIVVPP,, bbeeccaauussee iittss uussee

rreeqquuiirree tthhee kknnoowwlleeddggee ooff ppaasstt ttwwoo ppooiinnttss.. IInn ssuucchh aa ssiittuuaattiioonn,, aa RR--KK mmeetthhoodd iiss ggeenneerraallllyy

uusseedd ttoo ssttaarrtt tthhee pprreeddiiccttoorr mmeetthhoodd..

MiMillnnee’’ss MMeetthhoodd

IItt iiss aallssoo aa mmuullttii--sstteepp mmeetthhoodd wwhheerree wwee aassssuummee tthhaatt tthhee ssoolluuttiioonn ttoo tthhee ggiivveenn IIVVPP iiss

kknnoowwnn aatt tthhee ppaasstt ffoouurr eeqquuaallllyy ssppaacceedd ppooiinntt tt (^00)

,, tt 11

,, tt 22

aanndd tt 33

TToo ddeerriivvee MMiillnnee’’ss pprreeddiiccttoorr--ccoorrrreeccttoorr ppaaiirr,, lleett uuss ccoonnssiiddeerr aa ttyyppiiccaall IIVVPP

dy f t y y t y dt

OOnn iinntteeggrraattiioonn bbeettwweeeenn tthhee lliimmiittss tt (^0 )

aanndd tt 44

,, wwee ggeett

4 4

0 0

t t

t t

dy dt f t y dt dt

4

0

4 0 ( ,^ )

t

t

y − y = f t y dt

BBuutt wwee kknnooww ffrroomm NNeewwttoonn’’ss ffoorrwwaarrdd ddiiffffeerreennccee ffoorrmmuullaa

2 3 0 0 0 0

s s s s s f t y f s f f f

where

0 , 0

t t s t t sh h

4

0

2 3 4 0 0 0 0 0

4 0

t

t

s s s s s y y f s f f f

s s s s f dt

^ −^ −^ −

NNooww,, bbyy cchhaannggiinngg tthhee vvaarriiaabbllee ooff iinntteeggrraattiioonn ((ffrroomm^ tt^ toto^ ss ),), tthhee lliimmiittss ooff iinntteeggrraattiioonn aallssoo

cchhaannggeess ((ffrroomm 00 ttoo 44)),, aanndd tthhuuss tthhee aabboovvee eexxpprreessssiioonn bbeeccoommeess

FFiinndd yy (2(2..00)) iiff yy (( tt ) i)iss tthhee ssoolluuttiioonn ooff

dy t y dt

yy^ (0(0)) == 22,,^ yy^ (0(0..55)) == 22..6^6336 6,,

yy (1(1..00)) == 33..5 5995 5 aanndd yy ((11..55)) == 44..9 9668 8 UUssee MMiillnnee’’ss PP--CC mmeetthhoodd..

SoSolluuttiioonn

TaTakkiinngg tt 0 0

= 0=0..00,, tt 11

== 00..55,,^ tt 22

== 11..00,,^ tt 33

== 11..5^5 yy 00

,,^ yy 11

,, yy 2 2

anandd (^) yy 33

, a,arree ggiivveenn,, wwee hhaavvee ttoo

cocommppuuttee yy 44

,, tthhee ssoolluuttiioonn ooff tthhee ggiivveenn ddiiffffeerreennttiiaall eeqquuaattiioonn ccoorrrreessppoonnddiinngg ttoo tt ==22..0 0

Th Thee MMiillnnee’’ss PP –– CC ppaaiirr iiss ggiivveenn aass

1 3 2 1

1 1 1 1

n n n n n

n n n n n

h P y y y y y

h C y y y y y

  • − − −

  • − − +

= + ′^ + ′^ + ′

FFrroomm tthhee ggiivveenn ddiiffffeerreennttiiaall eeqquuaattiioonn,, y ′^ = ( t + y ) / 2

WWee hhaavvee

1 1 1

2 2 2

3 3 3

t y y

t y y

t y y

NNooww,, uussiinngg pprreeddiiccttoorr ffoorrmmuullaa,, wwee ccoommppuuttee

[ ]

4 0 1 2 3

h y = y + y ′^ − y ′^ + y ′

UUssiinngg tthhiiss pprreeddiicctteedd vvaalluuee,, wwee sshhaallll ccoommppuuttee tthhee iimmpprroovveedd vvaalluuee ooff^ yy 44

ffrroomm ccoorrrreeccttoorr

ffoorrmmuullaa

4 2 (^2 4 3 4 )

h y = y + y ′^ + y ′^ + y ′

UUssiinngg tthhee aavvaaiillaabbllee pprreeddiicctteedd vvaalluuee yy 44

aanndd tthhee iinniittiiaall vvaalluueess,, wwee ccoommppuuttee

4 4 4

3 3 3

2

t y y

t y y

and y

TThhuuss,, tthhee ffiirrsstt ccoorrrreecctteedd vvaalluuee ooff yy 44

iiss ggiivveenn bbyy

(1) 4

3.595 [2.2975 4(3.234) 4.4355]

y = + + +

SSuuppppoossee,, wwee aappppllyy tthhee ccoorrrreeccttoorr ffoorrmmuullaa aaggaaiinn,, tthheenn wwee hhaavvee

(2) (1) 4 2 (^2 4 3 (^4 ) 3

0.5 2 6. 3.595 2.2975 4(3.234) 3 2

h y = y + ^ y ′^ + y ′^ + y ′  

FFiinnaallllyy,, yy (2(2..00)) == yy (^4 )

Ex Exaammppllee

TTaabbuullaattee tthhee ssoolluuttiioonn ooff^ ,^ (0)^1

dy t y y dt

= + = inin tthhee iinntteerrvvaall [[00,, 00..44]] wwiitthh (^) hh == 00..1 (^1) ,,

uussiinngg MMiillnnee’’ss PP--CC mmeetthhoodd..

So Solluuttiioonn

MMiillnnee’’ss PP--CC mmeetthhoodd ddeemmaanndd tthhee ssoolluuttiioonn aatt ffiirrsstt ffoouurr ppooiinnttss^ tt 00

,,^ tt 11

,, tt 22

aanndd^ tt 33

. A.Ass iitt iiss nnoott aa

sseellff –– ssttaarrttiinngg mmeetthhoodd,, wwee sshhaallll uussee RR--KK mmeetthhoodd ooff ffoouurrtthh oorrddeerr ttoo ggeett tthhee rreeqquuiirreedd

ssoolluuttiioonn aanndd tthheenn sswwiittcchh oovveerr ttoo MMiillnnee’’ss PP –– CC mmeetthhoodd..

TThhuuss,, ttaakkiinngg^ tt 0 0

= 0=0,, tt 1 1

= 0=0..11,, tt 22

== 00..22,,^ tt 33

== 00..33 wwee ggeett tthhee ccoorrrreessppoonnddiinngg^ yy^ vvaalluueess uussiinngg

RR––KK mmeetthhoodd ooff 4 4

tthh oorrddeerr;; tthhaatt iiss yy 00

== 11,, yy (^1 )

= 1=1..1 111003 3,, yy (^2 )

= 1=1..2 244228 8 aanndd yy 33

((RReeffeerreennccee LLeeccttuurree 3^38 8))

Now we compute

1 1 1

2 2 2

3 3 3

y t y

y t y

y t y

UUssiinngg MMiillnnee’’ss pprreeddiiccttoorr ffoorrmmuullaa

[ ]

4 0 1 2 3

h P y = y + y ′ − y ′ + y ′

BBeeffoorree uussiinngg ccoorrrreeccttoorr ffoorrmmuullaa,, wwee ccoommppuuttee

4 4 4 (^ )

y ′ = t + y predicted value

FFiinnaallllyy,, uussiinngg MMiillnnee’’ss ccoorrrreeccttoorr ffoorrmmuullaa,, wwee ccoommppuuttee

Using the predicted value, we shall now compute the corrected value as;

( (^ ) )

4 2 2 3 4

4 4 4

4 2 2 3 4

4

4

4

,int ;

h y y y y y

Now

y x y

Putting the values o the Corrector Formula

h y y y y y

y

y

y

6 Ans.