0% found this document useful (0 votes)
3 views8 pages

Study of Numerical solution-8579

The document discusses numerical solution methods for ordinary differential equations (ODEs), focusing on Taylor, Euler, and Runge-Kutta methods. It highlights the advantages and disadvantages of each method, noting that while Taylor's method is accurate, it is rarely used due to the need for successive derivatives, whereas the Runge-Kutta method is more commonly utilized for its accuracy and efficiency. The paper includes comparisons of numerical solutions obtained from these methods against exact solutions, illustrated with tables and graphs.

Uploaded by

manegergovind
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views8 pages

Study of Numerical solution-8579

The document discusses numerical solution methods for ordinary differential equations (ODEs), focusing on Taylor, Euler, and Runge-Kutta methods. It highlights the advantages and disadvantages of each method, noting that while Taylor's method is accurate, it is rarely used due to the need for successive derivatives, whereas the Runge-Kutta method is more commonly utilized for its accuracy and efficiency. The paper includes comparisons of numerical solutions obtained from these methods against exact solutions, illustrated with tables and graphs.

Uploaded by

manegergovind
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

International Journal of Mathematics and Physical Sciences Research ISSN 2348-5736 (Online)

Vol. 7, Issue 2, pp: (124-131), Month: October 2019 - March 2020, Available at: www.researchpublish.com

Study of Numerical solution of Ordinary


Differential Equation by Taylor, Euler and
Runge-Kutta methods
Sayed Abdul Bashir Osmani
Head of Department of Algebra, Faculty of Mathematics
Kabul University, Kabul, Afghanistan
[email protected]

Abstract: Numerical solution methods of ordinary differential equations in numerical analysis is an important
topic, which is usually used for many differential equations that is difficult to find their exact and analytic solution
or the equation which cannot be represented in explicit form. There are many methods of numerical solution of
ordinary differential equations such as; Taylor method, Euler method, Hunn method and Runge-Kutta method
with first, second, third, fourth and higher orders respectively. Taylor's method is very accurate for numerical
solution of differential equations, but it is rarely used because of the need for computations of successive
derivatives. Euler's method has more errors but needs less computation. The Runge-Kutta method is a suitable
and the most commonly used method with less computational steps and accurate calculation. The Runge-Kutta
method is the generalized form of the Euler method which is used for numerical solution of ordinary differential
equations. In this paper, the numerical solutions of ordinary differential equations are solved by Taylor, Euler and
Runge-Kutta fourth-order methods and then their exact solutions are compared using tables and graphs.
Keywords: Ordinary Differential Equations, Numerical Solution of Equations, Exact Solution of Equations,
Taylor’s Method, Euler’s Method, Runge-Kutta Method.

I. INTRODUCTION
Ordinary differential equations are one of the important and widely used techniques in mathematical modeling. However,
not many ordinary differential equations have an analytic solution, usually it is extremely difficult to obtain and it is not
very practical [1].
Differential equations are the best language for expressing many of the general laws of nature in quantum physics,
electronics, computational chemistry and astronomy [2]. Therefore, solution of these equations is of particular
importance. Numerical solution methods are also of particular importance in applied problems. Finding numerical
solution of differential equations is an important topic in numerical analysis, which is usually used for many differential
equations that is difficult to find their exact and analytic solution or the equation which cannot be represented in explicit
form. This problem may because of the nonlinear equations or may they have coefficients that change over time. For
example, the linear differential equations having as much as higher coefficients, the more difficult it is to solve. Some
equations are also more difficult to solve because of more inputs under different conditions [3].
There are many methods like; Taylor, Euler, Heun, Multistep, Adams-Bashforth, Adams-mouton, Runge-Kutta methods
which produce numerical approximations to solution of initial value problem in ordinary differential equation. Euler’s
method which is the oldest and simplest method originated by Leonhard Euler in 1768 and improved Euler method,
Runge Kutta methods described by Carl Runge and Martin Kutta in 1895 and 1905, respectively [4].
Therefore, finding numerical solutions of differential equations by Taylor’s method has proper accuracy but is rarely used
because of the need for successive derivatives computation, but the fourth-order Runge-Kutta method is the most
commonly used technique in numerical solution of differential equations.
Page | 124
Research Publish Journals
International Journal of Mathematics and Physical Sciences Research ISSN 2348-5736 (Online)
Vol. 7, Issue 2, pp: (124-131), Month: October 2019 - March 2020, Available at: www.researchpublish.com

II. LITERATURE REVIEW


For finding numerical solution of ordinary differential equation in general, each numerical method has its own advantages
and disadvantages of use [4].
Taylor’s method is one of the best methods and have proper accuracy but rarely used because of the need successive
derivatives calculations [5].
Runge–Kutta methods have been presented for the integration of linear systems of ordinary differential equations with
constant coefficients. when the step size is limited by stability, then the fourth-order method is the most suitable [6].
Runge-Kutta method and Usmani Agarwal method are compared with a new method for numerical solution of three
problems and the result shows that in all three problems with step size of h  0.1 and h  0.05 the accuracy of new
method is more than Usmani Agarwal and Runge Kutta methods but with step size of h=0.2 Usmani Agarwal method has
more accuracy than the new method [7].
Numerical methods for systems of first order ordinary differential equations are tested on a variety of initial value
problems. In this case Runge-Kutta methods are not competitive, but fourth or fifth order methods of this type are best for
restricted classes of problems in which function evaluations accuracy requirements are not very stringent [8].
Numerical solution of linear and nonlinear equations are compared with Adomian decomposition and Runge-Kutta
methods and the result shows that Adomian decomposition method is very powerful [9].
Adams-Moulton and Runge-Kutta-Merson Methods which are used for solving initial-value problems in ordinary
differential equations are improved in case of efficiency by the Modified Taylor method based on three derivatives [10].
Taylor's method is accurate but it is less commonly used because of its successive derivatives computation. The Euler’s
method is also a suitable method, but the error is more in this method. The Runge-Kutta method has different order and is
more accurate than other methods and has less error.

III. NUMERICAL SOLUTION METHODS


A. Taylor’s method
For finding the answer of differential equation y   f ( x, y ) with initial-value y ( x0 )  y0 in closed interval [a, b] we
follow [11]:

ba
I. Partition the interval [a, b] into n equal parts with length h  .
n

x0  a , xn  b , y ( xn )  y (a  nh) , xn  a  nh

II. With y n we obtain numerical value y ( xn 1 ) i.e. yn 1 from following formula:

h2 h p ( p 1)
yn 1  yn  hf ( xn , yn )  f ( xn , yn )  ...  f ( xn , yn ) , n  0,1, 2,..., n  1
2! p!

e.g. find the numerical solution y 1.5  of ordinary differential equation y   2 xy, y (1)  1 for P  4 with step size h  0.1
by Taylor’s method.

Sol. Since x0  1, y0  1 and f ( x, y )  2 x  y then we expand Taylor’s series up to forth order:

h2 h3 h4
yn 1  yn  hf ( xn , yn )  f ( xn , yn )  f ( xn , yn )  f ( xn , yn ) , n  0,1, 2,3
2! 3! 4!

By differentiating first up to forth order of function f ( x, y )  2 x  y at the point ( x0 , y0 )  (1,1) we have:

y0  2 , y0  6 , y0  20 , y0(4)  76

Now we put these values in Taylor’s series, then for n  0 we obtain value y1 :
Page | 125
Research Publish Journals
International Journal of Mathematics and Physical Sciences Research ISSN 2348-5736 (Online)
Vol. 7, Issue 2, pp: (124-131), Month: October 2019 - March 2020, Available at: www.researchpublish.com

h2 h3 h4
y1  y0  h f ( x0 , y0 )  f ( x0 , y0 )  f ( x0 , y0 )  f ( x0 , y0 )  1.2336496
2! 3! 4!

i.e. . .

By differentiating first up to forth order of function f ( x, y )  2 x  y at the point ( x1 , y1 )  (1.1,1.23365) we have:

y1  2.71403 , y1  8.438166 , y1  29.4200852 , y1(4)  115.35318344

Now we want to find value of y 2 such that x1  x0  h  1.1 then according to Taylor series for n  1 we have:

h2 h3 h4
y2  y1  h f ( x1 , y1 )  f ( x1 , y1 )  f ( x1 , y1 )  f ( x1 , y1 )  1.55262783655
2! 3! 4!

i.e. . .

Similarly, we get the values of y3 , y4 , y5 after calculation as followings:

y3  1.9936 , y4  2.6116 , y5  3.4902

The Taylor’s method for numerical solution of y 1.5  in ordinary differential equation y   2 xy, y (1)  1 with step size
h  0.1 for P  4 with exact solution and absolute error is shown in table 1.

TABLE I: Numerical solution of equation y' = 2xy, y(1) = 1 by Taylor’s method with step size h=0.1

Xn Exact Value Yn(Taylor) Absolute Error


0000 000000 000000 000000
0000 003..1 1.2336 0.0001
0030 005531 1.5526 0.0001
00.0 0099.1 0099.1 0.0001
00.0 301001 301001 0.0001
0050 .0.90. .0.903 000003

Graph of numerical and exact solution of above equation for y 1.5  by Taylor’s method is as following [2].

Figure I: Graph of Numerical and exact solution of equation y' = 2xy, y(1) = 1 for y(1.5) by Taylor’s method.

Page | 126
Research Publish Journals
International Journal of Mathematics and Physical Sciences Research ISSN 2348-5736 (Online)
Vol. 7, Issue 2, pp: (124-131), Month: October 2019 - March 2020, Available at: www.researchpublish.com

B. Euler’s method
If we put p  1 in Taylor’s method, then Euler’s method will be obtained which has the formula, yn 1  yn  h f ( xn , yn )

such that f is the function which is obtained from equation y   f  x, y  , h is a positive number or difference between xn

and xn 1 . Values of y1 , y2 ,..., yn are numerical solution of y  x  at x1 , x2 ,..., xn .

Therefore, Euler’s method is the same as Taylor’s method [12].

e.g. find the numerical solution y 1.5  of ordinary differential equation y   2 xy, y (1)  1 with step size h  0.1 by
Euler’s method.

Sol. Since x0  1, y0  1 and f ( x, y )  2 x  y , then by Euler’s formula we have, yn 1  yn  h f ( xn , yn ) for n  0,1, 2, 3, 4


we calculate the values of y1 , y2 , y3 , y4 , y5 , then:

y1  1.2 , y2  1.464 , y3  1.81536 , y4  2.28735 , y5  2.92781

The numerical solution of y 1.5  in ordinary differential equation y   2 xy, y (1)  1 with step size h  0.1 by Euler’s
method with exact solution and absolute error is shown in table 2.
TABLE II: Numerical solution of equation y' = 2xy, y(1) = 1 by Euler’s method with step size h=0.1

Xn Exact Value Yn(Euler) Absolute Error


0000 000000 000000 000000
0000 003..1 003000 000..1
0030 005531 00.1.0 000..1
00.0 0099.1 00.05. 0001..
00.0 301001 303.1. 00.3..
0050 .0.90. 30931. 005131

From table 1, We can observe that absolute errors by Euler’s method are more than Taylor’s method. To reduce the errors,
h should be considered small. But Euler's method has less calculation complexity.

The Following graph depicts the numerical and exact solution of above differential equation for y 1.5  by Euler’s method
[2].

Figure II: Graph of Numerical and exact solution of equation y' = 2xy, y(1) = 1 for y(1.5) by Euler’s method.
Page | 127
Research Publish Journals
International Journal of Mathematics and Physical Sciences Research ISSN 2348-5736 (Online)
Vol. 7, Issue 2, pp: (124-131), Month: October 2019 - March 2020, Available at: www.researchpublish.com

C. Fourth Order Runge-Kutta Method

We start from ordinary differential equation y   f  x, y  with initial-value y  x0   y0 , the following formula is the
Euler’s method for numerical solution of ordinary differential equation [13].

yn 1  yn  hf  xn , yn  ...................... 1

Such that f is the function which is obtained from equation y   f  x, y  . h is a positive number or difference between xn

and xn 1 . Values of y1 , y2 ,..., yn are numerical solution of y  x  at x1 , x2 ,..., xn [14].

Basically, all Runge-Kutta methods are generalizations of the following basic Euler formula [7] [15]:

yn 1  yn  h  w1k1  w2 k2  ...  wm km  ....................... 2 

Values of w1 , w2 ,..., wm , i  1, 2,3,..., m are constant that generally satisfy w1  w2  ...  wm  1 and ki (i  1, 2,3,..., m) the
function f evaluated at a selected point  x, y  . The number m is called the order of the method.

Suppose if m  1, w1  1 and k1  f  xn , yn  , then we get the familiar Euler formula yn 1  yn  h f  xn , yn  . Hence Euler’s
method is said to be a first order Runge-Kutta method [16].

If we select m  1, 2,3, 4 in (2), then formula (3) with constants w1 , w2 , w3 , w4 , 1 ,  2 ,  3 and 1 ,  2 , 3 ,  4 , 5 ,  6 are
called fourth order Runge-Kutta method.

yn 1  yn  h( w1k1  w2 k2  w3 k3  w4 k4 ).............(3)

Where,

k1  f ( xn , yn )

k2  f ( xn  1h, yn  1hk1 )

k3  f ( xn   2 h, yn   2 hk1  3 hk2 )

k4  f ( xn   3 h, yn   4 hk1  5 hk2   6 hk3 )

In accordance with fourth degree polynomial of Taylor’s series of equation system from above parameters eleven
equations and thirteen unknowns will be formed which has infinite solutions. We can get the values of parameters after
solution of equation system as follows [16]:

h
yn 1  yn  (k1  2k2  2k3  k4 )
6

k1  f ( xn , yn )

1 1
k2  f ( xn  h, yn  hk1 )
2 2

1 1
k3  f ( xn  h, yn  hk2 )
2 2

k4  f ( xn  h, yn  hk3 )

e.g. find the numerical solution y 1.5  of ordinary differential equation y   2 xy, y (1)  1 with step size h  0.1 by fourth
order Runge-Kutta method.
Sol. For the sake of illustration let us compute the case when n  0 , from above formula we have:

k1  2 , k2  2.31 , k3  2.34255 , k4  2.715361

Page | 128
Research Publish Journals
International Journal of Mathematics and Physical Sciences Research ISSN 2348-5736 (Online)
Vol. 7, Issue 2, pp: (124-131), Month: October 2019 - March 2020, Available at: www.researchpublish.com

0.1 0.1
Then y1  y0  (k1  2k2  2k3  k4 )  1  [2  2(2.31)  2(2.34255)  2.715361]  1.23367435
6 6

i.e. . .

Similarly, values of y2 , y3 , y4 , y5 with exact solution and absolute error is shown in table 3 [17].

TABLE III: Numerical solution of equation y'=2xy, y(1)=1 by 4 th order Runge-Kutta method with step size h=0.1

Xn Exact Value Yn(RK4) Absolute Error


0000 000000 000000 000000
0000 003..1 003..1 000000
0030 005531 005531 000000
00.0 0099.1 0099.1 000000
00.0 301001 301001 000000
0050 .0.90. .0.903 000003

It can be observed in Table 3 that absolute error of the numerical solution of equation by fourth-order Rang-Kutta method
is zero or close to zero [16].

Following graph is the numerical and exact solution of above differential equation for y 1.5  by fourth order Runge-
Kutta method [2].

Figure III: Graph of Numerical and exact solution of equation y' = 2xy, y(1) = 1 for y(1.5) by fourth order Runge-
Kutta method.

IV. COMPARISON OF NUMERICAL SOLUTION METHODS

A. Comparison of Numerical Solutions of Differential Equation y   2 xy , y (1)  1 by Taylor, Euler and Fourth-
Order Rang-Kutta Method
The main criteria for comparing methods are the accuracy of the answers and the Volume rate of computation [18].

Table 4 shows the comparison of Numerical and exact solution of ordinary differential equation y   2 xy, y (1)  1 with
step size h  0.1 according to absolute errors by the above three methods.

Page | 129
Research Publish Journals
International Journal of Mathematics and Physical Sciences Research ISSN 2348-5736 (Online)
Vol. 7, Issue 2, pp: (124-131), Month: October 2019 - March 2020, Available at: www.researchpublish.com

TABLE IV: Numerical solution of equation y'=2xy, y(1)=1 by Taylor, Euler and fourth order Runge-Kutta method
with step size h=0.1

Xn Exact Value Yn(Taylor) Error Yn(Euler) Error Yn(RK4) Error


0000 000000 000000 000000 000000 000000 000000 000000
0000 003..1 1.2336 0.0001 003000 000..1 003..1 000000
0030 005531 1.5526 0.0001 00.1.0 000..1 005531 000000
00.0 0099.1 0099.1 0.0001 00.05. 0001.. 0099.1 000000
00.0 301001 301001 0.0001 303.1. 00.3.. 301001 000000
0050 .0.90. .0.903 000003 30931. 005131 .0.903 000003

Figure IV: Graph of Numerical and exact solution of equation y' = 2xy, y(1) = 1 for y(1.5) by Taylor, Euler and
fourth order Runge-Kutta method.

V. CONCLUSION
In this paper Taylor, Euler and Fourth-Order Rang-Kutta Methods for numerical solution of ordinary differential
equations and the comparison of numerical solutions of differential equation y   2 xy , y (1)  1 by mentioned methods
are discussed and the result shows that Taylor’s method has more accuracy but it requires long calculations, Euler’s
method is suitable method with less calculation but absolute errors in Euler’s method is more than other two methods and
this is one of the disadvantages of Euler’s method.

To reduce the errors, the value of h should be chosen small. Comparison of numerical and exact solutions shows that the
solution of differential equation by fourth-order Runge-Kutta method is very close to the exact equation and has less error.
Change of value h have effect on the numerical solution of differential equation by fourth order Runge-Kutta method, it
means if the value of h is selected small then numerical solution errors according exact errors will be less. The problem
with choosing a small value for h by fourth order Runge-Kutta method is that, it has more calculation and takes more
time. The advantage of choosing a small value for h is that the obtained solution has high accuracy and close to the
general solution. If the value of h is chosen large then the long calculation is prevented.

Page | 130
Research Publish Journals
International Journal of Mathematics and Physical Sciences Research ISSN 2348-5736 (Online)
Vol. 7, Issue 2, pp: (124-131), Month: October 2019 - March 2020, Available at: www.researchpublish.com

REFERENCES

[1] M. A. Akanbi, “A third order Euler method for numerical solution of ordinary differential equations,” ARPN Journal
of Engineering and Applied Sciences, vol. 5, pp. 42-49, 2010.

[2] J. Butcher, Numerical methods for ordinary differential equations, John Wiley & Sons, 2016.

[3] D. Barton, I. Willers and R. Zahar, “The automatic solution of systems of ordinary differential equations by the
method of Taylor series,” The Computer Journal, vol. 14, pp. 243-248, 1971.

[4] S. Fadugba, B. Ogunrinde and T. Okunlola, “Euler’s Method for Solving Initial Value Problems in Ordinary
Differential Equations,” The Pacific Journal of Science and Technology, vol. 13, pp. 152-158, 2012.

[5] X. Wu and J. Xia, “Study of general Taylor-like explicit methods in solving stiff ordinary differential equations,”
International Journal of Computer Mathematics, vol. 84, pp. 1795-1803, 2007.

[6] D. Zingg and T. Chisholm, “Runge–Kutta methods for linear ordinary differential equations,” Applied Numerical
Mathematics, vol. 31, pp. 227-238, 1999.

[7] D. Kondrat and D. Jacques, “Extended A-Stable two-step methods for the numerical solution of ordinary differential
equations,” International Journal of Computer Mathematics, vol. 42, pp. 117-124, 1992.

[8] T. E. Hull, W. H. Enright, B. M. Fellen and A. E. Sedgwick, “Comparing Numerical Methods for Ordinary
Differential Equations,” SIAM Journal on Numerical Analysis, vol. 9, pp. 603-637, 1972.

[9] N. Shawagfeh and D. Kaya, “Comparing Numerical Methods for the Solutions of Systems of Ordinary Differential
Equations,” Applied Mathematics Letters, vol. 17, pp. 323-328, 2004.

[10] F. Reverter and J. M. Oller, “A modified taylor series method for solving initialvalue-value problems in ordinary
differential equations,” International Journal of Computer Mathematics, vol. 65, pp. 231-246, 1997.

[11] R. L. Burden and J. D. Faires, Numerical analysis, Cengage Learning, 2010.

[12] C. Chicone, Ordinary differential equations with applications, vol. 34, Springer Science & Business Media, 2006.

[13] A. Q. M. Khaliq, “Numerical Methods for Ordinary Differential Equations,” London, 98 .

[14] W. Tang and Y. Sun, “Construction of Runge–Kutta type methods for solving ordinary differential equations,”
Applied Mathematics and Computation, vol. 234, pp. 179-191, 2014.

[15] L. F. Shampine, Numerical solution of ordinary differential equations, Routledge, 2018.

[16] D. G. Zill, Differential equations with boundary-value problems, Nelson Education, 2016.

[17] J. Butcher, “Numerical methods for ordinary differential equations in the 0th century,” Journal of Computational
and Applied Mathematics, vol. 125, pp. 1-29, 2000.

[18] U. M. Ascher, R. M. Mattheij and R. D. Russell, Numerical solution of boundary value problems for ordinary
differential equations, Siam, 1994.

Page | 131
Research Publish Journals

You might also like