You are on page 1of 15

of Explicit implicit methods:

Comparison & Enter

While
Explicit method is
Implicit unconditionally
method is stable. the

conditionally stable.

e.g.
A-et=. y(0) =)- Exact solution octl=et

At ->0:
Numerical solution approaches
solution
asymptotic
1 <Atx2 : Numerical solution overshoot
& oscilate about exact solution
at>2: Numerical solution oscilate
about exact solution in

unstable manner that grows


only
an
so, conditionally
stable

for AtK2. exponentially without bound.

Numerical instability)
unconditionally stable.
emain advantage of
1
impheit
methods)
Note:the error increases as at increase, but
This is problem, nota
accuracy
an

stability
problem.

Remarks:
Euler'smethod use turncated
Taylor series
expansion his term).
cop to
choice to increase is to includehigher order terms.
one
accuracy
However, it
requires
the
computation & evaluation dentative ofgives
discussed earlier, in most cases, it is cumbersome and
as
very
-
computationally impossible.
So, Runge
= kuttamethod provide an
technique to have higher order
accuracy
while the
eliminating need to
complete & evolute derivatives atyou)
idea:
key Generalization of single-step methods.
r

Yut Inthe effective slopes


=

Range-kutta method
proposed to approximate slope as a weighted average of slopes
at intermediate prints (i.e, IPs)

3 3+ h(E Wep:]i]
,es
=

n+1

l=
slopes and zw 1
=

Ipi
Wi
=1

in Ip, jpa--- Ipi unti


->

Although, itlooks more


complicated that one we had before,
will don't need to calculate
but we
appeariate itsince we

denicitives ofyou
The choose intermediate points leads into differentR-K methods.
way
- we
and ene
order

Rutta
written
is for order
enti-y,thceffective slopes
RR as follows
+h (W, 3'=p,+W2Y=pe)
is in
n pe Ie nint
In+1 yn
=

It can be
proofthat RK-2nd order method provide a 2ndorder
accuracy
as follows, but using
an
equivalentformula.

algunaamounts
01 3 in
= +

21 In

E
iw, 1;
3x mediate
=
w =

IP, Un
=

Explicit
Euler
Fuered metho d
Henn's methods
determined for initial and end
use the average value for slopes points
ofthe intervent.
Thus, IP1 =
(an, 3n) y'IP2

y'(+h y+Yp4)
y,+Y'Iph) sin"
anis sig
(anth,
⑧ +

Ip2 =

-
I
Approximate value
Yn.
Then of y at anth ⑧

Yes ip2
h[Y,* I
Y
In+=Yn+ ⑧ ⑧ Y

ern Enth
W, Wa 2 -

I
y'
es
2.9.
G be-0.4
=
·34) 5 &h=1.5Find
=

y =5
y(3.0)=?
y =4.302
y
z
2.50
=

A -X
An

In+1 yn =

h(tip1+9'12]
+
x 0
=

are
n 1.5
=
x 1.54,3
=

I
ne
=

h 1.5
=

Step #1:
aI5e40.4y. y'10,5)
IPI
=
3e-0.4(5) 1
=
=

I
y IP2 I gith, y. +yph) -* y'10+1.5,5 + 1X1.5) y'(1.5,6.5)
=

- 1.5
bbe
=

-0.416.5) = -
1.9306

h(24 y')
so
y, y.= +

IP2
x5
=

(12(1) + 21-19306) (.5.)


+

Y, 4.302
= =
y(1.5)
Step #2: x, =

I
1.5,
y, 4.302
=

I
IP1
=
y'(,17,) y'(1.5, 4.302) be" T0.4(4.302)
= =
=
-1.0519

YIpz y'(, th, 3n+Y1p) y' (1.5


= =
+ 1.5, 4.302+(-1.0519) (1.5.)
y
=> (3,2.726.) = -0.9406

32 y, + h(y'Ip1 yyp2) 4.302


(2(- 10519) 1(-0.9406))x1.5
+
= +
= +

=> 2.50t =y(3.0) y(ua! =

42 x, + k 1.5 1.5 3.0


=
=

+ =
Enact -$ y13) 2-763
=

is to the accurate reduce


Absolute relative true error
Itt1=1% more

step size. i.eh!


Midpoint Method:

use the
slope at the mid point
Thus, IP1= (un, Jn)

Ipz (antth,
=

Ytp1?

approximate of

areyetsh
value

y at midpoint Int
i.e. Mnth.) i
-
Ther We

* **** I
I
M 1 Ip
z
A
1

In+1 Yu Y
+
=
⑧ e ⑧

IP2 ern u Enth


2 -

Wnt1 yn
=

hy'Ip2
+
I
2.9.
by -
·34) 5 &h=1.5Find
de
be
=

0.4y =

y(3.0)=?
thyIP2
ne

y In+1= Im

...
~

Step #1:
oyu,y) y'c0,5)
=
3e -0.425)
=
1
=
6 =3.0

'Epz y'(+1h, y. Y'Iph) y'( +1,x1.5,5 +(((((1.5))


=
+ =

y'C0.75,5.75)
=

31pc 750-4(5-75)
0 -

3e
-0.8829
=

3, 1
=

+
hyyp2 x
=
5 + (-0.8829)(1.5) 3.676
=

y(n 15)
=
=

G 2th 0 + 1.5
step
=
= =
1.5
#2:

=5050
i3 y'(1.5, 3.676)
=
=-o e

32pz=y'(x, +1h, y, kyspch! y'(5+1(1.5, 3.676 +x-0.8009X1.5.


=

- y'(2.25,3.075) -0.9138
=
32 1,
=

hy2pz
+
5.676
=

+ (-0.9138)4.5) 2.304
=
y(z) y(3)
=
=

224,+h 1.5 1.5


= =
+

-
3-0

EN 2.763
=

16) 16.57%
=

Absolute relative true error

In's methods
-

use the
slope at two
points as follows

Thus ↑

-
IP1 =
(xn, 3n)

Ipz (anth, Int Y'Ip14)


=

me

approximate value of
Yeste I
⑧ Y

at antih ern with enth


Then y 2 -

In+1 yn h(sysp1+5Y'sp).
= +
e.g.
G ber_0.4y,yW)= 5&h-1.5Find y(3.0) =?

-
=

In+1 yn h(sysp1+5Y'sp).
N
= +

Step #1: -=5.

Yp1 y'(2, y) 3'10,5) 30 0.45)=1


-
=
=
= -
43 =
an = 1.5

>'sqz y'(x- 94,2 3'sp1h)


=
+

+
y
=
"(0 2x1.5,5 2(1)(.5)
+ +

y'(1.125, 6.125.)
=>

1.125
1.476
-

be
=>
-

0.4(6.125) =-

I = 7. 4(321+ ypz)
+

5+
=

(5x43(-1.4761)(1.5) 4.024-y(u,)=y(1.5)
=

x, x+h- of 1.5=1.5
=

Step #28 4.024


ty,y
m
,
=

>'=p1 y'(x,,y,) y'(1.5,4.024)


=
=

= -0.9402

Y'spz y'(,+Eh, y,+Ypph) y'(1.53(1.51,4.024


=
=

31-094024.5))
+
y'(2.625,2.966)
= =
=
0.9692

yz 3,
=

h(by2p1+3Y2q2)
+

4.024(13x
=
- 0.9402 +

3x- 0.9692).(1.5)
2.5547=y() y(3)
=
=

n2 x,+
=
h 1.5+1.5 3,0
=
=

EY 2.763
=

16t1 6.453%
=

Runge-Kulta nth order method:

The general form of


Int= Inth (effective slope.
written
is for order RR as follows

Inx 3 +
h
=

[Y 5 Ypt Yips'YIph
Yup, =y'kn Yn!
↳'Ipz y'(m,+h, gh.)
=

App. value at midpoint


using y Ips
-Ips= " (un+Eh,3, Yp!)-
Refined App-value at midpoint using yIp2
Y'spa=y'anth, In+Ypsh.)
Inx 3 +
=
h
[Y 5 Ypt Yips'YIph

i
Yup, =y'kn Yn! I'=p4
↳'Ipz y'(m,+h, gh.)
=

App. value at midpoint


using yIp:
-Ips= " (un+Eh,3, Yp!)
-
Refined App-value at midpoint using y'Ipz 3 p1
Y'spa=y'anth, In+Ypsh.)
en antish unti

It can be
proofthat RK-nth order method provide an 4th-order

accuracy
as follows, but using
an
equivalentformula.
-=3+
im-n)+
↳2 e) must in
momen 21 In
0
No =

2.9.
G y13.0)=?
5
be y
=

=
-
0.4
Y ·34) 5 &h=1.5Find
=

y'

Step #/wr,
y 5
=

I, 3
=
h
+

[Y5 Ypt Yips' YIph


Yup, =y'k., 40) y'10,5.) 30%-0.4x5=1
= =

'Ipz=y'(n.th,yotYph.) y'L0+ 1x15,5 1 1.5!)=


=
+

y'10.75,5.75)
=

= -

0.8829

>'Ip (.+(h13. 1) y'(+2X1.5,5 12(-0.8829.1.5.) y'(0.75,4.338)


=
+ =
+
=
=
-0.3180

Y'spa=y'(oth,y0+Y(psh) y'(0+1.5,5( 1.140)(1.5)


=

y'(1.5,4.523)
=
=-1.140

3, 3.14
=

[5Y 5ytyp5y= 5
(5()+51-0.8029) 5(
+
+
-

0.3150) 5(-1.140!]
+

= 4.365 y(1.5.)
=y(ur)=
step #0 4.365
,J1 =

Y(p y(x,,y,) y'(1.5,4.365) x50.4(4.365)


= =
=
= -

1.076

yIpz y(u,+ th,y,+ yh) y(1-5 1)15),4-365 1) 1.076)(1.5!)


=
=

+ + -

y2.25,3.557)
= = -1.107

ezpz y(x, h,x,+yxh) y(1.5 +(y(15.),4.365


= + = +
( -

1.107)(1.5))
3(2.25,3.535)
= =
-1.098

37p y(,+h,,y y(ph) y(15


=
+ = + 1.5, 4.365 + 1 -

1.095.)x1.5)) y(3,2.715.)
=

=
0.9379
-

y
2 y,
-

h53 595(by]
+
+

IP4
4.065
=
+
(5(-1.076)1 + -
1.107) + E(-1.095.)
80.9379)] 2.759
8.7509(x100 0.1507%
+ =>

EX = 2.763 j 1c + 1 =
=

-Y(3)
l

BUP-ODE - Finite difference -


went week

FDM-parabolic
& PDE after

⑭ FDM -

Elliptic PDE Wee sonly one)

③ FDM- Hyperbolic PDE

You might also like