#### Abstract

This paper will consider the implementation of fifth-order direct method in the form of Adams-Moulton method for solving directly second-order delay differential equations (DDEs). The proposed direct method approximates the solutions using constant step size. The delay differential equations will be treated in their original forms without being reduced to systems of first-order ordinary differential equations (ODEs). Numerical results are presented to show that the proposed direct method is suitable for solving second-order delay differential equations.

#### 1. Introduction

In the recent years, there are rigorous and numerous researches undertaken in the areas of science and engineering that are skewed towards the developments of the mathematical models involving the delay differential equations. In mathematics, the DDEs are differing from ODEs in which the derivative of the unknown function at a certain time is given in terms of the values of the function at previous times. Several numerical methods have been proposed to solve first-order DDEs such as in [1ā4]. However, less attention was made to solve second-order DDEs. Spline collocation methods [5] and Adomian decomposition method [6] have been proposed to solve second-order DDEs directly. There were few numerical methods that have been proposed for solving ODEs and those methods have been extended to solve DDEs with some modifications in the algorithm. These are some works carried out for solving first-order DDEs using the extended version such as in San et al. [1], Ismail et al. [2], Radzi et al. [3], and Ishak et al. [4].

In this paper, we are concerned with solving second-order delay differential equations (DDEs) as follows: where is the initial function and is the delay term.

The direct Adams-Moulton methods were studied by several researchers and the methods have shown their ability to solve first-, second- and higher-order ODEs [7, 8] and boundary value problems [9] effectively and accurately. Hence, in this paper, we aim to propose the direct method of order five in the form of Adams-Moulton method for solving (1) using constant step size. The proposed direct method has the advantage to solve the second-order delay differential equations directly without reducing to system of first order. Therefore, the second-order DDEs problems will be handled in their original forms. This idea will reduce the computation cost at each step for the proposed direct method.

#### 2. The Direct Method

##### 2.1. Formulation of the Method

Most numerical methods for ODEs can be used to solve DDEs. In this paper, we adopted direct method proposed by Majid and Suleiman [8] to solve DDEs. The following is the derivation of one point direct Adams-Moulton method.

The point at can be obtained by integrating once and twice as follows.

Integrating once

Integrating twice

The function in (6) and (8) will be approximated using Lagrange interpolation polynomial and the interpolation points involved are five points, that is, . Taking and replacing , the value of can be obtained by integrating (6) and (8) using MAPLE. The direct method is the combination of predictor of one order less than the corrector. The following is the predictor and corrector of the direct method.

Predictor

Corrector

##### 2.2. Order and Error Constant of the Method

The order of this developed method is calculated by referring to [10ā14]. Linear -step method can be written in the form of where , , and are the coefficients with the -vector. , and are

The formulae is defined as

The method has order ifāā and is the error constant.

By referring to the corrector formulae in (11) and the general multistep method in (12), we will obtain and substitute those values into (14):

Hence, and is the error constant.

The corrector of the direct method is of order five and the error constant is . The method is said to be consistent if it has at least one order. Since the proposed method is order five, hence the method is said to be consistent.

##### 2.3. Stability Analysis

The method is zero stable provided the roots of the first characteristic polynomial specified as and satisfy .

We rewrite (10) and (11) in the matrix form:

The first characteristic polynomial of the method is given as

, where and . Consider that

Since , the method is said to be zero stable.

There are many concepts of stability for numerical methods when applied to DDEs, depending on the test equation as well as the delay term involved. We would like to study the stability of the method by substituting the following test equation: into the proposed method (10) and (11). The method can be described in the following matrix form: where

We solve the determination of , where

The following stability polynomial is obtained by letting and :

The boundary of the stability region in plane is determined by substituting the values of , and into the stability polynomial, where . Figure 1 shows the stability region of the direct method and the stable region is the bounded shaded region.

##### 2.4. Convergence Analysis

A basic property for an effective numerical method is that the method needs to converge. A linear multistep method is convergent if and only if it is stable and consistent [15].

By definition, a linear multistep method of the form is said to be consistent if the LMM is of order .

The proposed direct method is of order five, where and has error constant .

Since the method is order five which is ā„1, therefore, the method is consistent according to the definition. In the previous section, it has been shown that the method is zero stable. Therefore, we can conclude that this method is convergent.

#### 3. Implementation

In the code of PECE scheme stands for an application of a predictor, stands for an evaluation of a function , and stands for an application of a corrector. The developed code starts by using Adams-Bashforth method once at the beginning to calculate the three starting initial points. Once the points are calculated, then the proposed method can be applied until the end of the interval. The values of the delay term will be stored for future use. For , the delay term is calculated using the initial function given, . Otherwise the delay term depends on the location of . From the location we are able to recall the value which we had stored earlier. In this paper, no interpolation is required due to the implementation of constant step sizes. The algorithms of the proposed method were developed in language.

In the code, the selection of step sizes is predetermined.

##### 3.1. Algorithm of Direct Method

*Step 1. *Set starting value , ending value , and step size , given initial value and given initial function .

*Step 2. *For , set , compute function , and delay term .

Evaluate the approximate value with direct Adams-Bashforth method.

*Step 3. *While , do Step 4.

*Step 4. *Set , compute function , and delay term .

Evaluate the approximate value with proposed method.

Computing and , we use the predictor formulas as follows:

Computing and , we use the corrector formulas as follows:

*Step 5. *Complete.

#### 4. Numerical Result and Discussion

In order to study the efficiency of the proposed direct method, we presented three second-order DDE problems with constant delay in the following test problems. The numerical results of the direct method when solving Problems 1, 2, and 3 will be compared with cubic spline in [5], variable multistep method (VMM) in [16], and dde23 in MATLAB solver, respectively.

*Problem 1. *Consider

Exact solution

*Problem 2. *Consider

Exact solution

*Problem 3. *Consider

Exact solution

The algorithm of the C language was executed on the Microsoft Visual C++ environment. The notations at the end of the paper are used in Tables 1ā3.

The numerical results for solving Problems 1ā3 are displayed in Tables 1ā3.

In Problem 1, we solved the DDEs by the direct method and compare our results with the cubic spline method in [1]. Table 1 shows that the direct method managed to obtain highly accurate results compared to the cubic spline method at the same values of . At larger step size, that is, , we observed that the maximum error obtained by the direct method and the cubic spline is and , respectively. We could also observe that the maximum error for the direct method and the cubic spline was comparable, that is, and at and , respectively. Hence, these results show that the direct method is able to obtain comparable maximum error compared to cubic spline at larger step size and therefore less expensive. The total function calls for the direct method during the computation are also shown in Table 1. Figure 2 display the comparison of the maximum error at different values of step sizes for solving Problem 1.

Table 2 displays the results for the direct method with the range of step sizes from 0.0128 to 0.1 compared to the variable multistep size method in [10] with varies step sizes (range from 0.0016 to 0.002) at different values of when solving Problem 2*. *The direct method is clearly superior compared to variable multistep method since it is able to obtain comparable and better results at larger step sizes. Hence, the direct method has less computational cost. The total function calls are also shown in Table 2. Figure 3 shows the comparison of maximum error at the given value of .

Table 3 displays the numerical results for solving Problem 3 for the MATLAB solver dde23 and the present direct method. Since dde23 is a variable step size method, therefore, the user may control the efficiency and accuracy of the solutions by changing the real tolerance and the absolute tolerance. The table will only show the compatible maximum absolute error with the least function calls. We could observe that the direct method managed to obtain comparable maximum errors with lesser total function calls and total step and to have no failure step compared to dde23. Hence, the direct method has less computational cost compared to dde23. Figure 4 shows the comparison results for maximum error and total function calls.

#### 5. Conclusion

In this study, we have shown that the proposed direct Adams-Moulton method using constant step size is suitable for solving second-order DDEs directly. The proposed direct method has solved the second-order DDEs in their original forms without being reduced to first-order ODEs. This approach has given advantage in terms of computational cost to the direct method. The method has shown superiority in terms of accuracy and it has less computational cost.

#### Notations

: | Step size |

MAXE: | Magnitude of the maximum absolute error |

FCN: | Total function calls |

TS: | Total steps |

TFS: | Total failure steps |

RT: | Real tolerance |

AT: | Absolute tolerance |

dde23: | MATLAB solver dde23 based on the explicit Runge-Kutta (2,3) pair [17]. |

#### Acknowledgment

The authors gratefully acknowledged the financial support of University Putra Malaysia Grant.