0% found this document useful (0 votes)
674 views40 pages

Maths Module 5

Uploaded by

Afreen Zohra
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)
674 views40 pages

Maths Module 5

Uploaded by

Afreen Zohra
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/ 40
4ODULE-5 (2021 Scheme) a NUMERICAL SOLUTION OF ODEs OF FIRST ORDER AND FIRST DEGREE a Numerical methods for initial value problems Consider a differential equation of first order and first degree in the form = = f(x,y) with theinitial condition Y(X,) = yy thatis ¥ = yy aly This problem of finding y is called an initial value problem, We discuss five numerical methods for solving an initial value problem, In these numerical methods, we compute y (x) in the neighbourhood of the value of ‘x, Equivalently, we compute y (x, £1) where I is small enough. Lesser the value of h, results in greater the accuracy of y(x, th), [a1] Taylor's series method ; i Consider the initial value problem : ue f(xy) and y(x,) = y,. The solution y ( x) is approximated to a power series in (x=.,) using Taylor's series, Then we can find the value of y for various values of x in the neighbourhood of xy | We have Taylor's series expansion y (3°) about the point x, in the form : x-xF (1240) ery) gan 12) = yla,)e(ama)y (5) Sv) Sy) | dy a Here ¥'(x)), ¥"(x, Jers denote the value of the derivatives ih’ atx, which can be found by making use of the data. 400 II SEM - ENGINEERING MATHS - 21 MAT 21 WORKED PROBLEMS ) [1] (@) Use Taylor's series method to find y at x = 0.1, 0.2, 0.3 considering terms a upto the third degree given that GH = x* +y* and y(0) = 1, (b) Compute y (0.1) [Dec 18} = Taylor's series expansion of y (x ) is given by _ (x=), (x=% Py ¥(x) = y(%,)+(x-x,)y (%) + Spry" (Fo) + Gy" (ay) to By data, x, =0,y,=1 and y' = x+y? x? Cad W(x) = yCO)rxy'(0) + y"(0) +5 y"(0) a We need to compute y’(0),y"(0),y"(0). Consider, y' =x? +y? ; y'(0) =O? +[y(0)F =041=1 Differentiating y' w.r.t x we have, yl = 2x4 2yy' ; ¥"(0) = (2)(0) +2-y(0)-¥'(0) = (2)(1)(1) = 2 Differentiating y” w.r.t x we have, y" = 2+2[yy+(y')?] y"(0) =2+2[(1)(2)+V] =8 Substituting these values in (1) we have, 3) 4x? x? x, =ltx-14% 94%. 21 2 5 aah y(x) 2 A tae 4 This is called as Taylor's series approximation wu; plo the third degree anc we need to put x = 0.1, 0.2, 0.3 in the same. Thu: s we have, 4(0.1)° y (0-1) =140.14(0.1)? +iCay = 1.1113 Note : Solution of (b) ends here. re yODULE -5 {2021 Scheme] 7 4(0.2 y(0.2) = 140.2 +(0.2)? + ao aia Seen 4(0.3)° y(0.3) = 140.34+(0.3) +2083)" _ 1 476 thus, [y(0-1) = 1.1113, y(0.2) = 1.2507, y(0.3) = 1.426 [2] Find y at x = 1.02 correct to five decimal places given dy = (xy -1)dx and y = 2 at x = 1 applying Taylor's series method. @ Taylor's series expansion is given by (2) = Ya) + (= ¥y)¥! (%y) + EM ye) FAY yea y By data, x, = 1, y, =2 and y' = we xy-1 x Since the number of derivatives for approximation is not specifically mentioned, we shall have the approximation upto third degree. Hence we have, y(x) = y(L) 4 (x- py y+ y “y+ ya) a) Consider, y' = xy-1 ; ¥()=@@)-1 =1 y= xy'+y py" (1)=(1)(1)42, = 3 T y™=xyeyty py" (A) = (1)(3)+141=5 ° find y (1.02 ), we shall substitute these values along with x = 1.02 in (1). 2 -41) y(1.02) = 24(1.02-1)1 EOD 13 4 (02: ae = 2+ (0,02) +6002)" (3) , (0-027) Thu: i y (1.02) = 2.02061 Tom Taylor's seri ies method, find y ( 0.1) considering upto fourth degree term Fy ( *) Salisfies the equation # =x-y,y(0)=1. x Tay), ; Ylor’s series expansion is given by a 402 II SEM - ENGINEERING MATHS - 21 MAI -x,), (x-x,), y (3) = y (xg) (4 )y" (x) + ESE y (x5) + Ey (a) By data, x, =0,y, =Ly'=x-y (x) = y(O)+xy' (045 y(0) +5 Y"(0) + Ty! (0) + + y'(0)=0-1 =- y= 1-2yy + yf (0) = 1-(2)(1)(“1) = 3 yr =O-2Eyy+(y PT: yo" (0) =~ 2 [(1)(3)#(- 1) = -1 ~ 2, yy" + y"y' + 2y'y"] = -2[ yy" + 3y' y" ] (fourth derivati Consider, y! = x-y? 4 yO = vy (0) = ~2[(1)(-8) +(3)(=1)(3)] = 34 To find y (0.1 ), we shall substitute these values a with x = 0.1 in ( y (0-1) =14(0.1)(- 1) OD (3)+ (ent (0-1)" (8)4 (oy (TY (34) Thus, (0.1) = 0.9138 [4] Use Taylor's series method to obtain a power series in (x~4) for the equati dy Seo ty -2=0; x, = 4, y, = 1 and use it to find y at x = 4:1, 42, correct to four decimal places. @ Taylor's series expansion is given ” 2 u(x) = (%)+(x- x )y'(x,)+& Zo) y" (x, tee Since x, = 4, Y, = 1 by data, the series becomes ¥(x) =y(4)+(2-Ay (4) +E" y'(A) ee Consider, 5xy'+y?-2=0 Substituting the initial values we obtain, [ Note (5)(4)y'(4)+V-2=0 or 20y'(4) =1 py=y'(x)] r MODULE -5 12021 Scheme] 40 1 ‘ = — =0.05 ¥'(4)= 99 Differentiating the given equation w.r.t. x, r S[xy’+y'J+2yy=0 [ Note: y"= y"(x)] substituting the initial values and the value of y/(4) we have, 5[4y" (4) +0.05}+(2)(1)(0.05) = 0 ie, 20y"(4)+0.254+0.1 =0 Since the value of the second derivative itself is smal] enough we shall approximate Taylor's series as in (1) upto second degree terms only. Substituting these values in (1) we have, y(x)=1 +(x-4)(0.05) +254 (9.0175) We now find y (4.1), y (4.2) and y (4.3 ) from this expression. y(4.1)= 1+(4.1~4)(0.05) + G4=4¥ (_ 9.0175) Thus we have, J 5), (0-1)* = y¥(4.1)= 1+(0.1)(0.05) + 3 (- 0.0175) = 1,0049 y(4.2)=1 +(0.2)(0.05) + (9:2) (_ 0.0175) 1.0097 2 w 3)? y(4.3)= 1+(0.3)(0.05) + 22 0.0175) = 1.0142 d. 11 Use Taylor's series method to find y (4.1) given that a ~ ee andy (4) =4, Taylor's series expansion is given by SS 404 JI SEM - ENGINEERING MATHS - 21 MAT 21 -x J x-x,)P V(3) = 9%) (=m) (+ 2) yrs, yh ar) + a 7 y Tar A vor 4 yla) = y(A)e(a— ayy (4) CD yng 1) 2 ay.) by approximating upto the third dears terms. 1d [eee Consider, 9 = ry (Note: y' = y' (x),y" = y"(x) etc.] or y¥i(x?+y)=1 + Q Substituting the initial values we have, y (4) +4] =1 or y' (4) = = = 0.05 Differentiating (2) w.r-. x, (2r+y')+(2 +y)y" =0 8) Substituting the initial values and the value of y/( 0.05((2)(4)+0.05]+[4? + 4]y'(4) =o ie, 0.05[8+0.05]+ 20y"(4) =0 ie, 0.4025+20y"(4) =0 ot y°(4) = —o.020195 We observe that the value of the derivatives are small enough and the third degree term can also be neglected, Substituting these values in (1) for computing y (4.1 ) we have, 4) we have, y(41) = $+(4.1~4)(0105)+ G29) 4 gp0195 Thus, y(4.1) = 4.0049 [6] Use Taylor's series method to solve y' = x? + y in the range 0 y(0O) =1, y'(0)=05 ~3y 7 y"(0) =0 yr smaymy 0G y"(0) =~ yO = -xy"-2y' 5 (0) =-1 From (1), the first five terms of the Taylor's series expansion is given by By data, y" Consider, y" y(x) = y(0)+xy' (+e y" (0)+ ry "(0)4 2 y (a) 0 paid (0) Now, y(0.1) = 1+(0.1)(0.5)- acu - 2.9001 = 1.0498 y(0.2) =14(0.2)(0.5)- ome ~ S018 ~ 1.0986 y(0.3) =1+(0.3)(0.5)- “Se ~ 2008) = 11452 Thus, y(0-1) = 1.0498, y(0.2) = 1.0986, y(0.3) = 1.1452 ASSINGMENT Use Taylor's series method to solve the following initial value problems. dy Boxy, ax yey (0) = 1. Compute y ( 0.1 ) considering terms upto fourt! degree. dy dx * ¥~V¥(0) = 1. Compute y (0.03 ) using the expansion of y upt« second degree terms. d 3, a de TY YC) = 2 Compute y (1.1) & y (1.2) by taking step size 01 Ci ya (x-t)ptlare) sa he canes 5, 0.9003, 0.8023 542| Modified Euler’s Method dy Consider the initial value problem = = f(xy): ¥(%) = Yo We need to find y at x, = 2, +h. We first obtain y(x,) = y, by applying Euler's formula and this value is regarded as the initial approximation for y, usually denoted by ye PP n ly y Ys; also called as the predicted value of y,. Euler's formula is given by IP = Yot hf (%o/Yo) bo accuracy is poor in this formula this value y, is successively improved pana to the desired degree of accuracy by the following Modified Euler's ula, where the successive approximations are denoted by AY VQ) Sree ye, yo, tee ete. A h I = yy ALF (xv) 4S (29) ] 2) ys Yo SUL to) + F(a, YJ 410 II SEM - ENGINEERING MATHS - 21 MAT 2} h 2 VO = tS LF (xeyy f(a 9) | Each of the succeeding approximation is better than the preceding ones. They are called corrected values. Euler’s formula and modified Euler’s formule jointly are also called as Euler’s predictor and corrector formulae. WORKED PROBLEMS [9] (a) Given * =1+4,y =2atx=1, find the approvimate value y al x = 14 by taking step size h = 0.2 applying modified Euler's method. Also find the value of y at x = 1.2 and 14 from the analytical solution of the equation. (©) Compute y (1.2) in tivo steps. [Dec 18, Sep 20] © The problem has to be worked in two stages. I Stage : x, =Ly, =2, f(x,v) =1+(y/x), h = 0.2 x, =x, th =12, y(x,) = Now, f(x,,¥,) =1+(2/1) =3 y(1.2)=? We have Euler's formula: y\ = y, +h f(x,,y,) --@ = 2+(0.2)(3) = 2.6 Further we have modified Euler’s formula : y= Yo) * FH] 1+ Ffi+x, +H] 140.1[1+0.2+ V1.2] = 1.2295 y? = 14 0.1[1.2 + ¥1.2295 J = 1.2309 y= 1 +0.1[1.2 + ¥1.2309 ] = 1.2309 Thus, (0.2) = 1.2309 Il Stage : Now let x, = 0-2, ¥ = 1.2309 Flay) =x )y if (% Yo) = 0-2 + VT-2309 = 1.3095 xox, +h =0.4; y(x,)= 4, = (04) =? Substituting in the Euler’s formula, yf) = 1.2309 + 0.2(1.3095) = 1.4928 Next from modified Euler’s formula, ayo 0.2 0) y! 1.2309 + $2 [1.3095 + x, + WM; ] = 1.2309 +0.1[ 1.3095 + 0.4 + V1.4928 ] = 1.524 1.2309 + 0.1[ 1.7095 + V1.524 | = 1.5253 2 Hy = 1.2309 + 0.1[ 1.7095 + V1.5253 | = 1.5254 Wy? = 1.5254 y(0.4) = 1.5254 i) " yy? Also Thus, be 8 11 SEM- ENGINEERING MATHS - 21 May 21 41 1 dy, [14] Use modified Euler's method to compute y (0.1 ) given that = = x2 4y, ing h = 0.05 considering the accuracy upto two approximations in 0) = 1 by taking li = 0.05 considering © We need to compute y (0.05 ) first and use this value to compute y (0.1) Stage: By data x,=0,y,=1, f(xy) => +y,h = 0.05 F(X), Yo) =O 4151. x, =x, +h = 0.05 y(x,) = y, = y(0.05) =? From Euler's formula: y{° = y, +h f(x,,y,) we obtain, y = 14(0.05)(1) = 1.05 Next by modified Euler's formula, he WD = ots flay yt fla, y)] 0. 1+ 2 [reat ey] 1+ 0.025[1+ (0.05)? +1.05] = 1+0.025[1.0025+1.05] = 1.0513 y\? = 140.025[1.0025 + 1.0513] = 1.0513, (0.05) = 1.0513 II stage : Now, let x, = 0.05, y, Thus, = 1.0513 FUE I= 4Y 5 f(x,y.) = (0.05) 41.0513 = 1.0538 % =o th = OLY (x) =y, = y(4y =? Substituting in the Euler's formula, y{®) = 1.0513 +0.05 (1.0538) = 1.104 Next from the modified Euler's formula, 0.05 y= 1.0513 +> 2.0538 4 x3 4 ior) MODULE -5 [2021 Scheme] ano 1.0513 + 0.025[1.0538+ (0.1)? +1.104] WW 1.0513 + 0.025[1.0638 + 1.104] = 1.1055 y®) = 1.0513 + 0.025[1.0638 + 1.1055] = 1.1055 1 Thus the required [y (0.1) 055 a [15] Using Euler's predictor and corrector formulae solve #Y. ix *tY¥ atx =0.2 dx given that y (0) =1. @ We need to compute y ( 0.2 ) and since the step size is not specified we shall take it be 0.2 itself. By data we have, x, = 0, y, = 1, f(x.y)=x+y and h F(x, ¥)=OF+1=1. x, =x, +h = 0.2 (assumed) = 0.2 y(x,) = y, = y(0.2) =? We have Euler's formula (predictor formula) y =y, thf (x,,y,) =1+(0.2)1 =1.2 Next consider modified Euler’s formula (corrector formula), i) ot ELF yr ud + F(a, ¥I] = 1492149, ey] =140.1[14+0.2+(1.2)] = 1.24 (2) Ww 140.1[1.2+4(1.24)] = 1.244 (3) Wits am 140.1[1.24+1.244] = 1.2444 yi) =14+0.1[1.24+1.2444] = 1.24444 Thus the required | y(0.2) = 1.2444 Remark : If we had worked the problem in two stages ( Taking h = 0.1) we would 4 : have got more accurate answer. It may be noted that lesser is the step size, greater is the accuracy. 420 I SEM - ENGINEERING MATHS - 21 MAT 21 [16] Using Euler's predictor and corrector formula compute y (1.1) correct to five and y=latx=1. dy decimal places given that ae Also find the analytical solution. {Aug 21] dy 1 dy _1-xy ~ mam ebb to 1-x We have, f(x,y) -— i, =1,Y, = 1. Let us take h = 01 F(t) =O x =x th=11 9(x,)= 9, =y(14) =? From Euler's formula : y\" = y, +f (x,,y,), we obtain y= We have modified Euler's formula, = y+ AF, I,)+ F(x, ¥)] (0) = 1494] 9 aon x4; 2 x 1-1.1(1) (14) 1-1.1(0: ye =1 sos] 218020) 959) = 0.99605 (ayy Si 1005] | = 0.9959 1-1.1(0.99605) 8) = 140,05| | y?) =1+ tay | 0.99605 Thus, y(1.1) = 0.99605 Analytical Solution Ei : YY A is oF the form Ls Py = 0 where p= fx and Q= 1x dein ix dx whose solution is given by 421 = F(=¥)¥ (4) = 9p We need tp Gnd y(=, +h), where h is the step size. We have t Sst compute 4,1, .k,,k, by the following formulae. 422 IUSEM~ ENG! ERING MATHS ~ 21 MAT2 WORKED PROBLEMS [17] Given * = ave2,y(0) = 1, compute v (0.2) by dating k= 02 x ty Runge-Kutta method of fourth onier, [Feb Also find the analytical slution, 2) k nF (y+ My) = (0.2) F(1) = (a2[sso- =02 or ke us(ase 4) = (02) (0+ k= (0.2) #(0.1,1.05) = (02)[3s0.2+ a k= (0.2) f (0.1,1.0825) = (0.2)/ 3x04 k= hf (xyth, vy ek) = (0.2) £(0.2,1.16825) k= (0.2)|3x02 + HSS] = 0.236825 a We have, ¥(%, +h) = y= E(k, + 2k, +2 y(0.2)=1 +2 (0.14 260.165 = 20.1682 6 Thus, We shall find the analytica lution of the given equation by writing 8 e ey a Py = Q whose solution is yel"* = fae! a+ ae a MODULE -5 [2021 Scheme] i dy 9 pert gear: ela gm We have, rare Here 772 3x pe =e a2 = ‘The solution becomes, ye W223 fre hee, Integrating RHS by parts we have, yew = 3[xe%(-2)— fo (-2)-1ax +e yer? = 3[-2xe" -4e" Jtc Multiplying with ¢¥? we oblain, y = -6x-12+¢ et Applying, the initial condition that y=1 at x = 0 the solution becomes, 1=0-12+¢ . c=13 The analytical solution of the initial value problem is given by, y = -6x-12+13e? Now by putting x = 0.2 we have, y(0.2) = -6(0.2)-12413e™ = 1.1672219 Thus, [y(0.2) = 1.1672219 = 1.1672 | by analytical method. di 7 ‘pals jour order Runge-Kutta method to solve, (x + ne =1,y(0.4)=1 at x = 0.5 correct to four decimal places. [Aug 21] di i = We have, x = yyy and y= Lat x = 04 f(xy) = os =, E =? Fay’ to OF My 1, y(0.5) Here, x4 =0.5 sh =0.5-x, =0.5-0.4 = 0.1 We shall first compute k, »k, +k, ky. k= f(x,0y,) = (0.1) f (04,1) = (pred = 0.0714 IL SEM - ENGINEERING MATHS - 21 MAT 21 42a 0.0714 2 ans (x4 yet) = (oy s(o.4+ + 20714) k, = (0.1) f (0.45, 1.0357 ) (0. sascceas7 | = 0.0673 k k, = n(x +tevs +2) = (0.1) f (0.45,1.03365) i 4 FE 00 sass tosses | coo Hf (xy th, Yotk,) = (0.1) f (0.5,1.0674) 1 Sc eee c Less tera | 20688 We have, y(x,+h) = yy +Z(k, + 2k, + 2k, +k,) a y(0.5) = 1+ <[ 0.0714 + 2(0.0673) + 2(0.0674) + 0.0638] Using Runge-Kutta method of fourth order, find y ( 0.2) for the equation y-x : ine y(0) = 1 taking h = 0.2. [Dec 17, June 18] yox yrx =0,y,=1h=0.2 = By data, f(x,y) = We shall first compute k,,k,-k, -k,. = hf (%,+ Yo) = (0.2) f (0,1) = (0.2)[3=2| k, k= s(x, +8, vot) = (0.2) F (04,14) MODULE -5 [2021 Scheme] 425 = (0. ait = 0.1667 h k,\ +5 Ygt | = (0-2) f (0.1,1.0835) [1.0835—0.1 k, = (0.2 = 0.1662 3 =O roses eo 0835 +0. cer =hf (x,+h, y,+k,) = (0.2) f (0.2,1.1662) i 1.1662 -0.2 = (0.2)| —————_} = 0.14 aoe 1 terse | i 1 We have, y(t, +h) = y, +Z(k, + 2k, +2k, +k.) ¥(0.2)=1 +2o2+ 2(0.1667) +2(0.1662) + 0.1414] Thus, y(0.2) = 1.1679 [20] Nse fourth order Runge-Kutta method to find y at x = 0.1 given that a oe = Bet +2y,y(0) =0 andh =0.1. [Sep 20] © By data, f(x,y) = 3e"+2y, x, =0,y,=0,h=01 We shall first compute k, ,k, -k, -k k= hf (xy, yg) = (0.1) f (0,0) = (0.1)[3e° + 2x0] = 0.3 i= a(x, steyet) = (0.1) f (0.05,0.15) = (0.1) [3e% + 2(0.15)] = 0.3454 k 21s (x, +h y+) = (01) (0.05, 0.1727) k, = (0.1)[3e° +2(0.1727)] = 0.3499 126 II SEM - ENGINEERING MATHS - 21 MAT 21 k= hf (x,+h, y,+k,) = (0-1) f (0.1,0.3499) k, = (0.1)[3e"* +2(0.3499)] = 0.4015 all We have, y(x, +h) = Yo + E(k, + 2k, + 2k, +k,) y(0.1) =0 +31 0.3 +2(0.3454) +2(0.3499) +0.4015] Thus, [21] Use dy oC) y(0.1) 3487 fourth order Runge-Kutta method to compute y ( 1.1 ) given that 7 By data, f(x,y) = xy", x, =1,y,=1 We need to compute y ( 1.1 ). This implies that xth=14 h=01 We shall first compute k, ,k, ,k, ,k,. k= hf (x,y) k, = (0.1) f(1,1) = (0-1)[(1)(1)"] = 0.1 k) ke rs(ssehy,+4) = (0.1) f (1.05,1.05) K, = (0-1)1(1.05)(1.05)') = 9.1967 h k k= ns(seba, +4) = (0.1) f (1.05, 1.05335) k, = (0.1)[(1.05) (1.05335 ] = 0.1068 kK=hf(x,+h, y, +k) = (0.1) F (1.1,1.1068) k= (0.1)[(1.1)(1.1068)"] = 0.1138 We have, y(x, +h) = Ye E(k, +2k, 42k, +k.) MODULE -5 [2021 Scheme] om y(1a) = 1+3f 0.1 +2(0.1067) +2(0.1068) +0.1138] Thus, y(4.1) = 1.1068 [22] Using Runge-Kutta method of fourth order solve “4% +y = 2x at x =1.1 xe given that y = 3 at x = 1 initially. da. <= We have, “e = 2x-y,x, Yo =3 f(y) = 2x-y,x,+h =14 .h=01 We shall first compute k,,k,/-k,,k,- Kk, = MF (%,-¥9) = (0.1) £ (1,3) = (0.1)[ 2(1) -3] = -0.1 k, = tt (xy +a +8) = (0.1) £(2.05,3 - 9:2) k = (0.1) f (1.05, 2.95) = (0.1)[2(1.05) —2.95 ] = —0.085 h k, = ms (x, +t, +2) (O.1)F (2.05,3 - 2.085) k, = (0.1) f (1.05,2.9575) = (0.1)[2(1.05) — 2.9575] = — 0.08575 k= Wf (x,+h, yy +k,) = (0.1) f(1-1,3 — 0.08575) k, = (0.1) (1.1,2.91425) = (0.1)[2(1-1) — 2.91425] k, = -0.071425 We have, y(x, +h) = Yo + Elk, + 2k, + 2k, + ky) y(11) = 3+ z[-0.4 +2(-0.085) +2(— 0.08575) — 0.071425] Thus, y (1-1) = 2.9145125 = 2.9145 423 I SEM - ENGINEERING MATHS - 21 MAT 2 [23] (a) Using Runge-Kutta method of fourth order find y (0.2 ) for the equatio; dy _¥ de 7 pax’ ¥(0) = 1 taking b= 01 (b) Compute y (0.1 ). [Dec 18 = The problem has to be done in two stages. y-x TStage: f(G¥) = 2, a, = Oy, = Ln = 01 We shall first compute &, kk, ky. k, = f(xy.) = (0.1) f (0,1) = coay[ 2] =01 k ( h k, ahglay+diys = = (0.1) f (0.05, 1.05) k, = (0.2)| 195 L105 + a h k k= n(x, + 0My +4) = (0.1) f (0.05,1.0455) k= hf (xy +h, yy+k,) = (0.1) £(0.1,1.0909) 1.0909 -0.1 k, = (0.1)| £:0909=0.1) _ = 1 seoce3 | a 1 We have, y(x, +1) = y, + elk + 2k, + 2k, +k) 1 y(0.1)=1 +G(0d+ 0.182 + 0.1818 + 0.0832) Thus, y(0.1) = 1.091167 = 1.9912 Note : Solution of (b) ends here. MODULE «& [2021 Scheme] 429 nstage: fH) = xy 2001, yy = 1.0912, = 04 Again by using the same formulae for ky, k, ,k,, ky we have, sata pos 1,0912-0.1 = (Wed) f(0.1,1.0912) = (0.1) | LOM2= 0-1 R= (1) FC van [Re ua by = (ed) F (0.18, 1.1328) = 0.0766 ky = (0.1) f (0.15, 1.1295) =0.07655 ky = (0-1) { (0.2,1.16778) = 0.07075 0.0832 \ 1 Now, ¥(Xy th) = yy elk + 2k, + 2k, +k) y(O140.1) = 1.09124 £(0.0882 +0.1532 + 0.1531 + 0.07075) 6 Thus, Remark : Referring to Prob : is N= 0.2 and we have obtained y (0.2) = 1.1679. DY) Solve s (yx? yes (y? 4x7) dy for x = 02 anal OA given tha Y= Lat x =0 initially, by applying Runge-Kutta method of order 4. (b) Compute y (0.2) by taking h = 0.2. dy “yee 7 We have 7° = y= Oy, =U n= 0.2 en worked in one stage with Dune 17] TStage: f(x,y) = We shall compute k, ky +k, +k, K, = MF (x 0Yp) = (0.2) f (0,1) = (0.2)1 = 0.2 k, =ng{s al a At = (0.2) f (0.1 1.1) = 0.1967 2 [Mot prYo ty J = (0-2) F011. : kahglx sh 3 Mt gMet Ky=WF(xy +t, yy + ky) = (0.2) f (0.2,1.1967) = 0.1891 = (0.2) f (0.1, 1.0984) = 0.1967 war , 430 II SEM - ENGINEERING MATHS - 21 MAT 21 1 We have, y(x,+h) = Yo + E(k, + 2k, + 2k, +k) 9598 Thus, y(0.2) Note : Solution of (b) ends here. 196 U1 Stage : f(xy) = i 1%, = 0.2, yy = 1.196, = 0.2 Again using the same formula for k, ,k, -k,k, we have, k, = (0.2) f(0.2,1.196) = 0.1891 k, = (0.2) f (0.3,1.29055) = 0.1795 k, = (0.2) f (0.3,1.28575) = 0.1793 k, = (0.2) f (0.4,1.3753) = 0.1688 Now, y(x,+h) = Yat Ek, +2k, +2k, +k,) Thus, y(0.4) = 1.37525 ~ 1.3753 ASSIGNMENT Apply modified Euler’s method to solve the following initial value problems by considering the accuracy upto two approximations in every step. dy _ Vee = 77990) = 2. Compute y ( 0.2 ) by taking h = 0.1 dy 2 ae Y= Y= 0 atx=0. Compute y at x= 0.4 by taking h = 0.1 di 3, dx lays * FY in the range 0 < x < 0.06 by taking h = 0.02 given that y= Lat x = 0 initially, dy 4 iy *FY9(0) = 1. Compute y (0.2) by taking h = 0.1 dy 4a - 5. at = ¥9(0) =1. Compute y in the range [ 0, 0.6 ] by taking I! = 02. 32 II SEM - ENGINEERING MATHS - 21 MAT 2 5.2| Numerical Predictor and Corrector methods In these methods the viaue of y at a desired value of x is estimated from ; set of four values of y corresponding to four equally spaced values of x The four values may be readily available or be generated using Be giver initial condition by any numerical method discussed earlier. Taylor S Serie: method would be appropriate to generate three more values of y given one value initially. We discuss two predictor & corrector methods 1. Milne’s method 2. Adams - Bashforth method [Self Study Content] . ; ; : 1 ay fC Consider the differential equation y' = a f(*,y¥) with a set of four pre determined values of y:y(x,) = yy-y(x,) =y,,y(x,) = y, and y(%,) = ys. : Here x,,x,/x,,x, are equally spaced values of x with width h. Also x, =x, +h=x,+4h Predictor and Corrector formulae to compute y(x,) = ¥Y, are as follows. Milne’s predictor and corrector formulae Ye. = Yo +Foy, ~¥, ¥2y,).. 5.21 (Predictor formula) yo h ’ ’ ’ +304 + 4y, ty)... (Corrector formula) [ 5.22} Adams - Bashforth predictor and corrector formulae ae 7 " J! - ’ ¥, Ys tag (S5Y; - 59y! + 37y" —9y)) (Predictor formula) yO = Fey, + 19y, -5yy! Ys + 5g ON Ys — SY, +y)) * (Corrector formula) ULE -5 [2021 Scheme] MOD 433 Working procedure for problems We first prepare the table showing the values of y corresponding to four equidistant values of x and the computation of y’ = f(x,y). We compute y, from the predictor formula. e We use this value of y,to compute y', = f(x, V4) « We apply corrector formula to obtain the corrected value of Vye This value is used for computing y{, to apply the corrector formula again. « The process is continued till we get consistency in two consecutive values of yy (_WORKED PROBLEMS d ; : Y xy? and the data y(0) ="0, y(0.2) = 0.02, y [25] Given that = y(0.4) =0.0795,y(0.6) = 0.1762. Compute y at x = 0.8 by applying (a) Milne’s method [June 18, Sep 20, Feb 21 (b) Adams - Bashforth method. * We prepare the following table using the given data which is essentially required for applying the predictor and corrector formulae. x, 1 y yox-y x, =0 y, =0 y, = 0-07 =0 x, = 0.2 y, = 0.02 y= 0.2-(0.02)? = 0.1996 x, =04 2 ¥,2= 0.0795 y= 0.4- (0.0795)? = 0.3937 x, = 0.6 Yq, = 0.1762 y, = 0.6 — (0.1762)? = 0.5689 x, = 0.8 ¥, =? (a) By Milne’s method We have the predictor formula 4h uy 7 WD = ot (2yy— Vs + 2y5) 434 I SEM - ENGINEERING MATHS - 21 Mar yi) = 04 40-2) [2 (0.1996) - 0.3997 +2(0.5689)] = 0.3049 Now, y', = x,y? = 0.8-(0.3049)? = 0.707 Next we have the corrector formula, yO =y, hu, tay yi) yo) = 0.0795 +2] 0.3937 + 4(0.5689) + 0.707 ] = 0.3046 Now, y', = x,y? = 0.8-(0.3046)? = 0.7072 Substituting this value of y', again in the corrector formula, y = 0.0795 + °2 (0.3937 +4(0.5689) +0.7072] = 0.3046 y, = ¥(0.8) =0.3046 Thus, ma ve es. | MODULE ~5 [2021 Scheme) 435 y = 0.3046 Ths, 4, = (08) = 03049 26] Apply Mine's method to compute y (1.4 ) corrector to four decimal places dys gan Sh =k ond joing dat: y(1)=2 y (11) = 2.2156 y (1.2) = 24689, y (13) = 27514 © First we shall prepare the following table. x y y= wt jin,2 x 21 y,=2 yatrye? £51 y, = 2.2156 =(1y+ ae = 23178 || 412 y, = 24649 = (12) += a = 2.67245 | 2 = x,=13 y, = 2.7514 y, = (13) += = 3.0687 [ x=14 y=? Weave yl =y +4 (ay' -y! +2) ehave y; Hal yy, ty, ye 2A 1) 9(29178) -2.67245-+2(3.0657)] = 3.0793 p , “ = 3.49965 Hence, yj = 32 4 = (14+ Now consider, y{°) = y, ly, +4yi ty!) y= 2aoisa AD eras H43 0657) +3:49965] = 3.0794 Now, y, = (14) + 20794 = = 3.4997 Kk 436 II SEM - ENGINEERING MATHS - 21 MAT 2 Substituting this value of y again in the corrector formula we obtain yS) = 3.0794 Thus, Ty, = y(1.4) = 3.0794 [27] Use Taylor's series method (upto third derivative term) to find y at d . x= 01, 0.2, 0.3 given that ae =x 4y withy(0) = 1 Apply Milne’s predictor-corrector formulae to find y ( 0.4 ) using the generated set of initial values. © Referring to Problem - [1], we have obtained y (0.1 ) = 1.1113, y (0.2) = 12507, y (0.3 ) = 1.426. Using these values along with y (0) =1 initially, we prepare the following table. x y yore y, =1 y= 042 =1 x, =01 y, = 1.1113 yi = (0.1)? +(1.1113)? = 1.245 Ears y, =1.2507_| ¥, = (0.2)? +(1.2507)? = 1.6043 x, = 0.3 y, = 1.426 ys = (0.3)? + (1.426)? = 2.1235 x, = 04 y, =? ; , they, Consider, y{" = y, + (2H, Yi, + 2y,) 4(0.1 yf?) = 1+ AO) 2(2.245)-1.6043 + 22.1238) = 1.6844 Hence, y, =x; +y; = (0.4)? + (1.6844)? = 2.9979 (Cc) _ Ly ee Next we have, yj, = y, + 3% + 4y)+ yi) 0.1 y) = 1.2507 + =z [1.6043 + 4(2.1235) 2.9972] = 1.6872 Now, y, = (0.4)? + (1.6872)? = 3.0067 Substituting this value of y{ in the corrector formula again, MODULE - 5 [2021 Scheme] ie yo) = 1.2507 4 Of 1.6043 + 4( 2.1235) + 3.0067] = 1.6875 Now, y, = (0.4)? + (1.6875)? = 3.0077 Substituting again in the corrector formula we obtain yO = 1.6876 Now yi, = (0.4)? + (1.6876)? = 3.008 Substituting again in the corrector formula we obtain. yO = 1.6875733 ~ 1.6876 Thus, y(0.4) — 1.6876 [28] The following table gives the solution of 5xy' + y® — 2 =0. Find the value of y at x =4.5 using Milne’s predictor and corrector formulae. Use the corrector formula twice. x | 4 44 4.2 43 44 y_|_1_| 1.0049 | 1.0097 | 1.0143 [1.0187 Dune 17] = By data Sxy’+y?—2=0 or y! We prepare the following table. x y 7 " = 0.05 Ye ot Yo ~ "5x4 2—(1.0049)? x= 41 = ere 1.0049)" _ 9.0483 y, = 1.0049 vy Ct = 4.2 y, = 1.0097 yt, = 24.0097)" _ 0.0467 Ye 2 5x 4.2 Zt 2 — (4.0143 2. x, = 43 4. . 0143)" _ 0.045 Me era Ye 5x 4.3 2— (4.0187) _ 9.0437 ee 4 = 2—(1.0187)" =o. Ya 0187 vy Oa L ee 438 Il SEM - ENGINEERING MATHS - 24 MAT 21 We have Milne’s predictor and corrector formulae in the standard form Y= Ye +Zoy, ~ yy +2ys); yO sy, okey, +4yi ty) Since we require y,, the equivalent form of these formulae are given by (P) he ee Ys = MOY, ys + 2y)) | iC) hoe faa WO = Ys +S (ys + Ay, +L) 4(0.1 Hence, y!"? = 1.0049 + 002) 9 9.0467) -0.0452 +2(0.0437)] = 1.023 2 ys _ 2-(1.023)2 x, Begg = 0.0424 Now, yp = e 0.1 Hence, yf) = 1.0143 + ~y [0.0452 +4 (0.0437) + 0.0424] = 1.023 Thus, y(4.5) = 1.023 Remark : Though we had asetof five pre determined values of y, we used only a set of {four values to determine the fifth value inthe sequenee dy _ 5s PIV a = 2-9, V0) = 2,y(0.1) = 2.010, (0.2) = 2.040 and ¥(0.3) = 2.090, find y (0.4) correct to four decimal places by using Milne’s predictor-corrector method, [Dec ug 21) ‘We prepare the following table, MODULE -5 [2021 Scheme] 439 L a y y' = 2e-y = 0 Yo = 2 y, = 2e°-2=0 x, = 01 Peg y,, = 2e°? -2.01 = 0.2003 y, = 2.040 L y, —2.04 =0.4028 y, = 2.090 y,, = 2e? - 2.09 = 0.6097 y= 2 (a) By Milne’s predictor - corrector method We have Milne’s predictor formula, ? yf Aon ar pout = Vy (Yi Ys +25) y?) = 2+ 402) (20.2003) - 0.4028 +2(0.6097)] = 2.1623 Now y', = 2e°* —2.1623 = 0.8213 Ms Next, we have Milne’s corrector formula, hey Gn YO) = Yat (U2 + AY FH) | yO = 2.04 +9210. 4028 + 4(0.6097) + 0.8213] = 2.1621 Now, y' = 2e°* - 2.1621 = 0.8215 Applying the corrector formula again we have, yf = 2.04+ 92,0, 4028 + 4(0.6097) + 0.8215] = 2.1621 Thus, y(0.4) = 2.1621 Note : Same problem by Adams-Bashforth method [Sep 20]

You might also like