You are on page 1of 515
ENGINEERING MATHEMATICS - IV : Fourth Semester Engineering Course of VTU LCBCS Scheme] t | for the | | Dr. K.S. CHANDRASHEKAR M.Sc.Ph.D Formerly Professor and Head Department of Mathematics i ‘The National Institute of Engineering i (An Autonomous Institution under VTU) i MYSURU - 570 008 GPx a9 BO 0 l of “ . (drksc1953@yahoo. Se eRe GN | (drksc1953@yahoo.com) Says = eee Ss ‘. \o |; | triour ehdeavour to protect you against counterfet/fak® Books we have i ial on some of our fast | puta hol f and thi displays a unique multi. moving titles. The + | colour effect from different angles when tilted under single source of light.” | A fake does not give such a special effect. Phone : 22216177 ‘SUDHA PUBLICATIONS _ No.1, Annadanappa Lane, Avenue Road Cross, Bangaluru - 560 002 Summary of the grading system adopted by VIU Choice Based Credit System (CBCS) effective from 2015-16 Grades and Grade Points Very ‘Above 7 u Gack {294 verage AveraBe| Poor] Fall Level | Outstanding | Excellénit [Grade o state} c [p> Tele Giade pear 10 om | os | or | 06 | 05 | 04 | 00 |, Grade Points Scale Level_| Outstanding | Excllent| 07, |Good| Above | average| Poor | Fail “Grade 0 s_[ale | c' |p TETE Grade 10 o | 08 | o7| o | .05. | of | 00 Point Score z 90 |80 |>7/>60| >50 | 245 [2 40]/< FAIL is First Attempt In Learning : — Dr. APJ. Abdul Kalam FAILURE is the opportunity to begin again more intelligently = Henry Ford REWARD for Achievers VTU students of the CBCS scheme from2015-16 will be rewarded with cash prizes by the authoras perthe following criteria. > Student should have secured ‘O’ (Outstanding) grade in all the four semesters in Engineering Mathematics (15 MAT-11, 21,31, 41), : > Student should also have secured atleast 'S’ grade in all the subjects of the first four semestersinthe firstattempt, Please write to the author at the publisher's address with all the copies of marks cards duly attested by the HOD / Principal with an e-mail to the author. It should reach within 15 days from the date of announcement of VTU results of 1V semester, (Conditionsapply) Mr.Bharath.M.V, a student from 2006‘ batch of E&C. branch from PESIT-Bengaluru, received cash prize in 2008 as per the earlier criteria. (Centum in all the four papers) : ‘My Best Wishes to alt the students to become Achievers, -Dr. KSC.’ a Ens + differentiability. Analytic functions-Ca SYLLABUS FOR 2015-2019. ENGINEERING MATHEMATICS - Iv & (Common to ‘all Branches) ! ‘Course Title: Engineering Mathematics -IV > Course Code: 15MAT31, Credits: 04 : L-TP: 4-0-0: Contact Hours/Week : 04 Total Hours: 50 1A Marks: 20 Exam, Marks : 80 Course Objectives: * ‘The purpose of this courses tomakestudents well conversant with numerical methods td solve ordinary differential equations, complex analysis, sampling theory and joint probabilitydistribution and stochastie processes arising in science and engineering, MODULE -I Numerical Methods : Numerical solution of ordinary differential equations of first order and first degree, Taylor's series method, modified Euler’simethed, Runge-Kutta. ‘migthod of fourth ‘order. Milne’s and Adams-Bashforth predictor and corrector methods (No derivations of formulae). PRET 10 Hrs MODULE - II Numerical: Methods : Numerical solution of second order ordinary differential . equations, Runge-Kutta method and Milne’s method. Spécial Functions : Series solution-Frobenious method. Series solution of Bessel’s differential equation leading to [,, (x) Bessel's function of firstkind. Basic properties, recurrence relations and orthogonality. Series solution of Legendre’s differential equation leading to P, (x) ~ Legendré polynomials. Rodrigue's formula, problems. 10 Hrs MODULE - I” Complex Variables : Review of a function of a complex variable,.limits, continuity, suchy-Riemarin equations in cartesian and polar forms. Propertibs and’ construction of analytic functions, Complex line inltegrals-Cauchy’s theorem and Cauchy's integral formula, Residue, poles, Cauchy's sidue theorem ( without proof) and problems. ' (Cttansfotmations : Conformal transformations. é Discussion of transformations :w = 2", w= ¢, w.=2+(I/z) (z #0) avid bilinear transformations-problems.’) : 10 Hrs Question paper pattem : MODULE - Iv SSDOLE ~ IV Probability Distributions(Random variables (discrete and contin mass/density finttio inuous), Probability Poisson distribution. Exponential anq normal distributions, problems, Fee. . Joint probability distribution: Joint Probability Variables, expectation, covariance, ns, Binomial stributon) distribution for two discrete raniiom correlation éoefficient. = - MODULE-V, meMULE SY, Sampling Theory : Sampling, Sampling distributions, standard error, test: of hypothesis for means ard Proportions, confidence limits for means, student's PAistribution, Chi:square distibution as « tose of goodness of fit. : Js ais Aiseni'e! Stochastic Process: ‘Stochastic processes, probability vector, stochastic matrices; fixed Points, regular. stochastic matrices, Markov chains, higher transition probability = simple probleins, 7 | Course Outcoines : On completion of this ‘course, students are able to: 1. Use appropriate single step and multi-step numerical meth: Second order ordinary differential equations arising Problems, 2 Explain the idea of analyticity, Potential fields residues anl‘poles of complex Potentials in field theory and electromagnetic the ds to solve first and in flow data design 3. Employ Bessel’s functions and Legendre’s polynomials fot: tackling problems arising in contitrum mechanics, hydrodynamics and heat conductice, 4. Describe random variables and Probability distributions using rigorous statistical methods to analyze problems associated with optimization of digital circitits, information, coding theory and stability analysis of systems, 5. Apply the knowledge of joint probability distributions and attempting engin: Markov’ chaing itt ering problems for feasible i. random events. , The question paper will have ten full ‘Questions carrying equal inarks, Each full question consisting of 16 marks, . , . : There wil] be. two full questions (with a maximum of four sub questions) from eachmodule, : . Bach full question will have sub Question covering all the topics under a modiile, The students will have to answer five full questions, selecting one full question from each module. Hrs | a pao “NUMERICAL METHODS - 1 MAT, aw HEy ar hm “4 Cy £. Contents a w ; < [ Module -1 ] [1-42] 1:1 Numérical solution of ordinary ditt and frst degree-Intoducton sr sere ee + 1.2. Numerical methods for initial value problems . «#21 Taylor's series method . wane 422 Modified Euler's method 223 Runge-Kutta method of fou 13. Numerical predictor and corrector methods . 131 Milne’s method bete 1.32 Adams-Bashforth method . Module -2 NUMERICAL METHODS - 2 +21 Numerical solution of second order ordinary differential equations ... . 43 2.11 Introduction and pre-amble . baa . 4B 2.12 Runge-Kutta method 447 2.13 Milne’s method : . . 50 2.2 Special Functions . 221 Introduction . : . - 2.22 Solution of Laplace equation in cylindrical systera, leading to Bessel differential equation... 0... 0 eee reese eee ener tees 59 “2.23 Solution of Laplace equation in spherical system leading to "Legendre differential equation . . . ~ : 61 2.24 Series solution of Differential Equation 6 © "Power series solution ofa second order ODE... 63 © Generalized power-series method - Frobenius method . 5 2.25. ‘Series solution of Bessel’s differential equation leading to Bessel functions ; : . 0°87 . Equation rue he form of ese’ equton and soliton soot © Properties of Bessel functions ........ ++ ot 92 © Recurrence relations / Recurrence formulae x * Orthogonal property of Bessel functions... . . 119 2.26 Series solution of Legendre's differential alequation 421 © Legendre polynomials .... . +123; © Rodrigue’s formula . ese satel ware COMPLEX VARIABLES * 3.1 Introduction... ..... + +e 2 135 3.2 Recapitulation of basic concepts 33 Function of a complex variable, Limit, Continuity & Difeciiy . + +187 3.4 Analytic function and connected theorems . . . . « - 139 3.41 Cauchy-Riemann equations in the cartesian form . + + 139 3.42 Cauchy - Riemann equations in the polar form . V1 35 Properties of analytic functions. . . . « 1463 351 Harmonic property . . 188 352 Orthogonal property . M5 3.6 Complex line integral - 183 3.61 Cauchy's theorem . . 194 © Consequence’s of Cau y's theorem +195 3.62 Cauchy’s integral formula... ..- ++ +197 © Generalized Cauchy's integral formula . .198 37 Singularity, Pole and Residue... . . - +216 3.71 Formula for the residue at the pole. . .219 3,72 Cauchy’s residue theorem . . +220 438 Conformal Transformations 234 A381 Bilinear Transformation . - . 236 Discussion of conformal transformations - 255 © Discussion of w= 2 +255 © Discussion of = & - 261 © Discussion of w = z+(a/z) and w = z+(1/2).. 262 Modul (269.376) 4.1, PROBABILITY DISTRIBUTIONS 4.11 Introduction and preamble . - 269 4.12 Random variables - Introduction “on 4.13 Discrete and continuous random variables - Definitions 1272 ¢ - Probability function and Discrete probably ds distribution 4.14 Repeated trials {© Bemoulli’s theorem.. 4.15 Binomial distribution .. © Mean and. standard deviation of, the binomial ‘dist 4.16 . Poisson distribution. . ... | © Mean and standard deviation of the Poisson ist n 417 Continuous probability distributi \4.18 Exponential distribution. . woe Mean anid standard and deviation of the exponential distiibution’. ©. . 309 4.19 Normal distribution -311 * Mean and standard deviation of the normal distribution 4 © . Standard normal distribution’ . fee 4.2 Joint probability distributions . © Joint probabilty‘and joint probabi ty distributions 2 Marginal probability distributions . Independent random variables : « Expectation, Variance, Co-Variance and Correlation . ‘Continuous random variables . : ‘SAMPLING THEORY 5.1 Sampling Th 5.1 Introduction... 5.12 Randomsampling . 5.13 Sampling distributions. : . Sampling distribution of the means “5.14 Testing of hypothesis ‘Null hyppthesis and Alternative hypothesis. Errors; Type and TypeI errors... . « | S16 Student'stdisttibution .. 2.2... © Student's ¢ testofa sample mean . . © Confidence limits for the population mean . a © Test of significance of difference between sample means . : 5.17 Chi-square distribution .......,....000 © Chi-square test as a test of goodness of fit . 5.2 Stochastic Process. ........- 0,000 © Classification of stochastic process. Sot. Definitions: 1.9 a2 cs apn gs 545 6 oom [Probability vector, stochastic and egulars stochastic matrix] 5.22 Markov Chains Higher transition probabilities. é Absorbing state of a Markov Chain... BEATING THE MEMORY APPENDIX 1. Numetical methods . :, © Picard’s method for first order first degree ODES v.28 05 4 M59 2. Numerical solution of simultaneous first order ODES .......... « 474 © Picard’s method and Runge-Kutta method & Picard’s method for second order ODEs 3. Application of Complex Variables ..... 0.2... Sone ee ABA STATISTICAL TABLES! oi. oe cn cece Penns dt Seba cons aane 50" © Normal probability table © Student's?’ distribution table QUESTION PAPERS ALPHABETICAL INDEX Numerical Methods - 1 [Za] Numerical Solution of Ordinary Differential Equations of First Order and Eirst Degree We have studied various analytical ( theoretical) methods of solving differential equations, applicable only to equations. in some specific form. But the differential equations arising out of many physical problems do not belong to a specific form and some times analytical solution may not even exist. In some cases it may be very difficult, tosolveby analytical methods. In such cases Numerical Methods assumes importance and computers help in many numerical methods for obtaining the result to the highest degree of accuracy. 1.2] Numerical methods for initial value problems Consider a differential equation of first order and first degree in the form #o fxy) with the initial condition y(x5) = yy thatis y = yp at x = x) ix This problem of finding y iscalled an initial value problem. We discuss several numerical methods for solving an initial value problem. 1.21] Taylor's series method dy Consider the intial value problem: 54 = f(x,y) and y(x9) = Yy The solution y (x) is approximated to a power series iri (x ~ xy) usiig Taylor's Series. Then wecan find the valueof y for various valuesof x in theneighbourhood of x) - o We have Taylor's series expansion of y(x) about the point Jy in the form : (x-%F (mF Be PCa ay Ogi Y(2) = y (4) # (2-49) (aq) + 2 ENGINEERING MATHEMATICS - IV 2 Here y’(x9), y’(%p) +++ denote the value ofthe derivatives “2, “2 a at xq which can be found by making use of the data. ’ WORKED PROBLEMS 1. Use Taylor's series method to find y at x = 0.1, 0.2,03 considering terms upto the . ‘i : Bat +P and y(0)=1 ‘hird degree given that = >> Taylor's series expansion of y(x) is given by (e-%) (em? y YC) = yC%q) + (24) 9 (aq) 9” (4) ZO) By data x)= 0, yy=1and y’=x 47 e yla) = y(0) #2y'(0) +2 y"(0) + ¥(0) + () Weneed to compute y’(0), ¥”(0), y’”(0). Pays y= P+ [yOP=041=1 Differentiating y’ wa. x wehave, Consider y ys 2x42yy’ 5 y”(0) = (2)(0) + 2-y(0)-y(0) = (2)(1)(1 Differentiating y” wart. x wehave, y= 24 20yy" + (y'F] yl” (0) =242[(1)(2) +P] =8 Substituting these valuesin (1) wehave, x 2 ypeleelt D245 -8 Thatis y(ay = 4x et This is called as Taylor's series approximation upto the third degree and we rieed to put x = 0.1, 0.2, 0.3 inthe same, Thus we have, NUMERICAL ‘METHODS - 1 : 5 ‘ y(01) = 1+ 01 + (ort $OU) =1im3 ‘ y(02 1402+ (a2jP 4 ABP sor! Z ( a . 3 it: y(03) 1 +03 + (03)? +402) = 1.426 4 4 2. Find yiat_ x ='1.02 correct to five decimal places given dy = (xy - 1) ax and y=2 at x=1. applying Taylor's series method . a, 22 Taylor's series expansion is given by (x-%) (x-%)° Y¥(X) = ¥ (XQ) + (4-49) y’ (ay) + DY 0) ty” Gt 4 By data xy =1, yy =2 and y= He y-1 , i ue Since the number of derivatives fr approximation is not specifically mentioned, we shall have the approximation upto third degree. Hence we have 2 : i ; -1)2 =e giz) =y(1) + Oya) ¥EB yay + ED y™ (1). @) Consider y’ = xy - 1 397), 2D) Us ve Ly@azytey 6 py) =) (1) +2 3, yMaxy ty tye yl (1) =(1)(3) FLL To find y (1.02), we shall substitute these values along with x =-1.02 in (1). (1.02-- 17 (1.02 ~ 1% 7 ee (1.02) = 24(102-.1)1 + (0.02 )7(3) , (0.02)°(5) 2 = 2+ (0.02) + 6 Thus (1.02) = 2.02061 3. From Taylor's series method, find. y(O.1) considering upto fourth degree term if . a 30. Me y(x) satisfies the equation ¢ ex-y, y(0)=1 ._ >> Taylots series expansion is given by Boy | Gamy (a> x i ¥(E) = 9 (4) + (8%) Y! (XQ) Gy YO) A By data x) ponte ylaeoe 4 és 2s ENGINEERING MATHEMATICS -1V Yr) = y(O) + xy’ Fyre bye. 8 fy. (ot) Consider y= x-y? py’(0) =0-P at yah 2yy’ 290) =1-=(2)(1)(=1) =3 y= O-2E yy" + (y"P] preaye-aurineaye-atiet = 2yy" + yy + 2y" y" T= “2, yy" 3y’y”) (fourth derivative) y) (0) = ~20(1)(-8) « (3) (-i)(8)] = 34 . To find y (0.1), weshall substitute these values along with x= 0.1, in (1). y(O1) =1 4 (01).(— 1) + Wa (3)+ aa. cout 4 yh) (-8) +- (34) Thus (04) = 0.9138, 4, Use Taylor's series method to obtain a power series in (3-4) for theequaion wx Wy yp—-2=0; X= 4, Yo = 1 and ube it torfind y at x = 41, 42, 43 correct to fouir decimal places, . >> Taylor's series expansion is given by (x29)? Y(X) = y (XG) + (%-xp) Y’ (4y) + Since xg = 4, yp = 1 by data, the series becomes x4f ji yA) te @ ) yx) = (4) + (4-4) y" (a+ } Consider Sry’ + -~2=0 Substituting the initial values we obtain, (Note: y’ = y’(x)] (5) ca) (4)4 2-220 or 2y’ (aye ya) Differentiating the given equation wat x, , Slxy” + y"] + 2yy’=0 [Notes y” ay" Substituting the initial values and the value of y’(4) we have, 5[4y"(4) +,005] + (2)(1) (005) = 0 ‘ ie, 20" (4) +025 + 01 =0 NUMERICAL METHODS -1 ‘ way ot 2S y" (A) == 59 0.0175 Since the value of the second derivative itself is small enough we shall approximate Taylor's series as in (1) upto second degree terms only. Substituting these values in (1) we have, 2 y(x) = 1 (x-4) (005) + (2=4¥" (90175) Wenow find y (4.1), y (4.2) and y (43) from this expression. _4y y(41) =1+ (41-4) (0.05) Gey (-0.0175) Thus we have, y(41) =1+( (or) (005) +2 ay (0.0175 ) = 1.0049 a a} (42) =1+ (02) (005) + & (-0.0175) = 1.0097 yeaa) = 1+ (03) (005) +4 (0.0175) = 1.0142 5, Use Taylor's series method tofind (41) gjoentiat re . and y(4) =4. >> Taylor's series expansion is given by ; ( (e- y(x) = y(%p) + (2-9) ¥' ) + yls(ay)+ yl" (a) to 1 Bydan 9" ay bm =4, a4 1 yixy = yay Ody ES AF yay OS A yea) vt) by approximating upto the third degree terms. 1 Consider y= Hi [Notes yy (2), yy") ee] or oy’ (Hy) i 2Q) Substituting the initial values we have, ENGINEERING MATHEMATICS -IV yA 44] =1 or (4) == 005 Differentiating (2) w.r.t. x, y (+ y+ (2 +y)y”=0 + @) Substituting the initial values and the value ofy’(4) we have, 0.05 [(2)(4) + 0.05] + [42 +4] (4) =0 ie, 0.05 [8 + 0.05] + 20y”(4) =0 ie, 0.4025 + 20y” (4) =0 y” (4) = - 0.020125 We observe that the value of the derivatives are small enough and the third degree uae also be neglected. Substituting these values in (1) for computing y (41) (4 2 y(41) = 4+ (41-4) (0.05) + GAD (~ 0.020125) ‘Thus (4.1) = 4.0049 6, Use Taylor's series method tosolve y’ = x7 + y intherange 0 < x < 0.2 by taking step size k = 0.1 given that y = 10 at x = 0 initially considering terms upto the ‘fourth degree . . >> In this problem, since the step size is specified as 0.1, the problem has to be done in two stages. We have to first find y(0.1) and use this as the initial condition to - compute y(02). Taylor's series expansion is given by x3) ‘ ¥ (x) = y (4) + (2-39) ¥" (Ay) + FT 9" (9) (e-HP (x-% gp OQ) # Og) te) + TStage: By data y= x7 + y, % Y= 10 y((0)=0+10=10 or y’(0)=10 Differentiating y’ wart.x successively we have, yary’ iy” (0) = (2)(0) + ¥’(0) = 0+ 10 = 10 y“=24y" poy (OO) 2H y"(0)H2+4 10= 12 yay” ey" (0) = 12 F “NUMERICAL METHODS 1, With x = 0:1, and’ xy = 0, (1) becomes i . ot 2 _y OY = §(0) + (01}y°¢0) + GD yocgy ( , (oy, (oy +e yO) + “a yr" (0) iG L 0.01 0.001 0.0001, rt © IO + (01) 10 + S>(10) + =F (12) + cz) ( 1.05205 = 11.082 : 4 U Stage : Now taking x9 = 0:1, y'= 11.052 we have 4 ystey ;) y(O1) = (01S + 11052 = 11.062 4 Cy = es yyy (OL) = 2(0.1)+11.062 = 11.262 a yMa2ey" Go oy (OL) = 2+ 11.262 = 13,262 ( yay sy (OL). = 13.262 ‘ With x = 02 and Xp = 0.1, “(1) becomes : : 4 . 01 (02) = yO) + (Or ytcOA) + Sy" (or) 4 - 0,001, 0.0001 - / + ery (OL) + Ey (0.1) ( =11,052+ (0.1) (11.062) + oe (11.250) + 9 13.250) 4 -_ (13.262.)¢ Thus (0.2) = 12.216776 = 12.2168 1 7. Employ Tass series mathodtofndyatx = Oand0.2correc ofr placesofecimal " di in step size gor given the linear differential equation 2. 2y = 3° whose solution passes through the origin. Also find y (0-1) and (0.2) by analytical method >> By data, ’ = 2y+3e and y(0) = 0. That is x) = 0, jy = 0 4 ; ‘Taylor's series expansion is given by 4 an" be FT roxy? YE) = YQ) #(2-%9) y"Caq)4#— eH" (gt wt) 4 4 8 ENGINEERING MATHEMATICS -iv Step-1: We shall compute y (0.1) 4 2 0 Consider, y= 2y4+3e (0) = 2(0) 438" = 3 ya dys3& 5 yO) =2(3)43 = 9 ‘ y= 2y"43e 5 y™ (dD). =2(9)43 Em From (1) we have, ‘ ony 4 (ou? yO) = y(0)+(04)y”(0)+ AE y(g eb a) by considering terms upto third degree. Further we have | 001 y(01) = o+(a1) 3+ (9) ot 4 (21) Thus (0.1) = 03485 Step-2: We shall compute y (0.2) 2 . ; Consider y= 2y43e and let x)= 01, y= 03485 | ° Oo Now y'(0.1) =2y(01)43e + (OL) = 4.0125 ys 2yl43e enna + y"(O1) = 113405 = 2y" 434 5 yO) = 2(11.3405) 43.2% ; "(Ory = 25.9565 sectane from (1) y(02) = y(01)+(01). yoo y cor) + (01) -y(02) = 03485 +(0.1) (125) 4202 a. 3405) RE (25.9965 ) ‘Thus y(0.2) = 0.8108 . . Solution by analytical method ae Fe- 2) = 8¢ is of the form Biro where P=-2,Q=3e Solution eae Pa drag ie, Xe fee dere -2: - 2 = YO -3E 46 or ya 3d ao et is the general solution. NUMERICAL, METHODS - 1 Applying the condition y (0) = 0, the general solution becomes Q=-3+e or c=3 y'= 3(¢%*—e") is the befitting solution, ‘Thus y(0.1) = 0.3487 and y(0.2) = 0.8113 by the analytical method. 8. Using Taylor's. series method, obtain the values of y at x = 0.1(0.1) 03 to four significant figures if y satisfies the equation y” =—zy given that y’ = 0.5 and y = Lwhen x = O faking the first five terms of the Taylor’s series expansion. >> Taylor's series expansion is given by t (=n? 9 (x) = y (Xp) +(2-39) YH) Fy" seal) Bydata, = yy” = ~2y 3p ¥(0) aL, y"(0) = 05 Consider yy” = ~2y i y"(0) yUsnxyy (0) ed YP enxyay ¢ yO) =-1 From (1), the first five terms of the Taylor's series expansion is given by y(x) = y(O)txy" “ovek y" Hoye Eyre yO) 4 Now, y(01) =1+(01) (05-20 ogee = 1.0498 y(0.2) = 1402) (05-208 _ 20016 = 1.0986 6 24 y(03) = 14(03) (05) 20% - SOR = 11452 Thus y( 0.1) = 1.0498, y(0.2) = 1.0996, y(03) = 11452 a jo ENGINEERING MATHEMATICS «IV EXERCISES Use Taylor's series method to solve the following initial value problems. dy 1. Gy =*~ Hs ¥(O) = 1. Computey (0.1 ) considering terms upto fourth degree, 2 Maty-4 : i ax 7% ¥~ 1 y(O) = 1. Compute y (0.03) using the expansion of y upto second degree terms, a Vex yaya i i ae = YS, yCL) = 1. Computey (1.1) & y (12) by taking step size 0.1 dy 6: 4. 7 ty 7 x= Ly = 0. Find the third order approximation of the solution and use it to compute y(1.1),y(12) and y(13). dy 5. = = 2 y-1,y(0) = LintherangeO < x < 0.2 taking step size 0.1 ANSWERS 1. 0.8373 2 097 3. 1.107, 1.228 1 4. y =(x-1) + (x-1P + (4-1) 10.1105, 0.244, 0.4085, 5. 0.9003, 0.8023 1.22| Modified Euler’s Method di Consider the initial value problem © = f(x,y) :y (4) = Yo- Weneed tofind y atx, = %5 +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 y{9) also called as the predicted value of y, . Euler's formula is given by Hf) = 9 + Afl%y Hp) Since the accuracy is poor in this formula this value y, is successively improved (corrected to the desired degreeof accuracy by thefollowingModified Euler’s formula, where the successive approximations are denoted by y{1), yg??, ¥) ae NUMERICAL METHODS - I { “hy HP 99+ 5 [fay 30) + Favs) | ( K . = 99 +3 [F29¥) + fayy)] : ( a : : Pa ; ; hee “) 3 WP sagt 5 [109% + f(x, >] Each of the succeeding approximation is better than the preceding ones, They are called corrected values. Buler’s formula and modified Euler's formula jointly are also. called as Euler's predictor and corrector formulae. Wwe 9. Giver # e144, y= 2 ata = 1, find the approximate value of y atx = 14 by ' . x taking step size h =0.2 applying modified Euler's method. Also find the value of y.at x = 12and 14 from the analytical solution of the equation. >> The problem has to be worked in'two stages. “TStage: xy = 1, yy = 2, flny)=14 (wx), b= 02 “= noah 12. y(4) = y= ¥12) =? » Now, flay yy) = 1+ (21) =3 ; : We have Euler's formula :y}) = yo.+ f(xy Yq) 2) yf = 2 + (02)(3) = 26 Further we: have modified Euler's formula : Hf = Ho 5 [Pao40) 4 Feap9| --@) ; tha (01) [3 + (1+ yf7x,)] = 24 (01). [4+ y%12] "abs (O1) [4426/12] yf = 26167 Nextapproximation y{?) is gotjust by replacing the value of y\) in place of y() Now, yf? ='2+(01) [4+ 2.6167/1.2] = 2.6181 i es : fone marienares-1v (= fis natea Again yo: = 2+ COL) [4+ 2618/12] = 26182. Also y Thus y.(22) = 26182 MU Stage: We repeat the process by taking y (1.2) = 261825 ile initial condition, ‘or 12, Yo = 26182 f(xy Yq) = 1+ (px) = 31818 HSH PRLS y(y) = y, Sy (14) =? We have from(1), yf) = 26182 + (02) (3.1818) = 3.2546 Now from (2), yf) = 2.6182 + (0.1) [3.1818 4°(1 +f] ie, yf") = 2.6182 + (0.1) [4.1818 + 3.2546/1.4] = 3.2689 .. y= 2.6182 + (0.1) [4.1818 + 3.2689/1.4]= 3.2699 yf?) = 2.6182 + (0.1) [4.1818 + 5269/14) = 3.2699 , Thus (1.4) = 3.2699 = 3.27 Now, let us find the analytical solution of the equation i Yodo MYL tte at This is a linear DE of the form a + Py = Q whose solution is given by ye lPae taal Here, P=-1/x andQ=1 Sete a eli te. cee «pont — aye The solution becomes, y-1/x = [1- Vx dre ie, y/e = logx +e, . ‘ Applying the initial condition that y = 2 at x = 1.wehave, . ts Wlaloglt+e . c=2 since log1 = 0 The solution now becomes, : wx =logx +2 or y = x(logx + 2) Thisis the analytical solution of the given initial value problem. NUMERICAL METHODS -1 13 Now by putting x'= 12 and 1.4 we obtain, ¥(12) = 12 (log. 12 + 2) = 26188 & (14) = 1.4(log, 14 +2) = 32711 Solutions are tabulated for comparison. Solution By modified By analytical u(x) Euler's method method y (12) 2.6182 2.6188 (1.4) 3.2699 3.2711 J ., £ 10. Using modified Euler's method find y at x = 02 given & = Or + Sy with y(0)= 1 taking k= 01, Perform three iterations at each step. >> Weneed to find y (0.2) by taking = 0.1. ‘This implies that the problem has to be done in two stages, TStage : By data x)= 0, y= 1h = 04, f(xy) = 3x + (y2) Fy 9) 505, x= ay th= 01 ¥Cq) = yy = ¥(01) =? From Euler's formula :y{°) = yo-+ hf(xy yy) we obtain yf = 1+ (01) (05) = 105 Wehave modified Euler's formula, h enath yey et [Feo +f y3.)] (frst iteration) (0) oa ne 1+] 05 43x +75 yf) H = 14+ 0.05 | 05+3(01) + 4 = 14005 08+ : a “| 1.05 it, 4? =r 005 [oa + 22 = 1.06625 . : ing yl) by yf!) The second iterative value is got simply by replacing yj") by y; That is by replacing 1.06625 in place of 1.05 a4 ENGINEERING MATHEMATICS - IV 1.06625 y= =1+ oos[os + 1.0667 2 yf?) = 1+ 0.05 [os | = 1.0667 Thus (0.1) = 1.0667 MStage: Now, letxy = 0.1, yy = 1.0667 Wehave f(x,y) = 3x + we F (xq. yy) = 3(01) + 7 = 089035 x Say th=02; y = teifinthrey From Euler’s formula we obtain yf) = 1.0667 + 0.1 (0.83335 ) = 1,15 Next, from modified Euler's formula, (0) a. O41 4 1.0667 +> | 0.83905 + 3x, 4 —L A) ® 1.0667 + 0.05 083335 + 3(0.2) + 2 = 1.0667 + 0.05 Lasaa5 + HE seri vf?) = 1.0667 + 0.08 | 1 1.43335' 4 sh = 11675 - yy? = 1.0667 + 0.05 | 1.43335 + a). = 1.1676 Thus (0.2) = 1.1676 1, Using modified Euler's method find y (02) correct to four decimal places sotving the. . equation = x Py) =1 taking h = 01 » Weshall first compute y (0.1) and use this value to. compute y (0.2) TStage: By data xy =0, yy = 1, h = 04, finy)= -¥ fq %) = 0-P =-1, x Y(%) = y= ¥(O1) =? xpthsor t NUMERICAL METHOGS 1 cin Br forte yf (0) = Vp + hf (ty yy) we obtain yet +O 1) = 03 We have modified Euler's formula, “yD eye t iL WIS w] ; (0) ] = 1+ 0.05 [-1+ 0.1 - (09)7] = 1+ 005 [-09-(097] = 09145 yf?) = 1+ 0.05 [-09-~ (0.9145 )?] = 0.9132 “od Silt fang, yf? oss ‘Thus y(oa) = do133 UStage: Now, let x = 0.1, yo = 09133. f(xy) = x I- (09138 ¥ = F (xy Yq) = 9. By = y+ h = 02, yxy) = y(02) =? y{0)-= 09133 + (0.1) (—0.7341) = 0.8999 Now from the modified Euler's formula, Substituting in fe formula,. 9: af? = dors + aay 0.7341 + x, - {4} | = ‘9133 + 0.05 [-0.7341 + 0.2 - (0.8399)] = 0.9133 + 0.05 [-0.5341 ~ (0.8399)?] = 0.8513 yf?) =-0.9133 + 005 [- 0.5341 - (0.8513 7] = 0.8504 4°) ='0.9138 + 0.05 (-0.5341 — (0.8504)? = 0.8504 Thus (0.2) = 0.8504 “46... “ENGINEERING MaTaeMATICS =v 2 Using modified Euler's method find ¥(202), and’ y(20.4) given that 4 x = Josio | y | wit y(20) = 5 taking h = 02 \ >>. Weshall me ‘compute y(20.2) and use this value to compute y( = 4) Stage: By data. = 20, yo = 5 and h = 02": : .6021- SOY) = logy (2) F(x ¥9) = 10,94) = % th = 202, y(x) ='y, = y(202) =2 x From Euler's formula: y{) = yy +-1f(xy Yo)" we obtain yf) = 534 (0.2) (0.6021) = 5.1204 Next by modified Euler's formula yf) = y+ 3 [fo%0 + flxpy! ” =54+2 0.6021 + log, #| 1 sees fom ena) 5.1198 12 of?) <5 +01 [ oat +a (pa) = 5.1198 Thus y (20.2) = 5.1198 WStage: Now, let xy = 20.2, yy = 5.1198 F(%9) = Jogo (3) + fay 3q) = 05961 HH ty th = 204, y(x,) = y, = y(204) =? Substituting in the Buler’s formula, yf) = 5.1198 + (0.2) (0.5961) = 5.239 y NUMERICAL METHOOS -1 17 Now by modified Buler’s formula, 02 (DL = Hy) = 51198 + = 0.5961 + “1089 a 3 . 204 = 51198 + 0.1 | 05961 + logis | =o55 | | = 5.2364 yf?) = 5.1198 + 0.1 [sa + logig (eal | = 5.2385 Thus y(204) = 5.2385 13, Use modified Euler's method to solve & =x+IVyl inthe ranged > Weneed to compute (0.2) and y(04) with h = 0.2 * IStage: By datas, = 0, yy =1, f(xy) =x+W,h=02 Where the modulus sign indicates that we have to take only the Positive value of vy. fGyy) 0+ a1 x, =x th=02 ym ).= ¥, = ¥(02) =? From Buler’s formula: y{°) = yy + Af (xq Y) we obtain yf) = 14021) =12 Wehave modified Euler's formula, Hays 3 [/Go%)+ + flayy, 4] 02 wt+ Dla aa 4°] =1401[1+402 + Vi2] = 1.2205 WY? = 1401 [1.2 +4295] = 12309 yf = 14 01 [12 + Vi2300] = 12309 Thus y(0.2) = 1.2309 . WStage: Now let %) = 0.2, yo = 1.2309 Fy) =x +AY; fry yy) = 02 + VE2B09 = 1.3005 ENGINEERING MATHEMATICS -IV y (x) = y= ¥ (04) = Substituting in the Eule’’s formula, yf = 1.2309 + 0.2 (1.3095) =1.4928 Next from modified Euler's formula, yf) = 1.2309 + F [es txt [x] = 1.2309 + O.1 [1.3095 + 0.4 + 1.4928 ] = 1.524 yf?) = 1.2309 + 0.1 [1.7095 + VI524] = 15253 yf) = 1.2309 + 0.1 [1.7095 + VI52S] = 1.5254 Also y{4) = 15254 Thus y(04) = 1.5254 da 14, Use modified Euler’s method to compute y(O1) given that E s2ry y(O) = 1 by taking h = 0.05' considering the accuracy upto two approximations in cench step . >> Weneed tocompute y (005) first and use this value to compute y (0.1). IStage: By datax, = 0, yy =1, f(xy) =x +y, b= 005 Fry yy) =P FLL, x2 ty +h = 0.05 y(x) = ¥, = ¥ (0.05) yf) = Yq + bf (apy) we obtain From Euler's formula = yO) = 1 + (0.05) (1) = 1.05 Next by modified Euler's formula, h HW? =% +5 fam) +fey¥.")| 0.05 a1 [regen] = 1+ 0025 [1 + (0.05)? + 1.05] = 1 + 0.025 [1.0025 + 1.05] = 1.0513 NUMERICAL’ METHODS-1 19 yf?) =1 + 0.025 [1.0025 + 110513] = 1.0513 Thus (0.05) = 1.0513 Stage: Now, let xy = 0.05, yy ='1.0513 f(xy) =? + y 5 flay yy) = (0.05)? + 1.0513 = 1.0538 1 RAH R= OL y(x lem = y(O1) =? Substituting in the Euler's formula, yf = 1.0513 + 0.05 (1.0538) = 1.104 Next from the modified Euler’s formula, = 1.0513 + 0.025 [.1.0538 +.(0.1)? + 1.104] 0513 + 0.025 [1.0638 + 1.104] = 1.1055 yf?) & 1.0513 + 0.025 [1.0638 + 1.1055] = 1.1055 Thus the'required y (0.1) = 1.1055 15. Using Euler's predictor and corrector formulae solve a = x+y at x= 02 given that y(0) = 1. 5> Weneed togompute (0.2) and since the step size is not specified we shall take it to be 0.2 itself. By data we have, x = 0, yy = 1, few =x ty and h = 02 (assumed) fy yy) = 04151 x =x) +h = 02 yl) =, = y (0.2) We have Euler's formula (predictor formula) Ws yt hf (%yYp) = 1+ (0.2)1 = 12 “Next consider iriodified Euler's formula (corrector formula) 20_ i wet ENGINEERING MATHEMATICS -1V f= y+ 3 [Pete + flay (| a1 Plea eg] =14+01[1+02+(12)]=124 yO) = 1401 [12 + (124)] = 12484 yO) = 1401 [1241244] = 1.2448 y) = 14 O4 [12 + 12484) = "1.24488 Thus the required y(0.2) = 12444 ° Remark : Ifwe had worked the problem in two stages ( Taking h = 0-1) te would have {got more accurate answer. It may be noted that lesser isthe step size, greater is the accuracy. —eae_a_a_=~c~ceeeeeeeeeeeEeEex eee 16. Using Pale’ reir and career form compute (1.1) ‘correct to five decimal places given that “t ate = aa and y= Latx= 1, Ato i esis tas. w Byam # Welave f(x, 9) = SE F297 Yo) = 0, 4 = xyth = 11 yA) ay =¥Gd From Euler's formula: yf) = yj+hf(4q, yo), we obtain (0) = We have modified Euler's formula, . h A = 3945 [Fa %) +10 4] tx, 4 ait eS = [NUMERICAL METHODS - | Pl 1-141 (09959) yf?) = 14005 S| = 0.99605 1-11 (05 yf) = 1+005 To (059606) | sp605 (ty Thus (11) = 0.99605 “Analytical Solution a veh YY Dye =1 s ete = aisofthe form art Py Q where P = i/x and Q=uve whose solution is given by. . y dPe of oelPe dete _fPat _ Jue de glogx Solution: y+x = [ax are ie, xy =logx+e. Using y(1)=1, 1=logite ~ cel logx +1 ‘The befitting solution isry = logx+1 or y= "> Now y(11)= tegii)+t = 0.99574 ‘Thus (11) = 0.99574 is the analytical solution. 1.23] Runge - Kutta method of fourth order Consider the initial value problem & = f(xy),¥ (Xp) = Yr Weneed to find (4 + h) where i is the step size. Wehave to first compute k,, ky, ky, ky by the following formulae. k, =hf (qr) h 4 =f yt mt y A ahf athined k= hf (1 +h, th +h) The required y(xy:+ h) = yp +e + 2k, + 2k, + ky) ES 22 ENGINEERING MATHEMATICS - IV WORKED PROBLEMS 1. Given a. = 3x44, y(0)=1 compute y(02) by taking ht = 0.2 using Runge- sata neta of fourth order. Also find the analytical solution. >> By data f(x,y) = 3x + y m= 0, Yel, h=02 We shall first compute, Ky, Ky, ky mea ae ky = hf (Xy Yo) = (0.2) F(0,1) = aay] x04, 4 = 01 k, } ae vfs + 4, Yt +). (0a) {0 +%, 1 +2) ky = (0.2) f (04, 1.05) = (0.2) [2 x O1 AB] - or wom[ne 4, y+) =cony(o+2, 1-88) ky = (0.2) f (O41, 1.0825) = (0.2) [> x 01+ “ 0.16825 ky = hf (ty + br yyt ky) = (0.2) f( 0.2, 1.16825) i= (08) [202+ 9) ones Wehave, YO +h) = ay +E (hy + ky + ky + Ky) os y(0.2) =144 (01 42x 0.165 + 2x 0.16825 + 0.236825) Thus (0.2) = 11672208 We shall find the analytical solution of the given equation by writing in the form # + Py = Q whosesolutionis ye JP = f ge SP arse | Wehave La ax, Here P= Qasr; ola g ze The solution becomes ye? = 3 Jre*dx +o, Integrating RHS by parts we have, yo? = 3[xe*? (2) - for*? (-2).1de] + yer? = 3[-2xe*? - ge *) 46 23° NUMERICAL METHODS -1 Multiplying with e”/ we obtain, y = 6x — 12 + ce*/2 Applying the initial condition that y= I at x= 0 the solution becomes, 120-2+e & c=13 ‘The analytical solution ofthe initial value problem is given by, y =< 6x - 134 13%? "Now by putting x =.02' wehave . » -y(02) = -6(02) 124 1398 = r672019 Thus | y (0.2) = 11672219, by arialytical method. 18, - Use fourth order Runge-Kutta method to solve (x + y) & =1, ¥(04) = 1 at x = 05: correét to four decimal places . 5 wy 1 = = b> Wehave Gi = 5 and y= 1 at x= 04 1 Flay) = Fy 1470 Y= 1. y(05) =? Here xp +h=05 + h=05- %y =05 - 04 = 0.1 We shal first compute ky, ky, ky Ky 1 ky = Bf (ap, Yp) = (01) f(04,1)= (0.1) [aa i|- oom . : 0: ky wishaebnet)]=con does, 1 +S) 7 1 he Ky = (01) f(0.45, 1.0957) = (0.1) ] 7ST 7 pgp | = 9.0673 : h 4 ka hf (» + Fete 2] (04) (045, 1.08365 ) L f= (Ol) Fe + 108865 y= If (ay + hy yg + hy) = OA) f(O5, 10674) 1 = (on) la ¥ 1.0674 0.0674 | = 0.0638 a 24 , ENGINEERING MaTHEMATICS -1v ine if 7 . si Weave, y(xy +h) = 4p + 5 (hy + 2ky + 2k +) y(05) = 1+ z [oor + 2( 0.0673) + 2( 0.0674) + una) } Thus y(0.5) = 1.0674 19. Using Runge-Kutta method of fourth order, find y (02) for the equation we Hee CO) =A taking = 02 >> By data f(x,y) = aie? XO, AT, b= 02 We shall first compute k,, ky ky, ky 4 Fy = FF (pug) = (02) f(0, 1) = con [9] 02 ky bens wes \- onjeouay 11-01 k= coa)| lis ib 0.1667 ky nou (aetias 2) =ca2yse, 1.0835 ) ky = ky = Wf (ay + fy Yo + ky) = (0.2) F(0.2, 1.1662) 1.1662 - 0.2 ky = ony | He = ox Wehave, sta Raa tia +2ky +h) 2 y(02)=14= g[02-+2(0167)+2(0162) «axe Thus (0.2) = 1.1679 s NUMERICAL METHODS -1 off 25 20, Use fourth order Runge-Kutia methed to find y atx = 0:1 given that di oh a ct + By, y(0) =0 and k= 01 >> By data, f(x,y) =e" + 2y, xy = 0,49 =0, h = 01 We shall first compute k,, ky hy. ky ky = hf (ay yo) = (0.1) (0,0) = (0.1) [32 + 2x0] = 03 h 4) B= MSL ao # ge Mot p |= (04) (005,045) ky = (0.1) [32° + 2(0.15)] = 0.3454 k= t+ +8, Mt 2) = (0.1) (0.05, 0.1727) “iy = (01) [329% + 20.1727] = 0.3499 Ky = hf (aq + hy Yo + ky) = (0.1)f(021, 0.3499) ky = (0.1) [3e71 + 2,(0.3499)] = 0.4015 ° 4 1 Wehave, ¥(% +h) = Yp +g (hy + 2k + 2+ hy) y(01)=0+ z [03 + 2(0.3454) + 2(0.3499) + 0.4015 | Thus y(0.1) = 0.3487 21... Use fourth order Runge-Kutta method to compute y (1.1) given that 2 exy, y(ja1, >> By data f(xy) = ay, ry =1yy=1 Weneed tocompute y(1.1). Thisimplies that x) +h =11 0. #=O01 -~ "We shall first compute ky ky ky ky- ky = f(y %) k, = (01) (4,1) = (01) ((1) 19] 26 ENGINEERING MATHEMATICS -IV h ky k= we +r % + *e (0.1) (1.05, 1.05) ky = (01) [(1.05) (1.05)"9] = 0.1067 h k, = iss + 5eh + ‘|. (0.1) f( 1.05, 1.05335) ky = (0.1) [ (1.05) (1.05335 )”? } = 0.1068 ky = Af (xg th, yp + ky) = (OLDS (14, 1.1068) ky = (0.1) (C11) (1.1068)! } = 0.1138 1 Weave, y (x +h) = yo + ¢ (hy + ky + 2 + ky) y(1d) =1 +3 [oa + 2( 0.1067) + 2(0.1068) + 0.1138 | Thus y(1.1) = 1.1068 22. Using Runge Kutta method of fourth order solve a + y = 2x atx = 141 given that y =3 atx =1 initially. >> We have, Ber-y, H=Lyy=3 f(y) =W-y xy thal « h=01 We shall first compute ky, Ky ky ky. ky = hf (xy Yo) = (0.1) f(1, 3) = (0.1) [2(1)-3)] = - 0.1 Mi ou = as{s + g Yt 2) = coay4( us, 3- o) ky = (OL) (1.05, 2.95) = (0.1) [2(1.05) ~ 2.95] = -0.085 tr(so+beay + 8) = con {a 9-282) ey = (OL) f(1.05, 2.9575) = (0.1) [2(1.05) ~ 2.9575 ] = -0.08575 ; ky =f (ag + hy y+ Hy) = (1) f( 14, 3- 0.08575) Le oe 5 NUMERICAL METHODS-1 “Ry = COL)FC14, 291495) ='(0l1) [2¢1.1) - 291425] . - ~ 0.071425 1 Wehave, yxy + i) = yy + = (k, +2, + 2k, + ky) 1 YO) = 34% [-o + 2(~0.085) + 2(—0.08575 ) - oo71425 ] Thus y (11) = 2.9145125 = 2.9145 : 2%. Using Rungesutta method of fourth order find y (02) forthe equation # = ae ' yO) ="1 taking b= 01 >> ‘The problem has to be done in two stages, ' =x IStage: f(x; y) rae y= 0, yy=1, k= 04 Weshallfirstcompute kk, Ky ky , 1-0 K = Af(%, yg) = (0.1) f(01) = (01) [55]-e i= tilt, wit] = (04) (005, 1.05) > ) = (0-1) f(0.05,, 1.0455) he r Ky SAF Cag +h, yo +hy) = (0.1) f(0.1, 1.0909) 1.0909 - 0.1 ky = (01) [set] = 0.0832 1 Webave, y(xyth) = yy (ky +2ky+2hy hy) y (01) +3(01-+0262+-01818-+00882) Thus “y(01) = Lopti67 = 10912 28 ENGINEERING MATHEMATICS «IV MStage: a ee - IStage: f(x, y) yox ' 70 = OLY =10912,h = 04 Again by using the same formulae for ky, ky, ky. ky wehave, ky = (OL) f(0:1, 1.0912) = co | iomasas | = 0.0833 k= (01) f@.15, 1.1328) = 0.0766 k, = (0.1) f(0.415, 1.1295) = 0.07655 ky = (01) (02, 1.16775) = 0.07075 Now, y(xp+h) = wrt (hy + 2g + 2g + ky) y (0140.1) = 1.0912 +t (0.0882 0.1592 +0.1531+0.07075) Thus (0.2) = 1.167908 = 1.1679 Remark: Referring to Problem-19, the problem has been worked in one stage-withh = 0.2 and we have obtained y (0.2) = 1.1679 2. Solve: (y?—27) dx = (422) dy for x = 0(0.2) 04 given that y= 1 at x = O initially, by applying Runge- Kutta method of order 4 dy ~-2 have = = > 7 x) = Oy) = 1h = 02 >> Wehave = vat % a UStage: f(x,y) = GE Wesalleompute by, fy, by Ky = hf (29, Yo) = (02) f(0, 1)'= (02)1,= 02 =h al A = (02) f(01,11) = 0.1967 I= hfl ata. Mota s nies a 0.2) f(O.1, 1.0984) = 0.1967 Ky =f xg) Yor y | = (02) FOL, . ky = hf (ath, yotky) = (02) f(02, 1.1967) = 0.1891, 1 We have, y (x) +h) = Yrs (iy + 2k 42k thy) Thus y(0.2) = 1.19598 ~ 1.196 (NUMERICAL METHODS -1 29 UStage: f(x, y) = 02, yy = 1196, h=02 ‘Again using the same formula for k, ky, ky ky we have, ky = (02) f(02, 1196) = 0.1891 ky = (0.2) f (0.3, 1.29055) = 0.1795 ky = (0.2) f (0.3, 1.28575) = 0.1793 ky = (0.2)f (0.4, 13753) = 0.1688 Now y(xp+h) = wte (ky #2 +2 hy) Thus (04) = 137525 = 13753 EXERCISES Apply ‘modified Euler's method to solve the following initial calue problems by considering the accuracy upto too approximations in every step, di L 7 ~x/, y(0) = 2. Compute (0.2) by taking b= 0.41 a . 2 a + y= Ly =Oatx = 0.Compute y atx = Ody taking h = 0.1 3. & = 7-+y in the range0 £ x.< 0.06 by taking h = 0.02 given that y= Lat x=0 initially. 4. a = x+y, y(0) = 1.Compute (02) taking h = 0.1 ¥, y(0) = 1. Compute y in the range [0, 06] by taking h = 02. Ee 6 pears Why |, y = Lat x= 1. Compute y at x =2 by taking ht = 02. a 7. = = x4 IL, y(0) = 1. Compute y (06) by taking h = 02 30 ENGINEERING MATHEMATICS -1V Use fourth order Runge-Kutta method to solve the following initiql value problems. 8. wax + y ¥(O) = 1. Compute y (0.2) 9 Yara y y(0) = 1.Computey (02)by taking h = 0.1 L = yy (0) = 1. Computey (0.2) by taking h = a 10. 7 =3r+ ‘, y(0) = 1. Compute y (0.2) with h = 0.1 4y _ 24 , . 1 105 =x +P, y(0) = Lor theinterval 0 < x < 02 by taking h = 01. ay ‘ W F= ay, y(1) = 2.Computey (1.2) by taking # =02, 13. “ =14yY, x =0,yp = 0. Compute the values of y corresponding to the values of x inthe range 0 < x < 06 by taking h =0.2 14. & = x(1+2y), y(0) =1 intherange 0 > We prepare the following table using the given data whichis essentially required for applying the predictor and corrector formulae. x y 70. Yo =o 0-@=0 age uy = 0.02 yy = 02 - (0.02) ate Y= 0.0795 | y' = 0.4 ~ (0.0795 43 = 06 Ys = 0.1762 | - y,’ = 06 - (0.1762)? = 05689 | = 08 (a) By Milne’s method Wehave the predictor fo formula YE?) = yy + en ~ uy +!) 4 iz yf?) = 0+ 2) [2(0.1996 ) ~ 0.3937 + 2( 0.5689} = 0.3049 Now, yy’ = x, = yj = 08 - (03049)? = 0.707 Next we have the corrector formula, fh ’ ’ ’ YO = Y + 5 Can! + Ay + 94) yf© = 0.0795 + —= [03937 + 4(05689) + 0.707] = 0.3046 . Now, yy = x, - yf = 08 - (0.3046) = 0.7072 Substituting this value. of y,’ again in the corrector formula, 02 ; yf = 0.0795 + “y [03997 + 4 (0.5689) + a.7072 Thus y, = (0.8) = 0.3046 NUMERICAL METHODS - 1 33 (b) By Adams - Bashforth method We have the predictor formula, yf?) = wth (55 yy ~59 yy! +37 y"—9 9") yf?) = 017822 [580.5689 )- 59 (0.3937) +37 (0.1996) -9(0) ] ug?) = 0.3049 Now — y4! = x4-yj = 0.8~( 0.3049)? = 0.707 Next, we have the corrector formula, h : . aye WO = W435 Oy #19 yy -5y)' +94") 2 yfO) = 760492 [ 9 a707) +19 05689) ~5( 0.3987 ) + 0.1996 | yf = 03046 Now 4’ = x4-yf = 08-( 0.3046) = 0.7072 Applying the corrector formulae again with only change in the vatue ofy,’ we obtain, yf) = 0.3046 Thus y4 = y(0.8) = 0.3046 26. Apply Milne’s method to compute y(1.4) correct to four decimal places given dy weve Sand following the data : ¥(1) = 2 y(11) = 2.2156, y(1.2) = 2.4649 ¥(13) = 27514 >> First we shall prepare the following table. * 7 yeded 51 Y= 2 2. - +572 \ yy = 2.2156 (aps as wdanta 34 ENGINEERING MATHEMATICS - IV 4h Wehave yf?) = yy + 7 (2yyf = yy’ + 23!) 4(01) 3 yf 22+ 12(23178) - 2.67245 + 2(3.0657)} 3.0793 ae Ms Hence wage yey + 49965, h Now consider y{© = y, + 3 (Yn + ¥y' + 44) 1 yf = 2.4649 + e [2.67245 + 4( 3.0657) + 3.49965] = 3.0794. 3.0794 2 Substituting this value of y,’ again in the corrector formula we obtain y{©) = 3.0794 Thus yg = y(14) = 3.0794 Now yj’ = (14) + = 3.4997 27. Use Taylor's series method (upto third derivative term) to findy at x = 0.1, 0.2, 03 given that ¥ =2P+y/ with y(0)=1. Apply Milne's predictor-corrector formulae tofind 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) = 1.2507 y(03) = 1426. Using these values along with y(0) = 1 initially, we prepare the following table. x y x wars Mal yeP+P=1 ¥y = LIS | y= (0.1) + (1.1113)? = 1.245 Yp = 1.2507 | y,* = (0.2)? + (1.2507)? = 1.6043, ¥g = 1426 | y.t = (0.3)? + (1.426)? = 2.1235 04 m=? | Consider yf?) = yy + 2 (2 - ¥f + 45) yi art £0) [21268 = 1.6043 +.2(2.1295) | = 1.6844 Hence y'y = x4 + yy = (04) + (1.6844)? =.2.9972 NUMERICAL: METHODS -1 . k hay Nextwehave, yf = yy 4 5 (ug! + 4y5! +94!) yf Now y, = = 1.2507 + a [1:6043.+ 4 (2.1235) + 29972] : 1.6872 04)? + (1.6872) = 3.0067 Substituting this, value of y,’ in the corrector formula again, yf 1.2507 + a [1.6042 + 4 (2.1235) + 3.0067] = 1.6875 Now y= (04) + (1.6875) = 3.0077 Substituting again in the corrector formula we obtain yf = 1.6876 Now y= (0.4) + (1.6876 = 3,008 ‘Substituting again in the corrector formula we obtain yf © = 1.6875733 ~ 1.6876 Thus 'y(04) = 1.6876 28. The following table gives the solution of Sxy’ + y — 2 = 0. Find the value of yat % = 45 using Milne’s predictor and corrector formulae, Use the corrector formiilafaice. x [4 41 42 43 44 Ly [1 | i.008s|0097 [7.0143 Zo1e7 . ; . >> Bydata 5xy’+y-2=0 or yt= = We prepare the following table, s y ye 2-7 1 te So Y% Yel = Fog = 0.05 2 = 1,0049 + 2-049" wn ' = Bxar 0.0483 - 2-(1.0097)? = 1.0097 y= 2.0077 Ye uy Bag = 00467 2- (1.0143)? = 1.063 » - {Ney Ys ¥5 Exag 7 0.0852 5 2-(1.0187 ¥y = 1.0187 » 22GB" goug7 4 Ya 5x44 Y=? 36 ENGINEERING MATHEMATICS - IV ‘We have Milne's predictor and corrector formulae in the standard forni (P) Bag nt p Ye = Yo ty Cn! ~ yl + 2ye') (C) B cae, hey Ys emt ty + 4ys’ + yy’) Since we require y,,, the equivalent form of these formulae is given by (P) 2 Baracoa , ISP) = yy +S C2ug ~ ysl + yg) ; (OV hye tay Ys = Ya + 3 Cus! + 4y,’ + ys!) Hence y{?) = 1.0049 + sOn [2(0.0467,) ~ 0.0452 +.2 (0.0437 ) ] 2-¥% 2 , 2-(1.023 Ne = 8 _ 2-103 oy OW IS Be 5 ag 002d Hence, yf) = 1.0143 + a [0.0452 + 4 (0.0437) + 0.0424] = 1.023 Thus (45) = 1.023 Remark: Though we had a set of five pre determined values of y, te used only a set of ‘four values to determine the fifth value in the sequence. 29. If & = 2e-y, y(0)=2, y(01) = 2010, y(0.2) = 2040 and y (0.3) = 2.090, find y (04) correct to four decimal places by using (a) Milne’s predictor-corrector method. () Adams - Bashforth prettctor - corrector method: (Apply the corrector forrmula twice) >> We prepare the following table. : x y yl =2&~y %=0 Yo yy =20-2=0 x, = 01 yy = 2.010 yy = 22-201 = 0.2003 Yp = 2.040 yy’ = 222 -2.04'=-0.4028 Yq = 2.090 ys’ = 229-209 = 0.6097 x, = 04 yet NUMERICAL METHODS - . 37 (a) By Milne’s predictor-corrector method We have Milne’s..predictor formula a ae ’ Ye) = yyy uy! ¥y + 24g) yfPe 202) [20.2003 ) — 0.4028 + 2.( 0.6097 )] = 2.1623 Now y,’ = 2¢4—2.1623 = 0.8213 We have Milne’s corrector formula, ae ee, WO = yA Cay ys +9) yf = aout [0.4028 + 4 ( 0.6097 ) + 0.8213 ] = 2.1621 Now y," = 2¢4—2.1621 = 0.8215 Applying the corrector formula again we have, WfOe 204d [0.4028+ 4 ( 0.6097 ) +0.8215 ] = 2.1621 Thus y(0.4) = 2.1621 (b) By Adams - Bashforth predictor - corrector method h Wehave, y{) = Yat 9g (55.¥s' —59 yo! +37 yy’ —9 yo!) O1 yf?) = 209457 [ 550.6097 )~59 (0.4028) +37 (0.2008)-9( 0) } = 2.1616 Now, y, = 2¢4-21616 = 0,822 h Next wehave, y{°) = y,4—> (9y,'+19y,'-5y,'+y,") is Yat 9g CONG Ig ~ 5 Yo +) {0 = 209 +5F [90822) +19 (6097) ~5 04008) +0208] 1615 1 Now, y, = 2¢4—23615 = 0.82215 Substituting again in the corrector formula, we obtain y{°) = 2.1615 “Thus (0.4) = 21615 . 38 ENGINEERING MATHEMATICS «IV 30. Apply Adams - Bashforth method to solve the equation (y*+1) dy~2 dx = 0 at x=10 given y(0) = 1 by generating the initiat values from Picard’s second ‘approximation at a step size of 0.25. Apply the corrector formula trvice. x a >> By data, & = y* = dx pr Referring to Problem-5 for the values y (0.25), y (0.5) and y (0.75) we prepare the following table. * y % wy 2 y, = 1.0026 O27. ona (1.0026 741 2 Yq = 1.0206 » ay = 0.1225 ~ a (1.0206 )° +1 (0.75) x4 = 075 Yq = 1.0679 y= OY 2628 ° ° 3 * (96797 +1 x4=1 %=? We have the predictor formula A s ’ , ’ yf? = Ygt 54 (5B ys) ~59 yp’ +37 yy’ 9 yy") yfP= 1.0679 +92 [55 ( 0.2628 ) - 59 ( 0.1225 ) +37 ( 0.0312) -9 (0) ]=1.1552 No ri ts. 0. a “fet (aass2%41 Next we haye the corrector formula, Or yt (944! +19 ys! ~5 yy! +yy') y= 1.0679 + 923 [9 (0.4284) + 19 (0.2628 )-5 (0.1224) +0.0312 ] {© = 1154 Now, y= : 0.4289 (1154741 ‘ Applying the corrector formula again we obtain, y{°) = 1.1541 ‘Thus the required y(1) = 1.1541 Now NUMERICAL METHODS -1 : 3 31. Find the value of y. at x = 44 by applying Adams - Bashforth: method given tat 5x Bipe =0 and y=1 at x=4 initially by generating the other required talues from the Taylor's polynomial, 5> Weneed to generate the valueofy atx = 41, 42, 43 [Refer Problem-4 for the generation of the required values] Wehaveobtained y(41) = 1.0049, y(42) = 1.0097, y(43) = 1.0142 by using the given initial condition y (4) = 1, We prepare the followirig table. * y Yat Y= 1.0049 Xy S42 Yq = 1.0097 x= 43) Ys = 1.0142 Me We have the predictor formula, I , ’ “._g5ne Ih) = yyy (553y' ~595' +37 9,’ -9y6)) 4r- 0. cone St [ 55 (0.0452) ~59 ( 0.0467 ) +87 (0.0483) -9 (0.05 )} ot yfP) = 10187 : 2-¥E 2101872 = 0.0437 5x, 5x44 ) he fyyt Next wehave, yf = ys+77 (944! +199, —Byy' 4") (Cc) Yq! = Lowes St {9 ( 0.0437 ) + 19 ( 0.0452 ) — 5 ( 0.0467 ) + 0.0485 ] 40 ENGINEERING MATHEMATICS ©1V yf = 10186 Now yy Sa = 0.0137 ( Sante value as earlier ) _ Thus y(44) = 1.0186 32. Solve the differential equation y’+y-+x,y? = 0 with the initial valués of y: Yq = i, ¥4 = 0.9008, y, = 0.8066, y, = 0.722 corresponding to the values of Rta =0, x)= 01, x= 02, 2, =03 by computing the value of y corresponding to x = 0.4 applying Adams - Brshforti predictor and corrector formula >> We prepare the following table. : : * ye y’ =~(ytx¥) %= y, = 0.9008 Yp = 018066 Yq = 0722 Wy =? We have the predictor formula, (PY oy gH Ya” = Yat pg (553-59 yy" +37 yy’—9 yy") On substitation we obtain, y{?) = 06371 Now y/’ = ~[y, +x, ¥] = - 0.7995 Next we have, Oey (944 +19 ys) -5 y,/+y,') On substitution we obtain, y{°) = 0.6379 Now y,’ = - [0.63794 (0.4) (0.6379 )*] = -0.8007 Applying the corrector formula again we obtain y{°) = 046379 Thus —y(0.4) = 0.6379 NUMERICAL METHODS - 1 44 EXERCISES Applying Milue’s method compute y at the specified value of x for the following. (1 to4] 1 a ato x | 0 0.2 04 0.6 y | 2 | 1.9231 | 1.7241 | 1.4706 Compute y (08) a . HL =1+¥ + 9(0)=0. Compute (08) correct to four decimal places by generating the intial values from Taylar’s polynomial of order 2. dy 6 eae a *tY x 0 01 0.2 0.3 y 1 11 1.231 | 1.402 Compute y(04) 4 = ; (x+y), y(O) = 2, y(O5) = 263, y(1) = 3595, ¥(15) = 4968 .Compute y at x = 2 correct to three decimal places, Use Taylor's series method to obtain the solution as a powerseries in x (upto the third derivative terms) given that # +P=x, ¥(0)=0. Using this generate the values of y corresponding to x = 02, 04, 06 correct to four decimal places. Then apply Milne’s predictor-corrector formulae to compute y at x = 08 and at x= 1 ay Using Adams Bashforth method findy (1.4) given that = 24 with y(1) = 2. Obtain the initial values of y atx = 1.1, 1.2, 1.3 by Taylor's series method of order 4 ven YY : Given Wty 2 and the data : x 1 11 12 13 y 1_| 0996 | 0.986 | 0.972 compute y (1.4 ) correct to 3 decimal places by applying Adams -Bashforth predictor and corrector formulae. 42 ENGINEERING MATHEMATICS - IV 8 Solve Bey 2; y(0) = 1 by obtaining Taylor's polynomial of order 4. Evaluatey atx = 0.1, 0.2, 03and by using these values obtain y atx = 0.4 applying Adams - Bashforth predictor and corrector formulae. ANSWERS 112 2 1.0234 f 3. 1.7003 4. 6.873 5. 0.3046, 0.4555 6. 3.0793 7. 0.949 8. 0.6897 ‘f eenne ms TEMA, ee CS» © dule -2 ; 2 Mo % Numerical Methods - 2 2.1 | Numerical solution of second order ordinary differential equations 241] ‘Introduction and pre-amble The given second order ODE with two initial conditions will reduce to two first order simultaneous ODEs which can be solved. We present the method explicitly. Let_y” = (x,y, y") with the initial conditions ¥(%) = Yo and y’(x5) = y5/ be the given second order DE, Now, let y’ =H = 2. this gives yr = 22 _ yy gives y ‘The given second order DE assumes the form 2 = g(x, y, z) with theconditions ¥(%q) = yp ‘and 2 (49) = 2) where yy is be denoted by 3 Hence we riow have two first order simultaneous ODEs, d a; fe, and nals. y. 2) with y(%) = yp and 2(x9) = zy Faking f(x, y, 2) = z, wenowhavethefollowingsystemof equations forsolving, Begs, yr 2), Be ses.y.2) 5 Y(%) = Yq and 2(%) = % 44 1” ENGINEERING, MATHEMATICS -IV 2.12/ Runge - Kutta Method Wehave to compute y(x)+i) and ifrequired y’(ay+h) = z(x9+h) We need to first compute the following : ut K = Bf (%, Yo. 2%) ; =h§ (Xr Yor 2) 4 _ how 4 a. He. b= bipyeta nets mtg] + hahsloty wtp. ty hook ob hook ob sa ti[aotts spelt get 4 =hg Mt DE Yt tD Kaha ths Yorks, +h) 7 = hglayth, wth, +h) 5 1 Therequited yxy +h) = y+ (hy +26 +b +h,) and Y' Cath) = 2(ayth) = 442 (42h t2yth,) WORKED PROBLEMS 5 . a t 1. Given op-2d ~ dy = 1, (0) =1, y"(0) = 0. Evaluate y(0.1) using Runge-Kutia method of order 4. 2 >> By data, SPP Ba ryetiyet yao azn. a? : Putting & = z and differentiating wart, x we obtain = = # 50 that the given de . equation assumes the form =~ Hence, we have a system of equations, -22-2xy=t Wg oy sary 4 22 whee y=1,2=0,x=0 os a a are c Let flyyz) 22, g(ny2) = 1+ xy ot. (e %y = 0, = ) % = 0 and letus take-h = 0.1 Weshall firstcompute the following: ky = Hf (%y Yo) = (0.1) f(0,1,0) = (0.1)(0) = 0 NUMERICAL METHODS -2 45 1, = (01) [1 + (2)(0)(1) + (0°)(0)] = 04 k, 1 i 4 h nom(yrtneti ned] k, = (0.1) (0.05, 1, 0.05) = (0.1) (0.05) = 0.005 1 = COLJ[L + (2) (0.05) (1) + (0.05)? (0.05)] = 0.11 Wg gee acyl aM 4p wt pat 5 ky = (0.1) f( 0.05, 1.0025, 0.055) = (0.1) (0.055) = 0.0085 1, = (O.1){1 + (2) (0.05) (1.0025) + (0.05)? (0.055) ] = 0.11004 Ky = f(a +h yg + yy 2 +h) Ky = (0.1) (0.1, 1.0055, 0.11004) = (0.1) (0.11004) = 0.011 1 = (OL) [1 + (2) (0.1) (1.0055) + (0.1)? (0.11004 )} = 0.12022 5 1 Wehave, (x9 +h) = yp + & (hy + 2k + 2hy + hy) y(OL) = 1 +2[0 + 2(0005) + 20.0055) + 0.011] Thus, (0.1) = 1.0053 2 da? 4 2. By Runge-Kutta method, solve a (£) ~ y? forx = 0.2 correct to four decimal places, using the initial conditions y = Land y’ = 0 when x = 0, a >> By data, —1 4, ing 4 i i int t _& Putting 3° = z and differentiating w.r.. x, we obtain ae The given equation becomes, dz me rxe ~y? with y= 12=0 whens =0, 46 ENGINEERING MATHEMATICS - IV Hence, we have a system of equations “Y Geog Bs Let f(y 2) = 2, 80% 2) = 22-7, y= 0, y= 1, 0 anh ea We shall first compute the following. ky = hf (xy Uy %) = (02) f(0,1,0) = (0.2)(0) = 0 = (02) [(0)(0)? - (1)*] = -02 k 1) akg att, Yo + yaa] we k, = (0.2) (04, 1,-0.1) = (0.2)(-0.1) = -0.02 4 h kh 4 : b=m(4e3.neBigsd . ke (0.2) f(0.1, 0.99, -0.0999) = (0.2) (- 0.0999) =.- 0.01998 (02) [(0.1)(-0.1)* = (177] = -0.1998 : I, = (0.2)[ (0.1) (— 0.0999)? - (0.99)?] = -0.1958 ky = Bf (29 + bh Yo + ky % + by) = (0.2) f (0.2, 0.98002, - 0.1958) = (0.2) (—0.1958) = — 0.03916 u (02) [ @2) (-0.1958)? - (0.98002)? ] = - 0.19055 1 We have y (3p +h) = yy + 2 (hy + 2k + 2k, + ky) 1 y(02)=142 {o + 2(-0.02) + 2(-0,01998 ) — 0.08916 | Thus y(0.2) = 0.9801 iven £2 wy ; 3. Compute y(0.1) given —Z = ¥ and y = 10, Fe 7 Sat x= 0 by Runge-Kutta method of fourth order, 4 >> Putting SY = z and differentiating w.xt x we obtain Py aE chat the ae ide ; de . : given equation assumes the form = = y?, Hence we have a system of equations NUMERICAL METHODS - 2 at dy dz, ens, & = =5,x=0. de TE Gey where y= 10, 2 x Tet Sle yea) = 2, Bx yz) ey, %= 0, Y= 10, 2 =5 and h= 01 Weshall firstcomputethe following. Ky =H C97 Yor %) = (O4)F(0, 10, 5) = (0.1)5 = 05 h = (0-1) [107] = 100 _ hk xq b mem artnet ged k, = (0.1) (0.05, 10.25, 55) = (0.1)(55) = 55 1 = (0.1) (( 10.259] = 1077 hook . ke vised, WT ty = (0.1) f(0.05, 12.75; 5885) = (0.1) (58.85) = 5.885 1, = (0.1) (1275) = 20727 Ky = Hf (%q+h, yothy, 2941) Ky = (0.1) (0.1, 15.885; 21227) = (0.1) (212.27) = 21.297 y= (0.1) (15.885 )° = 400.83 1 We have, YC +H) = Yt Ee (Ky +2ky+2kg+ky) y(01)= tosd [05+2(55)+2(53885)421.207] Thus y(01) = 17.4162 4. , Given y’"—xy’—y = 0 with the initial conditions y(0) = 1 +9'(0) = 0, compute 2 ¥ (02) and y’ (0.2 ) using fourth order Runge-Kutta method. a > Putting y= 2 weobtain y” = 5. The given equation becomes Bezety 7° y(0) =1,2(0)=0 48. ENGINEERING MATHEMATICS - IV Hence we have a system of equations, 4 ai are Fa mty where y= 1/250, x=0 Let f(x,y, 2) = 2, g(x,y, 2) =a24y, %y = Oe Yy=1, 2 = 0 andh = 02 Weshall firstcomputethe following. ‘ Ky = hf (397 Yor %) = (02) f(0, 1,0) = (02)0=0 1 = (0.2)[0x0+1] = 0.2 how | gems, wiz mts k= (02) (OA, 1, 01) = (02) (01) = 002 = (02) [01x01 41].= 0202 Cees +] ky = (02) (01, 1.01, 0.101) = (0.2) (0.101) = 0.0202 1, = (0.2) [0.1% 0.101+1.01] = 0.204 ky = hf (xgth, yothy, 294) ky = (02) f(02, 1.0202, 0204) = (0.2)( 0.204) = 0.0408 1, = (0.2) [0.2x 0.204 + 1.0202] = 0.2122 I Wehave y (ath) = Yote (ky +2 +2ky thy) 1 Z(apth) = 2ytZ (y+2ht 2h thy) Substituting the appropriate values we obtainy (0.2) = 1.0202 and z (0.2 Thus (0.2) = 1.0202 and y’(0.2) = 0.204 NUMERICAL METHODS -2 : 49 x dx ¢ ‘ait 5. Obtain the value of x and “7° when t = 0.1 given that x satisfies the equiation a ae = age and x= = = 0 when t = O initially. Use fourth order Runge-Kutta method. >> Putting y= & we obtain = ‘The given equation becomes 2 4 Be ty-ae, x=3, y=0 when f=0 Hence we havea system of equations, dey a at =ty-4; x=3, y=0 whent Let S(t ey) =, BCL, x, y) = ty defy 0,2 = 3, yy = 0 and h = 01 We shall first compute the following.. Ky = BF (tg, yr Yo) = (0A) F(0, 3, 0) = (0:1)(0) =0 L O.1)[0-12] = -12 4 no olerderhanel] k = (0.1)f(0.05, 3,-0.6) = (0.1)(-0.6) = -0.06 Le el =-1203 b senfurhoch nd] ky = (011) f(005, 297, -0.6015) = (0.1) (—0.6015) = 4 = (0.1) [005 ) (0.6015 )~4%297) = —1.191 Ky =hflfyth, ayths, p+) Ky = (01) f(04, 2.93985, -1.191) = (0.1)(—1.191) = -0.2191 ke (0.1) [(0.1) (~1.191 )—4% 2.93985] = — 1.18785 50 ENGINEERING MATHEMATICS -1V 1 Webave x(lg +t) = i9+¢ (ky +2ky +2ky thy) 1 ae Ylyth) = Hytg (h+2h +24 +l,) where y = 5 Substituting the appropriate values weobtain x (0.1) = 2.9401, (0.1) = - 1.196 Thus x = 2.9401 and & = -1196 when t = 0.1 2.13) Milne’s Method Preamble: Werecall [Module-l, Article-1.31] Milne's predictor and corrector formulae for solving first order ODE : y’ = f(x, Y)EY(%) = Yo YOY) = Hy YQ) = Hy ¥ (43) = yy Here x), x), x, x are equidistant values of x distant h. We have to computey(z,) wherex, = x,+4h ‘P) 4h ’ , , . HP) = yt 2yy'—yy' +24) [Predictor formule ] c) H uty dy tay? WO = ts (Wty ty) [Corrector formula | Method to solve y” = f(x, y/ y’) given y(%) = yy and y’ (x9) = yy © Weputy’ = 2 which gives y 2 =z. ‘The given DE becomes?’ = f(x, y, z) * We equip with the following table of values, x % x y Y 0 = % ylad Yo" = 70 wae ‘NUMERICAL METHODS: 2 * Wefirst apply predictor formula to computey(”) and 2(?) where, 4h yf?) = Vote (24-4225), since y’ =z 4h Wane (22/-2/+22;) ; “© | Wecompute.z)’ = f(x,, yg, %) and then apply corrector formula where, ( Oey ak HO = ysr5 (ard) \ AO a zeke ean’ tz!) gy = tg (2 Az t7, © Corrector formula can be applied repeatedly for better accuracy. WORKED PROBLEMS 1 6 Apply Milne’s retidtoatoe Ht = 1 given thefollzooing table of initial values. x 0 01 02 03, y 1 1.1103 1.2427 1.399 y 1 1.2103 1.4427 1.699 compute y (04) numerically and also theoretically. >> Patting y’ = “Y= z, weobtain y nity 4 - i. BIR . ae , The given equation becomes 5 = 1+z or 2 = 142. Furtherz’ = 142 will give us the following values 2(0) = 1+2(0) 2141=2 z’(01) =.1+2(01) = 2.2103 2'(0.2) . =14+2(0.2) = 2.4427 2/(03) ,=1+2(03). = 2.699 52 ENGINEERING MATHEMATICS -1V Now we tabulate these values. x xa | x, =04 wy = 02 y * yg=1 y,= 1.1103 | y, = 1.2427 | ° y, = 1399 meal z,=12108 | z= 14427 we? | a= 22108 | 2’ = 24827 269 |, ‘We first consider Milne’s predictor formulae : 4h IAD = yt (2% ~2,4225) 4h aPe 0g (2u'>2) +223) Hence, yf?) = 1A) [2( 1.2108 ) = 1.4427 +2 (1,699) ] 2?) = 14402119 (22103) -2469742(2.699)} v6?) = 1.5835 .and 24?) = 1.9835 Next we consider Milne’s corrector formulae: A yo = yy (2 t47,424) h CY ce athe tee? HO = at (my 442g +2/) Wehave, 2,’ = 1+2\?) = 141.9835 = 29835 ©) o1 . Hence, yf) = 1.2427 += [ 14427 +4 (1,699 ) + 1.985 ] 01 ACh. 14427 + [2.4427 + 4 (2.699) +2.9835 | YAO = 158344 and 2°) = 1.98344 Applying the corrector formula again for -y, we obtain f°) = 1.583438: Thus the required y( 0.4) = 1.5834 Theoretical solution of the problem is as follows, NUMERICAL METHODS - 2 53 y"=lty! or y"-y'=1 or (D-D)y=1 AE: mt@-m=0 or m(m-1)=0 > m=0,1 Ye tee 1 oo a "Dp pp 2-17 ‘Complete solution: y = Yer Yy isgiven by y = c +0,e—x This gives y’ = c,e"-1 and by using y(0) = 1, y’(0) = 1 wehave, 1 -x +e and L=q-1 2. G=2 and ¢ = Hence, y = -1+2e*~x is the theoretical solution. Now (04) =-1+42e"—G4 = 158365, theoretically. 4 7. Apply Milne’s method to compute y(0.8) given that fy - yh and the a {following table of initial values. x 0 02 ot 06 y 0 002 | 0075 01762 | y’ 0 0.1996 0.3937 05689 Apply the corrector formula twice in presenting the value ofy at x = 0.8 fy ae ‘The given equation becomes 2” = 1-2yy’ = 1-2yz Now, 2 =1-2(0)(0)=1 2 = 1-2(002) (01996) = 0992 2y/ = 1-2(0.0795) ( 0.3937 ) = 0.9374 23, = 1-2 (0.1762) (0.5689 ) = 0.7995 We have the following table. >> Putting y’ = a =z weobiain y 2, = 0.9374 54 ENGINEERING MATHEMATICS-IV- We first consider Milne's predictor formulae, 4h IAP) = yg ty (22-2425) 4h HP) = ay4 FP (22/2 42a) ‘On substituting the appropriate values from the table we obtain wh?) = 03099 and 26?) = 0.7055 Next we consider Milne’s corrector formulae, h Cc yw ttt) 40 whee eanyny) Wehavezy = 1-2y{?)z{?) = 1-2 (03049) (0.7055) = 0.5698 Hence by substituting the appropriate values in the corrector formulae we obtain * yO) = 03045 and 21°) = 0.7074 Applying the corrector formula again for y, we have Wh de 10795 + 92 [0.3937 +4 ( 0.5689 ) +0.7074] = 0.3046 Thus the required y (0.8) = 0.3046 zB 8. Obtain the solution of the equation 2 = axel by computing the value of the dependent variable corresponding to the value 1 dif icp ariable by applyin, Milne’s method using the following data see z 1 1d 123 13 y 2 2.2156 24619 | - 27514 Ly’ 2 23178 265 || 3.0657 >> Dividing the given equation by 2 we have, PY oY ge yr corel ge tp ge OF YS 224% . i Pulling y/ = 2 weoblainy” = 2’ and the given equation becomes 2’ = 2x +2 NUMERICAL METHODS -2 55° Now, Bras" We have the following table. x x=1 = 13 ‘ ys Yg = 2 Yy = 2.7514 wy =2 2 = 3.0657 y’a2’ fb ay=3. | f= 33589 zy = 4.13285 | | We first consider Milne's predictor formulae, ‘ yy? sigs (221-29 +225) AP = ay ttre) 2, +22,) On substitutirig the appropriate values from the table we obtain PY. w= .0793, and -24P) = 3.4996 . Next we consider Milne’s corrector formulae, i : HO. = vet 3 (B45 42) Bho ie ’ , 40) = By ty (a tay ty) > Putting y’ = z, we get y” = 2, Also wehave 2’ =~(xz+y) from the given equation. Further, (0) = -[041] =-1 2” (OL) = ~[ (0.1) (~0.0995 ) +0.995] = - 0.985 2/(02) = -[(02) (~0.196) +0.9801 | = -0.941 2"(03) = -[(03) (—0.2867) +0.956] = -0.87 Wealso have by using data the following table. 2 x= 0 x= 01 Xp = 02 y Y=1 y, = 0.995 0.9801 %=0 — 0.0995, ne = 0.985 03 0.956 = 0.2867 ay = =087 We first consider a predictor formulae, sy?) =%t Fae, -n425) {Pde at tt (aaa 422) Onsubstituting theappropriate values fromthetable weobtain sh?) = 0.9231 and 24?) = - 0.3692 Next we consider Milne’s corrector formulae, h HO = ps3 (ytd) HO myth (af raz neg gr ig fog) ole Webave, 24! = —(x4 26") +y{P)) = ~[( 04) (0.3692) 409231] = — 0.7784 AUMERICAL METHODS «2 Hence by substituting the appropriate value tn the corrector formulae We abiain 692, WO = 0.9230 and 26°) o - Thus the required y (04) = 0,920 aticior and corrector formlaecemputey (0.8) given that y alii yy! and y Sy! are governed by the following values y¥(0)=0,, y(0.2) = 0.2027, Y (Ot) = 0.4228, (0.6) = 0.6841 y"(O) = 1, y"(02) = LOL, y’(04) = 1179, (06) = 1.468 Apply corrector fornula tice, 10. Applying Milne the equation y" >> Putting y’ = zweobtainy”” = = = 2*& the given equation becomes 2” = Qyn Now, 2/(0) =0, 2/(02) = 2(0.2027)( 1.041) = 0.422 2° (04) = 2( 0.4228) (1.179) = 0.997 2'(0.6) = 2( 0.6841) ( 1.468) = 2,009 Now we tabulate all the values, a x ayo x, = 02 X= 04 X= 0.6 y Y= 0 wy = 02027 | y= 04228 | yy = 0.6841 y’ =z 1 2, = 1041 if = 04D ~ We first consider Milne's predictor formulne, 4h yf?) = YytZ (22,72, 4225) 4h, aP) Mt (22-2 +22)') (On substituting the appropriate values from the table we obtain 34?) = 1.0237 and 24?) = 2.0307 - {7 NextweconsiderMilne's comector formulae, HO = yy¥F (a hagt29) £0. h : att (2442514241)

You might also like