0% found this document useful (1 vote)
118 views

Modified Euler Method

Any helping meterial for modified euler mathod in numerical analysis

Uploaded by

Faheem
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 (1 vote)
118 views

Modified Euler Method

Any helping meterial for modified euler mathod in numerical analysis

Uploaded by

Faheem
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/ 2
8.3.2 Modified Euler's Method The modified Euler's method (also called Heun’s method) is a single-step, explicit, numerical technique for solving a first-order ordinary differential equation. The method is a modification of Euler's explicit method. In Section 8.3.1 on Euler’s method, we stated the assumption in that method is that in each subinterval or step, the derivative or the slope between points (x,, ¥,,) and (9.1, Ygo1) iS Constant and equal to the slope of y(x) at point (x, y,). This assumption causes error. In the modified Euler's method, the slope used for computing the value of y,,1 is modified to include the effect of that the slope changes within the subinterval. This slope is the average of the slope at the beginning of the interval and an estimate of the slope at the end of the interval Hence, the slope at the beginning of the interval is given by = slope at x= ty =f ns Yn) 27 The slope at the end of the interval is estimated by finding first an approximate value for y,,,1, written as yi using Euler's explicit method. That is y= Im + £Qy ht (8.28) Jae The estimation of the slope at the end of interval is obtained by substituting the point (x,,1, y, ) in the fa ‘or tion for 2 caution for or 2 LC nat Mee) 82 Yair is then estimated using the average of the two slopes. ™) a That is Yat = h (830) 282 = Numerical Methods // ‘The modified Buler’s method is illustrated in Fig. 83. The slope at the beginning of the interval (given by Eq. (8.27)) and the value of "as per Eq. (8.28) are shown in Fig. 8.3(a). Figure 8,3(b) shows the estimated slope at the end of the interval as per Eq. (8.29). The value of yp. obtained using Eq. (8.30) is shown in Fig. 83¢¢). 1 . . yt) I your, yor, 7 yn You Exact fm Exact es Exact, solution Ln solution? solution Sk Slope: ‘Slope: Ya lope: — ™ A Banyo) fl.) = {0 Yn) =e ‘fon ye) Bis oe TH poter Pa SStee haste (2) Slope at the beginning of (b) Estimate of the slope (©) Using the average of the the interval at the end of the interval two slopes Fig. 8.3: The modified Eulers method In modified Euler's method, instead of approximating (x, y) by f (xp, yp) in Eq.(8.22), the integral in Eq.(8.23) is approximated using the trapezoidal rule. . hr cn ‘Therefore yi? = FFL 0.904 Sr | (831) where y(° = yy + hf (io, Yo) obtained using Euler’s formula. Si larly, we obtain yw] 3 h 2 w= vot SLO. 99+ FOU I)] h FL eo. yort Fey a af? = ot SL Po 0+ FO PD] (832) aaa aaa aoe and so on. Therefore, we have Hn h on yw = 0 +5 Lf 0.90) + FOr xf >»y] . n=0,1,2,3, (833) Oy {'? is the n™ approximation to y,. where y The iteration formula given by Eq.(8.33) can be started by selecting y(” from the Euler’s formula. The formula given by Eq,(8.33) is terminated at each step if the condition | y(") — y(*-b|< ©, where cis a very small 4 Numerical Solution of Ordinary Differential Equations // 283 arbitrary value selected depending on the level of accuracy to be accomplished is satisfied. If this happens for sa, n =k, then we consider y, = y“ and continue to compute the value of y at the next point by repeating the procedure described above. Equation (8.33) can also be written as I Yuet =n ty (Ky + Ky) + OVP (8.33a) where Ky = AS Op Yn) (8.33b) N+ Gnsts Yn + Ky (8.33¢) Example E8.11 y Use the modified Euler's method to solve the differential equation a =x + y? with (0) = 1, Take the step size hh = 0.1 Solution: From Eq.(8.31), we have h yf? = yo+ 51 Fe0. vo) + FO.) ] where HO = 30+ Af Co, 0) c, a a 2. 2,2 Therefore wt? =142[0+1) +0.14040.10+1))] =140.05[1 + 0.1 + 1.12) = 1.1155 is the improved Euler’s estimate Similarly P= vot [Fao y0)+ Faro?) | (1) = 11155 where fl ‘ h WP = +S [Pon P+ Lorn? thf.) 2111554904 41.1155%) +0241 155+0.1(0.1 +1.11557)))] = 1.2499 is the Euler’s method estimate starting from (x,, yt?) - Now, starting from [xy, yg + 1 f(x, yo)], we have yO) = L1155 + 0,05[(.1 + 1.1155) + (0.2 + 1.2499%)] = 1.2708 is the improved Euler's estimate.

You might also like