MH4700 Notes
MH4700 Notes
1). Definition :
Mesh points :
ti =
Because InLtn+a)
v
no
Step Size :
hi =
Fits-t:
always >0 ! know
to
[Explicit Mtd]
.
, YnLtnil
with Exact solution :
Yctn)
Differential equation with Euler's Method Y(tu) fath ynctnl) f(tn yn)
: =
=
. ,
2) Psedocode :
3) Error Analysis :
<
=Yctn) + h Y(tn)
.
+bY"(3n) for 3nECtn ,
tn+)
Hence Y(tn) =
-Yctn) + och) , Y"(3n) truncation error .
Y
Note that fith YnCtrl)=,
Thus the error for fith Ynctnl) Differential equation with Euler Method Och)
=
=
Yn+Och
i e
. . Zochy for each step of approximation .
After n
steps ,
the
accumulating error :
n .
och") :
nh och)
-
:
(tn-to) och)
·
① Therefore ,
the total error
:
Och) .
i e . . Ycth)-Yactull = B h .
Let k =
max1 41 ,
M-
maxlY" its
Since Yatate) Yctn) +h Yctn) =
y(tn+1) =
3n)
So ente =
Intel Itn) 21 +
h k) + Ihi
-
...
UK
e 1 V + r2+
+
...
+ rut =
I
Therefore ,
Ienl 10/21thk" + A thM .
eirc (1tr)"
Note that ,
inequality ,
i e
. .
-
Itol(1+(n-tolk)"+ EK- 1
. thM
Yo Y
marly
=
=
to =
P .
=>
lenk .
In
③ Asymptotic
.
Error
Analysis :
With DCt) s .
t . D'Ct) g(t) D(t)
=
- +
EY"Ct) ,
Dito) =
/y Yet
Y)
g(t)
=
=
)
=>
YCEn) -
[2YnCtn) -yenctn)] =
Och
·
The backward Euler's Method & The Trapezoidal Method
1) .
Definition :
Recall Forward Euler Approximation fith Ynctnl)
,
=
Anyctn)
Backward At-h)
Approximation
:
Y(t) - h
sit .
fit ,
Yet) = AYCt-h)
Because its should be known . i e
. . Yct) = YCt-h) +
hofct Yctx) ,
X
[Implicit Mrd] i e
. . Yctit1) ~Y(ti) th fctits Ycti+1)) ·
, , Yo= Yo
Mn-Ynl=Ochs ,
/Yit1 -
Yitzl= Och
2)
Absolutely Stable Method :
After n
steps ?
(1) .
Definition
:
Y'It xYt) =
,
X 0 lim
Yn im Yuctn)= mytotuh)
= =
0 h
- n
I
-
If Y fit =
,
y)8 .
(2) .
Examples :
⑦ Forward .
Euler's Method NOT
absolutely stable
Proof :
,
=
Yi+hXY : =
(1thX) Yi , Yo= 1 .
Hence ,
yn= (thX) Yn-1 =
AthX)Yn-z =
. ..
=
(1t hX)"
If mn= Em Ithx)" 0
=
i e .
.
-2hx<0
Since X so ,
then och >
This shows
ImYhtu) 0 is NOT for all h
=
So .
Forward Euler Method is NOT absolutely stable .
② .
Backward Euler Method Absolutely Stable
Proof :
,
Yits)
=
Yi th xYi+1= (1-hx) + yi
·
,
Yo= 1 .
= - "
Yn (1 hx)
1
Yn z
= -
= -
-
=
-
...
If = m1-hx) =
En =
predictor formula
.
① Definition
.
:
,
with first guess
:
,
yil
Then yet =
Yithofctite y ,1) j ,
=
0 1 2,
, ,
...
GCys
Y= GLY Y
Recall NA1 .
fixed -
point iterations =
Yi )
Yi +h ·
f (ti+1 ,
. ,
, ,
imgcy11: Yitz
Y
:
Ih < 1
Yi= gyts(
If I / <M Ft y , =
Yi+h ·
fcti+1 yes ,
=Yith ·
Then hi n
Explicit ?
,
NOW
(1) .
Definition :
h
Recall the trapezoidal quadrature rule :
a
-
b
Ifas + f(b))
With Error :
St**isds = [Yti)+Y'ti+1)) -
is )"
(Here Y'(s) =
f(x) -
P2())
=
[fiti , till + fatits Y(tie))] ,
-
" 25i)
Och")
(2) .
The total error for Trapezoidal Method :
(After n
steps)
n .
Och= nh Och= (En-to) Och" -
·
=> It's of second order accuracy .
23) .
1)
Proof :
Yitz
=
yi
+
Exyi ExYi+1 +
E) (1 -
= mI =
0 -
/ I
i e
. .
-1 < 1
Since 230 ,
x0 .
So 1-Exs0
-> -
-
1 +
Ex 1 +
Ex<1-EX ,
which always holds for all h.
Therefore trapezoidal ,
method is always absolutely stable .
14) .
Implicit to Explicit :
By Fixed -
Point Iteration .
Henn's Method .
g(y) yi +
=
with h must
satisfy :
1) myxy)-1 .
Y
*
= >
=
= Yi+hifcti ,
yi)
y =
Not
Absolutely Stable
Proof :
Yitz =
Yi + :
[fcti yil+f(titz
, , Yitz Yith futi
=
·
,
fill]
yi E xyi x(yi+ h fcti yi))
=
+ .
+ .
.
,
Yi+Ehxyi+Ehxyi+EChx)"y
=
=21 +
hx + Echx)"] Y :
Thus , Un :
[Ithx + EchNsY
"
i e . .
-< x(1+ Ehx) < O
As ho ,
XCO ,
this implies It Ehx >0
Hence ,
-
ICEXCO -
2 ChXCO
So , Ihx1<2 => h >
1
This shows Henn's Mod is NOT absolutely stable .
·
Taylor Method :
·
.
...
where forward Euler Method just uses the first two terms of Taylor Expansion .
Yut) = -
Yt) + 2 cost , Yo =
1 .
Exact Solution : Y :
sint+cost
1) .
Example of Taylor Method of order 2 :
[Y(4)] =
Y" (t) = -
Y(t)-2sint=Yct-2cost-2sint
Then , Yitz Yith 2-yi+zwsti) +
=
· .
, .
After n
steps ,
nochc :
nh .
Och =
(An-to) Och's .
Therefore ,
the total error is ochi .
Yct+z) =
Yeti) +
h Y cti)
·
+ .
Ycti) + Y"<ti) .
+ Och")
[Y" <til]' =
Hence ,
the total error after n
steps
:
Och" .
(1) .
Differentiation on variable t :
+y) =
3)
.
Y (t) =
fit ,
Yct1)
Yt)
Y"(t) =
(t
Yc+1) ,
+
·
ft (t , Yt1) +
fyCt , YC) Y'(t) ·
AYt1)
t ,
fit Ct Yct1)
-2nd-order
Est-order
ft)y It Yet) YCt Note & Sty fyt
Y (t)]' +L
=
Ct [Y
"
dt
·
=
= , , .
=[ftCt , Yrt) +
fyct , Yct1) YCt3 ·
-
fit YAI ,
fry ct Y)
·
·
, , ·
,
, , ,
+
fyCt YAI) ftCt YA1) ,
·
,
+ fyct , YA) ·
Yitz
=
Yith-yi+ y, + ... +By with yo: Yo
Error=OchP of order
+
At Each Step ,
) Yp-YP Since yitz p
Och"/
By Extrapolation :
Yet ynct) hP Dct) + Och+1)
· = .
=>
Yct =
YC-YnCt= Yurt -
YnLt) -
# Y2hLt)
22P 2P
21 Y2n(t)
-
+
1
-1 Yurt)
-
= YnLt)-Yzh(t)
( Y(t) yart)+ 25Lynct) -Yen(i) If Y not known
=
.
·
1) Definition
.
of Runge :
Kutta Method of e2 :
Yitz =
Yith FCti Yi ·
, ,
h) +Och sit .
Y-Yn= Och
where Fct y h)
, ,
=
Difct y),
+ b2 ·
fct + 2h ,
y Bh f(t y)
+ ·
① Asymptotic
.
error
:
② . Constant Setting
:
fix-h) + ....
Ochrf)
. Adams
1 -
Bashforth Method :
EXPLICIT ?
1) .
Definition : Yitz =
Yi+E B fiti . .
,
yi) -fCti-1 Yi-xl] , Interpolation of degree 1 .
Proof
let father-actwind
:
Hence ,
P1Ct) =
/Pactidt 1 [3kcti)
*
So .
kcdt- =
-
Kuti-e
2) Error
.
Analysis :
St katdt=1Pactdt+ Eh K "(3i) ->
Error at each step :
Och"
Proof :
↳ h
>
I I ·
titl ti ti+1
en
>
Itch2dt=c .
h =
och
Ye Yoth Y:
:
.
Och'
Interpolation of degree 2 .
With tiz ,
tia ,
ti
Yitz =
, , ,
Need to know Yo Y1 Ye , , .
Proof :
Let k2t :
f (t Yct) Y(t)
,
= =
P2Ct) =
(2017) ·
,
L21(t) titts
=E ,
Lazt= -
(ti-ti-z) (ti-ti-1)
It /
* **
ktdt Pactsdt =
[23k(ti) -16(s(ti 1) 5kti 2)] -
+
-
2) Error
.
Analysis of Three Step A-B :
(Except initial values)
the
Proof :
Kuts Parti
-
=
= k"(3i) :
h h h
I 1 1 => It- ticksh .
It-tickch , It-tilth
ti ti-I ti tit 1
There are
many ways to estimate ya Yz
, .
Therefore ,
the total error after n
steps
:
Bashforth Method :
Ochaty) .
Ochat) =>
Asymptotic error :
Y -YhCt)= Dc h &+ Ochat·
By extrapolation to accelerate
convergence .
2 . Adams -
Moulton Method :
IMPLICITI
1) .
One-Step Adams -
Moulton Method :
Let kCt) =
fit Yct)
,
=
/
*
=
+
ct , YCt)dt
So . (Etidtfbactidt=(stite-t ·
kitil+ (t-til ·
Therefore ,
Yitz =
YitE [fcti yis+fctive Yixas] , , Implicit .
i e
. .
2) Error .
Analysis :
By Interpolation of degree 1 .
Iti t-rich
t-titzh
,
So ket) Pact)-
= E h h
. .
=
Och2
Then IS Kuts -
Pactsdt1 /ket) > -
Mct) Yucts) -
=
(n-1) :
=(n-1)h Och" · +
/Y= -y=)
=
(An-t1) Och" + Och"
=Och
The total error ,
here , Ochi .
after n
steps .
SF putdt=/
= *
pactdt-22hk"(i)
1) .
Implicit .
⑦ . At each step
:
Error=Och" .
② Total
. error , after n
steps
=
Och .
S* S
**
. . . . .
=> P1 =
Yi +h f (tit1 ·
, Y! (
=Yi +h ·
This is
by support of theory :
,
, ,
, .
2y
If hi
maxIy7
.
3 Comparisons of Adams -
(h/k "(3i)))
① Second Order
. AM's error (Ehlk"(Bill) - Second Order AB's error
② .
AM :
Implicit ,
AB :
Explicit .
③ .
AM :
Absolutely stable .
AB NOT :
Proof :
Ditz =
Yi +
Eh[3f(ti yi)-fctie , , yi-zl)
Since Y'ct) fct y) x yct)
:
,
=
with x<0
So Yitz Yi+Eh[3 xycti) -xycti-Al]
=
.
(Eh-3x+ 1) yi Eh xYi-1
= - .
↳ E>
~S t .
r-2 + Ehx)r+
Un= C1 Vo+Cz Va
·
Ehx
.
=
E)
with roots
nee
(r-VoSCV-V)
Vo
=
,
VI
v=cro+V)U+roV
.
nimYn= m ro+(V) 0 =
IrokI IVK1
=
-
So IEhNc1 i e . .
IhIX , > h >
conflicts Uh .
4. General Multistep Method :
1) .
General Two-Step Multistep Method :
Yitz Yi +As Yiz th [D- fCtit Yitz) +Do fcti yi)+D1 fctin Yi-zl]
SEE
=
do . .
.
, ,
.
⑦ .
Adams -
Bashforth :
Yitz
=
Yith [Efiti
.
,
yi) -Efcti-z , Yi-11]
② Adams Moulton Yitz Yith [ futies Yit) + fiti yi) -F2fct-1 yi-zl]
=
- ·
:
, ,
.