Comparison of Euler and Range-Kutta Methods in Solving Ordinary Differential

Comparison of Euler and Range-Kutta Methods in Solving Ordinary Differential

Leonardo Journal of Sciences Issue 32, January-June 2018 ISSN 1583-0233 p. 10-37 Comparison of Euler and Range-Kutta methods in solving ordinary differential equations of order two and four 1* 1 1 David I. LANLEGE , Rotimi KEHINDE , Dolapo A. SOBANKE , Abdulrahman ABDULGANIYU2, and Umar M. GARBA2 1Department of Mathematical Science, Federal University Lokoja P.M.B 115 Lokoja Kogi State, Nigeria. 2 Department of Mathematics/Computer Science, Ibrahim Badamasi Babangida University Lapai P.M.B 11 Lapai Niger State, Nigeria. E-mail(s): [email protected] (DIL); [email protected] (REK); [email protected] (UMG) * Corresponding author, phone: +2348030528667, +2348131235684 Abstract The purpose of this to produce efficient numerical methods with the same order of accuracy as that of the main starting values for exact solutions of fourth order differential equation without reducing it to a system of first order differential equations. The methods of the differential systems arising from the approximate solution to the problem are adopted using the Runge-Kutta method and stages. The methods were compared and contrasted based on the results obtained. The comparison shows that Euler method gives accurate approximate result than Runge-Kutta method. After the derivation of the formulae of O(h2), the comparison was done in regards to identify the formula with higher accuracy. Keywords Numerical Analysis; Numerical Approximation; Exact Solution; Accuracy; Runge-Kutta and Euler 10 http://ljs.academicdirect.org/ Leonardo Journal of Sciences Issue 32, January-June 2018 ISSN 1583-0233 p. 10-37 Introduction Numerical analysis is a branch of mathematics that deals with the study of methods and procedures used to obtain approximate solutions to mathematical problems. EndreSull and David Mayer defined the numerical analysis as a branch of mathematics that provides the theoretical foundation for the numerical algorithm we rely on to solve a multitude of computational problem in mathematical models or the study of algorithms that use numerical approximation (as opposed to general symbolic manipulations) for the problems of mathematical analysis [1]. Numerical analysis naturally finds applications in all fields of engineering and the physical science, but in this 21st century, the life science and even the arts have adopted elements of scientific computations [2]. The overall goals of the field of numerical analysis in the design and analysis of techniques to give approximate but accurate solution are hard to get. It is therefore, important to be able to estimate the error involved in such approximation. Thus, the aims of this work was to compare between Euler and Runge-Kutta methods to a rigorous analysis in order to demonstrate the efficiency of the methods to other similar techniques. It was also examine the effect of the steps on the accuracy of the techniques. Euler’s method is more preferable than Runge-Kutta method because it provides slightly better results. Its major disadvantage is the possibility of having several iterations that result from a round-error in a successive step. Secularity band differences in the results of some numerical methods with the standard Euler’s method of order three and four was examined. Material and method Euler method In mathematics and computational science, the Euler method is a first-order numerical procedure for solving ordinary differential equation (ODEs) with a given initial value. It is the most basic explicit method of numerical integration of ordinary differential equation and is 11 Comparison of Euler and Range-Kutta methods in solving ordinary differential equations of order two and four David I. LANLEGE, Rotimi KEHINDE, Dolapo A. SOBANKE, Abdulrahman ABDULGANIYU, Umar M. GARBA the simplest Runge-Kutta method. The Euler method is named after Leonhard Euler (1707) [3]. Two approaches named standard Euler method and modified Euler method are known. Standard Euler method The standard Eular method which is the first order Runge-Kutta method was derive by Leonarhd Euler (1707-1783) [4]. Consider the initial value problem, the first order ' y() x,,; y= f () x y y () x0= y 0 (1) where y' is the first order differential equation; f( x, y) is the function of x and y; y is the solution to the differential equation in equation (1) at x0 given as y0 ; y0 is the value of y obtained at x0 and x0 is the point for which y is obtained as y0 y' () x− x y'' () x− x2 y''' ( x− x )3 y() x= y + 0 + 0 + 0 (2) 0 !1 !2 !3 Thus, y() x1 = y ( x0 + h ) (3) hy' () x h2 y '' ( x) h3 y ''' ( x) hNN y( x ) y()() x+ h = y x +0 + 0 + 0 + ... 0 (4) 0 0 1! 2! 3! N! Let n =1 ' y() x1 = y () x0 + hy () x0 (5) equation (5) is the same as y1= y 0 + hf( x0, y 0 ) (6) y2= y 1 + hf() x1, y 1 (7) y3= y 2 + hf( x2, y 2 ) (8a) yn+1 = y n + hf( xn, y n ) (8b) Equation (8b) is known as standard Euler method. Leonardo Journal of Sciences Issue 32, January-June 2018 ISSN 1583-0233 p. 10-37 Modified Euler method This method is a second order Runge-Kutta [5]. The convergence in this method is higher due to a higher degree of accuracy as compared to the standard Euler. 1 y= y + hf[()( x, y+ f x + y )] ( ) 9 n+1 n 2 n n n+1 n + 1 DERIVATION: Considering the Taylors series of y( xn+1 ) about h given by hy' h 2 y '' h 3 y ''' hN y n y())( x+ h = y x +n +n +n +... n ( ) 0 1 0 0 1! 2! 3! N! Truncating when n = 2 hy' h 2 y '' y() x= y +n + n ( ) 1 1 n n 1! 2! From the definition of derivatives ' yn = f(x n, y n ) ( ) 2 1 ' ∗ ' '' y h( x+ h) − y() x ∗ ∗ f( x, y ) y ≅ n n =f() x + h, y() x + h − n n (13) n h∗ n n h∗ Thus, ∗ ∗ y( xn + h) = yn + h f( x n, y n ) ) (41 f( x, y ) y'' ≅ f() x + h∗ , y() x + h∗ − n n )( 5 1 n n n h∗ '' ' Substitute yn and yn into equation (6): h2 yn+1 = y n + hf() xn, y n + (16) ⎛ ∗ ∗ f() xn, y n ⎞ 2⎜ f() xn + h , y() xn + h − ⎟ ⎝ h∗ ⎠ Let h∗ = ah )( 7 1 Then we have 2 h ⎛ f( xn + ah, yn + ahf( xn, y n ))⎞ yn+1 = y n + hf() xn, y n + ⎜ ⎟ )( 8 1 2 ⎝ ah ⎠ h y= y + hf() x, y +()f() x + ah, y + ahf()() x,, y− f x y (19) n+1 n n n 2a n n n n n n 13 Comparison of Euler and Range-Kutta methods in solving ordinary differential equations of order two and four David I. LANLEGE, Rotimi KEHINDE, Dolapo A. SOBANKE, Abdulrahman ABDULGANIYU, Umar M. GARBA h ⎛ h ⎞ yn+1 = y n + hf() xn, y n + ⎜ f() xn + ah, yn + ahf() xn, y n − f() xn, y n ⎟ (20) 2a ⎝ 2a ⎠ h h y= y + hf() x, y − f() x, y +()f() x + ah, y + ahf() x, y (21) n+1 n n n 2a n n 2a n n n n ⎛ h ⎞ h yn+1 = y n + hf() xn, y n ⎜ 1− ⎟ +()f() xn + ah, yn + ahf() xn, y n (22) ⎝ 2a ⎠ 2a Equation (22) can be written as yn+1 = y n + c1 k 1 + c 2 k 2 ( ) 3 2 where ⎛ 1 ⎞ c1 = h⎜1 − ⎟ ( ) 4 2 ⎝ 2a ⎠ ⎛ 1 ⎞ c2 = h⎜ ⎟ ( ) 5 2 ⎝ 2a ⎠ k1 = f( x n, y n ) ( ) 6 2 k2 = f( xn + ah, yn + ahk 1 ) ( ) 7 2 Let 1 a = ( ) 8 2 2 ⎛ ⎞ ⎜ 1 ⎟ c= h⎜1 − ⎟ =h()1 − 1 = 0 ( ) 9 2 1 ⎜ 1 ⎟ ⎜ 2 ⎟ ⎝ 2 ⎠ ⎛ ⎞ ⎜ ⎟ h c = ⎜ ⎟ = h ( ) 0 3 2 ⎜ ⎛ 1 ⎞ ⎟ ⎜ 2⎜ ⎟ ⎟ ⎝ ⎝ 2 ⎠ ⎠ k1 = f( x n, y n ) ( ) 1 3 ⎛ 1 1 ⎞ k2 = f⎜ xn + h, yn + hk1 ⎟ ( ) 2 3 ⎝ 2 2 ⎠ Hence, ⎛ 1 1 ⎞ yn+1 = y n + hf⎜ xn + h, yn + hk 1 ⎟ ( ) 4 3 ⎝ 2 2 ⎠ OR Leonardo Journal of Sciences Issue 32, January-June 2018 ISSN 1583-0233 p. 10-37 1 y= y + hf[()( x, y+ f x + y ) ] ( ) 5 3 n+1 n 2 n n n+1 n + 1 Runge-Kutta method The Runge-Kutta method is also a second order Runge-Kutta Method using Taylors series expansion to derive it, like modified Euler’s method [6]. From equation (22) ⎛ h ⎞ h yn+1 = yn + hf() xn, y n ⎜ 1− ⎟ + ()f( xn + ah, yn + ahf( xn, y n )) (36) ⎝ 2a ⎠ 2a Equation (36) can be written as yn+1 = y n + c1 k 1 + c 2 k 2 ( ) 7 3 where: ⎛ 1 ⎞ c1 = h⎜1 − ⎟ ( ) 8 3 ⎝ 2a ⎠ ⎛ h ⎞ c2 = ⎜ ⎟ ( ) 9 3 ⎝ 2a ⎠ k1 = f( x n, y n ) ( ) 0 4 k2 = f( xn + ah, yn + ahk 1 ) ( ) 1 4 Let 2 a = ( ) 2 4 3 ⎛ ⎞ ⎜ ⎟ 1 ⎟ ⎛ 3 ⎞ ⎛ 1 ⎞ 1 c1 = h⎜1 − =h⎜1 − ⎟ = h⎜ ⎟ = h ( ) 3 4 ⎜ 2 ⎟ ⎝ 4 ⎠ ⎝ 4 ⎠ 4 ⎜ 2 ⎟ ⎝ 3 ⎠ ⎛ ⎞ ⎜ ⎟ h3 h c = ⎜ ⎟ = ( ) 4 4 2 ⎜ ⎛ 2 ⎞ ⎟ 4 ⎜ 2⎜ ⎟ ⎟ ⎝ ⎝ 3 ⎠ ⎠ k1 = f( x n, y n ) ( ) 5 4 ⎛ 2 2 ⎞ k2 =f⎜ x n +h, y n + hk1 ⎟ ( ) 6 4 ⎝ 3 3 ⎠ 15 Comparison of Euler and Range-Kutta methods in solving ordinary differential equations of order two and four David I. LANLEGE, Rotimi KEHINDE, Dolapo A. SOBANKE, Abdulrahman ABDULGANIYU, Umar M. GARBA 1 3h ⇒y = y + hf() x , y +(f( x + ah, y + ahk )) )( 7 4 n+ 1 n 4 n n 4 n n 1 1 3h ie: y= y + hk + k ( ) 8 4 n+1 n 4 1 4 2 h thus: y= y +(k+ 3 k ) ( ) 9 4 n+1 n 4 1 2 Third-stage Runge-Kutta method The third-stage Runge-Kutta method express how formulations of k iterations are obtained.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    28 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us