Comparison of Numerical Methods for System of First Order Ordinary Differential Equations

In this paper three numerical methods are discussed to find the approximate solutions of a systems of first order ordinary differential equations. Those are Classical Runge-Kutta method, Modified Euler method and Euler method. For each methods formulas are developed for n systems of ordinary differential equations. The formulas explained by these methods are demonstrated by examples to identify the most accurate numerical methods. By comparing the analytical solution of the dependent variables with the approximate solution, absolute errors are calculated. The resulting value indicates that classical fourth order Runge-Kutta method offers most closet values with the computed analytical values. Finally from the results the classical fourth order is more efficient method to find the approximate solutions of the systems of ordinary differential equations.


Introduction
Many physical phenomenon in sciences and engineering are modeled by using a systems of n first order ordinary differential equations defined by [1,2,3] as dy 1 dx = f 1 (x, y 1 , y 2 , ..., y n ) dy 2 dx = f 2 (x, y 1 , y 2 , ..., y n ) . . . dy n dx = f n (x, y 1 , y 2 , ..., y n ) Where each equation represents the first derivative of each unknown functions as a mapping depending on the independent variable x, and n unknown functions f 1 , f 2 , ..., f n and the initial conditions f 1 (x 0 ), f 2 (x 0 ), ..., f n (x 0 ) are prescribed.
The comparison between a domain decomposition method and Runge Kutta methods for system of ordinary differential equation was analysed by [4]. An n th order initial value problems could be also reduced to a systems of n first order ordinary differential equations discussed by [5,6]. A second order initial value problem is reduced to two first order systems and solved by fourth order and Butcher's fifth order Runge Kutta Methods [7].
The main purpose of this paper is to compare the numerical methods by obtaining the approximate solutions of a systems of first order ordinary differential equations. Section 2, deals on the detail discussion and derivation of numerical methods. Section 3, emphasizes on the computational aspects. And finally a conclusion is given in the last section.

Euler's Method
An Euler method for a single equation is elaborated and explained in [2,3,5,6,8,9,10,11] as From (2) it could be deduced the iterative formula for systems of n differential equations and has the following form y 1,i+1 = y 1,i + hf 1 (x i , y 1,i , y 2,i ....y n,i ) That is if we know the entire vector y of the unknown functions at the point x = x i , then we can find the entire vector of unknown functions at the next point x i+1 = x i +h by means of (3).
That is From (3) for each iteration it need the computation of n equations.
For demonstration purpose consider a systems of two ordinary differential equations, then Euler methods results the following at each step we compute the vector of approximate values of the two unknown functions from the corresponding vector at the immediately preceding step.

Modified Euler's Method
A modified Euler method for a single ordinary differential equation is discussed and implemented by the authors [2, 3, 5, 6, 10, 12] and given by where Extending (4) for a systems of n differential equations we obtained where and As seen from (5), (6) and (7) we observed that the computation for every iteration needs in solving 3n equations.

Computational Aspects
A test problem is chosen to numerically validate the comparison of the methods to solve systems of ordinary differential equations. For this purpose I used a systems of two first order ordinary differential equation of the form: y 1 = y 1 + 3y 2 y 2 = 2y 1 + 2y 2 with initial conditions y 1 (0) = 5 and y 2 (0) = 0. And the analytical solution of this systems is y 1 (x) = 3e −x + 2e 4x and y 2 (x) = −2e −x + 2e 4x .
Solving this systems numerically by the above methods for some specific step size h = 0.05 for the independent variable x and applying Matlab codes described by the authors [3,14,15] leads the following tables of results for each dependent variable y 1 and y 2 . The solution for the dependent variable y 1 and y 2 are separately solved using Euler, Modified Euler and classical fourth order Runge Kutta method.
By comparing the approximate result with the analytical solution and by taking small step size the absolute error is calculated. The results obtained from the two tables, reflects that the fourth order Runge-Kutta method is the best mechanism of solving system of first order ordinary differential equations using numerical method similar to that of a single ordinary differential equations.

Conclusion
In this paper ,three numerical methods were applied to the system of first order ordinary differential equations. Upon solving the systems by Euler method, Modified Euler method and classical fourth order Runge-Kutta methods, the error arise from each method has significant difference. Comparing among the results the accuracy of the classical fourth order Runge-Kutta method is very high and almost the same with the analytical solution. The accuracy sequence in decreasing order becomes classical fourth order,Modified Euler and Euler respectively even if the computational cost was different.