Direct Two-Point Block One-Step Method for Solving General Second-Order Ordinary Differential Equations

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 PE CE m 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.


Introduction
In this paper, we are considering solving directly the general second-order initial value problems IVPs for systems of ODEs in the form y f x, y, y , y a y 0 , y a y 0 , x ∈ a, b . 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 1-5 .
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, x n , x n 1 and x n 1 , x n 2 . 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.

Formulation of the Method
In order to compute the two approximation values of y n 1 and y n 2 simultaneously, the interval of a, b is divided into a series of blocks with each block containing two points as shown in Figure 1.
In Figure 1, we observed that kth block contains x n , x n 1 and x n 2 , where x n becomes the starting point and x n 2 is the last point in the kth block with step size h. The approximations values of y n 1 and y n 2 are computed simultaneously. The evaluation solution at the last point in kth block will be restored as the initial values for k 1 th 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 y n 2 at the point x n 2 are taken as the initial values for the next iteration.

Mathematical Problems in Engineering 3
We obtained the approximation values of y n 1 and y n 2 at the points x n 1 and x n 2 by integrating once and twice over 1.1 with respect to x. We begin to evaluate the y n 1 and y n 1 by integrating once and twice 1.1 over the interval x n , x n 1 : x n x x n f x, y, y dx dx.

2.1
Let x n 1 x n h which gives

2.2
Then, f x, y, y in 2.2 will be replaced with Lagrange interpolation polynomial that involves interpolation points in the block at x n , f n , x n 1 , f n 1 and x n 2 , f n 2 . Taking  x x n 2 sh, s x − x n 2 /h, and dx h ds 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 y n 1 and y n 1 are obtained as follows: y n 1 y n h 12 5f n 8f n 1 − f n 2 , y n 1 y n hy n h 2 24 7f n 6f n 1 − f n 2 .

2.3
To approximate the value of y n 2 and y n 2 , we take x n 2 x n 2h by integrating once and twice 1.1 over the interval x n 1 , x n 2 and apply the same process. The limit of integration will be from −1 to 0, and the following corrector formulae will be obtained: y n 2 y n 1 h 12 −f n 8f n 1 5f n 2 , y n 2 y n 1 hy n 1 h 2 24 −f n 10f n 1 3f n 2 .

4 Mathematical Problems in Engineering
The formulae 2.3 and 2.4 may be rewritten in the form of matrix difference equation as follows:

2.5
The order of this developed method is identified by referring to 10-12 . The two-point onestep block method for ODEs can be written in a matrix difference equation as follows: where α, β, and γ are the coefficients with the m-vector Y m , Y m , and F m be defined as Y m y n−1 , y n , y n 1 , y n 2 T , Y m y n−1 , y n , y n 1 , y n 2 T , F m f n−1 , f n , f n 1 , f n 2 T .

2.7
By applying the formulae for the constants C q , in 10 the formulae is defined as

2.8
Therefore, the order and error constant of the two-point one-step block method can be obtained by using equation in 2.8 .

Mathematical Problems in Engineering 5
For q 0, For q 1,

2.10
For q 2, Mathematical Problems in Engineering For q 3,

2.14
The method is order p if C 0 C 1 · · · C p 1 0 and C p 2 / 0 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

Implementation of the Method
The initial starting point at each block are obtained by using Euler method as predictor and the initial h used is as follows: where TOL is the tolerance and p 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 y n 1 and y n 2 simultaneously until the end of the interval. We use r function evaluations per step at the corrector formulae, that is, PE CE r , where P, E, and C indicate the predictor, evaluate the function f, and the corrector, respectively. where k 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 N is the number of equation in the system and TS is the number of successful steps.

Mathematical Problems in Engineering 9
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 C 0.5 is a safety factor. The algorithm when the step failure occurs is

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:  Figure 2 showed the stability region of the direct block one-step method when r 0.
In case r 1, the stability polynomial is obtained as follows:    Figure 3 showed the stability region of the direct block one-step method when r 1. 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.

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 .

5.2
Solution: y 1 x 1 − e x , y 2 x e x sin πx, y 3 x −e x , y 4 x e x π cos πx.

5.3
Solution: y 1 x cos x, y 2 x e x cos x. First-order systems:
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  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.

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.      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, TS 2P A /TS 2P B RTIME: The ratio execution times, TIME 2P A /TIME 2P B