Research Article  Open Access
Direct TwoPoint Block OneStep Method for Solving General SecondOrder Ordinary Differential Equations
Abstract
A direct twopoint block onestep method for solving general secondorder ordinary differential equations (ODEs) directly is presented in this paper. The onestep block method will solve the secondorder ODEs without reducing to firstorder equations. The direct solutions of the general secondorder ODEs will be calculated at two points simultaneously using variable step size. The method is formulated using the linear multistep method, but the new method possesses the desirable feature of the onestep method. The implementation is based on the predictor and corrector formulas in the mode. The stability and precision of this method will also be analyzed and deliberated. Numerical results are given to show the efficiency of the proposed method and will be compared with the existing method.
1. Introduction
In this paper, we are considering solving directly the general secondorder initial value problems (IVPs) for systems of ODEs in the form Equation in (1.1) arises from many physical phenomena in a wide spectrum of applications especially in the science and engineering areas such as in the electric circuit, damped and undamped spring mass and some other areas of application. We will also consider solving general second order as in (1.1) using the direct block onestep method. Block methods for numerical solutions of ODEs have been proposed by several researchers such as in [1–5]. The common block methods used to solve the problems can be categorized as onestep block method and multistep block method.
Onestep block method such as the implicit RungeKutta method is also being referred to as one previous point to obtain the solution. The multistep block method in the form of Adams type formula is presented in [5, 6]. In [7], the block backward differentiation formula (BBDF) for solving stiff ODEs has been introduced and the solutions referred to as more than one previous point. The works in [6] showed the proposed twopoint fourstep block method presented as in a simple form of Adams Moulton method for solving secondorder ODEs directly.
The block method of RungeKutta type has been explored in [1], and it is suggested that a block of new approximation values is used simultaneously for solving firstorder ODEs. The works in [3, 8, 9] have been considered in solving (1.1) using the block onestep method, while [3] has proposed a twopoint implicit block onestep method for solving secondorder ODEs directly and suggested that the method is suitable to be parallel.
In [9], Majid et al. have derived the twopoint block method for solving firstorder ODEs by using the closest point in the interval, that is, and . The Gauss Seidel iteration was implemented in the proposed block method. The approach in this research is to extend the idea in [9] for solving (1.1) directly without reducing system of firstorder ODEs using twopoint block onestep method.
2. Formulation of the Method
In order to compute the two approximation values of and simultaneously, the interval of is divided into a series of blocks with each block containing two points as shown in Figure 1.
In Figure 1, we observed that block contains and , where becomes the starting point and is the last point in the block with step size . The approximations values of and are computed simultaneously. The evaluation solution at the last point in block will be restored as the initial values for block. The same procedure is used to compute the solutions for the next block until the end of the interval. The evaluation information from the previous step in a block could be used for other steps of the same block only. During the calculations of iteration, the final values of at the point are taken as the initial values for the next iteration.
We obtained the approximation values of and at the points and by integrating once and twice over (1.1) with respect to. We begin to evaluate the and by integrating once and twice (1.1) over the interval : Let which gives Then, in (2.2) will be replaced with Lagrange interpolation polynomial that involves interpolation points in the block at and. Taking , and and replacing into (2.2). Then, the limit of integration in (2.2) will be from −2 to −1. The corrector formulae will be obtained using MATHEMATICA. The formulae of and are obtained as follows: To approximate the value of and , we take by integrating once and twice (1.1) over the interval and apply the same process. The limit of integration will be from −1 to 0, and the following corrector formulae will be obtained: The formulae (2.3) and (2.4) may be rewritten in the form of matrix difference equation as follows: The order of this developed method is identified by referring to [10–12]. The twopoint onestep block method for ODEs can be written in a matrix difference equation as follows: where , and are the coefficients with the mvector , , and be defined as
By applying the formulae for the constants , in [10] the formulae is defined as Therefore, the order and error constant of the twopoint onestep block method can be obtained by using equation in (2.8).
For ,
For , For ,
For ,
For ,
For , The method is order if and is the error constant. Thus, we conclude that the method in (2.3) and (2.4) is of the order 3 and the error constant is
3. Implementation of the Method
The initial starting point at each block are obtained by using Euler method as predictor and the initial used is as follows: where TOL is the tolerance and is the order of the method. Then, the calculations are corrected using the corrector formulae in (2.3) and (2.4). For the next block, the same techniques are repeated to compute the approximation values of and simultaneously until the end of the interval. We use function evaluations per step at the corrector formulae, that is, , where P, E, and indicate the predictor, evaluate the function , and the corrector, respectively.
Algorithm 3.1. Computing approximating , and using the predictor formulas is as follows: for to 2 doend forComputing approximations , and using corrector formulas is as follows: for do for to 2 do end forend forfor until convergence dofor to 2 doend for end for
The convergence test: where is the number of iterations and is the tth component of the approximate. , correspond to the absolute error test. , correspond to the mixed test and finally , correspond to the relative error test. The mixed error test is used in all tested problems. If the convergence test is satisfied, then we control the error in the current block by performing the local truncation error as follows: where is the order of corrector formula. The errors calculated in the code is defined as For the evaluation of maximum error, it is defined as follow: where is the number of equation in the system and TS is the number of successful steps.
In order to make the selection of the next step size, we follow again the techniques used in [9]. If LTE ≤ TOL, then the next step size remains constant or double, otherwise the step size will be half. The step size when the integration steps are successful is given by where = 0.5 is a safety factor. The algorithm when the step failure occurs is
4. Stability of the Method
In this section, we will discuss the stability of the proposed method derived in the previous section on a linear general secondorder problem:
Firstly, the test equation in (4.1) is substituted into the predictor formula (3.2). The evaluation of and will be substituted into the righthand side of (3.3) when as shown below: where , , , and in (4.2) are obtained in (3.2) after substituted the test equation (4.1). Then, the formulae are written in the matrix form and setting the determinant of the matrix to zero. Hence, the stability polynomial is obtained:: Figure 2 showed the stability region of the direct block onestep method when .
In case , the stability polynomial is obtained as follows:: Figure 3 showed the stability region of the direct block onestep method when .
The stability region is plotted using MATHEMATICA, and the shaded region inside the boundary in Figures 2 and 3 demonstrate the stability region for the proposed method.
5. Numerical Results and Discussion
We have tested the performance of the proposed method on four problems. For the first three problems, a comparison is made between the solutions obtained in [9].
Problem 1. We have
Solution: .
Firstorder systems:
Solution:, , , .
Problem 2. We have
Solution: ,.
Firstorder systems:
Solution: ,,,.
Problem 3. We have
Solution: , .
Firstorder systems:
Solution:, , , .
Problem 4 (Van Der Pol oscillator). We have where we take .
The codes are written in C language and executed on DYNIX/ptx operating system. The numerical results for Problems 1–3 in Tables 2–4 are solved using the proposed method and the method in [9]. The results in terms of total steps and execution times for solving Problems 1–3 are presented in histograms and graph lines in Figures 4, 5 and 6. The solutions of 2P(B) for solving Problem 4 are plotted in Figure 7 at tolerance and compared with the solutions obtained by the MATLAB builtin solver ode45.
In Figures 4, 5 and 6, it is obvious that method 2P(B) requires less number of total steps as compared to method 2P(A) when solving the same given problems. It is also observed that the execution times of 2P(B) are faster than 2P(A) at all tested tolerances. This is expected since 2P(B) has less number of function calls; therefore, it has affected the computation time of 2P(B).
In Table 1, the RSTEP and RTIME are greater than 1.00 which shows that 2P(B) is more efficient compared to 2P(A). In fact, in some cases, the ratios are greater than 3.00, which indicates a clear advantage of method 2P(B) over 2P(A).




In Table 2, it can be observed that the maximum error of 2P(B) is one or two order larger than 2P(A) but still acceptable as it is within the given tolerance. This is expected since the code 2P(B) solved the given problem directly without reducing to system of firstorder differential equations. We could observe that the RSTEP for Problem 1 is greater than 2 in Table 1.
In Tables 3 and 4, it is observed that the maximum error of 2P(B) is two or three order larger as compared to 2P(A) in solving Problems 2 and 3 but it is still within the given tolerances. In Figure 7, it is obvious that the 2P(B) solutions agree very well with the solutions obtained by the MATLAB builtin solver ode45 when solving Problem 4.
6. Conclusion
In this paper, we have constructed the direct twopoint block onestep method which is efficient and suitable for solving general secondorder ODEs directly. The block method has shown acceptable solutions and managed to solve the secondorder ODE faster compared to the existing method.
Notations
TOL:  Tolerance 
MTD:  Method employed 
TS:  Total steps taken 
FS:  Total failure steps 
MAXE:  Magnitude of the maximum error of the computed solution 
AVERR:  The average error 
FCN:  Total function calls 
TIME:  The execution time taken in microseconds 
2P(A):  Implementation of the direct block method in [9] by reducing the problem to system of firstorder ODEs 
2P(B):  Implementation of the direct twopoint block onestep method by solving the problem directly 
RSTEP:  The ratio steps, 
RTIME:  The ratio execution times, 
Acknowledgment
The authors would like to thank the Universiti Putra Malaysia for providing financial support through Graduate Research Fellowship (GRF) during the study period.
References
 J. B. Rosser, “A RungeKutta for all seasons,” SIAM Review, vol. 9, pp. 417–452, 1967. View at: Publisher Site  Google Scholar  Zentralblatt MATH
 L. F. Shampine and H. A. Watts, “Block implicit onestep methods,” Mathematics of Computation, vol. 23, pp. 731–740, 1969. View at: Publisher Site  Google Scholar  Zentralblatt MATH
 P. B. Worland, “Parallel methods for the numerical solution of ordinary differential equations,” Institute of Electrical and Electronics Engineers, vol. 25, no. 10, pp. 1045–1048, 1976. View at: Google Scholar  Zentralblatt MATH
 S. Mehrkanoon, Z. A. Majid, and M. Suleiman, “A variable step implicit block multistep method for solving firstorder ODEs,” Journal of Computational and Applied Mathematics, vol. 233, no. 9, pp. 2387–2394, 2010. View at: Publisher Site  Google Scholar  Zentralblatt MATH
 Z. A. Majid and M. B. Suleiman, “Implementation of fourpoint fully implicit block method for solving ordinary differential equations,” Applied Mathematics and Computation, vol. 184, no. 2, pp. 514–522, 2007. View at: Publisher Site  Google Scholar  Zentralblatt MATH
 Z. A. Majid, N. A. Azmi, and M. Suleiman, “Solving second order ordinary differential equations using two point four step direct implicit block method,” European Journal of Scientific Research, vol. 31, no. 1, pp. 29–36, 2009. View at: Google Scholar
 Z. B. Ibrahim, M. B. Suleiman, and F. Ismail, “Fully implicit two point block backward difference formula for solving a first order initial value problems,” Science Putra Research Bulletin, vol. 11, no. 2, pp. 14–17, 2003. View at: Google Scholar
 P. C. Chakravarti and P. B. Worland, “A class of selfstarting methods for the numerical solution of ${y}^{\prime \prime}=f(x,y)$,” BIT, vol. 11, pp. 368–383, 1971. View at: Google Scholar  Zentralblatt MATH
 Z. A. Majid, M. B. Suleiman, F. Ismail, and M. Othman, “2point implicit block onestep method half GaussSeidel for solving first order ordinary differential equations,” Matematika, vol. 19, pp. 91–100, 2003. View at: Google Scholar
 S. O. Fatunla, “Block methods for second order ODEs,” International Journal of Computer Mathematics, vol. 41, pp. 55–63, 1991. View at: Publisher Site  Google Scholar  Zentralblatt MATH
 J. D. Lambert, Computational Methods in Ordinary Differential Equations, John Wiley & Sons, New York, NY, USA, 1973.
 C. W. Gear, Numerical Initial Value Problems in Ordinary Differential Equations, PrenticeHall, Englewood Cliffs, NJ, USA, 1971.
Copyright
Copyright © 2012 Zanariah Abdul Majid 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.