### Comparison of Exact and Numerical Solutions with Special Attention to First Order Ordinary Differential Equations

Kassaye Bewketu Zellelew

#### Abstract

In this paper I solved three first-order ordinary differential equations (ode) both analytically and numerically using 4th order Runge-Kutta method (RK4). I selected differential equations which can also be solved analytically so as to compare the numerical solutions with the analytical solutions and see the accuracy of the 4th order RungeKutta method in solving ordinary differential equations of type linear, separable and exact. Both solutions were obtained by employing a computer program written in FORTRAN 90/95. The absolute errors associated with different step sizes have been calculated and the efficient step size for the three types of odes under consideration has been identified. I found out that this numerical method is computationally more efficient and very accurate in solving first-order ordinary differential equations of the three types. This is verified from the relatively small (negligible) differences between the numerical and analytical values (absolute errors).To illustrate the efficiency of the method and for better visualization of its accuracy, the numerical and analytical solutions were plotted against the independent variable. For the differential equations under consideration, the efficient step size (the one with smallest average absolute error) is h = 0.100. When the step size decreases from 0.500 to 0.100, both the relative and absolute errors show a slight decline but they show a slight rise when the step size decreases further from 0.1 to 0.02. This is due to over accumulation of round off errors. Given step size h = 0.100, 4th order Runge-Kutta method is found to be the most efficient for solving the linear ode. The possible reason for this is the relatively smallest degree (extent of nonlinearity) of the analytic solution associated with the linear ode. Further analysis should be made for detailed reasoning.

Key words: Numerical solution, analytic solution, Runge-Kutta method, efficient step size.

Full Text: PDF 