You are on page 1of 6
Problem A ye = 2x #128 - 20x + 86 , from x=0 to 2+ 4 with the inilial condition that y=1 at x= 0, Uce h=O5 a) Euler Explicit Method The values of x ond y ore X70 and yi shy in yee f Oye When h=05 5 pie +05) yin * yb #C2x? [2 ~ 203i*8.6 (0.6) The number of steps i determined by: no. of steps = The finet print of olution is COI) at iL © First step at i= | oie 1405 ee +05 = 05 Pye ye Ze at 20086 (06) ye ¥! L208 12018 000885] (08) +1986 (05) yer 5B The sesond point of solution is (O5,5.25) where Xe=05 ond yo 5.25 © Secand step at i= 2 Pier M05 tau 805 wel » yin * YEG 2x? De = 200i # 8.6 (0.6) 5.05 yg 2 yous C-2x2 + [De ~ 2030*8.6 (0.6) yo = 5.25 + (2008) + 1200.5)*> 2005)+ 8.6] (0.5) ye "5.895, Tho third point of olution is (1.5875) where xs 1 and yo *5875 © Third step of 13 PMH HOS wn eh as meld » yin “yi Cx + [Dad ~ 2031+8.6 (06) yin oy ane» td 200085 1005) yo 6.095 + [2017 +12c1)" 2001+ 8.6] (0.5) ye + 6125 0) Euler's Explicit’ Method The fourth point oF solution ic (15 .6:126) where x4 * 1.5 and. y4 5.125 © Fourth step ot i4 ome FOS w= 405 Weed » yn “yore 12d - 2010+8.6 (08) Yous Wt C2ae [der = 20e*8.6 1005) ye = 6125" (201.5) + 1201.5) 2001.5)+8.6] (06) yrs The fifth point of solution i (2.4.5) where Xs*2 and ye 45 © Fifth ctep at i°5 Prien 105) Wen yin yet C 2x? Del ~ 20 #85 00.6) Yeu oye -2sd + (2a ~2055°8.6 1008) Yo 245+ [-200" +120)" 200+8.5](05) Ye 4.35 The sixth point of colution ic (2.54.75) where Xe *2.5 and yo= 4.75 Sixth step at i=G o Kiet = xpos wens Ke OS weed > yin "yi eae (2a! - 20+8.5 (06) yeu sW* Coed © [2a8 - 203648 6 (05) y= 495 + (-2028)'+ 12¢25)* 20¢2.5)+8.6] (06) We + 6835, The ceventh point of solution ie (3,5.875) where Xv =3 ond 9 “6.695 © Seventh step ab is 7 P Kiel =m 05 won 405 735 » yon “Ke Ga + (a= 20486 (05) You se C2? + [Daa - 200448. 906) yo" 6.835 + (205) +128)" 20+8.6] (06) YB 4) Euler's Explicit Method The eighth point oF colution ic (3.5.3.125) where Xe =3.5 and ye 3.125 © Lighth step ot i= 8 Pac om 05 von = 94+ 05 met » yin * y+ Co 2x2 + [Dat ~ 2038.6 (0) F100 8, 9? on ow" Cee « [Dee ~ 2014" 8.6 (05) Yo" 4125 +[-268.5) +1208.5)*- 2008.5)" 8.5] (0.6) Yar? Get the general solution of the ODE She ae? + 10d 20% +86 When initial value is (0.1), C is given as 2, iy-on . dy + (-2x' “i “0 85) dx ~ af 42- 10 85x 6 (ay = § (-2x°* 120" 208 + 86)éx a . y ended + pe 08" + 85x +460) 1000+ 850046 4 3 2 le6 y Beta 10s 86x 16 © The explicit solution is y ="-g2*44™ 10x'* 85x +1 ye Ie Substitute the values of x at each step to the general colution to obtain exact values of y When x= 0 and i=l When %*2 and +5; yt at iota ax | y= Ghar ierss5@rr| 2 yr | yr 2 When xe 06 and i=25 When %6*25 and i+G; <0.5)"+ 4(0.5)*- 1000.5)'* 8.5005)+1 y sh 4.5" 905" 850. H+ y + 3.21875 y * 2.71895 When +1 and i=35 When %=3 and i+ ¥) y OH 400* 100n"e 8541 y glory 10csy"+ 8503)+ | 2 yro yr4 When %*15 and i=4; When Xe=3.5 and i +9; y Gp 4159" 1ocisy 85¢199+ | y GH G5" 0G.9"856911 y 7 2.21835, y° 471895 i Hl 2 8 4 5 a 7 4 x 0 05 I! Ib 2 888 1 5.2 $895 5.25 4.54.95 5.895 F105 | 321895 8 2.2895 2258 4 4.91835 Yicrumeia Yiu) Problem A y= 2x? +120 20x +8.6 , from x=0 to x*4 with the initial condition that y-1 at x= 0. Uso h=05 'b) Second - Order Runge Kutta Method The values of x and y are %70 and pel The number of steps ie determined by: na of steps. = The first point of olution is (0,1) at i-l. © Firat step at i= | Print =F 05 » Ke * § Cath, yor Kih) [> 206 +h)" +1260 +h)" 2068 +h) #85] Kin 8 405 = [= 264 +h)" + 12Gx +h)*=2004 +h) #85) e205 = 0 ond h= 05, thes, x th * 05 Kee f= C Dad + [Dad - 2008.5) \ {C205° esr 2908-85) = Cdn [or 2°85) go es 785 yer Kih > ye # Koh = 146.5)(05) =5.25 » yon #yit $CKitKedh \ you sy tf 85 #125005) ye #34975 The second point oF solution ic (O5,94995) where xe 705 ond ys* 3.4975 © Second step at i*2 PKK OS > Ke =f Cah yer Kish) = [= 26x oh)" #126 oh) 206 +h) +85] wan ys = [-26ca th) + 126% +hY'=20G%e +h) 8.5] wel %2 0.5 ond h=O5, thu, xath *1 > Kio FOXY) © (202+ [Dat - 208° 8.5) = [-2a? + (20% 200+ 8.6] = (De? + [Dee 2088.6) Ke o15 ' « [-208)"+ 1200.5)*- 20005)+ 8.6] > you tyet (Kit Kadh - 3.4375 Koo tas yen yh (125-1595 b yet Kh = yet kh ye = 3595 = 34995 +(1.25)(05) * 4.0625 The third point of colution i¢ (1.3535) where Xs =| and ye * 8935 © Thind step at 3 oe +05 » Ke = f Gi th, yor Kih) = [= 260 +h)** 126. +h) 2008 +h) #85] wun #304 05 = [26 sh) + 12% +h)*-206x +h) #85] weld a= ond h=05, thas, oth #15 PK FO ye CDK? * [2d - 200 +8.5) = [-20.5)° «1201.5 20¢1.5)485] = 248 + [208 - 201985) Kar L25 ae > yon yee pCR AK = [2c «1201 20019# 8.6) ‘33% Kokd you “96 CL5- 1.259005) Ya = 2.6095 bye kh = Yo Kih 995 + C1.5N(05) 2.625 b) Second ~ Order Runge-Kutta Method The fourth point of solution i¢ (1.5,2.G895) where X+*|.5 and yq* 2.0095 © Fourth step at ie4 oe TOS » Ke faith, yor ih) = [= 26. +h) + 126 +h)*=2000 oh) +85] tons 05 = [2044 +h)” # 1264 +h)" 20609 +h) #85) weed Me 1-5 ond he O5, thas, meth = 2 Kee f Om yO) © 2K? + [Dad = 20018.) = [-2c? +120" 200+ 8.6) = Dxg + [204 20486) Ker 05 = [-201.5)"+ 124.6)" 20015986 ] yon eye (Kit Kadh = 15, Keon 125 et C125 t0.5)(05) byt Kih > yet Kin ye 25 = 2.0875+ (1.25)(0.5) = 4.0625 The fifth point of colution ic ¢2,2.5) where Xs*2 ond yo" 25 © Fifth step at 1-5 Paar sm S05 » Ka =f Guth yor Kih) = [> 26 +h)" #126 +h)=20G +h) #8 5] Yor #309 05 + [204 +h)" + 12a +h)" 2066 +h) +85] Xe 25 M22 ond he OS, thes, Xsth = 25 > Kis f Ouyid= 2K * [2st ~ 205185) =[-20.5)° +1205)" 200.5)+8.5] 22 (Dad - 205585) Ken 225 3 : » yin yt g (Kit Kah, -2(2)° + |2(2)"~ 20(2)* 8.5] 25 Ki 05 you #46 (0.542.25)005) bye Kh Yet Kh we $1895 = 2.5+(0.5)(05)=2.75 The sixth point of solution ic (25, 3.1875) where Xe "2.5 and ye= 3.1995 o Sixth step at i+ Pas > ke* FO th, yor Koh) = [> 264 0h)® + 1264 oh)*20¢K +h) +85] wen = 0+ 05 = [+200 +h) + 12Gu+h)'-200K6 +h) + 8.5] wend 2.6 ond h=05, thus, Xeth =o PK =f CRYO) = 2x + [Det ~ 2088.6) = [20° + 12@y* 200)+8.5) = (Dnt + [ee ~ 2050 8.6) ker26 = [225+ 1205)" 202.586 ] > yon yet pK t Kh = 5.1815 Kea You “16 (2.2542.6)005) myer Kh > ye * Koh yr = 4335 = 3.1095 + (2.25)(05) = 4.5125 'b) Second - Order Runge Kutta Method The seventh print of olution i¢ ¢3,4.595) where t+ =3 ond ys = 4.545 © Seventh step at i+ F Peat 05 » Ke * fC +h, yor Koh) = [= 206 +h) # [2G oh)" 20Gx sh) +85] won = 9 05 = [+268 +h)’ * [2G +h)'=20649 +h) #85] 35 23 ond h=05, thas, Xeth © 35 > Kye fx yid= (2K? * [2st ~ 205185) = [-26.5)" «126.5% 2008.+8.5] toe ke 025 240+ IB 20°85) » yon se beK th (3)? + 1208-208) 8.6] 4335 5 you sy td (2.5-025)005) ye #49895 > yet Kh = yet Kah = 4.575 + (2.5)(05)= 5625 The eighth point of solution i¢ (3.5.49995) where Xe =3.5 and ys =49995 © Eighth step at i=8 Pier X05 (xi h)* + [2G Y= 2G +h) +85] 33 > ke fc th, yor ih) = nant = 104 05 = [2640 +h)” + 1200 +h)"= 206K +h) #85] med 42.35 ond h=O5, tac, th 24 PKs FO) © e+ Ded = 2008.6) = [- 204)? + 124y* 204+ 8.6] De + [Das ~ 2000" 8.5) es = [-2035)"+ 12645)" 2065185] » yin * yer Kit Kedh 02 49995 ’ yu tte 6025-75)005) Ki > yer Rh = et Kih = 49395 + €0.25)(05) = 4.9125

You might also like