Research Article | Open Access
S. A. M. Yatim, Z. B. Ibrahim, K. I. Othman, M. B. Suleiman, "A Quantitative Comparison of Numerical Method for Solving Stiff Ordinary Differential Equations", Mathematical Problems in Engineering, vol. 2011, Article ID 193691, 12 pages, 2011. https://doi.org/10.1155/2011/193691
A Quantitative Comparison of Numerical Method for Solving Stiff Ordinary Differential Equations
We derive a variable step of the implicit block methods based on the backward differentiation formulae (BDF) for solving stiff initial value problems (IVPs). A simplified strategy in controlling the step size is proposed with the aim of optimizing the performance in terms of precision and computation time. The numerical results obtained support the enhancement of the method proposed as compared to MATLAB's suite of ordinary differential equations (ODEs) solvers, namely, ode15s and ode23s.
Consider the first-order ordinary differential equations in the form of with given initial values in the given interval . The system of (1.1) is said to be stiff if the eigenvalues of the matrix have negative real parts at every time and varies greatly in magnitude. Solving stiff ODEs which aroused from mainly applied problems, for example, from physical, chemical, and biological phenomena is made easy with several methods of interest appeared in subroutine libraries . Some examples can be seen in [2–4]. From the code pioneered by Gear called DIFSUB, the wide interest in stiff ODEs has caused many other codes evolved to meet the same objective of finding the most accurate approximation for IVPs . Some renowned codes are EPISODE and LSODE . With the advancements of the existing methods of solving ODEs, many of these codes are preinstalled in MATLAB to work as numerical solvers. An overview of MATLAB’s numerical solvers presented in  shows a wide choice of solvers according to the problem type, step, and order to deal with stiff and nonstiff problems. Since then, several measures have been brought up by many researchers to evaluate which method turns out to be the most efficient method . Despite that there exist some limitations in each method, these methods proven to have their own strength in solving certain initial value problems .
The need to solve large systems of stiff IVPs has also influenced the development of other existing method. These include iterative linear equation solvers and sparse direct linear equation solvers. Further discussion and additional references on this method are discussed in more detail in . The method that incorporated with BDF proposed by Gear has been expanded gradually to become an improved method . The study on producing block approximations also known as block backward differentiation formulae (BBDF)  was inspired by Gear’s method. BBDF method in  has verified the competency of computing concurrent solution values at different points. Apart from that, block approximations have been used in different methods to improve the methods to give a better accuracy and computation time. Consequently, the study by Ibrahim et al. in  is extended in a way that the accuracy is improved with reduction of total steps and lesser computational time.
In the next section, we discuss the derivation of the 5th-order variable step block backward differentiation formulae (5oBBDF). The strategies and implementations are presented next, followed by the results and discussion. It is also one of the main aims of this paper to prove that the method proposed acts as an alternative way in solving IVPs which arise in engineering and applied sciences. We are interested to compare the numerical results obtained with stiff ODEs solvers provided by MATLAB, namely, ode15s and ode23s.
2. General 5oBBDF Formulation
The ratio distance between current and previous step is represented as in Figure 1. In this paper, the step size is given selection to decrease to half of the previous steps or increase up to a factor of 1.9. For simplicity, is assigned as and for the case of constant, halving, and increasing the step size, respectively. The zero stability is achieved for each of these cases and explained in the next section.
We find approximating polynomials by means of a -degree polynomial interpolating the values of at given points are , where Define to find the 4th-order interpolating polynomial for (2.1), is equated to 0 and 1 after the polynomial is differentiated with respect to , when , respectively, Upon substituting and 10/19 into and , we obtained the coefficients for points and as follows:
3. Implementation of 5oBBDF Method
It is commonly known that stiff ODEs codes must solve both nonlinear and linear systems at each step of differentiation. This is due to implicity of the formulae for solving stiff IVPs. Throughout this section, we illustrate the effect of Newton-type scheme to find the approximation solutions of and simultaneously in every step. The general forms of the 5th-order BBDF method are with and are the back values. Equation (3.1) in matrix-vector form is equivalent to By setting , , , , , and , (3.1) is simplified as Newton iteration is performed to the system , by taking the analogous form where is the Jacobian matrix of with respect to . Equation (3.4) is separated to three different matrices denoted as
Two-stage Newton iteration is now introduced in order to find the approximate solution to (1.1). Thus, the corresponding linear system to be solved is . According to Jackson in , evaluating the Jacobian and LU factorization of require the most computation time during the operations. As a result, two strategies which are based on the step size are applied to ensure the efficiency of the method:(i)no calculation of new matrices and if the step size remains as previous step size. Hence, there is no new calculation of the Jacobian matrix ,(ii)the matrices and are updated with new evaluation of the Jacobian matrix for every occurrence of changing step size.
As a result, this paper agrees with  that this method has a higher tendency in saving computational time. Unlike most modern solvers that incorporated full Newton iterations, 5oBBDF method offers refined strategy for reevaluating the Jacobian matrix .
3.1. Stability Conditions for 5oBBDF
In this section, we provide the conditions for the stability of 5oBBDF method as in (2.5). To begin with, we include some definitions to support the practical criterion for a method to be useful in solving ODEs.
Definition 3.1. A method is said to be zero stable if the roots of the polynomial satisfy the condition .
Definition 3.2. A method is said to be absolute stable in a region for a given if for that , all the roots of the stability polynomial satisfy , .
The stability polynomial, , associated with the method of (2.5) is given by , while the absolute stability region of this method in the plane is determined by solving . Below are the absolute stability regions in the method of (2.5) for different step size selections: and , respectively, To determine for zero stable, we substitute to (3.8). We will have the following equations for each step size selection mentioned previously: Hence, the roots for three different step size selections obtained by using Maple are listed below, and ,, and ,, and .
Since all of the roots have modulus less than or equal to 1, the method (2.5) when and is zero stable.
The stability region was given by the set of points determined by the boundary . The stability region is obtained by finding the region for which . Figure 2 shows the stability for the cases and , respectively. The stability regions lie outside the closed region for each case.
Based on Figure 2, the 5th-order BBDF possesses the region absolute stability, which contains almost whole of the half-plane .
3.2. Choosing Step Size
The importance in choosing the step size is to achieve reduction in computation time and number of iterations. Therefore, this paper proposed three basic strategies for the step size selections. For each successful step, the step size remains constant or increased by a factor of 1.9 . Inversely, when a fail step occurs, the next step size will be halved of the previous step size . The user initially will have to provide an error tolerance limit, TOL on any given step, and obtain the local truncation error (LTE) for each iteration. The LTE is obtained from where is the th order method, and is the th order method.
The successful step is dependent on the condition . If this condition fails, the values of , are rejected, and the current step is reiterated with step size selection . On the contrary, the step size increment for each successful step is defined as
And if , then . Where is the safety factor, is the order of the method, while and are the step size from previous and current blocks, respectively. In this paper, is set to be 0.8.
4. MATLAB’s Stiff Numerical Solvers
MATLAB offers several numerical solvers to solve either stiff or nonstiff ordinary differential equations. These built-in numerical solvers are capable in approximating solutions to almost any system of differential equations . As far as this paper is concerned, we are interested in solving stiff ODEs. For comparison purposes, this paper considers only ode15s and ode23s. This is because both of the methods deal with stiff differential equations based on backward differentiation formulas (BDFs) and on a modified Rosenbrock formula of order 2, respectively. Therefore, a fair comparison is obtained, and the discussions are made easy.
5. Numerical Results
We carry out numerical experiments to compare the performance of the 5th-order BBDF method with stiff ODE solvers in MATLAB mentioned above. Three sets of stiff test problems aroused from problems in physics are tested for the purpose of elucidating the difference in numerical results obtained. These test problems are performed under different conditions of error tolerances—(a) 10−2, (b) 10−4, and (c) 10−6, and the error trend is defined by The test problems and solution are listed below (1)basic circuit problem is with solution ,(2) oscillatory problems in physics: Torsion spring oscillator with dry and viscous friction  with solution eigenvalues, ,(3)Physical problem  is with solution eigenvalues, .
From Table 1, among the three methods tested, our method, 5oBBDF, requires the shortest execution time for each given tolerance level. On top of that, this method also gives the smallest maximum error and average error. From Figure 3, we can see that 5oBBDF gives the lowest maximum error for every tolerance level. When we look at the convergence of the methods compared in Figure 3, our method comparably converges faster with minimum number of steps taken.
From Table 2, once again, 5oBBDF requires the shortest execution time for each given tolerance level. From the error trends described in Figure 4, we can see that the maximum errors for 5oBBDF are the smallest for each TOL as compared to ode15s and ode23s. So the convergence of the method, 5oBBDF is found to converge fastest among the methods tested.
From Table 3, similarly, 5oBBDF gives the shortest execution time for each given tolerance level. This method is also completed with lesser total steps except when TOL is 10−2. The error trends for all of the methods tested are depicted in Figure 5. The error trend shows that 5oBBDF converged fastest with smallest maximum error for each TOL as compared to ode15s and ode23s.
For all problems tested, it is proven that, the 5th-order variable step BBDF has outperformed the ode15s and ode23s in terms of average errors as well as maximum errors. It also managed to reduce the number of total steps taken in most of the cases especially when TOL is less than 10−2. When we tested the convergence of the methods compared in this paper, the error trend worked as the identifier for the fastest error of the method approaches zero. Figures 3, 4, and 5 illustrate how fast the error of 5th-order variable step BBDF converged as compared to the other two methods used. As a result, we found that this method converges fastest for all problems tested. In terms of computation timewise, it gave lesser values for all of the test problems. Therefore, we can conclude that the 5th-order variable step BBDF is one compatible alternative solver for solving stiff ordinary differential equations which mostly arise in engineering and applied sciences.
|TS:||The total number of steps taken|
|TOL:||The initial value for the local error estimate|
|MAXE:||The maximum error|
|AVEE:||The average error|
|METHOD:||The method used|
|TIME:||The total execution time (seconds)|
|5oBBDF:||5th-order variable step BBDF|
|:||Error for each point of approximations.|
- G. D. Byrne and A. C. Hindmarsh, “Stiff ODE solvers: a review of current and coming attractions,” Journal of Computational Physics, vol. 70, no. 1, pp. 1–62, 1987.
- C. F. Quo and M. D. Wang, “Quantitative comparison of numerical solvers for models of oscillatory biochemical systems,” in Proceedings of the 2nd International Multi-Symposiums on Computer and Computational Sciences (IMSCCS '07), pp. 44–51, University of Iowa, Iowa City, IA, USA, August 2007.
- C. W. Gear, Numerical Initial Value Problems in Ordinary Differential Equations, Prentice-Hall, Englewood Cliffs, NJ, USA, 1971.
- J. G. Verwer and D. Simpson, “Explicit methods for stiff ODEs from atmospheric chemistry,” Applied Numerical Mathematics, vol. 18, no. 1–3, pp. 413–430, 1995.
- G. D. Byrne, A. C. Hindmarsh, K. R. Jackson, and H. G. Brown, “A comparison of two ODE codes: gear and EPISODE,” Computers and Chemical Engineering, vol. 1, no. 2, pp. 125–131, 1977.
- W. H. Enright, T. E. Hull, and B. Lindberg, “Comparing numerical methods for stiff systems of ODEs,” BIT Numerical Mathematics, vol. 15, no. 1, pp. 10–48, 1975.
- Z. B. Ibrahim, M. B. Suleiman, and K. I. Othman, “Fixed coefficients block backward differentiation formulas for the numerical solution of stiff ordinary differential equations,” European Journal of Scientific Research, vol. 21, no. 3, pp. 508–520, 2008.
- Z. B. Ibrahim, K. I. Othman , and M. B. Suleiman, “Variable step size block backward differentiation formula for solving stiff odes,” in Proceedings of the World Congress on Engineering, vol. 2, pp. 785–789, London, UK, 2007.
- K. R. Jackson, “The numerical solution of large systems of stiff IVPs for ODEs,” Applied Numerical Mathematics, vol. 20, no. 1-2, pp. 5–20, 1996.
- A. S. Mahmood, L. Casasús, and W. Al-Hayani, “The decomposition method for stiff systems of ordinary differential equations,” Applied Mathematics and Computation, vol. 167, no. 2, pp. 964–975, 2005.
- J. C. Polking and D. Arnold, Ordinary Differential Equation Using MATLAB, Upper Saddle River, NJ, USA, Prentice Hall, 2nd edition, 1999.
Copyright © 2011 S. A. M. Yatim et al. 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.