0% found this document useful (0 votes)
27 views12 pages

Runge-Kutta Method

module 3

Uploaded by

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

Runge-Kutta Method

module 3

Uploaded by

VAHEES
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 12
O The Runge-Kutta Methods This method was devised by Runge, about the year 1934 and extended py Kutta a few years later. Therefore we call this method as Runge-Kutta method. Unlike any of the methods, explained in the preceding two sections the increments of the function are calculated once for all by means of a definite set of formulae. Here a set of formulae are given without proof for solving a differential equation of the form & f ( y) under the initial condition y (9) = Yo: Let # denote the length of the interval between equidistant values of x. The various types of formulae according to their order are given below. | Second order Runge - Kutta Method y If the initial values are xq, Yo for the differential equation = f (x, y) then the first increment in y viz Ay is computed from the formulae ki hf (o> Yo) 4.38 sessssssssstsscessststensessnstnesnsnassseesenenseunt NUMERICAL METHODs ‘ a ky = Af |xot720tQ Ay = k Nowx, = x9 +h, y) =o + Ay The increment in y for the second interval is computed in a similar manner by means of the formulae, ky = Af Gyr, : A MY. ky = Aflatzntz)> Ay = hk, ~ and so on for the succeeding intervals. i Q Third order Runge - Kutta Method The third order Runge-Kutta method is designed by the following formulae. ky = hf (%,y0), h ky { = nslortwett) ( / Ay = hf %o+h, yo + 2ky-k), ‘3 * Now the first increment in y viz Ay is computed from ! 1 Ay = [ky + 4ky +k] Now x1 = x9 +h, yy =yq+ Ay The increment in y for the second interval is computed in a similar manner by means of the formulae. AL = AS Guy), . : hk ky kh = as(ast.y,+4) > y= hf Qy+hy+2ky-h), ; : AY = & [ky + 4hy + hs], and so on for the succeeding intervals, NN goth VALUE PROBLEMS FOR ORDINARY DIFFERENTIAL EQUATIONS g Fourth Order Runge-Kutta Method : : | This method is most commonly used in practice. Unless and otherwise gated, Runge-Kutta method means only Fourth Order Runge-Kutta method. Let & = f @&, y) be a given differential equation to be solved ynder the condition y (xo) = yo. If h be the length of the interval between equidistant values, then the first increment in y is computed froth the formulae. ~ ky = hf.@o¥)> = atlart grat ky = hf\xotz.YtQ) > a h kh “t ts ~ rilaehveB) : .. ky = hf Hoth yo* hs) a “ Ay = FE (ky + ky + 2s + a) a. 7 Nowx, = x9+h,91;=¥o + Ay The increment in y for the second interval is computed in a similar manner by means of the formulae. - ky = hf Gpy> - h ok = rila+BontZ), ky = h ky ky = nian), ky = Af (ey thy th)» Ay = F (ky + 2h + 2 + ha) ‘ad so on for the succeeding intervals. \ ue . h nge- Note : If o is a function of x alone then the Fourth Order Rung Kutta method reduces to Simpson’s Rute. - For, ky = ASG) uUnrr4 @ _. NUMERICAL METHODS 4.40 woes by = Aseo4) kth 10 + 4) ky = hf(xoth) . ay = tf Feee)+ 2420 +) 2f(20#3) +/+ »| G) [reo + a(x +f) +fG0+ ] ich i ined by applying Simpson’s hich is the same result as would be obtaine: , Rule in the interval x9 to x9 + h if we take two equal sub-intervals of idth 2 width > . Now we shall illustrate this method in the following examples. ( A AX exaup.e1 6 — : Find the values of y(1.1) using Runge-Kutta method of the third |S order and (ii) Runge-Kutta method of the fourth order given that dq art et. J Given y= Yty ie, SOY) = Pty And also given that xp = o=l = i) yo = Land h=0.1 To find y (1.1) using third order Run, Now k= AF (X,Y) ge-Kutta Method : = hly? +094] = ODL +A] = 0.1) 7 k= 0.2 hy IL a0+d yok] Z @ Una /BLEMS FOR ORDINARY DIFFERENTIAL EQUATIONS ......+0e-ss00e00+ 441 ponerse F ky)2 h ky = al (e+) +(xo+ +4) (v0 4) | 2 0.2\2 0.1 02 - on[ (1+) +(e )(O+¥) | 4 = (0.1) [1 +01) + (1 +0.05) (1 +0.1) ]- ky =: 0.2365 ky = hf (xoth, yo+2ho~h) = h[(yot2h- hy + (x0 +A) (yo + 2k - 1) 1 = (0.1) {C1 + 2(0.2365)- o2Pt(1+01) = (0.1)[0.273y + .1)(1.273)] = (0.1) [3.0208 ] key = 0.30208 . 1 chy = ¢ lh t4h+ bl ca z [ 0.2-+ 4(0.2365) + 0.30208 ] ‘ 1 A = gf 1.44808} c Ay = 0.24135 yy = YorAy = 140.24135 ; y(L1) = 1.24135 To find y (1.1) using Runge-Kutta Method of Fourth order: Here x) = 1, youl and h=0.1 [1 +2(0.2365)-0.21} Now k, = hf (0.0) oe M h (90° + x0 yo) = OD [P +] =O.D2) ky = 0.2 A= ofl nate nt | «il Goodale) Oo) i - anf DOP) = (0.1) [(1.1 + (1.05) (1-1) ] ky = 0.2365 = ky = af nti nee |] = af (we) «(~e8) (or) « oof (AR) e(149) (14285) = (0.1) [ (1.11825) + (1 + 0.05).(1.11825) ] = (0.1) [2.4246 ] oo . ) ky = 0.24246 Ne, . ky = hfQoth, works) - = (0.1) [ (mths +(x +h) (yo +hs)] = (0.1) [ (1.24246)? + (1.1) (1.24246) ] = (0.1) [ 1.5437 + 1.366706 ] ; (Or = (0.1) [2.91041] : { / ky = 0.29104 - PS 1 “Ay = é [ky +2 ky +2 hy + ky] : = [0.2 + 2(0.2365) + 2(0.24246) + 0.29104 ] £1 1.44896 7 je ycby f oe 5 0.24149 OY = Yot Ay = 1+0.24149 . yy = 1.24149 “ . SC sprvik. VALUE PROBLEMS FOR ORDINARY DIFFERENTIAL EQUATIONS p EXAMPLE2 @ p>- By applying the fourth order Runge-Kutta Method find fromy’ =Y— XY (() =2 taking f= 0.1. y-(02) SU) = . a rt 7O Given y! = y-x. 7 vor ie, f(x,y) = y-x ve and y (0) = 2 Le. x9 = 0, yo = 2 and k= 0.1. We know that the fourth order Runge-Kutta formula for finding the first increment in y viz Ay is given by 1 : by = Gly +2hg+2h +h) where ky = hf (Xo, yo) . h kh) ky = dot nia) . y= ng{ 0+ B yt 2). 7 )— ky = hf (xo +h, yo+ ks) wi. 2. ky = (1) 09-40) = 012-9) t n=O v[(o0+B)-(-0+8)] A ox [(2+52)- (o+%)| += (0.1) [2.1-0.05] = 0.205. t= en|(w+)-C"9)] - oof (2+%#8)-(-¥)] — = (0.1) [2.1025 - 0.05] =. 0.20525 ky = (0-1) 0% As) Got I o wa UN 4 -—— — 4 SIA csecssenenseneenees! aesaseesasonecneeneeseneesenneer yl), oe. Ay 7K a w W (0.1) [2 + 0.20525 -0-0.1] 0.210525 sth 2h +2 +a i cf = do. 2 + 20.205) + 2 (0.20525) + 0.210525] i [0.2 +0.41+0.41 05+ 0.210525] 0.20517 v=o t AY. 2+0.20517 2.20517 Next we have to find y (0.2) =y2 =y, + Ay ~fe Yi Lo: "where Ay [= \¢ [ky +2 ky +2 ky + ka] @ Ung. 1 Now k, W a x th=0+0.1=0.1 Af) AD -%] (0.1) [2.20517-0.1] = 0.210517 - h ky os (x,+4, yt +2) [b-4)-G3)] on| (2205174 22105 )-(01 ae (0.1) (2.31042 ~ 0.15] = 0.21604 = h h ky) - t(aj+2, n+] ALbn8)- God] oi 2 ) re ysTIAL VALUE PROBLEMS FOR ORDINARY DIFFERENTIAL EQUATIONS 4 : sessesennanssenene 45 conf (220s 42248) (, +ot)] (0.1) [2.31319 — 0.15] = 0.21632 ky = hf thy +h) = hl th)- Gi tA. : = (0.1) (2.20517 + 0.21632)- (0.1 +0.1)] | i = (0.1) [2.142149 - 0.2] = 022214 \ a cs Ay = & Uy t+ ky + 2ky + a Al 1 =6 [0.2105 +2 (0.21604) +2 (0.21632) + 0.22214] ; . =6 [0.2105 + 0.43208 + 0.43264 + 0.22214] } = 0.21622 on 8 KW dn tay ne = (2.20517 + 0.21622 yx = 2.42139 “4h Hence we haye the following table. { x 0 ot | 02 bh oy 2 |2.20517| 2.42139 : | + EXAMPLE 3 * ee ‘ Find the values of y(0.2) and y(0.4) using Runge-Kutta Method of : : od . turth order. with f= 0.2, given that “qr =V" + 73.9(0)=08- Given - y= ety ie, fosy) = VP *Y And also given that x9 = Yo= = 0.8 and h=0. a | To find y (0. We know that the fourth order Runge-Kutta formula to find the first | increment in where k, = Af (xq, ¥o) k, k i = .2\2 Cys 2 02[ (0+22) +(os+ 222882) $20 pe aw os eek CON OATES Yio kk fu °%* ks vasssssssus NUMERICAL METHOps | 2) 3 y viz. Ay is given by 1 Ay = G [ky +2 hy +2 hy + ha] =h [Nw ty ] = (0.2)[Y0+08 ] = 0.17889 = asl ott y+H | NCFCD W =” 0.18968 ( } i asl nti nt ] 1 CoO B 7 2 (0 +P + (os + 218968) = .2)[ V1 +0.8 + 0.09484 ] | = 0.19025 = AS Goth, yo+ky) = INGOTS GS FR) = AVOF02¥ 4087 0.19025) = (0.2)V0.044 0.99025 = 0.20300 ee oo VALUE PROBLEMS FOR ORDINARY DIFFERENTIAL EQUATIONS 4.47 1 chy = 6 Ut 2h +2hg thy] 1 = & [0.17889 + 2(0.18968) + 2(0. 19025) + 0.20300 } 1 . = g( 1.14175] : : ~ Ay = 0.19029 2.0.2) = yot dy = 0.8 +0.19029 0.99029 y (0.2) To find y(0.4) Here x; = 0.2, yi =0.99029 and h=0.2 Now k = hf(,y) = h [Natty | = (02) [Y@2y¥ + 0.99029 ] ky = 0.20301 in = WL att ont +i] iL oF O5) (0.2) | (02 s o2y + (0.9029 R 020301 }I = (0.2) V0. 3) + 0.99029 + 0.10150 ky = 0.21742 = afl nt xt bye] o. Ay “ y2 2 y (0.4) W W sc cecescuaaestesccotesesetctsomcsnenecsa-orcsetersesseecesei NUMERICAL METHOng: f (0. ty (0.3y" + 0.99029 + 0.10871 | 0! 0.21808 hf@ath,yitks) AN (a thy + (i +h) hf O2+02) + (0.99029 + 0.21808) (0.2) 1.36837 0.23396 7 [i+ 2k +2kyt ky] 7 [ 0.20301 + 2(0.21742) + 2(0.21808)-+ 0.23396 J bf 1.30797 ] 0.217996 y+ Ay 0.99029 + 0.217996 1.20828 [| 04 | 0.8 | 0.99029

You might also like