Comparison between standard and non-standard finite difference methods for solving first and second
order ordinary differential equations
A. R. Yaghoubi 1*, H. Saberi Najafi 2
1 Department of Applied Mathematics, School of Mathematical Sciences, University of Guilan, University Campus2, Rasht, Iran, Faculty Member of Islamic Azad University, Saravan Branch, Saravan, Iran
2 Department of Applied Mathematics, School of Mathematical Sciences, University of Guilan, Rasht, Iran
*Corresponding author E-mail: email@example.com
Copyright © 2015 A. R. Yaghoubi, H. Saberi Najafi. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
In this paper, we solve some first and second order ordinary differential equations by the standard and non-standard finite difference methods and compare results of these methods. Illustrative examples have been provided, and the results of two methods compared with the exact solutions.
Ronald Mickens began developing numerical schemes using nonstandard finite difference (NSFD) schemes for solving physical problems. The fundamental of this method is centered on two rules :
i) The discrete first-order derivative must take a more general form than that used in standard discretization, i.e.
Where and are known, respectively, as the numerator and denominator functions, having the properties
The second-order derivative discrete in the following form
ii) Both linear and nonlinear terms involving the dependent variable may require "nonlocal" discretization; for example
The full details about these procedures are given in [11-16]. The nonstandard finite difference scheme has developed as an alternative method for solving a wide range of problems whose mathematical models involve algebraic, differential, biological models and chaotic systems ,  and [4-10].
In this work, we compare non-standard finite difference (NSFD) and standard finite difference (FD) schemes for solving ordinary differential equations. Some famous equations such as Dynamic, Logistic, Lane-Emden and Airy equations have been provided. Solution of Airy equation which is a special case of Storm-Liouville equation  can't be displayed based upon primary functions. We use the series solutions' method to find the power series solution for this second-order linear differential equation and compare NSFD and FD methods with the power series solution.
2. Numerical examples
In this section, we apply NSFD and FD methods to obtain numerical solutions for first and second order ordinary differential equations.
2.1. First order ODE
Example 1: Consider the following first order ODE
The exact solution of (6) is
Where and have the properties (2). In this example, we choose the numerator and denominator functions as follows:
Therefore, we have.
In figure 1 the results of equations (9) and (12) are compared with the exact solution (8) with and
Fig. 1: Numerical Solutions of NSFD and FD Methods for Solving Equation (6) with (A) and (B).
Consider the following first order ODE
The exact solution of (13) is
We have the following FD and NSFD schemes respectively for solving (13)
In figure 2 the results of equations (15) and (16) are compared with the exact solution (14) with
Fig. 2: Numerical Solutions of NSFD and FD Methods for Solving Equation (13) with
Consider the following general nonlinear first order dynamic equation with the initial condition
Where n is a positive integer, when equation (17) becomes a logistic differential equation.
The exact solution of (18) is.
We use the following NSFD scheme for solving (18).
In figure 3, the results of the non-standard scheme (20) is compared with the following standard scheme.
Fig. 3: Numerical Solutions of NSFD and FD Methods for Solving Equation (18) with (A) and (B).
In general, we have the following non-standard discretization equation for the equation (17)
For we have the following scheme
The exact solution of equation (18) for is
In figure 4 we compared the standard and non-standard finite difference methods with the exact solution of equation (17) for 1.
Fig. 4: Numerical Solutions of NSFD and FD Methods with (A) and (B) for Solving Equation (17) with
2.2. Second order ODE
Consider the following second order ODE
With the following initial conditions,
Equation (25) is called Lane-Emden equation. This equation describes the temperature variation of a spherical gas cloud under the mutual attraction of its molecules and subject to the laws of classical thermodynamics. The polytrophic theory of stars essentially follows out of thermodynamic considerations that deal with the issue of energy transport, through the transfer of material between different levels of the star. This equation is one of the basic equations in the theory of stellar structure and has been focused in many studies.
In equation (25) for andwith the following initial conditions we have.
For solving (28) we construct the following NSFD scheme.
After some manipulation we have
In this example the denominator functions for first and second order derivative are respectively,
Note that and satisfied relations (2) and (4). The numerator function is
In figure 5, the result of scheme (29) is compared with the following standard scheme.
Fig. 5: Numerical Solutions of NSFD and FD Methods for Solving Equation (27) with
Consider the following Lane-Emden type equation.
The exact solution of (32) is
For solving (32) we have
In this case, we choose and as follow:
In figure 6, the result of scheme (35) is compared with the following standard scheme.
Fig. 6: Numerical Solutions of NSFD and FD Methods for Solving Equation (32) with
Consider the following second order ODE
This equation is called Airy differential equation. The solution for this equation can't be display based upon in primary functions. We use the series solution's method to find a power series solution for this second-order linear differential equation. The general form of power series is.
Therefore, we have.
By substituting (40) and (41) in (39), after some algebraic manipulation, we obtain the following power series solution.
From the initial conditions, we obtain we will compare solutions of FD and NSFD methods with the equation (42). We have the following non-standard scheme for solving equation (39)
by solving (43) in we have.
A standard scheme for equation (39) is
In figure 7 we compared the standard and non-standard finite difference methods for with the power series solution of equation (39), we supposed that in equation (42), n changes from 1 to 1000.
Fig. 7: Numerical Solutions of NSFD and FD Methods for Solving Equation (39) with
In this paper, we have presented the efficiency of non-standard finite difference method in comparison with the standard finite difference method for numerical solution of first and second order ordinary differential equations. From the graphical results, clearly non-standard method is more stable than the standard method and the domain of h for stability in the non-standard method is larger than those of the standard method. If the denominator functions are chosen in appropriate from the non-standard method produces better results.
 Abraham J. Arenas, Jose Antonio Morano, Juan Carlos Cortes. Non-standard Numerical Method for a Mathematical Model of RSV Epidemiological transmission, Computers and Mathematics with Applications, 59, (2010) 3740-3749. http://dx.doi.org/10.1016/j.camwa.2010.04.006.
 Alvarez-Ramirez, J. Valdes, Non-standard Finite Differences schemes for Generalized Reaction-Diffusion Equations, Computational and Applied Mathematics, 228, (2009) 334-343. http://dx.doi.org/10.1016/j.cam.2008.09.026.
 Amodio P, Settanni G, Variable-Step Finite Difference Schemes for the Solution of Sturm-Liouville Problems, Commun Nonlinear Sci Numer Simulat, 20, (2015) 641-649. http://dx.doi.org/10.1016/j.cnsns.2014.05.032.
 Benito M. Chen-Charpentier, Dobromir T. Dimitrov, Hristo V. Kojouharov, Combined Non-standard Numerical Methods for ODEs With Polynomial Right-Hand Sides, Mathematics and Computers in Simulation, 73, (2006) 105-113. http://dx.doi.org/10.1016/j.matcom.2006.06.008.
 Elizeo Hernandez-Martinez, Hector Puebla, Francisco Valdes-Prada, Jose Alvarez-Ramirez, Non-standard Finite Difference Scheme Based on Green's Function Formulation for Reaction-Diffusion-Convection Systems, Chemical Engineering science, 94, (2013) 245-255. http://dx.doi.org/10.1016/j.ces.2013.03.001.
 Elizeo Hernandez-Martinez, Francisco J. Valdes-Prada, Jose Alvarez-Ramirez, A Green's Function Formulation of Nonlocal Finite-Difference Schemes for Reaction-Diffusion Equations, Computational and Applied Mathematics, 235, (2011) 3096-3103. http://dx.doi.org/10.1016/j.cam.2010.10.015.
 Matthias Ehrhardt, Ronald E. Mickens, A Non-standard Finite Difference Scheme for Convection- Diffusion Equations Having Constant coefficients, Applied Mathematics and Computation, 219, (2013) 6591-6604. http://dx.doi.org/10.1016/j.amc.2012.12.068.
 Patidar, K. C, on the Use of Non-standard Finite Difference Methods, Differential Equation Appl, 11, (2005) 735-758. http://dx.doi.org/10.1080/10236190500127471.
 Ronald E. Mickens, A Nonstandard Finite Difference Scheme for a Nonlinear PDE Having Diffusive Shock Wave Solutions, Mathematics and Computers in Simulation, 55, 549-555, 2001. http://dx.doi.org/10.1016/S0378-4754(00)00309-8.
 Ronald E. Mickens, Advances in the Applications of Nonstandard Finite Difference Schemes, World Scientific, Singapore, 2005. http://dx.doi.org/10.1142/9789812703316.
 Ronald E. Mickens, A Non-standard Finite Difference Scheme for a PDE Modeling Combustion With Nonlinear Advection and Diffusion, Mathematics and Computers in Simulation, 69, (2005) 439-446. http://dx.doi.org/10.1016/j.matcom.2005.03.008.
 Ronald E. Mickens, Calculation of Denominator Functions for Nonstandard Finite Difference Schemes For Differential Equations Satisfying a Positivity Condition, Wiley Inter Science, 23, 672-628, 2006.
 Ronald E. Mickens, Determination of Denominator Functions for a NSFD Scheme for the Fisher PDE with Linear Advection, Mathematics and Computers in Simulation, 74, 127-195, 2007. http://dx.doi.org/10.1016/j.matcom.2006.10.006.