J. Nig. Soc. Phys. Sci. 2 (2020) 120–127 Journal of the Nigerian Society of Physical Sciences Original Research An Examination of a Second Order Numerical Method for Solving Initial Value Problems S. E. Fadugbaa,∗, S. N. Ogunyebia, B. O. Falodunb aDepartment of Mathematics, Ekiti State University, Ado Ekiti, Ekiti State bDepartment of Mathematics, University of Ilorin, Kwara State Abstract This paper presents an examination of a Second Order Convergence Numerical Method (SOCNM) for solving Initial Value Problems (IVPs) in Ordinary Differential Equations (ODEs). The SOCNM has been derived via the interpolating function comprises of polynomial and exponential forms. The analysis and the properties of SOCNM were discussed. Three numerical examples have been solved successfully to examine the performance of SOCNM in terms of accuracy and stability. The comparative study of SOCNM, Improved Modified Euler Method (IMEM), Fadugba and Olaosebikan Scheme (FOS) and the Exact Solution (ES) is presented. By varying the step length, the absolute relative errors at the final nodal point of the associated integration interval are computed. Furthermore, the analysis of the properties of SOCNM shows that the method is consistent, stable, convergent and has second order accuracy. Moreover, the numerical results show that SOCNM is more accurate than IMEM and FOS and also compared favourably with the ES. By varying the step length, there are two-order decrease in the values of the final absolute relative errors generated via SOCNM. Hence, SOCNM is found to be accurate, stable and a good tool for the numerical solutions of IVPs of different characteristics in ODEs. Keywords: Absolute relative error, accuracy, comparative study, stability. Article History : Received: 20 April 2020 Received in revised form: 31 May 2020 Accepted for publication: 04 June 2020 Published: 01 August 2020 c©2020 Journal of the Nigerian Society of Physical Sciences. All rights reserved. Communicated by: B. J. Falaye 1. Introduction Most of the real world problems in science and engineering are modelled and formulated by means of differential equations. Some of these differential equations cannot be solved analyti- cally or difficult to obtain their exact solutions. One way is to use numerical methods for approximating the solution of the differential equations using prescribed initial or boundary con- ditions. In the recent years, many numerical methods of various ∗Corresponding author tel. no: +2348067032044 Email address: sunday.fadugba@eksu.edu.ng (S. E. Fadugba ) nature have been developed for the solution of IVPs in ODEs of the form dy d x = f (x, y), y(a) = y0, −∞ < y < ∞, a ≤ x ≤ b (1) such as the Euler’s method, improved Euler’s method, Runge- Kutta methods and so on. In [1], the authors developed a new one-step scheme for the solution of IVPs in ODEs. Ahmad et al. [2] studied the numerical accuracy of the Runge-Kutta method of second, third and fourth order for the numerical solution of differential equations. Fadugba and Idowu [3] derived a new numerical method of third order accuracy via the transcendental function of exponential type for the solution of IVPs in ODEs. 120 Fadugba et al. / J. Nig. Soc. Phys. Sci. 2 (2020) 120–127 121 They also analysed the properties of the derived method. In [4], accurate solutions of IVPs of ODEs with fourth order Runge Kutta method were presented. Islam [5] compared the numer- ical solutions of IVPs for ODEs with Euler’s and Runge-Kutta methods. Refs. [6, 7, 8, 9, 10] also studied the numerical solu- tions of IVPs in ODEs via several developed methods. In this paper, the performance of SOCNM in terms of accuracy and stability, that provides numerical solutions to IVPs in ODEs is examined. The SOCNM is implemented on some selected IVPS of different characteristics in ODEs. The rest of the paper is structured as follows; Section Two presents the analysis and the properties of SOCNM. In Section Three, three numerical examples were solved via SOCNM in the context of the IMEM [13], FOS [14] and ES. Section Four concludes the paper with the discussion of results. 2. Analysis and the Properties of a Second Order Conver- gence Numerical Method This section presents the analysis and properties of SOCNM as follows. 2.1. Analysis of SOCNM Consider the IVP given by (1) whose exact solution is ob- tained as y(x). In [1], a new numerical method of one step of the form yn+1 = yn + h ( fn + f (1) n ) + ( e−h − 1 ) f (1)n (2) was proposed and developed by means of the interpolating func- tion of exponential and polynomial types F(x) = 1∑ i=0 ai x i + a2e −x (3) for the numerical solution of (1). Simplifying further, (2) be- comes yn+1 = yn + h fn + ( h + e−h − 1 ) f (1)n (4) The mesh point is defined as xn+1 = a + (n + 1)h, n = 0, 1, 2, ... and the step length is defined as h = b−aN , where N is the number of integration steps. 2.2. Properties of SOCNM The properties of SOCNM such as accuracy, consistency, stability and convergence are discussed as follows: 2.2.1. Accuracy of SOCNM Consider the Taylor’s series expansion for the exact solution y(x) given by y(xn + h) = y(xn) + h f (xn, y(xn)) + h2 2! f (1) (xn, y(xn)) + h3 3! f (2) (xn, y(xn)) + O(h 4) (5) The local truncation error is given by Tn+1 = y(xn + h) − yn+1 (6) Substituting (4) and (5) into (6) yields Tn+1 = y(xn) + h f (xn, y(xn)) + h2 2! f (1)(xn, y(xn)) + h3 3! f (2)(xn, y(xn)) + O(h 4) − [ yn + h fn + (h + e −h − 1) f (1)n ] (7) Simplifying further and by means of the localizing assumption (that is, assume that no errors have been committed), (7) be- comes Tn+1 = h3 3! [ f (2)(xn, y(xn)) + f (1)(xn, y(xn)) ] + O(h4) (8) which is the local truncation error for SOCNM. Hence, (8) con- firms the second order accuracy of SOCNM. 2.2.2. Consistency of SOCNM According to [15], a one step numerical method is said to be consistent if it has at least order p = 1. It is clearly seen from (8) that SOCNM is consistent since it has second order accuracy and that lim h→0 Tn+1 h = lim h→0  h3 3! [ f (2)(xn, y(xn)) + f (1)(xn, y(xn)) ] + O(h4) h  = 0 2.2.3. Stability of SOCNM According to [15], a one step numerical method is said to be stable if it is capable of damping out small fluctuation carried out in input data. To discuss the stability of SOCNM, consider the IVP of the form dy d x = −φy, y(0) = 1 (9) The exact solution of (9) is obtained as y(x) = e−φx, φ > 0 (10) where φ is a complex constant. Expanding (10) at the points x = xn and x = xn+1 and using the fact that h = xn+1 − xn, one obtains y(xn) = e −φxn (11) 121 Fadugba et al. / J. Nig. Soc. Phys. Sci. 2 (2020) 120–127 122 and y(xn+1) = e −φxn+1 = e−φxn e−φh = y(xn)e −φh (12) Using SOCNM and the series expansion of e−h, one obtains yn+1 = yn [ 1 −φh + φ2h2 2! ] (13) Setting A = [ 1 − z + z2 2! ] , z = φh (14) Equation (13) becomes yn+1 = Ayn (15) Comparing (12) and (15), it is clearly seen that (14) consists of the first-three terms of the series expansion of e−φh. Hence, the stability function of SOCNM requires that ‖A‖ < 1 (16) Equation (16) shows that SOCNM is stable. 2.2.4. Convergence of SOCNM According to [16], the necessary and sufficient conditions for convergence are consistency and stability. In other words, a one step numerical method is said to be convergent if it is con- sistent and stable. It is clearly seen that SOCNM is convergent since it is consistent and stable. The convergence of SOCNM is of second order. 3. Numerical Examples Here, the performance of SOCNM in terms of the accu- racy and stability is examined. Also the comparative study of SOCNM, IMEM given by yn+1 = yn + hk3, where k1 = f (xn, yn), k2 = f (xn, yn + k1), k3 = f ( xn + h 2 , yn + h 2 k2 ) , FOS given by yn+1 = yn + ( h + h2 + 23 h 3 ) fn and ES is presented. All the cal- culations were carried out with the aid of computational soft- ware ”MATLAB R2014a, 8.3.0.552, 32 bit (win 32)” in double precision. Problem 1 Consider the IVP of the form dy d x − x sin(x) = 0, y(0) = 1, x ∈ [0, 1] whose exact solution is given by y(x) = 1 + x sin(x) − x cos(x) Problem 2 Consider the IVP of the form dy d x − 1 − (y − x)2 = 0, y(0) = 1 2 , x ∈ [0, 1] whose exact solution is given by y(x) = x + 1 2 − x Problem 3 Consider the Riccati equation coupled with the initial value given by dy d x + 4 − 4y + y2 = 0, y(0) = 1, x ∈ [ 0, 2 5 ] whose exact solution is given by y(x) = 2x − 1 x − 1 and has a pole in x = 1. The results generated via the SOCNM, IMEM, FOS in the con- text of ES for Problems 1-3 are displayed in the Figures 1- 18. The comparative results analyses of SOCNM, IMEM, FOS and ES for Problems 1-3 with h = 0.1 are shown in Figures 19,21,23, respectively. The absolute relative errors (AREs) gen- erated via SOCNM, IMEM and FOS with h = 0.1 for Problems 1-3 are displayed in Figures 20,22,24, respectively. The rel- ative absolute errors (FAREs) generated via SOCNM, IMEM and FOS for Problems 1-3 at the final nodal point of the asso- ciated integration interval with different values of step length, h = 0.1, 0.01, 0.001, 0.0001, 0.00001 are displayed in the Fig- ures 25,26,27, respectively. Figure 1. The results generated via SOCNM and ES for Problem 1 122 Fadugba et al. / J. Nig. Soc. Phys. Sci. 2 (2020) 120–127 123 Figure 2. The ARE generated via SOCNM for Problem 1 Figure 3. The results generated via IMEM and ES for Problem 1 Figure 4. The ARE generated via IMEM for Problem 1 Figure 5. The results generated via FOS and ES for Problem 1 Figure 6. The ARE generated via FOS for Problem 1 Figure 7. The results generated via SOCNM and ES for Problem 2 123 Fadugba et al. / J. Nig. Soc. Phys. Sci. 2 (2020) 120–127 124 Figure 8. The ARE generated via SOCNM for Problem 2 Figure 9. The results generated via IMEM and ES for Problem 2 Figure 10. The ARE generated via IMEM for Problem 2 Figure 11. The results generated via FOS and ES for Problem 2 Figure 12. The ARE generated via FOS for Problem 2 Figure 13. The results generated via SOCNM and ES for Problem 3 124 Fadugba et al. / J. Nig. Soc. Phys. Sci. 2 (2020) 120–127 125 Figure 14. The ARE generated via SOCNM for Problem 3 Figure 15. The results generated via IMEM and ES for Problem 3 Figure 16. The ARE generated via IMEM for Problem 3 Figure 17. The results generated via FOS and ES for Problem 3 Figure 18. The ARE generated via FOS for Problem 3 Figure 19. The comparative results analyses of SOCNM, IMEM, FOS and ES for Problem 1 125 Fadugba et al. / J. Nig. Soc. Phys. Sci. 2 (2020) 120–127 126 Figure 20. The AREs generated via SOCNM, IMEM and FOS for problem 1 Figure 21. The comparative results analyses of SOCNM, IMEM, FOS and ES for Problem 2 Figure 22. The AREs generated via SOCNM, IMEM and FOS for problem 2 Figure 23. The comparative results analyses of SOCNM, IMEM, FOS and ES for Problem 3 Figure 24. The AREs generated via SOCNM, IMEM and FOS for problem 3 Figure 25. The FAREs generated via SOCNM, IMEM and FOS with varying step length values for problem 1 126 Fadugba et al. / J. Nig. Soc. Phys. Sci. 2 (2020) 120–127 127 Figure 26. The FAREs generated via SOCNM, IMEM and FOS with varying step length values for problem 2 Figure 27. The FAREs generated via SOCNM, IMEM and FOS with varying step length values for problem 3 4. Conclusion In this paper, an examination of SOCNM for solving IVPs in ODEs is presented. The SOCNM has been derived via the interpolating function comprises of polynomial and exponen- tial forms. The analysis and the properties of SOCNM were discussed extensively. Three numerical examples were solved successfully to examine the performance of SOCNM in terms of accuracy and stability. The comparative study of SOCNM, IMEM, FOS and ES is presented. By varying the step length, the absolute relative errors at the final nodal point of the as- sociated integration interval are computed. Furthermore, the analysis of the properties of SOCNM shows that the method is consistent, stable, convergent and has second order accuracy. The comparative study of the results generated via SOCNM, IMEM, FOS and ES is displayed in Figures 1-18. Moreover, the numerical results show that SOCNM is more accurate than its counterparts, compared favourably and agreed with ES as seen in the Figures 19,21,23. It is also observed from Figures 20,22,24 that the error curves for SOCNM show that SOCNM follows the ES curves elegantly. Also, by varying the step length (h = 0.1, 0.01, 0.001, 0.0001, 0.00001), it is observed from Figures 25-27 that there are two-order decrease in the val- ues of the final absolute relative errors generated via SOCNM. Hence, SOCNM is found to be accurate, stable and a good ex- plicit method for the numerical solutions of IVPs of different characteristics in ODEs. References [1] S. Fadugba & B. Falodun, “Development of a new one-step scheme for the solution of initial value problem (IVP) in ordinary differential equa- tions”, International Journal of Theoretical and Applied Mathematics, 3 (2017) 58. [2] N. Ahmad, S. Charan & V. P. Singh, “Study of numerical accuracy of Runge-Kutta second, third and fourth order method”, International Jour- nal of Computer and Mathematical Sciences, 4 (2015) 111. [3] S. E. Fadugba & J. O. Idowu, “Analysis of the properties of a third or- der convergence numerical method derived via transcendental function of exponential form”, International Journal of Applied Mathematics and Theoretical Physics, 5 (2019) 97. [4] Md. A. Islam, “Accurate solutions of initial value problems for ordinary differential equations with fourth order Runge Kutta method”, Journal of Mathematics Research, 7 (2015) 41. [5] Md. A. Islam, “A comparative study on numerical solutions of initial value problems (IVP) for ordinary differential equations (ODE) with Euler and Runge Kutta methods”, American Journal of Computational Mathematics, 5 (2015) 393. [6] Y. Ansari, A. Shaikh & S. Qureshi, “Error bounds for a numerical scheme with reduced slope evaluations”, J. Appl. Environ. Biol. Sci., 8 (2018) 67. [7] J. C. Butcher, Numerical methods for ordinary differential equations, 3rd Edition, John Wiley & Sons, Chichester, West Sussex, 2016. [8] M. E. Davis, Numerical methods and modeling for chemical engineers, Courier Corporation, New York, 2013. [9] S. E. Fadugba & J. T. Okunlola, “Performance measure of a new one-step numerical technique via interpolating function for the solution of initial value problem of first order differential equation”, World Scientific News, 90 (2017) 77. [10] S. E. Fadugba & A. O. Ajayi, “Comparative study of a new scheme and some existing methods for the solution of initial value problems in or- dinary differential equations”, International Journal of Engineering and Future Technology, 14 (2017) 47. [11] J. D. Lambert, Numerical methods for ordinary differential systems: the initial value problem, John Wiley & Sons, Inc., New York, 1991. [12] S. Fadugba & S. Qureshi, “Convergent numerical method using transcen- dental function of exponential type to solve continuous dynamical sys- tems”, Punjab University Journal of Mathematics, 51 (2019) 45. [13] O. Abraham, “Improving the modified Euler method”, Leonardo J. Sci., 10 (2007) 1. [14] S. E. Fadugba & T. E. Olaosebikan, “Comparative study of a class of one- step methods for the numerical solution of some initial value problems in ordinary differential equations”, Research Journal of Mathematics and Computer Science, 2 (2018) 1. [15] J. D. Lambert, Computational methods in ordinary differential equations, John Wiley & Sons Inc., 1973. [16] J. D. Lambert, Numerical methods for ordinary differential systems: the initial value problem, John Wiley & Sons, Inc., New York, 1991. 127