Enhanced Euler's Method To Solve First Order ODE

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/341150578

Enhanced Euler's Method to Solve First Order Ordinary Differential Equations


with Better Accuracy

Article · March 2020


DOI: 10.5281/zenodo.3731020

CITATIONS READS

0 1,775

1 author:

Md Nurujjaman
JagannathUniversity
4 PUBLICATIONS   3 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

A Review of Fractals Properties: Mathematical Approach View project

All content following this page was uploaded by Md Nurujjaman on 05 May 2020.

The user has requested enhancement of the downloaded file.


Journal of Engineering Mathematics & Statistics
Volume 4 Issue 1

Volume 2 Issue 1
Enhanced Euler’s Method to Solve First Order Ordinary
Differential Equations with Better Accuracy

Md. Nurujjaman
Lecturer
Department of Mathematics
Jagannath University, Dhaka- 1100, Bangladesh
Corresponding Author’s E-mail id: md.jaman24@gmail.com
DOI: http://doi.org/ 10.5281/zenodo.3731020

Abstract
Euler’s method is the most basic and simplest explicit method to solve
first-order ordinary differential equations (ODEs). Many other complex
methods like the Runge-Kutta method, Predictor-Corrector methods,
etc. have been developed on the basis of this method. In this paper, the
basic concept of Euler's method with some of its established modified
rules such as the Modified Euler’s method and the Mid- Point method
have been discussed. The main focus is confined to the geometrical
interpretation of these methods and to find a way to reduce the errors.
Finally, a modification has applied to these methods to improve the
performance by reducing errors and naming the new method as
Enhanced Euler’s method. Numerical experiments and graphical results
have been discussed in the paper. MATLAB programs have been used
for numerical and graphical computation.

Keywords: Euler’s method, Mid-point method, Modified Euler’s method,


Enhanced Euler’s method, ODEs, Numerical Solution, Enhanced
performance.

INTRODUCTION
Usually, we solve the differential equations in two ways. One is the analytical method and the
other is the numerical method. In fact, in many cases, differential equations can’t be solved in

1 Page 1-13 © MANTECH PUBLICATIONS 2020. All Rights Reserved


Journal of Engineering Mathematics & Statistics
Volume 4 Issue 1

Volume 2 Issue 1
an analytical way [1]. Because of this, a numerical method is a powerful tool that helps us
solve problems that are impossible or very difficult to solve in analytical ways.

Numerical methods normally provide approximate values of the solutions at different points
in a given interval [2]. Renowned mathematician Leonhard Euler in 1768 gave a simple and
excellent method to solve the first-order differential equation numerically [3]. Euler's method
is one of the simplest and most fundamental methods among the numerical methods to solve
the differential equation. Although this method is very slow and the amount of error is much
higher than the exact solution [4]. Later, many mathematicians change Euler's method to
increase its acceleration and reduce the error greatly [5][6]. The two most popular methods
are the Mid-point method and the Modified Euler’s method. This article provides a brief
review of the geometric interpretation of Euler's method, the Mid-point method, and
Modified Euler’s method. Finally using these methods with modification a new method
named Enhanced Euler’s method has been established to provide faster and less error-rich
results.

EULER’S METHOD:
Euler’s method is the simplest and the most fundamental numerical method for solving the
first-order initial value problem. It is one of the oldest & crudest methods [7].

Figure-1: Geometrical interpretation of Euler’s Method

2 Page 1-13 © MANTECH PUBLICATIONS 2020. All Rights Reserved


Journal of Engineering Mathematics & Statistics
Volume 4 Issue 1

Volume 2 Issue 1
Euler’s method provides the approximation for the solution of a differential equation. The
main concept of Euler’s method is to draw slopes at a constant distance using the given
differential equations so that they make up an approximation of the actual curve, shown
above [2].

A differential equation of 1st order can be algebraically manipulated into the form

Where

We must find a set of points that lie along with the solution. Now starting with we
get the slope of the solution at that point.

That is the slop of the solution at


This gives us the slope of the solutions’ tangent line at the initial point.

Now moving to a short distance we get a new coordinate say . We can easily calculate
the value of shown in figure-2 and this corresponding point is located in the
tangent line.

Thus we obtain

Figure-2

3 Page 1-13 © MANTECH PUBLICATIONS 2020. All Rights Reserved


Journal of Engineering Mathematics & Statistics
Volume 4 Issue 1

Volume 2 Issue 1
But it is not the desired solution. It is just an approximation that we are generating. Hence we
must use as though it was correct and proceed by computing the slope at the new
point.

That is the slope at similarly at the distance from we can estimate


the new coordinate point on the new tangent line. That is

The new point doesn’t lie on the true solution; we can’t actually produce a tangent line to the
actual solution at this point. But we can still substitute our new pints into the formula
that the slope of solution and can get our new point. In a similar way, we must
attempt to continue our quest for points of the solution curve.

The general formula for Euler’s method can be written as

Mid-point Method:
The Mid-point method is a simple modification of the Euler’s method. In Euler’s method, the
slope is drawn at the distance h in each step. It can be seen that the error increases gradually
with each step. Because at each step the slopes tend to move away from the actual solution.
Now in the mid-point method, a slope is drawn at the midpoint i.e. at the half distance
between the initial point and instead of h distance [8].

That is the slope at

Now the new slope is shifted at the initial point. (Figure-3) Now is calculated using this
new slope instead of

That is

Where and

4 Page 1-13 © MANTECH PUBLICATIONS 2020. All Rights Reserved


Journal of Engineering Mathematics & Statistics
Volume 4 Issue 1

Volume 2 Issue 1
This value of is much closer to the real solution than the previous one. In Figure 2, it is
seen that the error in Euler's method was AD which decreases in the mid-point method to the
CD.

The following steps can be calculated in a similar manner yields comparatively better results
than the Euler's method.

Figure-3: Geometrical interpretation of Mid-point Method

In general, from Euler’s method we get


(1)
Here is the slope at

Similarly

is the slope at ( )

Replacing the previous slope by the new slope at (1) we get


) (2)

This is the required equation of Mid-Point Method.

5 Page 1-13 © MANTECH PUBLICATIONS 2020. All Rights Reserved


Journal of Engineering Mathematics & Statistics
Volume 4 Issue 1

Volume 2 Issue 1
Modified Euler’s Method:
Modified Euler’s method is nothing but a simple predictor-corrector method. It is the same as
the first order Runge-Kutta method [9]. In this method the first approximation is obtained by
using the Euler’s method then the average of two slopes is taken at each step to correct the
approximation.
Given differential equation with initial condition

where
Now as Euler’s method starting with we get a slope at

Moving at a distance from to and its corresponding point is


By Euler’s method we get,
Hence the slope at

Then the average slope is

Figure-4: Geometrical interpretation of Modified Euler’s Method

Using this modified slope at Euler’s formula we get

6 Page 1-13 © MANTECH PUBLICATIONS 2020. All Rights Reserved


Journal of Engineering Mathematics & Statistics
Volume 4 Issue 1

Volume 2 Issue 1
The new value of is more close to the solution curve as shown in the figure-4. Therefore
this method gives the better approximation then before.
We thus obtain the iteration formula
(3)

This formula is known as modified Euler’s method.

Enhanced Euler’s Method:


From the above-discussed method, we have seen that the Mid-point method and the Modified
Euler’s method give better approximation than the original Euler’s method. But still, the error
is significant and there is scope to reduce the error. In [5] Abraham proposed a method
named Improved Modified Euler’s (IME) method to improve the performance of Euler’s
method and achieved better accuracy. But in his work, he inserts the value of for in
the inner function evaluation of his calculation which is unmethodical.

If we want to replace the value of we have to have in that place but in the place of
we can’t put the value of . It is also irrelevant to the geometric point of view as we
discussed the geometrical interpretation of the Mid-point method and Modified Euler’s
method in the previous section.

In the new Enhanced Euler’s method, we replace the in the place of which is
methodical for both mathematical and geometrical points of view.

From the Mid-point method we have,

For , (4)

7 Page 1-13 © MANTECH PUBLICATIONS 2020. All Rights Reserved


Journal of Engineering Mathematics & Statistics
Volume 4 Issue 1

Volume 2 Issue 1
Again from Modified Euler’s method we have

For , (5)

In Modified Euler’s method the average slope at and has used where is
calculated using the Euler’s method. But we can use the Mid-point method instead of Euler’s
method to evaluate i.e. substituting equation (4) in equation (5) we get,

That is we have used the enhanced slope to find the average slope in the Modified Euler’s
method and we name it Enhanced Euler’s method.

Therefore, in general we get the equation for Enhanced Euler’s method as

Numerical Experiment:
In this section, we present the solution of some initial value problems using the new
Enhanced Euler’s method. To compare the result we also solve the problems using Euler’s
method, Mid-point method and Modified Euler’s method and present the result with error
refer to the exact solution.

Problem-1:

The solution table with comparison for the problem is given below:

8 Page 1-13 © MANTECH PUBLICATIONS 2020. All Rights Reserved


Journal of Engineering Mathematics & Statistics
Volume 4 Issue 1

Volume 2 Issue 1
Table-1: Numerical comparison among the methods

Modified Euler’s
Mid-point Error
y (Mid-point)

Euler’s Error

Euler’s Error
y (Enhanced
y (Modified

Enhanced
Solution)
y (Euler)

y (Exact
Euler’s)

Euler’s)

Error
x

0.0000 1.0000 1.0000 1.0000 1.0000 1.0000 0.0000 0.0000 0.0000 0.0000
0.1000 1.1103 1.1000 1.1100 1.1100 1.1105 0.0103 0.0003 0.0003 0.0002
0.2000 1.2428 1.2200 1.2410 1.2415 1.2431 0.0228 0.0018 0.0013 0.0003
0.3000 1.3997 1.3620 1.3951 1.3967 1.4000 0.0377 0.0046 0.0030 0.0003
0.4000 1.5836 1.5282 1.5746 1.5779 1.5837 0.0554 0.0090 0.0057 0.0001
0.5000 1.7974 1.7210 1.7821 1.7879 1.7970 0.0764 0.0154 0.0096 0.0004
0.6000 2.0442 1.9431 2.0203 2.0294 2.0429 0.1011 0.0240 0.0148 0.0014
0.7000 2.3275 2.1974 2.2923 2.3058 2.3246 0.1301 0.0352 0.0217 0.0029
0.8000 2.6511 2.4872 2.6015 2.6204 2.6459 0.1639 0.0495 0.0307 0.0051
0.9000 3.0192 2.8159 2.9517 2.9772 3.0108 0.2033 0.0675 0.0420 0.0084
1.0000 3.4366 3.1875 3.3469 3.3805 3.4237 0.2491 0.0897 0.0561 0.0129

Graphical representation of the problem:

Figure-5: Graphical comparison among the solutions using different methods.

9 Page 1-13 © MANTECH PUBLICATIONS 2020. All Rights Reserved


Journal of Engineering Mathematics & Statistics
Volume 4 Issue 1

Volume 2 Issue 1

Figure-6: Graphical comparison among the errors in different methods

Problem-2:

The solution table with comparison for the problem is given below:

Table-2: Numerical comparison among the methods


y (Exact Solution)

Enhanced Euler’s
Modified Euler’s
Mid-point Error
y (Mid-point)

Euler’s Error
y (Enhanced
y (Modified
y (Euler)

Euler’s)
Euler’s)

Error

Error
x

0.0000 1.0000 1.0000 1.0000 1.0000 1.0000 0.0000 0.0000 0.0000 0.0000

0.1000 0.9048 0.9000 0.9050 0.9050 0.9047 0.0048 0.0002 0.0002 0.0001

0.2000 0.8187 0.8100 0.8195 0.8193 0.8185 0.0087 0.0008 0.0005 0.0002

0.3000 0.7408 0.7290 0.7426 0.7418 0.7405 0.0118 0.0017 0.0010 0.0003

10 Page 1-13 © MANTECH PUBLICATIONS 2020. All Rights Reserved


Journal of Engineering Mathematics & Statistics
Volume 4 Issue 1

Volume 2 Issue 1
0.4000 0.6703 0.6561 0.6733 0.6719 0.6698 0.0142 0.0030 0.0016 0.0005

0.5000 0.6065 0.5905 0.6110 0.6088 0.6058 0.0160 0.0044 0.0023 0.0008

0.6000 0.5488 0.5314 0.5549 0.5518 0.5477 0.0174 0.0061 0.0030 0.0011

0.7000 0.4966 0.4783 0.5044 0.5003 0.4951 0.0183 0.0078 0.0037 0.0015

0.8000 0.4493 0.4305 0.4589 0.4538 0.4474 0.0189 0.0096 0.0044 0.0019

0.9000 0.4066 0.3874 0.4180 0.4117 0.4041 0.0191 0.0115 0.0051 0.0024

1.0000 0.3679 0.3487 0.3812 0.3737 0.3649 0.0192 0.0134 0.0058 0.0030

Graphical representation of the problem:

Figure-7: Graphical comparison among the solutions using different methods.

11 Page 1-13 © MANTECH PUBLICATIONS 2020. All Rights Reserved


Journal of Engineering Mathematics & Statistics
Volume 4 Issue 1

Volume 2 Issue 1

Figure-8: Graphical comparison among the errors in different methods

DISCUSSION
The problems are solved using MATLAB R2014b (8.4.0 150421) both numerically and
graphically. The results in table-01 and table-02 shows that the Mid-point method performs
better than the Euler’s method where the Modified Euler’s method performs better than the
Mid-point method which supports the geometrical interpretation of these two methods
discussed earlier and the new Enhanced Euler’s method perform better than the Modified
Euler’s method. The comparison among the solutions is presented in figure-5 and figure-7 for
problem-1 and problem-2 respectively. Both the problems are solved in the interval [0,1] with
step size h=0.1. As the solution graphs are so compact in the given interval it is difficult to
compare the errors properly. To observe the errors more distinctly the error comparison
graphs are also drawn in figure-6 and figure-8. It is undoubtedly clear that Enhanced Euler’s
method gives better approximation among the mentioned method.

CONCLUSION
The purpose of this paper was to review the Euler’s method which the most fundamental
method to solve first-order ODE’s and enhance its performance by simple modification. The
most two common modified methods the Mid-point method and the Modified Euler’s method
are also discussed with their geometrical point of view. Using these two methods a simple
modification has done to observe the performance and called the new method as Enhanced
Euler’s method. Finally, some numerical experiments have done and we observed that the

12 Page 1-13 © MANTECH PUBLICATIONS 2020. All Rights Reserved


Journal of Engineering Mathematics & Statistics
Volume 4 Issue 1

Volume 2 Issue 1
new Enhanced Euler’s method greatly outperforms both the Mid-point method and Modified
Euler’s method.

REFERENCES
I. Lambert J. D., Numerical Methods for Ordinary Differential Equations, Jhon Wiley
and Sons, USA, (1991).
II. Richard L. Burden, J. Douglas Faires, Numerical Analysis-9th Ed., Cengage Learning,
(2010).
III. Kendall E. A., An Introduction to Numerical Analysis (2nd Ed.), Jhon Wiley and Sons,
(1989).
IV. Abdulaziz B. M. Hamed, The Accuracy of Euler and modified Euler Techniques for
First Order Ordinary Differential Equation with initial condition, American Journal of
Engineering Research, vol. 6, no. 9, pp. 334-338, (2017).
V. Abraham O., Improving the Improved Modified Euler’s Method for Better
Performance on Autonomous Initial Value Problems, Leonardo Journal of Science, p.
57-66, (2008).
VI. Abraham O., Improving the modified Euler’s method, Leonardo J. Sci., 10, p. 1-8,
(2007).
VII. Butcher J. C., Numerical methods for ordinary differential equations in the 20th
Century, Journal of Computational and Applied Mathematics, 125, p. 1-29, (2000).
VIII. Hull T. E., Enright, W. H., Fellen, B. M., and Sedgwick, A. E., Comparing Numerical
Methods for Ordinary Differential Equations, SIAM Journal of Numerical Analysis,
9, 603-637, (1972).
IX. Julyan E.H. C., Piro O., The Dynamics of Ruge-Kutta Methods, International Journal
of Bifurcation and Chaos, (1992).

Cite this Article as


Md. Nurujjaman (2020) “Enhanced Euler’s
Method to Solve First Order Ordinary Differential
Equations with Better Accuracy” Journal of
Engineering Mathematics & Statistics, 4(1), 1- 13
http://doi.org/ 10.5281/zenodo.3731020

13 Page 1-13 © MANTECH PUBLICATIONS 2020. All Rights Reserved

View publication stats

You might also like