# Small Modification on Modified Euler Method for Solving Initial Value Problems

Authors: Abushet Hayalu Workie
Journal: Abstract and Applied Analysis
 (2021)

---

## Abstract

In this article, small modification to the Modified Euler Method is proposed. Stability and consistency were tested to determine the end result, and some numerical results were presented, and the CPU time was compared again, and it is recognized that the proposed method is more reliable and compatible with higher efficiency.


---

## Body

## 1. Introduction

An initial value problem (IVP) is a differential equation with an initial condition that specifies the value of an unknown function at a specific point in the domain. Differential equations are commonly used in physics, chemistry, biology, and economics in science and engineering to solve a variety of physical problems [1, 3].There are a variety of analytical methods for determining the solution of differential equations. Analytical methods, on the other hand, may be unable to solve such complicated or complex differential equations in some cases. The solution to the difficult differential equations [1–3, 10] is obtained using numerical methods. Numerical methods are extremely useful tools for rapidly solving complex problems when used in conjunction with computer programming.Many researchers have developed numerical methods for solving ordinary differential equations (ODEs) with initial value problems (IVPs). Many authors have attempted to solve initial value problems (IVP) using a variety of methods, including Euler’s method, Modified Euler Method (MEM), and Improved Modified Euler Method (IMEM), and Improved Euler’s Method. The slope of the function over the interval is estimated by Euler’s procedure using the line tangent to the function at the beginning of the interval. The tangent lines to the solution curve at both ends of the interval are considered in Improved Euler’s (or Heun’s) technique. Some have tried to improve these precision methods, while others have improved them for greater accuracy, stability, and consistency [6–9].Numerical methods have been improved on occasion to increase performance in accordance with our requirements. By assuming the tangent slope as an average of the arithmetic mean and contra-harmonic mean, [1] proposed to improve the Improved Euler’s (or Heun’s) method. [10] proposed a hybrid numerical method that combines the Modified Euler method, the Improved Euler’s method, and the 2nd-order contra harmonic mean method to solve initial value problems. [2] performed a study on Improving the Improved Modified Euler Method for Better Performance on Autonomous IVP.The Modified Euler Method and its modification are used in this paper to solve ordinary differential equations in initial value problems. The numerical outcomes are highly promising.


## 2. The Methodology of the Proposed Method

Consider a first-order ordinary differential equation with initial value problem (IVP)(1)dydx=fx,ysubjecttoinitialconditionyx0=y0.The simplest and most known numerical method to solve this IVP is Euler’s method(2)yn+1=yn+hfxn,yn,n=0,1,⋯,which is used to evaluate differential equation involving initial value problem using slope at the start point.According to [3], the numerical method to solve the IVP using Modified Euler’s Method (MEM) is given by
(3)yn+1=yn+hfxn+h2,yn+h2fxn,yn,which is used to solve initial value problem using slope at the midpoint.According to [2], the numerical method to solve the IVP using Improved Modified Euler’s Method (IMEM) is given by
(4)yn+1=yn+hfxn+h2,yn+h2fxn,yn+h2fxn,yn,which solves ODE involving IVP using slope of the tangent at the midpoint but the y value of (4) is updated and hence it better than (3).Now, the new proposed method assumes:(5)yn+1=yn+hfxn+h2,yn+h2fxn,yn+h2fxn,yn+hfxn,yn+hfxn,yn,which uses the slope of the tangent at the midpoint but the y value of (5) is updated twice as compared to (4).


## 3. Stability and Consistency Analysis of the Proposed Method

The stability analysis of the proposed method indicated in (5) can be obtained using Dahlquist’s test problem [5]
(6)dydx=λyn;yx0=y0,λ∈ℂ.To check the stability of the proposed method, substituting (6) into (5), we obtain yn+1=yn+hλyn+1/2h2λ2yn+h3λ3/4yn+h4λ4/4yn+h5λ5/4yn=1+z+z2/2+z3/4+z4/4+z5/4yn, where z=hλ.Hence, the stability region of the proposed method is the region indicated in Figure1 below.
(7)Gz=yn+1yn=1+z+z22+z34+z44+z54≤1.Figure 1
The stability region of the proposed method.The shaded region in Figure1 above is the region of stability of the proposed method. Figure 2 refers to the stability regions of the stated methods: Euler method (region enclosed by blue curve) and proposed method (region enclosed by red curve).Figure 2
The stability regions of Euler and the proposed methods.In order to check the consistency of the initial value problem (IVP), the numerical formula expressed by [5], Equation (1) can be written in the form of yn+1=yn+hϕxn,yn,h and will be consistent if limh⟶0ϕxn,yn,h=fxn,yn.In order to check the consistency of the proposed method of Equation (5), we have
(8)ϕxn,yn,h=fxn+h2,yn+h2fxn,yn+h2fxn,yn+hfxn,yn+hfxn,yn,and then
(9)limh⟶0ϕxn,yn,h=limh⟶0fxn+h2,yn+h2fxn,yn+h2fxn,yn+hfxn,yn+hfxn,yn,=fxn,yn,which shows that the proposed method is consistent.


## 4. Examples, Numerical Results, and Discussion

The numerical solutionsyn of yx for the initial value problem (IVP) using MEM, IMEM, and the proposed method were discussed in this section, and three examples were used to illustrate the new proposed method, and Tables 1–8 show the numerical solutions, absolute errors made, exact solutions, and the average number of function evaluations-CPU time [11], and the results are computed using MATLAB software [4].Example 1.
Solve the initial value problem (IVP)y′=x3e−2x−2y;y0=1 which is reported in [1] using the MEM, IMEM, and the proposed method with step sizes h=0.1 and h=0.05 and compare the errors.Example 2.
Solve the initial value problem (IVP)y′=x+y;y0=1 which is reported in [2].Example 3.
Solvey′=−y;y0=1reported in [2].Table 1
Numerical solutions for Example1.
xMEMIMEMProposed methodh=0.1h=0.05h=0.1h=0.05h=0.1h=0.050.10.820011310467730.819288320841670.818011310467730.818591121798410.818431310467730.818632104694990.20.672406712864370.672587112297680.669375909535310.673513125439430.669999404557730.670999397307420.30.552267583100900.551758421895470.548448935112370.552213830880760.549790426383380.549977836452750.40.454840348491000.453873604555140.450626977184350.458787909388010.451997879114210.452284655545680.50.376386381249970.375133220058250.372073063307100.382521263853030.373338523849200.37368768837579Table 2
Absolute errors made for Example1.
Stage of iterationError made by MEMError made by IMEMError made by the proposed methodh=0.1h=0.05h=0.1h=0.05h=0.1h=0.0500.00.00.00.00.00.011.260089e-0035.3709984e-0047.3991053e-0041.6009920e-0043.1991053e-0041.1911630e-00421.818539e-0031.9989383e-0031.2122645e-0032.9249514e-0035.8876944e-0044.1122331e-00432.344603e-0031.8354419e-0031.4740449e-0032.2908509e-0031.3255362e-0045.4856453e-00542.635679e-0031.6689356e-0031.5776918e-0036.5832404e-0032.0678989e-0047.9986546e-00552.758824e-0031.5056631e-0031.5544937e-0038.8937069e-0032.8903315e-0046.0131376e-005Table 3
Numerical solutions for Example2.
xMEMIMEMProposed methodh=0.1h=0.05h=0.1h=0.05h=0.1h=0.050.11.1100001.11025312501.110250001.110320430664061.110277501.110323964265390.21.231050001.242609438286131.24262881251.242764944142291.242692489506251.242773108569050.31.3868102501.399392572063201.399465495015631.399660822852401.399575548070241.399674907069420.41.568925326251.583170434002241.583334238366031.583580161324621.583502612832201.583657464215140.51.780662485506251.796780887080521.797080166954051.797365618542751.797320809154641.79745435154903Table 4
Absolute errors made for Example2.
Stage of iterationError made by MEMError made by IMEMError made by the proposed methodh=0.1h=0.05h=0.1h=0.05h=0.1h=0.0500.00.00.00.00.00.013.4183615e-048.87111513e-0059.1836151e-0052.1405487e-0056.43361513e-0051.7871886e-00520.011755516321.96078034e-0041.7670382e-0044.0572178e-0051.13026814e-0043.2407751e-00530.012907365153.25043089e-0042.5212014e-0045.6792299e-0051.42067082e-0044.2708083e-00540.014724069034.78961280e-0043.1515692e-0046.9233958e-0051.46782450e-0048.0689326e-00650.016780055916.61654319e-0043.6237445e-0047.6922858e-0051.21732246e-0041.1810149e-005Table 5
Numerical solutions for Example3.
xMEMIMEMProposed methodh=0.1h=0.05h=0.1h=0.05h=0.1h=0.050.10.90500000.904876562500.9047500.904817110351560.9047725000.904819934284430.20.8190250000.818801593361820.8185725625000.818694003184950.818595181406250.818699113478480.30.7412176250.740914371170770.740603525921870.740768342223960.740642408768890.740785278056320.40.6708019506250.670436049291850.670061040077810.670260421345320.670112883787850.670277286609790.50.607075765315630.606661867659290.606237726010400.606463097624690.606299709146940.60648025042261Table 6
Absolute error made for Example3.
Stage of iterationError made by MEMError made by IMEMError made by the proposed methodh=0.1h=0.05h=0.1h=0.05h=0.1h=0.0500.00.00.00.00.00.011.6258196e-0043.9144464040e-0058.741803596e-0052.0307684399e-0056.491803596e-0051.7483751529e-00522.9424692e-0047.0840283839e-0051.581905779e-0043.6749893030e-0051.355716717e-0043.1639599500e-00533.9940432e-0049.615048905e-0059.615048905e-0054.9878457759e-0051.758119128e-0043.2942625399e-00544.8190459e-0041.160032562e-0042.590059578e-0045.9624690319e-0052.071622478e-0044.2759425849e-00555.4510560e-0041.312079467e-0042.929337022e-0046.7562087940e-0052.309505657e-0045.0409290019e-005Table 7
Exact solutions for Example1, Example 2, and Example 3.
xExact solution for Example1Exact solution for Example2Exact solution for Example30.10.8187512211.110341836151300.904837418035960.20.6705881741.242805516320340.818730753077980.30.5499229801.399717615152010.740818220681720.40.4522046691.583649395282540.670320046035640.50.3736275571.797442541400260.60653065971263Table 8
CPU time (in seconds) for each example using the stated methods.
MethodsCPU time for Example1CPU time for Example2CPU time for Example3AverageMEM46.3215050.8565641.8160046.33136IMEM54.7871753.1915441.9598449.97952Proposed method56.8726336.5196945.3751446.25582Solution: For Example1, Table 1 below shows results using MEM, IMEM, and the new proposed method with step sizes h=0.1 and h=0.05 while Table 2 shows the absolute error made using MEM, IMEM, and the new proposed method to find approximate values of the solution of the initial value problem.For Example2, Table 3 below shows results using MEM, IMEM, and the new proposed method with step sizes h=0.1 and h=0.05 while Table 4 shows the absolute error made using MEM, IMEM, and the new proposed method to find approximate values of the solution of the initial value problem.For Example3, Table 5 below shows results using MEM, IMEM, and the new proposed method with step sizes h=0.1 and h=0.05 while Table 6 shows the absolute error made using MEM, IMEM, and the new proposed method to find approximate values of the solution of the initial value problem.Table7 below shows exact solutions for Examples 1, 2, and 3.


## 5. Conclusion

A new proposed Modified Euler Method is shown in this paper to solve ordinary differential equations (ODEs) with initial value problems (IVPs). Stability and consistency were evaluated and found to be stable and compatible with the new proposed method. Comparison between MEM, IMEM, and the proposed approach was done. The numerical solutions of the MEM, IMEM, and the new proposed method with step lengthsh=0.1 and h=0.05 are shown in Tables 1, 3, and 5. The absolute errors of the numerical solutions obtained in Tables 1, 3, and 5 are shown in Tables 2, 4, and 6, respectively. Table 7 shows the exact solution for each numerical example. Table 8 indicates the CPU time (even though it is machine dependent) and shows that the proposed method takes less time on average to perform the functions evaluation. This shows that the proposed method is the fastest method while IMEM is the slowest method. Hence, the results indicate that the new proposed method better than MEM and IMEM. Future work is necessary to consider the practical applications of this proposed method like solving time fractional diffusion equation and others.



---

*Source: 9951815-2021-07-12.xml*