Study of Numerical solution-8579
Study of Numerical solution-8579
Vol. 7, Issue 2, pp: (124-131), Month: October 2019 - March 2020, Available at: www.researchpublish.com
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
ba
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
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.
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!
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. . .
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. . .
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
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
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.
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
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
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
Basically, all Runge-Kutta methods are generalizations of the following basic Euler formula [7] [15]:
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 )
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:
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
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.
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
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.
[12] C. Chicone, Ordinary differential equations with applications, vol. 34, Springer Science & Business Media, 2006.
[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.
[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