Download as pdf
Download as pdf
You are on page 1of 32
Numerical Solution of Ordinary Differential Equations INTRODUCTION The methods of solution so far presented are applicable to a limited class of differential equations. Fre- quently differential equations appearing in physical problems do not belong to any of these familiar types and ‘one is obliged to resort to numerical methods. These methods are of even greater importance when we realise that computing machines are now available which reduce numerical work considerably. A number of numerical methods are available for the solution of first order differential equations of the form : d) Se = Fey) given 04) =¥% A) ‘These methods yield solutions either as a power series in x from which the values of y can be found by direct substitution, or as a set of values of x and y. The methods of Picard and Taylor series belong to the former class of solutions whereas those of Euler, Runge-Kutta, Milne, Adams-Bashforth etc. belong to the latter class. In these later methods, the values of y are calculated in short steps for equal intervals of x and are therefore, termed as step-by-step methods. Euler and Runge-Kutta methods are used for computing y over a limited range of x-values whereas Milne and Adams-Bashforth methods may be applied for findingy over a wider range of x-values. These later methods require starting values which are found by Picard’s or Taylor series or Runge-Kutta methods. ‘The initial condition in (1) is specified at the point x5. Such problems in which all the initial conditions are given at the initial point only are called initial value problems. But there are problems involving second and higher order differential equations in which the conditions may be given at two or more points. These are known as boundary value problems. In this chapter, we shall first explain methods for solving initial value problems and then give a method of solving boundary value problems. PICARD’S METHOD* Consider the first order equation dyldx = f(x, y) ol) led after the French mathematician Emile Picard (1856—1941) who was professor in Paris since 1881 and is famous for his researches in the theory of functions. 1008 |INGNERICNY SOLUTION GF OntiRARY DirFeReWiaL Eouarions It is required to find that particular solution of (1) which assumes the value y, when x = x,, Integrating (1) between limits, we get L dy= i P(x, y)dx or y=yo+ C (x,y) dx 2) This is an integral equation equivalent to (1), for it contains the unknown y under the integral sign. As a first approximation y, to the solution, we put-y = yo in f(x, y) and integrate (2), giving = 90+ [flere de = Io f 1% Yo) For «second approximation y,, we puty =y, in f(x, y) and integrate (2), giving meet fl Peon) de Similarly, « third approximation is y,=Ye+ [° f(s») dx. so Continuing this process, a sequence of functions of x, +1vJo Yo ~ is obtained each giving a better approximation of the desired solution than the preceding one. Obs. Picard’s method is of considerable theoretical value, but can be applied only to a limited class of equations in “which the successive integrations can be performed easily. The method can be extended to simultaneous equations and ‘equations of higher order (See § $2.11 and 82.12). Example 32.1, Using Picard’s process of successive approximation, obtain a solution upto the fifth approximation of the equation dy / dx =y +x, such that y= 1 when x = 0. Check your answer by finding the exact particular solution. Solution, (a) We havey = 14 [° (y+) dx. First approximation, Puty = 1, iny +x, giving - +x) de= . ” 1s fia 2) dua 14x42. Second approximation. Puty = 1+x+/2iny +2, giving elt fj Gt eerst/) d= +x tat +26, Third approximation. Put y = 1+ +x?+ 246 iny +x, giving * 4 yg= 14 +23? 29/6) de=lextats 2 Fourth approximation. Put y = y, in y + x, giving . 3 =1 1+2r¢x7 42 yale Cf terres Fifth approximation. Puty =, iny + x, giving wets ff (tears Stig) a teseste S fi) (6) Given equation : & ~y = xis a Leibnitz’s linear in x. Its LF. being e~*, the solution is ye fom dx to=—xe* Joendere “*-e74¢ [Integrate by parts] if yrece—x—1. Since y =1,whenx=0, -. c=2. ‘Thus the desired particular solution is y = 2e"—a—1 lit) iii) Solution. We have y = 1+ f= dx yee First approximation. Put y = 1 in the integrand, giving 2 yale a * de= ref (- vas cys baveatedl'-t-ainuamnse oD Second approximation. Puty = 1—x + 2 log (1 +x) in the integrand, giving x 1ax42log(l+x)—x 1. pr Be fl 1s2 Malt | Toga deg (len)ee 1 Ty Bleg 5) which is very difficult to integrate. Hence we use the first approximation and taking x = 0.1 in (@) we obtain 0.1) = 1—(.1) + 2 log 1.1 = 0.9828. [EEE tavior’s series METHOD* Consider the first order equation dy/dx = fix, y) el) Differentiating (1), we have ite, S=hthf (2) Differentiating this successively, we can get y, »"° etc. Putting x =x, and y = 0, the values of ()"),, (¥. (9); can be obtained. Hence the Taylor's series G@e- toa (w= Sonal 4+ 8) WE)=Yy +(e -— XQ) OIg + Sp Wo + gives the values of y for every value of x for we (8) converges. On finding the valuey, for x =, from (3),9’, y” can be evaluated atx =x, by means of (1), (2) ete. Then y can be expanded about x =.x,. In this way, the solution can be extended beyond the range of convergence of series (3). Solution. Here (9) = Ly’ =2%y-1,6))=-1 Differentiating successively and substituting, we get y= Bry + xy, 7 = By + day’ 42°", y= Gy" + Gay” + xty”, *See footnote p. 145. "Nuwericnt Soutien oF Ononiaey Dierenenmal EQuarions ho Putting these values in the Taylor's series, a) = yy +290) + =r + yore FO + we have ya)= Lea FF “0 Fae Hence y(0.1 .90088 and, 02 0.80227. Solution. (a) We have y' = 2y + 3e* ¥'(0) = 2y(0) + Be Differentiating successively and substituting x = 0,y = 0, we get y= By" + Be, 90) = 20) +3=9 2" + Ber, (0) = 20) + 3= 21. Dy" + Ber, (0) = 2y°"(0) +8 = 45 ete. ye Putting these values in the Taylor’s series, we have 2 2 # vx) = (0) + xy"(0) + a yO) + oO + a (0) +... ordre 224 yey My aes Sate Late Baty. 2 6 24 2 2 8 Hence (0.2) = 3(0.2) + 4.5(0.2)? + 3.5(0.2)* + 1.875 (0.4) + .. = 0.8110 Ai) Now ~ 2y = Se" is a Leibnitz’s linear in x. Its LF. being e~, the solution is yet fae -e%dete=—Se%4e or y=—Ber+co™ Sincey=Owhenx=0, +. ¢=3. Thus the exact solution is y = 3(e® —e*) y= 8 (e402) = 0.8112 enlii) Solution. Weave y’=log-+ ly: y(Q) = log 2 Differentiating w.r.t. x and substituting x = 1, y = 2, we get yehely mers Flog 2 wad Pe Leyey(-3 4} syr@ante dred tog 2) dog 2 ‘Substituting these values in the Taylor's series about x = 1, we have yd = 91) +(e= Dy + SS ear y+ Se DP rade ae — 24d iog 2-1 dog 2) | = 2.036 2°4 4 =24+(e-1)log2+ = ie- vein y(t) = 2+ (0.1) log 2+ 22 if Hicies Enaiveerine MaTHEManics: 2 y(L.2)=2 + (0.2) log 2-+ 22) (1+ toe 2) et [ 141 hog 2 F dog aF| = 2.081. 2 2 6 | 2°4 ; ‘1. Using Picard’s method, solve dy/ds =~ xy with xy ‘upto third approximation. (Mumbei, 2005) 2. Employ Picard's method to obtain, correct to four places of decimal, solution of the differential equation dy/de = x° "+ forx= 0.4, given thet y = 0 when x = 0. (N-EU., 2009) ba Picard’s second approximate solution of the initial value problem : »’ =2%y?+ 1), 9(0)=0. Pr t eh) 4, Find an approximate value of y when x = 0.1, ifdy/de=x-y? and y=1 atx =0, using (@) Picard’s method (6) Taylor’s series. WU. ‘2010; Madras, 2006) B. Solve y’ =x + y given y(1) = 0. Find y(1.1) and »(1.2) by Taylor's method. Compare the result with its exuct value. (N.T.W,, 2008 ; Anna, 2005) 6. Evaluate y(0.1) correct to six places of decimals by Tuylor’s series method if yx) satisfies ¥say+ Ly) = 7. Solve »’= 8x + y2, y(0) = 1 using’Paylor’s series method and computer (0.1). (Mumbai, 2007) 8. Using Taylor series method, find y(0.1) correct to 3-decimal places given that dyldx =e —y2,y(0) = 1 EULER’S METHOD*. Consider the equation 2 2 =f,y) a) ¥4 ‘True value of y given that y(xq) = yo. Its curve a solution through Px, ¥q) is shown dotted in Fig. 32.1. Now we have to find the ordinate of any other point Q on this curve. Let us divide LM into n sub-intervals each of width A. at Ly, L», .. 80 that h is quite small. In the interval LL, we approximate the curve by the tangent at P. If the ordinate through L, meets this tangent in P,(xq + h,y,), then y= LyP,=LP +R,P, ol —— + = 7+ PR tan d=95+h (2) oth xt 2h xenh dz}p Fig. 32.1 = Yq th fixe, Yo) Let P,Q, be the curve of solution of (1) through P, and let its tangent at P, meet the ordinate through Ly in Play + 2h, y,). Then Y= Iy +h fleg+ hy y,) (2) Repeating this process n times, we finally reach an approximation MP, of M@ given by Yn =Mnar thf lxgt n—Lh.y, 9) ‘This is Euler's method of finding an approximate solution of (1) ‘Obs. In Euler's method, we approximate the curve of solution by the tangent in each interval, ic. 0 short lines. Unless # is small, the error is bound to be quite significant, This sequence of lines may also dev ably from the curve of solution. Hence there is a modification of this method which is given in the next section. Example 32.6. Using Euler's method, find an approximate vatue of y corresponding to x = 1, given that dyldx =x +y and y= 1 when x= 0. (Mumbai, 2005 ; Rohtak, 2003) "See footnote p. 302. | Nuvenicat SoLution oF Onomany Dirrenenrian Eauanions TE] Solution. We taken = 10 and h = 0.1 which is sufficiently small. The various calculations are arranged as follows : +. ER aaa tts 0.0 1.00 O1 1.20 02 ; 142 03 1.66 04 1.93 O5 2.22 06 2.54 on 289 08 3.89 09 am ee) ‘Thus the required approximate value of y = 3.18. Obs. In example 32.1, the true value of y from its exact solution atx = Lis 3.44 whereas by Euler's method y = 3.18 and by Picard’s method y = 3.434. In the above solution, had we chosen ri = 20, the accuracy would have been considerably increased but at the expense of double the labour of computation. Euler’s method is no doubt very simple but cannot be best. Example 32.7. Given oy oe with tnitial condition y = 1 at 4 = 0; find y forx = 0.0 by Rulers method. ! i : C2, 2001) Solution. We divide the interval (0, 0.1) into five steps ie. we take n = 5 and h = 0.02. The various calculations are arranged as follows : Hence the required approximate value of y = 1.0928. MODIFIED EULER’S METHOD In the Euler’s method, the curve of solution in the interval LL, is approximated by the tangent at P (Pig. 82.1) such that at P,, we have V1 =Io + hh ¥%0) (1) ‘Then the slope of the curve of solution through P, lie. (dy/dz)p, = f(x, + h, y,)] is computed and the tangent at P, to P,Q, is drawn meeting the ordinate through L, in P,(x, + 2h, 4). Now we find a better approximation y,'” of y(x9 + h) by taking the slope of the curve as the mean of the slopes of the tangents at P and Py, i. WY =I + fa [flxqr9q) + fle + hol wn(2) Asthe slope ofthe tangent at , is not known, we take, as found in (1 by Buler's method and insert it on R.HLS, of (2) to obtain the first modified value y,(”. The equation (1) is therefore, called the predictor while (2) serves as the corrector of y- ‘Again the corrector is applied and we find a still better value y,'® corresponding to L, as yi 99+ A Mg) + Meg + heh We repeat this step, till two consecutive values of y agree. This is then taken as the starting point for the next interval LL. Once y, is obtained to desired degree of accuracy, y corresponding to L, is found from the predictor Be =I th Xt hsy) and a better approximation y,{"is obtained from the corrector yay + dre +h, y,) + fl%ig + 2h, yo). We repeat this step until », becomes stationary. Then we proceed to calculate y, as above and so on. hla ir herandife Rulere mata whic = poate sorecbocanthed, Solution. Taking =| 0.1, the various calculations are arranged as follows : ll Seer 0 ean aires = ‘Solution. We have y' =y +e"= fix, 9); =0,y =Oandh =0.2 ‘The various calculations are arranged as under ‘To calculate y(0.2) : ‘Since the last two values of y are equal, we take y(0.2) = ‘To calculate y(0.4). Since the last two value of y are equal, we take (0.4) = 0. Hence y(0.2) = 0.2468 and y(0.4) = 0.6031 approximately. ‘Solution. The various caleulations are arranged as follows : Hence y(1.2) = 2.5351 and y(1.4) = 2.6531 approximately. ‘Mean slepe Old y +.2 (mean slope) = new y = 1.5253 + 0.2 (1.635) = 1.8528 06 — 06+ | J@8523)|= 1.9610 Ao + 1.961) = 1.798 1.5253 + 0.2(1.798) = 1.8849 06 - 06+ | Y@l8eID)| = 1.9729 (2.635 + 1.9729) = 1.6040 1.5269 + 0.2 (1.804) = 1.8861 06 06+ | Vase] =1.9784 2 (1.6954 1.9734) = 1.8042 1.5253 4 0.2 (1.8042) = 1.8861 Hence y(0.6) = 1.8861 approximately. Gira er 1. Apply Euler's method to solve y/ =x + y, 9(0) = 0, chéosing the step length = 0.2. (Carry out 6 steps). (Kottayam, 2005) 2 Using simple Buler’s method solve for y at x =0.1 from dyldx =x + +xy,y(0) = 1, taking step size h =0.025. 3. Using Euler’s method, find the approximate value of y when dy/dx = x + y? and.y(0) = 1 in five steps (i.e. h = 0.2). (Mumbai, 2006) 4, Solve y’ = 1~y,9(0) = 0 by modified Ruler’s method and obtain y atx = 0.1, 0.2, 0.3, (Anna, 2005) 5. Given y' =x + sin y,9(0)= 1. Compute y(0.2) and y(0.4) with h = 0.2 using Euler's modified methed. (IN.TU,, 2007) 6. Given that dyide = x° + y and (0) = 1, Find an approximate value of (0.1) taking h = 0.05 by modified Euler's method. WLU, 2010) 1 a ree with boundaty conditions y/2 1!when x= 0:ind approximately y for x'= 0.1)by Eoler’s moditied ‘method (5 steps). WLU. 2007) 8. Given that dyhdx=2+ JGy) andy =1 when. = 1. Pind approximate value ofy at x =2 in steps of 0.2, usingBuler’s sodified method. nna, 2004) [EEG unce’s metHop* Consider the differential equation, 2 = fix, yyhey) =p .) Clearly the slope of the curve through Porgy ¥9) is Flt, yo) (Pig. 32.2). Integrate both sides of (1) from (xo, ¥) to (y+ hy Yoh), we have PO a= 0" Fea ae (2) a hs ‘To evaluate the integral on the right, we take N as the mid-point of LM and find the values of f(x, y) (i.e. dylds) at the points xq, + h/2,%, + h. Por this purpose, we first determine the values of y at these points. Let the ordinate through WN cut the curve PQ in $ and the tangent PT in S,. The value of y, is given by the point S,. ¥=NS=LP+HS, =y,+PH tan 0 “* Called after the German mathematician Carl Runge (1856-1927) who was professor at Gottingen. ‘Hicher Excincerma MarHemencs =39+ Baldy = %5 + E flea) (3) Also Yp=MT=LP + RT =y, + PR tan 0 = yo hf lps ¥o)- Now the value of yg at x, +h is given by the point 7” where the line through P drawn with slope at Tay +h, ¥7) meets MQ. +: Slope at T= tan 6’ = f(x, +h, ¥7) = flay +h, ¥9 + Mf, Yo Y= MR+ RT = yy+ PT tan © = 34 + lifley + hyip + WC. %p)) (A) ‘Thos the value of fx, st P = fley. 49) the value of f(x, y) at $ = fle, +h/2,y,) and the value of f(x, y) at @ = fy +h, ¥Q) where yi, and yg are given by (3) and (4). Hence from (2), we obtain ath k= f f(x, 9) de -2 Ufp+ fe + fel {By Simpsons’ rule (p. 1106)] = 2 tfey9) + Aflxy+ RI2, yg) + Fx) +h, yell wB) which gives a sufficiently accurate value of k and also of y = yy + hk. ‘The repeated application of (5) gives the values of y for equispaced points. Working rule to solve (1) by Runge’s method : Caleulate successively hy = hho, ¥0) = Wf (x0 + 2h 90 + Ti) Ke = hflayt heyy hy) and hey = hf ag + hy yt RY Finally compute, ke i + dig + hy). vote that h isthe weighted mean of ky ke and h) pera ia piepaspaale He slits dy fe Ss i re ft a ict ara ee a Solution. Here we have x, = 0, y, 1, h=0.2, flo 9, Yq) =1 hy = hf oy Yo) = 0.2.1) = 0.200 hy =hf (x 44h, y +4) =0.2F0.1, 11) = 0.240 B= hf y+ fy yp + Ry) = 0.2 (0.2, 1.2) = 0.280 and keg = hf lag + hy Yot R’) = 0.2 f(0.1, 1.28) = 0.296 k= Lh, + Akg hs) = $(0.200 + 0.960 + 0.296) = 0.2426 Hence the required approximate value of y is 1.2426. RUNGE-KUTTA METHOD* ‘The Taylor’s series method of solving differential equations numerically is restricted by the labour involved in finding the higher order derivatives. However there is a class of methods known as Runge-Kutta methods which do not require the calculations of higher order derivatives. These methods agree with Taylor's series solution upto the terms in h’, where r differs from method to method and is called the order of that method. Euler's method, Modified Euler’s method and Runge’s method are the Runge-Kutta methods of the first, second and third order respectively. * See footnote p. 1017. Named after Wilhelm Kutta (1867—1944), ~Nuweficat SouuTion oF Orowar Dirrenenmal EoUATIONS L019] The fourth-order Runge-Kutta method is most commonly used and is often referred to as ‘Runge-Kutta method! only. Working rule for finding the increment k of y corresponding to an increment h of x by Runge-Kutta ‘method from 2 = fix, yt) = Yo i8 as follows : Cateulate successively ky = hfGy¥) ky = Mf (x0 +h, 0+ 3h) y= If (xp +4h, y+ 4h2) and Rg = hf ig + By Yo + hes) Finally compute he= Mh, + 2h, + Bk, + hy) which gives the required approximate value y, = yy +k. (Note that k is the weighted mean of hy, hy, kyand k,) Solution. Here X% be hy = hf Go, ¥o) = 0.2 x1 = 0.2000 by = hf (xy + 4h, yo + 4h) =0.2% (0.1, 1.1) = 0.2400 hg = hf (xo Zh. Yo + Eke) = 0.2 x (0.1, 1.12) = 0.2440 and keg = hf gt h, yo + hy) = 0.2 x ((0.2, 1.244) = 0.2888 b= M(hy + 2h, + 2k, +h,) = § (0.2000 + 0.4800 + 0.4880 + 0.2888) = 2 x (1.4568) = 0.2468. Hence the required approximate value of y is 1.2428. 2_ 42 Solution. We have f(x,y) = ed ¥ To find (0.2) Here x, = 0,¥)=1,h = 0.2 by = h flag, 9p) = 0.2 (10, 0) = 0.2000 hyo M504 2h + 5h) = 0.2/0.1, 1D. = 0.19672 hey = hf (* +h, Yo +t4) = 0.2/(0.1, 1.09836) = 0.1967 Be, = hf Got hy Yq + hy) = 0.2 (0.2, 1.1967) = 0.1891 1 [0.2 + 2(0.19672) + 2(0.1967) + 0.1891] = 0.19599 = EOhy + hy + 2h + hy ‘Hence (0.2) = yq +k = 1.196. Hichen ENciNcerING MamienaTics: To find (0.4): Here x, = 0.2, = 1196, 4 =0.2 Ry = hfe) = 0.1891 ke (a sino 34) =02/(0.8,1.2906) = 0.1795 ge to + 3h nt 3h) = 0.2 f(0.3, 1.2858) = 0.1793 hy = hfe, + h,y, + hs) = 0.2 (0.4, 1.8753) = 0.1688 1 = pita + Bhp + By thy) = jlo.s91 + 2(0.1795) + 2(0.1798) + 0.1688] = 0.1792 Hence MOA) =y, +h = 1.196 + 0.1792 = 1.3752. Example $2.15. Apply Runge-Kutta method to find an approximate value of y for x = 0.2 in steps of 0.1, iftdy/dx =x +y°, given that y = 1, where x = 0. (W.2.U,, 2009 ; Osmania, 2007 ; Madras, 2000) Solution. Here we take h = 0.1 and carry out the calculations in two steps. Step L x, =0,y)=1,h=0.1 z hy = hf leg ¥9) = 0-1 FO, 1) = 0.1000 hey = hf (x + His 0 + 444) = 0.1 (10.05, 1.1) = 0.1152 bey = hf (x9 + Bs Yo + bha) = 0-1 ((0.05, 1.1152) = 0.1168 Ae = hf eg + h, 9 + by) = 0.1 (0.1, 1.1168) = 0.1347 B= Uh, + 2k, + hy + hy) £ (0.1000 + 0.2304 + 0.2336 + 0.1347) = 0.1165 giving 0.1) = yy + k= 1.1165. Step IL. x, = x5 +h = 0.1, y, = 1.1165, h = 0.1 @ by = hfly, y,) = 0.1 f(0.1, 1.1165) = 0.1347 hy = hf (x + 4h, 91 +44) = 0.1 (00.15, 1.1838) = 0.1551 hea = hf (x +44, 1 + hy) = 0.1 F(0.15, 1.194) = 0.1576 hy = hfe, + h, yo+ hy) = 0.1 f(0.2, 1.1576) = 0.1823 * d= Lb, + 2k, + ky + hy) = 0.1571 Hence 0.2) =, + k= 1.2736. ‘ ‘ sn OY HE Example $2.16. Using Runge-Kutta method of fourth order, solve ory atx'=12, 1.4from © =P given x9 = 1,9) =0. (Mumbai, 2008) Solution. We have f(x,y) = 22+# + xe To find y(1.2) : Here y= 1,9) =0,h = 0.2 Ore fey = h gp Vp) = 0.2 = 0.1462 1 = hf ¥0) 18 1.1402 ages, +01? +a 40.10 ayo 4 4) =U CeCe r | ‘Nusenica. SovuTion or Onpwiany Dirrenenmiat EQuavions, i) Lt [2azcnes eit | 653808 fe ») tuls0+ 500+ (140.17 4040 2(1.2)(0.1399) + e* (1.27 +(1.2)e" Hf (p+ by Vg + hy) = 0.2 { | = 0.1348 1 and (hy + 2h + ky + h,)= g 10.1462 + 0.2804 + 0.2798 + 0.1348} = 0.1402. Hence (1.2) = yy + # = 0 + 0.1402 = 0.1402. To find y(1.4) 1402, h = 0.2 hy = hflxy, ¥;) = 0.2 f(L2, 0) = 0.1348 by = hf (ry + h/2, 9, + hy/2) = 0.2 (1.8, 0.2076) = 0.1303 ey = hf + W/2, yy + hy/2) = 0.2 f(1.8, 0.2053) = 0.1301 ke, = hf Gry + hy y, + ke) = 0.2 (1.3, 0.2703) = 0.1260 Here x, = ke ea, 4+ Dy + Dk + hy) z 10.1348 + 0.2606 + 0.2602 + 0.12601 = 0.1303 Hence y(1.4)=y, +k = 0.1402 + 0.1303 = 0.2705. 4. Use Runge’s method to approximate y when x = 1.1, given that. a pital a aaede ax ty? i 2 Using Runge-Kutta method of order 4, find (0.2) given that dy/dx = 8x + 2y,y(0)=1,takingh=O.1. (V.T.U., 2004) 3. Using Runge-Kutta method of order 4, compute 1.2) and (4) trom 102 =? +y%,y (0)=1, taking =0.1, (Rohtak, 2008 : Bhopal, 2002) 4. Use Runge-Kutta method to find y when x= 1.2 in steps of 0.1, given that : dyldx =x? + 9 and y(1) = (Mumbai, 2007) 5. Find (0.1) and,y(0.2) using Runge-Kutta 4th order formula, given that y’=2*—y and y(0)=1. W.N.T.U, 2006) 6. Using 4th order Runge-Kutta method, solve the following equation, taking each step of h = 0.1, given y(0) = 8, dy/dx = (Ax/y 29). Calculate y for x =0.1and 0.2. (Anna, 2007) “7. Use fourth order Runge-Kutta method to find y at x = 0.1, given that 2 Bet + 2y,9(0) = Oand h = 0.1. (V.2.0,, 2006) 8. Find by Runge-Kutta method an approximate value of y for x = 0.8, given that y =0.41 when x = 0.4 end dy/ds = ary. (S.V.7.0, 2007 8) 9. Using Runge-Kutta method of order 4, find (0.2) for the equation as rae 2S (0) = 1. Take h = 02. (W.7.0, 2011 8) 10. Given that dy/dx = (?— 2g? +x) andy = Latx= 05 find y forx = 0.1, 0.2, 0.3,0.4 and 0.5. (Delhi, 2002) PREDICTOR-CORRECTOR METHODS Ifx;_,and.x, be two consecutive mesh points, we have x, EI 1+ Mgt Fh, y,_ i= _1 +h. In the Euler’s method (§ 32.4), we have 1 BB a ) Hicer Enomcerine Manieuanics, ‘The modified Euler's method (§ 32.5), gives A WAI ort MR 9) + AI (2) ‘The value of y, is first estimated by using (1), then this value is inserted on the right side of (2), giving a better approximation of y,. This value of y; is again substituted in (2) to find a still better approximation of ¥, This step is repeated till two consecutive values of y; agree. This technique of refining an initially crude estimate of y, by means of a more accurate formula is known as predictor-corrector method. The equation (1) is there- fore called the predictor while (2) serves as a corrector of y;. In the methods so far explained, to solve a differential equation over an interval (x,,¥,, ,)only the value of yat the beginning of the interval was required. In the predictor-corrector methods, four prior values are required for finding the value of y atx; , . A predictor formula is used to predict the value ofy at-x,, , and then a corrector formula is applied to improve this value. We now describe two such methods, namely : Milne’s method and Adams-Bashforth method. MILNE’S METHOD Given dy/ dx= f(x,y) andy = yy, x we proceed as { ‘The value ¥, = y(x,) being given, we compute 9, = Hy + WI, p= Hg + A), Yg = yey + Bh), by Picard’s or Taylor's series method. Next we calculate, f= Flay Yoh = Fy + hs a f= Fig + enn) fy = Fig + 3h 99) Then to find y, = y(x + 4h), we substitute Newton's forward interpolation formula ‘9 to find an approximate value of y for x =x, + nh by Milne’s method, Pouy)=frndyy + MOD gop, me +8 in the relationy,=y,+ [°"" fx, yrax ne & vane fo (formas Paty + Jax [Putx = x9 + nh, de = han} no “ =Joth f (f+ ma% 4 f 20 8 =ygth [Af +84 +4" +34'f +] Neglecting fourth and higher order differences and expressing Af,, 4°f, and A*f, in terms of the function values, we get 8 4h seh ‘i AP = 99+ GA fe + Mf) which is called a predictor. Having found y,, we obtain a first approximation tof, = f(x, + 4h, 94). Then a better value of y, is found hy Simpson's rule (p. 1106) as of = 9+ Pet ah fw ‘ch is called a corrector. Then an improved value of f, is computed and again the corrector is applied to find a still better value of _yq We repeat this step until y, remains unchanged. Once y, and f, are obtained to desired degree of accuracy, 9, = y(x, + 5h) is found from the predictor as ” 4h WY = +S Ch fat 2) and f= f(t, + 5h, ¥,) is calculated. Then a better approximation to the value of y, is obtained from the corrector a8 of = 95+ Fs thy + fy. ‘We repeat this step till y, becomes stationary and we, then proceed to calculate y,, as before. This is Milne’s predictor-correetor method. To ensure greater accuracy, we must first improve the accu- racy of the starting valties and then sub-divide the intervals. Example 32.17. Ap Apply Milne’s method, to find @ solution of the differential equation ¥ —y? in the range 0 AG + 4f, +f,), gives yf = 0.4555, f= 0.7925 Again using the corrector, yf = 0.4555, a value which is the same as before. Hence, mi 0.4556. Example $2.18: Given y’ =x(2? +92) 4, 9(0)= L findy ats =04 fi mana a ethio Sees eee feahe * renee | BRE Vik ae Solution. Given yO)=1 and h=01 We have YO=x G2 ye 9G) = G8 + ay?) (— 7) + Bx? + y? xB) y'LO* * [at ay? + Br? + 94 Day's MC) = — €-* [a ay? + Be + 9? 4 Dayy’ + Be? + 9? + Qeyy’ — Ge — yy’ — Bay’? — eyy'] Substitute these values in the Taylor's series, 2 a ya) = 10) 4 yO) + Fy(0) + Fy) + 0.1) = 1 + (0.10) + Form + Lovie 2+. = 1+ 0.005 - 0.0003 = 1.0047 ie, 1.005 ‘Now taking x= 0.1, (0.1) = 1.005, h = 0.1 y'O.1) = 0.092, (0.1) = 0.849, (0.1) =— 1.247 Substituting these values in the Taylor’s series about x = 0.1, Ayors OF yon Ox ya +. (0.2) = y(O.1) + a = 1.005 + (0.140.092) + Me (0.849) + ae 1.247)+ 018 Now taking 2, (0.2) = 1.018, h = 0.1 y'(O.2) = 0.176, y"(0.2) = 0.77, (0.2) = 0.819 Substituting these values in the Taylor’s series (0.8) = (0.2) + F902) + ' 3! = 1.018 + 0.0176 + 0.0039 + 0,0001 = 1.04 ‘Thus the starting values of the Milne’s method with h = 0.1 are Yo=1 4 = 1.005 ¥q= 1.018 a= 1.04 4h Using the predictor, ff” = 99+ Jf -f, +2f)) sit sep [2(0.092) ~ (0.176) + 2(0.26)] = 1.09 x= 04 gif) = 1.09 f, = y'(.4) = 0.362 h Using the corrector, yf =9,+ 5 + 4s +f) VP = 0.018 + ot (0.176 + 4(0.26) + 0.362) = 1.071 Hence OA) = 1.071. Example $2.19. Using Runge-Kutta method of order 4, find y for x =0.1, 0: 9%, (0) = 1. Continue the solution at x = 0.4 using Milne’s method. q W.T.U,, 2008; S.V.7.U,, 2007 ; Madras, Solution. We have f(x,y) = ay +9% To find (0.1): Here = 0,99 = 1,h=0.1. ee a ky =h flay yo) =O. FO.D = 0.1000 y= it (a0 Fh 90 +44) = (0.1) (00.05, 1.05) = 0.1155 ky= i ( + 3h, aot 3) = (0.1) f(0.05, 1.0577) = 0.1172 keg = hf Gey hy q+ hy) = (0-1) (0.1, 1.1172) = 0.13598 ke ia, + Dy + Dk + hy) = doa + 0.231 + 0.2348 + 0.13598) = 0.11687 ‘Thus y(0.1) =y, =yo + = 1.1169. To find 02 Here x, = 0.1, y; = 1.1169, 4 = 0.1. hy =h f,9,) = (0.1) f(0.1, 1.1169) = 0.1359 ag=ht(n + 5h 9 +44) = (0.1) f(0.15, 1.1848) = 0.1581 Iy= na( tht 34) = (0.1) f(0.15, 1.1959) = 0.1609 eg = hf (ry +h 94 + beg) = (0.1) f(0.2, 1.2778) = 0.1888 fee Eh, + hy + Dy thy) = 0.1605 Thus (0.2) =y,=y, +4 = 1.2773. To find y(03): Here x = 0.2, y, = 1.2773, h = 0.1. hy = hf (x 9) = (0.1) (0.2, 1.2773) = 0.1887 hye hf (= rt 3h, wat 3h) = (0.1) f(0.25, 1.3716) = 0.2224 kg = ie + da, Yat 34) = (0.1) (0.25, 1.3885) = 0.2275 hh, = hf Gig + hh ¥o-+ hy) = (0.1) ((0.3, 1.6048) = 02716 bea Eh, + Bhp + Bhy hy) = 0.2267 Ja=Yo +h = 1.504. ‘Now the starting values of the Milne’s method are : y= 0.0 .0000 1169 Jp = 1.2778 . 5049 Using the predictor, 4h HP =%o+ yh - het Hy) *,=04 yp = 1.8844 and the corrector, yP m+ 3 dort iis yi =12773 + 2 11.8869 + 4 (2.7132) + 4.098] = 1.8386 f,= 4.1159 [1026 | Hicven ENGINcERING MATHEMATICS Again using the corrector, of = 1.2773 +S (1.8960. 4 (2.7192) + 4.1160) = 1.8391 f= 4.2182 ff) Again using the corrector ca = 1.2773 + o {1.8869 + 4 (2.7132) + 4.1182] = 1.8392 which is same as (i). Hence y (0.4) = 1.8392. Eee ase 1. Given “ =25 + y,y(0) =2. The value of 5(0.2) = 2.073, 9(0.4) = 2.452, and y(0.6) = 3.023 are got by RK. Method of 4th order. Find (0.8) by Milne’s prediictor-corrector method taking h = 0.2. (Anna, 2004) 2 Given 2 dy/ds: = (1 + x2¥y2and y(0) = 1, (0.1) = 1.06, (0.2) = 1.12, (0.3) = 1.21, evaluate y(0.4) by Milne’s predictor- corrector method. (VLU, 2017S; Madras, 2003) 3, From the data given below, findy atx = 1.4, using Milne’s predictor-corrector formula : 1 1d 12 13 2 22156 24549 2.7514 (V..U, 2007) 4. Using Milne’s method, find (4.5) given Sxy’ +9? ~ 2 = 0 given y(4) = 1, y(4.1) = 1.0049, y(4.2)'= 1.0097, 944.3) 0148, y(4.4) = 1.0187. (Anna, 2007) & It 2 = 2e*=y, (0) =2, 9(0-1) = 2.010, (0.2) = 2.04 and y(0-3) = 2.09 ; find y(0.4) using Mine's predictor-corrector ‘method. (V.7.U,, 2010) 6. Using Runge-Kutta method, calculate’(0.1), y(0.2), and (0.8) given that 2.23, =1,(0) = 0. Taking these. values as starting values, find (0.4) by Milne’s method. [E223 apams-BASHFORTH METHOD Given * =f (x,y) and y, = y(,), we compute 91 = VEy—h),¥ 9 = Wey 2h), y_4=HEq— 3h) by Taylor's series of Euler's method or Runge-Kutta method. Next we calculate (_,=flx)—h,y yf 2=O- 28,9 gf. g=fl%y-Shy ‘Then to find y,, we substitute Newton’s backward interpolation formula fo. )=f+n Vf + _ Harbin Vif bo in nave [rena Al) MY + L(6 + nV fo + meen Wifes) ae [Put x =x, + nh, dx =hdn] ath E(t +nVfo+ ne » Vhs) da ) 1 5 3 =nth (f +3M% +h +3 hot Neglecting fourth and higher order differences and expressing V/,,V"/, and y*f, in terms of function values, we get i =yo+ & oof, - 59f_, + 87f_»—9f_s) (2) ‘This is called Adams-Bashforth preitor formula. Having found y,, we find f, = f (x, + hy,,)- Then to find a better value of y,, we derive a corrector formula by substituting Newton's backward formula at f, ie, nine a sMeniesd f,¢--in FG, 9) =f, + 2Vf + MAM + [la + np + Meee =yot fifa +nYf, BD veg, Ju dn =n th(a-20h- 5A - EVA -) eS Wf t-| de [Putx =x, +nh, dx =hdn) Noglecting fourth and higher order differences and expressing Vf,, Vf, and V°f, in terms of function values, we obtain. yO aye h £m +19f-5f 1 +f.) (8) which is called a Adams-Moulton sree formula. ‘Then an improved value of, is calculated and again the corrector (3) is applied to find a still better value of y,. This step is repeated till y, remains unchanged and then proceed to calculate y, as above. Solution. Here f(x, y) =x? (1 +5). Starting values of the Adams-Bashforth method with h = 0.1, are = 18,94 = 1.979, fy Using th "(ify -59f_. + 377.4 9f.s) 78, fy = 7.004 U: Witte 19 x 5.035 — 5 x 8.669 + 2.702) = 2.575 Hence, 5 Solution. We have f (x, y) = 2e'y. To find 0.1: To find (0.4) by Adam’s method, the starting values with h = 0.1 are yg= 2d 9 = 2.478 y= 8.129 £=03 = 4.059 Using the predictor formula fg fig = 8.467 f= 7.643 f= 10.956 WO =H+ é (55f,— 59f, + 37f)—9f5) = 4.059 + # (55 x 10.957 ~ 59 x 7.643 + 37 x 5.467-9 x 4) 5.383 5.383 f, = 2e* (5.383) = 16.061 Using the corrector formula, h WP = 90+ 2 OA + 19,5, +s) = 4.0586 + e (9 x 6.061 + 19 x 10.956 — 5 x 7.643 + 5.467) = 5.392 Hence (0.4) = 5.392. ‘Bei pn: see iy Siting eoaton retin ? teatired ane toe ob Solution. We have f(x, 9). To find y (0.1): Here xy= 0,99 Lh=0.1 hy = hf (Yq) = (0.1) FO, 1) — 0.1000 he=tt (xy +E hi sta) =(0.1)/(0.05,095) = -0.08525 y= tt (aq+ Zhao +5 he} =O £0.06, 09570 =~ 0.0867 keg = hf (a + fs ¥p + hg) = 0.1) F (0.1, 0.9187) =~ 0.07341 ba Eh, + 2p + by +h) == 0.0883 Thus (0.1) =», =p + = 1 - 0.0883 = 09117 To find y(0.2) : Here x, =0.1,9, = 0.9117, k= 0.1. : ky = hf ey.) =O. F0.1, 0.9117) =~ 0.0731 hy=hf (x z $h, n+ 3 4) = (0.1) (0.15, 0.8751) =- 0.0616 y= Ot (5,4 $4.9 +4 hy) = (02 £0.16, 0.8800) =~ 0.0626 fag = hf le + yyy + hy) = 0.1) F0.2, 0.8491) =~ 0.0521 b= 2 (hy + 2h, + 2g +h) =~ 0.0628 Thus 0.2) =y, =, +h = 0.8494. To find y (0.3): Here x, = 0.2, = 0.8494, 9 = 0.1 hy =f (.¥q) = (0.1) f (0.2, 0.8494) =~ 0.0521 y= Mt (n+ Eh 90+ Eh) =(0.1 710.25, 0.8938) =~ 0.0428 y= ( +Fhorthe] = (0.1) (0.25, 0.828) = 0.0436 Key = hf (x, + hy yy + ky) = 0.1) f 0.3, 0.8058) =~ 0.0349 = 2k + 294 Bk thy) =~0.0438 ‘Thus ¥(0.3)=y, = yy + k= 0.8061 Now the starting values of Adam's method with h = 0.1 are : x=0.0 = 1.0000 [.5=0.0~(1.0)2 =~ 1.0000 ot 0.9117 fg=0.1-(0.9117)? = 1.7312 2 8404 0.2 (0.8494 ~ 0.5215 x=03 9 = 0.8081 .3 — 0.8061) ~0,3498 i Hionen Enomesrane Maren) Using the predictor, AP =96% Be Gof, 59.1 +97F2=9F 9) x=04 9{” = 0.8061 + oe [55 (— 0.8498) — 59 (— 0.5215) + 37 (- 0.7312) - 9 (- 1)] = 0.7789 f= ~ 0.2067 Using the corrector, a? =95+ A Oh +18 +hD) {0 = {? = 0.8061 + Pa [9 (0.2067) + 19 (— 0.8498) — 5 (0.5215) ~ 0.7312] = 0.7785 Hence ‘y (0.4) = 0.7785. ay 1. Using Adams‘Bashforth method, obtain the solution of dy/dx = x - 3? atx= 08, given the values x: 0 02 04 06 oh 0 0.0200 0.0795 0.1762 (Bhopal, 2, Using Adams-Bashforth formulae, determine y(0, 4) given the differential equation dy las = ay and Le) Ot oz 03 oa) Ee 2.0025 1.0101. 1.0228 3. Giveny* =. a2 ~y, (0) =1 and the noe -values (0-1) = 0.90516, (0.2) = 0.82127, (0.3) = 0.74918, eval using Adams-Bashforth method. SVLU. 4. LW Ey ROET ie We te given Sxy’ +? = 2,914) = 1, y(4, 1) = 1.0049, 9(4, 2) = 1.0097 1.0143, 5. Given the differential equation dy/dx = x¥y + x* and the data : ae 1 LL 12 13 ye: 1 1.233 1.548488 1.978921 Undore, 6. Using Adams-Bashforth method, evaluate (1.4), ify satisfies dy/ de +y/x = Ux? and y(1) = 1,9:(1.1) 1.986, y (1.3) = 0.972, [EGS SIMULTANEOUS FIRST ORDER DIFFERENTIAL EQUATIONS ‘The simultaneous differential equations of the type & =fay2) a) and 2 = 9,2) (2) with initial conditions y(x,) = y, and 2(xq) = z, can be solved by the methods discussed in the preceding sections, especially by Picard’s or Runge-Kutta methods. (i) Picard’s method gives Y=Ior ff G20 20) dx, 24 = 2+ Jo, 99,29) de ¥o=%or Jie xedez a+ fanaa Ys=Yo* Jf 90520) dx, 25 =29 # Joy. 29) de and s0 on. (i) Taylor's series method is used as follows If h be the step-size, y, = y (xy +h) and 2, (q+ &). Then Taylor's algorithm for (1) and (2) gives (3) ofA) Differentiating (1) and (2) successively, we get y”, 2”, etc. So the values ¥p’,.¥p", Yo" ANd 2’, 2", Z9""--- AFC known, Substituting these in (3) and (4), we obtain y,, z, for the next step. Similarly, we have the algorithms 2 Benth’ + See 5) iP, Batt (6) Since y, and z, are known, we can calculate y,’,9,”,...and2,’,2,”.... Substituting these in (5) and (6), we gety, and 25. Proceeding further, we can calculate the other values of y and z step by step. (iii) Runge-Kutta method is applied as follows : Starting at (x,,,,2,) and taking the step-sizes for x,y,z to be h, k, | respectively, the Runge-Kutta method gives, hy = HE Yo 20) 1, = hG Yo 20) y= Mt (x0 +5 90+ 5 het +2) 1 1 1 = (sob ato +b Pato + 5h] 1 1 1 1 1 1 By = M1 (40 +5 Ivo +5 tar t0 +5 le} = (5) +2436 %,2 +21) hey Hf (ag + ha yg + hy 2 + Ls) 1, = 18 (xg + hy ¥o + gy 29 #13) Hence M1 =Hot Ry + hy + hy + hy) and 2229+ 20,42, +2, +l) To compute», and 2,, we simply replace x9, Yos 2p BY X11» 2 in the above formulae, as dy de Sy =f ley 224425 and Gr Mendax-y Solution. Here x, = 0,99 = 2,29 = 1, YEH [fase and z=ayt Joes yerdx First approximations y,=y9+ [6 (x, yo.) dx=2+ fiernae-2erehe sy 2 x 1 + Goce ro,a0dde=1+ fie-Mac-1-aee de® Second approximations y, = Jo + [ifesmaddenas [f [x+1-4e+ de) ae , nto $2 4e y= 2y+ [oer arde sit ff. -( +] de 8 at ase Te -2a Bit. Third approximations y,=3o+ [Fs Jn 20d sore Sela te tet: waex Sets ists tas ayn 29+ [ln 9 Ide a ee oo* 2” ae and so on. Solution. Here fix, y,2)= 1422, 6 (x, 9, 2) 1. Let us take h = 0.3. .3 AO, 0, 1)= 0.3 (1 +0)= 0.3 T,=h Cp ¥qp20) = 0.30 x 0) =0 = 1 A J, b= ht (a0 +d haan +i 3h) = (0.3) 0.15, 0.15, 1) = 0.3 (1 + 0.15) = 0.345 1 1 1 T= ho (+ tym tg hn +hn) = 0.3 L (0.15) (0.15)] = - 0.00675, h ky= rs 45% +B +4) = (0.3) 0.15, 0.1725, 0.996625) = 0.8 [1 + 0.996625 x 0.15] = 0.84485 L=he (0+ B.ve+ 8,29 +4) = 0.8 [- (0.15) (0.1725)] = — 0.007762 y= Fly + hy Yip + bys 29 +l) (0.3) f (0.3, 0.34485, 0.99224) = 0.3893 L,=h Ct + hs dg + egy 29 +5) = 0.3 (0.3) (0.34485)] =— 0.03104 1 Hence vag + A) = Ip + 5 (hy + Bky + Bky + hy) ie, 03) = 0+ F [0.3 +2(0.945) + 2(0.84485) + 0.9809] = 0.94488, and 2liyth)=z9+ Ey +2 421,41) ey 2(0.3)=1+ zt 10 + 2 + (0.00675) + 2 (— 0.077625) + (— 0.03104)] = 0.98999 SECOND ORDER DIFFERENTIAL EQUATIONS Consider the second order differential equation 2 ls » 2) By writing dy/dx =2, it can be reduced to two first order simultaneous differential equations de & =fx,y.2) ra fx, 9, ‘These equations can be solved as explained above. for flx, y,2) and 1,, ly. ... for $(x;,y, 2), Runge-Kutta formulae became Plgn Yor Z0) 1, = AOC Yq %9) .2 (0) = 0 0.2(-1)=-0.2 b= Migs Yh yy + Bly 29% FL) Ly=hilay+ 3 yo Phy 29+ HD ).2 (- 0.1) = — 0.02 0.2(— 0.999) = — 0.1998 hg= Msg + F304 Hinze Hh) I= holes + B90 + Blas 29 + 3) = 0.2 (— 0.0999) 0.02 = 0.2(- 0.9791) = — 0.1958 hg = lifts + hig + hy 29 +15) 0.2 (- 0.1958) = — 0.0392 ke= Lhe + Dig + Deg + hey) =- 0.0199 Hence at x = 0.2, Hla +h, Yo + hee 29 +L) 0.2(0.9827) = - 0.1905 EL, + Qly + 2, + 21,) 0.1970 yrath= 1- 0.0199 = 0.9801 Solution. Putting.y = , the given equation reduces tothe simultaneous equations Zexety=0,ys2 fi) We employ Taylor's series method to find y. Differentiating the given equation n times, we get Yneat Mngt Yn + In =O At £=0, 0p ao =— H+ DO y * (0) = 1, gives y,(0) =~ 1,94(0 and y(0) = 0 yields y,(0) = y, (0) = Expanding y(x) by Taylor's series, we have # Z Ce) = 910) + ay (0) + Fy 9460) + 27 (0) + oe 2, yg (0) =-5 x 3... =0. y@)= xt Oe a) 2 and 2G) aye) =-24 9 * From (ii), we have @. ae (0.1) =1- £0. It 2 Higher Enciniceriis Mamenarics 7 " (0.2? , 0.2" _ (0.2) = 1- 2 8 (0.3? | 0.3) 30.3) = 1 5+ From (iii), we have 2(0.1) = - 0.0995, 2(0.2) = — 0.196, z (0.3) = - 0.2863. Also from (i), 2'(x)=— (xz +y) =. 2'(0.1) = 0.985, 2.2) = - 0.941, 2(0.3) = Applying Milne’s predictor formula, first to z and then to y, we obtain 0.87. 2(0.4) = 2(0) + Fone.» = 2'(0.2) + 22"(0.3)} 0.3692 =0+ (# Je 1.79 + 0.941 ~ 1.74} and (0.4) = ¥(0) + 0. 1) (2y” (0.1) — 90.2) + 29" (0.3)) =0+ (4). 199 + 0.196 — 0.5736) = 0.9231 Also 2'(0.4) = — 2(0.4)2 (0.4) + y (0.4)} = {0.4(—0.3692) + 0.9231} = - 0.7754. Now applying Milne’s corrector formula, we get 2(0.4) = 2 (0.2) + g fe’ (0.2) + 42’ (0.3) + 2’ (0.4)) =-0.196 + (ca )-ooa~ ~ 3.48 — 0.7754} = — 0.3692 and OA) =y (0.24 £ Y'(02)4y' (0.8) +10.) = 0.9802 + (Z 2)\-0. 196 ~ 1.1452 ~ 0.3692} = 0.9232 Hence (0.4) = 0.9232 and 2(0.4) = ~ 0.3692. eee a 1. Apply Picard's method to find the third approximation to the values of y and 2, given that dyldx = 2, dzldy 1 =32Q/+2), giveny =1,2 = 5 whenx=0. % Solve the following differential equations using Taylor series method of the 4th order, for x = 0.1 and 02, Dae 9, 0)= = ene LE =~ 29 590) =0 and 2(0)= 1. 4 3. Find »(0.1), 2(0.1), (0.2) and 2(0.2) from the system of equations y’ =x +z,2"=x-9* given y(0) =0, 2(0) = L-using. Runge-Kutta of 4th order. (.N.T.U,, 2008), 4. Using Picard’s method, obtain the second approximation to the selution of ay ay 3 ms ae a ae +x¥y sothat (0) = 1,90) = 5- 5) Use Picard’s method to approximate y when'x = 0.1, given that fy a 4y<0andy = 0.8; 2 £50. 6 Using Runge-Kutta method of order four, solve y” =» + 29", (0) = 1, 90) = 0 to find (0.2) and y'0.2). 7 7. Consider the second order value problem y” — 2y' + 2y = e¥ sint with (0) =~ 0.4 and 3/(0) =—0.6, Using the fourth order Runge-Kutta method, find 9(0.2). (nna, 2003), ‘Noniéhica SoLUTION OF Oroinany DirrenentiaL Equations ety 8. The angular displacement 0 of a simple pendulum is given by the equation where / = 98 em and g = 980 cm/see®, If = 0 and dB/dt = 4.472 at t= 0, use Runge-Kutta method to find 6 and d0ldt when t= 0.2 sec, BOUNDARY VALUE PROBLEMS Such a problem requires the solution of a differential equation in a region R subject to the various condi- tions on the boundary of R. Practical applications give rise to many such problems. We shall discuss two-point linear boundary value problems of the following types : 2 @ es + 1a) + ularly = 2) with the conditions yxy) = a, y(x,) = b. iq Gi 2 + Aely = Ce) with the conditions y(x,) = ’(¢,) = a and y(x,) = y'(x,) =. While there exist many numerical methods for solving such boundary value problems, the method of finite-differences is most commonly used. We shall explain this method in the next section. FINITE-DIFFERENCE METHOD In this method, the derivatives appearing in the differential equation and the boundary conditions are replaced by their finite-difference approximations and the resulting linear system of equations are solved by any standard procedure. These roots are the values of the required solution at the pivotal points. The finite-difference approximations to the various derivatives are derived as under Ify(x) and its derivatives are single-valued continuous functions of x then by Taylor’s expansion, we have we Ww yore h) = yx) + hy’ Ge) + Soy" (a) + Ey") + AD tid he and yer) = yx) — hy") + 57) STI) + a (2) Equation (1) gives y'(x) = ; [yGe +h) yo) - Ayre - 7 1 ie, YG) = 5, Lee +) ya] + O01) which is the forward difference approximation of (x) with an error of the order h. i D(x) —y(ar— Ay) + O(h) which is the backward difference approximation of y'(x) with an error of the order h. Subtracting (2) from (1), we obtain Similarly (2) gives y'(x) YO) = Zee + h) xe hl) + 00%) which is the central-difference approximation of y'(x) with an error of the order h2, Clearly this central difference approximation to y’G) is better than the forward or backward difference approximations and hence should be preferred. Adding (1) and (2), we get 1 d= Fa DEE +h) — Dye) + yee — hy] + OCH) which is the central difference approximation of"). Similarly we can derive central difference approximations to higher derivatives. | 1036] i ES TES) Hence the working expressions for the central difference approximations to the first four derivatives of y, areas under : Y= BiH oe 1 Y= FEMA BWAHD & Giga Dir + M%-1- Hd 1 HE = pO. Miv rt Y~Mor tH) 6) Solution. We divide the interval (0, 1) into four sub-intervals so that h = 1/4 and the pivot points are 0.x; = V4, x = U2, x, = 8/4 and x, = 1. The differential equation is approximated as 1 qe i TY or 16y; , 1 ~ 33y; + 16y;_, Using y, =, = 0, we get the system of equations 16y,- 3), = oy ~Biyg + 16y, = 2 = Bay + 16y, = 3 Their solution gives Solution. Here h = 1/3 and the pivotal points are x, 13, sy = 2/3, xy = 1. The corresponding y- values are yo(= 0), ¥y» ¥os¥s (= 0). Replacing y* by its central difference approximation, the differential equation becomes Oia ier BM 5 HI; 9) + By, = BLP or Vigo- Wisi tT, - 914% 22 i= 1,2 Ati=1, Yg~A¥9 + Ty — 49 +91 = V9 Ati=2, Ye V9+ Wa AY, + Yq= 9 Using y, = 3 = 0, we get —4y, + Typ +y_,= V9 M+ 1-49, = 419 | Niiienicat'Soiron OF Omonity Direrevnat Eovenons ‘Regarding the conditions y", = y”, = 0, we know that 1 =F Oi tH) Ati=0, 9, — By +91) or yaa Ati=3, a >a 2g +90) Using (iii), the equation a becomes = Ay, + 6y, = VO Using (iv), the equation (ii) reduces to Gy, —4y, = 4/9 Solving (v) and (vi), we obtain v1 = 11/90 and y, = 7/45. Hence y(1/3) = 0.1222 and y(2/3) = 0.1566. Solution. Here h = 1/3 and the pivotal points are x, = 0,2, = 1/3, x, = 2/3, x, = 1. The corresponding y-values are yo(= 0), ¥4+ Yoo ¥g- ‘The given differential equation is approximated to FeO a iar tO Mia Hi 2) + 81H, = HH) Ya~ 4¥2* TY, M9 Y= 1 = dys + Tyg 47, + % Ye Me +5491 = = fori =0, Since rel ; 2. fori=3, O= Y= FeO 25 +92) be Y4= By Ye alae: prions 01 M17 Nia) for i= 3, o= waa 1 O5- 2yq + B_—I) I5= 74 — +9, Using (iv) and (v), the equation (i) reduces to Ay, + 8,21 Using (iv) and (vi), the equation (ii) becomes: =Ya* Be- Dye 1 wo) oui) -(vii) viii) oobi) iz Hioser Enoncsrine MarieManics Using (vi) and (vii), the equation (iii) reduces to By 40/p +29, =3 ent) Solving (viii), (ix) and (x), we get ¥; = 8/13, yp = 22/13, 94 = 37/13, Hence y(/3) = 0.6154, y (2/3) = 1.6923, y(1) = 2.6462. ee Solve the boundary value problem for x = 0.5 wy Be 17+ 1= 0,10) = 1) =0. (Take n= 4) Find an approximate solution of the boundary value proble: 9" +8 (sin? nyly = 0, 05x51, (0) = (1) =1, (Taken =4) Solve the boundary value problem ay" +9 = 0,y(1) = 1, (2) = 2. (ake n = 4) Solve the equation yy” ~4y' + 4y = e%, with the conditions »(0) = 0, (1) ‘Solve the boundary value problem y" —64y + 10 = 0 with y(0) = 9 yalue of (0.5) and compare with the true value, Solve the boundary value problem Y" tay +y = 32? + 2, (0) = 0, Y The boundary value problem governing the deflection of a beam of length 3 metres is given by fy say $742 ert, x0= y'(0) =9(3) = 98) =0. i ‘The beam is built-in at the left end (x = 0) and simply supported at the right end (x = 3). Determine y at the, all points x = Landx=2. Solve the boundary value problem, | A. SF + Bly = 72022, (0) = (0) = yA) = 2, taking n = 4. by the finite difference method. Compute the (Usen = 3) Solve the equation y" (0) (FEZEE OBIECTIVE TYPE OF QUESTIONS Select the correct answer or fill up the blanks in the following questions : 4. Which of the following is a step by step method : ARR e e 8 9. 10, ve 12, Gaeraoes (@) Taylor’ s (®) Adams-Bashforth _ (¢) Picard’s (a) None. ‘The finite difference scheme for the equation 2y” + y = 5is Ify/’ =x + y.(0) = 1 andy"%x) = 1 +x + 242, then by Piard’s method, the value of 2) is 1... ‘The iterative formula of Buler’s method for solving y’ = /lx, y) with yxy) ~Yoy is. ‘Taylor's series for solution of first order ordinary differential equations is, Using Runge-Kutta method of order four, the value of y(0.1) fory’ =+ — 2y, 9(0)= 1 taking h = 0.1 is (a) 0.813, () 0.825 (©) 0.0825 (a) none. Given yo, 94,92, ¥y» Milne’s corrector formula to find ». for dyldx = fx, 9), ‘The second order Runge-Kutta fornmul ‘Aidsixe-Bashforth prodictor fordiola to solve, = ls, 7) giveni7g aap Ise = ‘The multi-step methods available for solving ordinary differential equations are ‘To predict Adam’s method atleast ..... values of y, prior to the desired value, are required. Taylor's series solution of y’ =—ay,)(0) = 1 upto xis...

You might also like