0% found this document useful (0 votes)
14 views11 pages

Adobe Scan 06 Oct 2023

Uploaded by

darshuerumamaadu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views11 pages

Adobe Scan 06 Oct 2023

Uploaded by

darshuerumamaadu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

oniy the given function values at

founth onder Runge Kutta method is


method of second order
differcnt pont
tedious,
s
we
, Numeri al
11 3 Second order Runge-Kutta
dy
method (for ffrst
AIM. To solve dx -f(x, y) given y(x)=Yo
Proof. By Taylor scries, we havec,
v(r+h) =y (*) +hy()
+)+O(h'
Differentiating the equation (1) w.r.t. x,
df of dy
+
-f,+yJ,=Í, +,
Using the values of y and y" got from (1) and
y(a+h) -y () =hf+, hU,+] + 0u'
(3), in (2), e

Ay = hft;,+)+ow)
Let Ajy= k, =fu, y). Ax =hf(u, y
A,y=k,=hf(r+ mh,y +mk)
and le Ay = ak, + bk,
constants to be determined to get the
where a., band m are better acous
of Ay. of h.
Expand k, and Ay in powers
two variables, we h
Expanding k, by Taylor series for
k,=hf(r+mh, y +mk,)
mh
mh + mk 2!
2

mh +mk,
mhf, +mhf,+ 2!
SInce k, =

powers of h
=hft mh (f,+f)+ higher
Substituting k, k, in (7),
hy= abf +bl af+m (, +f) +O(h)
-(a+b) hf+ bmh (f; +ff) +O(h)
Equating Ay from (4) and (10), we get
w/utton ofr Ordinary Dferential Equations
38|
mh'+) higher powers of h
subslitut1ngA. A, in
(7), (9)
AYahf

bmh' 4, +f) +oh')


and (10), we get ..10)
iquatingAy from (4)
and bm =2
..01)
Now we have only two equations given by (1) to
unknons a, b, m. solve for three
From a+h=1,N= | - b nd also m=
2h using (7),
Ay =(1- k, + bky
where k=hf(x, y)
h hf
k, =h, 2b "y+
25
Now Ay = y (x+ h)- y (x)
h hf
y(x+ h) = y(*) + (1 - b) hf+ bhfx 26
y+
25
1., Yn+=y, +(1- b) hfon, y,)
h
+bhf|x, t 26 2b
From this general second order Runge-Kutta
formula, setting
a=0, b =1, m= 2 we get the second order Runge-Kutta algorithm as

kË = hf (x, y)

ky = Second order R.K. algorithm


and Ay = K where h=A.
Since the derivations of third and fourth order Runge- Kutta
algorithms are tedious, we state them below for use.
The third order Runge-Kutta method algorithm is given below:
k, =hf(x, y)
,h,y ) Third order

ky = h (x+ h, y+ 2k,- k) R.K. algorithm

and Ay=k, +4k, + k,)


382
The fourth order Runge-Kutta method algorithm
problems unless
otherwisc nentioncd.
Iis Numerieat
k, = hf(, y)

ky =hf(uth, y
+ k) Four
R.K.thalgororditerhm
+k4)
and Ay=(k,+2k, +2k,
+ Ay
y (r+h) =y (r)
dy
solve dx -f(., y). y )= o
Working Rule: To

Calculate k, =hf(o o) 1

+k,)
ky=hf(+h,yo
1
2k, +2k, tk4)
and Ay=¿(k,+
where Ar=h.
Now y, = Yo+Ay.
from (ij, y)) and repeating the process, We
Now starting
(, y) etc. method,
order Runge-Kutta
Note 1. Insecond
h 1

h
:.=Yo +Ayo =.
method.
This is exactly the Modified Euler
second order is nothing but be
So, the Runge-Kutta method of
Modified Euler method.
alone, then the fourth orda
Note 2. Iffu, y)=f), ie., only a function x
Runge-Kutta method reduces to
kË=hf()
- the area of y=f(r) between X= X and

Le,
equal intervals of length by

Ay reduces to the area by Simpson's one.


thethree methods, (2nd order, 3rd
Xhird*thnçwe ith
Simpson': One )

In
all

values of Kc, ky
arder and h
aresame. Therefore, one need
Nale

doing by all the three methods.


while
t
repeat otrhdeer) the.
Apply the fourth order Runge- wortk
1.
fanple
y'=xty y(0) = 1. Kutta method to
(Ap. 1992)find
that
mentioned in
Since h is not
the
solotion.

Ertyy(0)=| .: f y ) =X+y, Xh =0,


quest on, we take
j=01,x,=0:2
fourth order Runge-Kutta method, for the first
-1)=01 interval,
By
=(01)4p+ y) =(01)(0 +
k=hflo )=(
+thtJ=(0)f(005, 195,
- (0-1)(005 + 105) =01|

=(01)f(005, 1055) = (0- 1)(005 + 1-055) =0110%

=(01)f(0-1, 11105) =(0:l)(01+1105) =0-12105

=(01+022 +0-2210+ 012105) =0110341667.


01)=y, =yo + Ay= 1-110341667 1110342.
Now starting from (x, y) we get (x, y»). Again apply Runge-Kutta
Miim replacing (Xp yo) by y).
h=hfk, y)=(01)(41 +y) =(01l)(0-1 ++1-110342)
1 =01210342

4+;=(01)f015,1-170859)
H7859)=0-1320859
= (01)(0-15 +
84

(0 1)f(0s.
=(0
1)f(0 2, 1
=0 144298048 242980M8
(01)+6, +.2k, +2k, +ka)
(02)
y =y
v(02) =12428055 =l1103424!
Correct to four decimal places, y(0-2) =12428.
Example 2. Ohtainthe values ofy at x =01, 0,2
order (i) third order and
of (i) second (iii) fourth oTder
y'=-), given y (0) = )
diferential equation fo
Solution. Here. f(x. y) =-y, =0. yo =l, (MKI V
()Second order:
k,=hf(Wp yo) =(0-1)(- y) =-01
x=01,x,=0)
1

=-0|x 095 =-
0.905
)) =o t Ay=l-0095 =
y;=y (0-1) =0.905
Again starting from (0-1, 0-905) replacing (p ) by
k,=(01)f(Kj, )}) =(01)(-0-905) =-0-0905

=(01) ((0-15, 0:85975)] = (01) (-085975) =- 0085975


Ay =k,
.. y2= y(02) = y, + Ay=0-819025
(iü) Third order:
k, =hf(oy yo) =-01

k, =hf(,+ h, yo +
2k, - k)
-
(0)f(0,09) =(01)(-0-9) =-009
Ay= (kt 4k, +k,)
y =
tns

k,= hf (u, th. y +2, h)


=(0 Df(02. 0828) = 9082%
EY
y, = + Ay =091+(4, 4, +b,y
- 091
+-091
6
0823366 -034)-0nn,
y (02) =
iDFourth order:
k, =hf ( Yo) =(01)f(0, 1)=-0|

kh=hf|othYotke =(01}f(005, 09525,


=-0(9525
ky= hf (xo +h, yo +k,) =(01)f(01, 090475)
=-0-090475

Ay =(k, +2k, +2k, +ka)


y=Y% +Ay= l +(k+ 2k, +2k, +ky)
y,=y (0-1) = 09048375
Again start from this ( };) and replace ( Yo) and repeat
k,=hfu, y}) =(0:1)-)=-009048375
1

-(0Df015, 08595956) = -)cdo! 08595956

=(0:1)f(0 15,0 86I8577 ) = -0 cdot 08618577

ky=hflzy th, ytky)


=(01)f(0:2,0-8186517) =-0-08186517
Ay=(-0
6 09048375 2x0-08595956
-2 x0-08618577-0-08186517)
386

00861066067

};=y(0 2) -
081873089
Numeri al Mon
Tabular values are
Thirdorder Fourth order
Second order

0.91 0-9048375

9483714j
0.905
0-823366 0-81873089
02 0819025
more closer to exact values
values are
Fourth order
dy
Biven
Example 3. Compute y
(03) dx +y =0, +xy'
taking h=0/ using R.K
method offourth order (correct to 4 y(0)1
Solution. y'=-(y'+y) =fu,yl; 4, =0, Yo=1, h=01, deCimal:
,=02, x =03, y, =?
For Ist interval:

Yo)] = -01
k,=hf(go yo) =(0-1)(-(aot
k, =hf|*o-(0)f(005,
h 095)

=-01 [(005) (095) +095] =-0-0995


h
o*jotj4 -(09f(005,,0.95025)
=(0-1) [- (0-05 x0-95025+ 1)(0-95025) )
=-0-09953987 - 0-0995

ky =hf(o t+h, yo +k,)


= (0-1)f(O1, 0.9005) =-00982

y=1+¿-01+2(-00995) +2(-00995)-0-09821
6

y(0-1) = 0.9006
of Ordimary
Diolfferentil Lquaton
n place (o 'o
) (0Df0 I,09000) epcat the pu
-0-0982

)f015,
=-0-0960
08S I5)
=(01)f(015, 0852%,
=-0-0962
+A, vy tk3) =(01)f(02,,0 8044)
=-0-0934

= A9006+-00982 +2x(-00960) +2hv


6

t2(-00962)
0)=08046
Aeain,starting from (X, y) in place of (o Yo) +(-00934)
=-0-0934. k, =-00902, k, =-0-0904.
k,
1
Ay =y, t(k, +2k, +-2k, +k,)
k,z-00867
6
y(03)=0-7144.
Bxample 4. Using
R.K. method of fourth order, find y(08) correct
-iecimal places if y' =y -xy (06) =1:7379 (April 1991)
Solution. Here, x =0-6, y, =:11-7379, h =0l,x=07,x=08
fuy)=y
ByR.K. method of 4th order
1
y) = Yot(k,+ 2k, + 2k, + k,) ..()

ere
k, =hf (ky. yo) =(01)f(06, 1-7379)
=(0 1) |1-7379 -(061=01378
h

(065)'|=01384
=(0-1)f(065, 1-8068)8) =(0 1)|18068
388

(01)|1 8071 -(065)-0h94


(0D08764)
+A,) =(01) f(07,
(07')=0 386
Numerinl M.
Hence, using (
(07)=,= 7370+101378 +2(0 1384).
y(07)= 18763
To find );=y 08), we again start from

where
Now, ,=)tk, +2k, +2k, +k,l
k, =hfu,y) =(0)|
h
(X)=0|1=03M%.\816
07'
=(0 1) [1-9456- (0-75)]=0-1383
\9436,
h

= (0-1)f(075, 1-9455)

=(0-1) [1-9455 (0-75)]=0-1383


k, =hf(x, th,yj +k)
= (01)f(08, 2-0146)
=(01) (20146- (08)]=01375
Using (2),.
Y, =y (08) =18763 + (01386+ 2(1-1383) +2(1-1383) +0!:
=2-0145
Y;=y (08) = 2-0145
Example 5. Using Runge-Kutta method of fourth order, solu
dy '
dx given y (0)=lat x=02, 0-4. (MS. April '92)
(Anna Ap. 2005)
Solution. y=fk, )=y-, (Anna Nov. 2004)
Here X=0, h02, x, =02, x, =0:4,Yo =1
f(Mo Y) =f(0, 1)=1+0
k, = hf (iy, Yo) =(02) xl =02
k,=f othlot =(02)f01, 11)
Differential Equations 389
Solutionof
Ordinary
121 -091
1-21+00
-02)/('+01)'
=0-1967213

-02r011joI97213
=(02)f(0-1, 1-0983606)
(10983606)-(001) =01967
=(0) (1-0983606)'+(001)
k,=hf(nth, n+k)
=(02)f(0-2, 1-1967)
(1967)-(02) =0-189
=(02)|96+(02)

Ay=1k, +2k, +2k,+k¡l)


-102 +2(019672) +2(1-1967)+01891)
6
=0-19598
Ay = 1 19598.
y(02) =y; =Yo+ (, yj) =(0:2, 1-19598).
from
Againto findy(04), start
Now, (1-19598)-(02)2|
=0-1891
k=if4, )=(02) (1-19598) +(02
1
, +¿k,=(02)f(03,1-2905)

(129055)?-(03) |
-02)| (129055) +(o03)
k,= (0:2)f(G3, 1-28572) =0-1793
=(02)f(04, y, +k4) =(02)f(04, 1:37528)
=0-1687

=10-1891
6
+2 (0 1795) +2(0-1793) +0-1687|
=0.!792
390

=y (0-4) =y, + Ay = 1
.. y,
Runge-Kutta method fc
1-14.
tial equations

numerically t

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy