Abstract

A direct two-point block one-step method for solving general second-order ordinary differential equations (ODEs) directly is presented in this paper. The one-step block method will solve the second-order ODEs without reducing to first-order equations. The direct solutions of the general second-order 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 one-step 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 second-order 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 one-step method. Block methods for numerical solutions of ODEs have been proposed by several researchers such as in [15]. The common block methods used to solve the problems can be categorized as one-step block method and multistep block method.

One-step block method such as the implicit Runge-Kutta 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 two-point four-step block method presented as in a simple form of Adams Moulton method for solving second-order ODEs directly.

The block method of Runge-Kutta type has been explored in [1], and it is suggested that a block of new approximation values is used simultaneously for solving first-order ODEs. The works in [3, 8, 9] have been considered in solving (1.1) using the block one-step method, while [3] has proposed a two-point implicit block one-step method for solving second-order ODEs directly and suggested that the method is suitable to be parallel.

In [9], Majid et al. have derived the two-point block method for solving first-order 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 first-order ODEs using two-point block one-step 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 [1012]. The two-point one-step block method for ODEs can be written in a matrix difference equation as follows: where , and are the coefficients with the m-vector , , 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 two-point one-step 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 forend 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 second-order 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 right-hand 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 one-step method when .

In case , the stability polynomial is obtained as follows:: Figure 3 showed the stability region of the direct block one-step 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: .
First-order systems: Solution:, , , .

Problem 2. We have Solution: ,.
First-order systems: Solution: ,,,.

Problem 3. We have Solution: , .
First-order 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 13 in Tables 24 are solved using the proposed method and the method in [9]. The results in terms of total steps and execution times for solving Problems 13 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 built-in 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 first-order 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 built-in solver ode45 when solving Problem 4.

6. Conclusion

In this paper, we have constructed the direct two-point block one-step method which is efficient and suitable for solving general second-order ODEs directly. The block method has shown acceptable solutions and managed to solve the second-order 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 first-order ODEs
2P(B):Implementation of the direct two-point block one-step 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.