MPE Mathematical Problems in Engineering 1563-5147 1024-123X Hindawi Publishing Corporation 261240 10.1155/2013/261240 261240 Research Article Solving Second-Order Delay Differential Equations by Direct Adams-Moulton Method Yann Seong Hoo 1 Abdul Majid Zanariah 1, 2 Ismail Fudziah 1, 2 Momoniat Ebrahim 1 Department of Mathematics Faculty of Science, Universiti Putra Malaysia Serdang 43400 Selangor DE Malaysia upm.edu.my 2 Institute for Mathematical Research Universiti Putra Malaysia Serdang 43400 Selangor DE Malaysia upm.edu.my 2013 12 12 2013 2013 22 06 2013 06 11 2013 11 11 2013 2013 Copyright © 2013 Hoo Yann Seong 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.

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 . However, less attention was made to solve second-order DDEs. Spline collocation methods  and Adomian decomposition method  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. , Ismail et al. , Radzi et al. , and Ishak et al. .

In this paper, we are concerned with solving second-order delay differential equations (DDEs) as follows: (1)y′′=f(t,y(t),y(t-τ)),y′′--=atb,τ>0,(2)y(a)=Ω,(3)y(t)=ϕ(t),αta,0τ|a-α|, where ϕ(t) 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  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  to solve DDEs. The following is the derivation of one point direct Adams-Moulton method.

The point yn+1 at xn+1 can be obtained by integrating (4)y=f(t,y(t),y) once and twice as follows.

Integrating once (5)xnxn+1y(x)dx=xnxn+1f(x,y,y)dx,(6)y(xn+1)=y(xn)+xnxn+1f(x,y,y)dx.

Integrating twice (7)xnxn+1xnxy(x)dxdx=xnxn+1xnxf(x,y,y)dxdx,(8)y(xn+1)-y(xn)-hy(xn)=xnxn+1(xn+1-x)f(x,y,y)dx.

The function f(x,y,y) in (6) and (8) will be approximated using Lagrange interpolation polynomial and the interpolation points involved are five points, that is, {xn-3,xn-2,xn-1,xn,xn+1}. Taking s=(x-xn+1)/h and replacing dx=hds, the value of yn+1 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 (9)y(xn+1)=y(xn)+h24(55fn-59fn-1+37fn-2-9fn-3),y(xn+1)=y(xn)+hy(xn)+h2360(323fn-264fn-1+159fn-2-38fn-3).

Corrector (10)y(xn+1)=y(xn)-h720×(-251fn+1-646fn+264fn-1-106fn-2+19fn-3),(11)y(xn+1)=y(xn)+hy(xn)-h21440×(-135fn+1-752fn+246fn-1-96fn-2+17fn-3).

2.2. Order and Error Constant of the Method

The order of this developed method is calculated by referring to . Linear k-step method can be written in the form of (12)αYm=hβYm+h2γFm, where α, β, and γ are the coefficients with the m-vector. Ym, Ym and Fm are (13)Ym=[yn-1,yn]T,Ym=[yn-1,yn]T,Fm=[fn-1,fn]T.

The formulae is defined as (14)C0=α0+α1++αkC1=α1+2α2++kαk-(β0+β1++βk)C2=12!(α1+22α2++k2αk)-(β1+2β2++kβk)-(γ0+γ1++γk)Cq=j=0k(jqq!αj-jq-1(q-1)!βj-jq-2(q-2)!γj),whereq=3,4,5,.

The method has order p if  C0=C1==Cp=Cp+1=0 and Cp+20 is the error constant.

By referring to the corrector formulae in (11) and the general multistep method in (12), we will obtain (15)α0=0,α1=0,α2=-1,α3=0,α4=1;β0=0,β1=0,β2=0,β3=1,β4=0;γ0=-171440,γ1=961440,γ2=-2461440,γ3=7521440,γ3=1351440 and substitute those values into (14): (16)C0=α0+α1+α2+α3+α4=0,C1=α1+2α2+3α3+4α4-(β0+β1+β2+β3+β4)=0,C2=12!(α1+22α2+32α3+42α4)-(β1+2β2+3β3+4β4)-(γ0+γ1+γ2+γ3+γ4)=0,C3=13!(α1+22α2+32α3+42α4)-12!(β1+22β2+32β3+42β4)-(γ1+2γ2+3γ3+4γ4)=0,C4=0,C5=0,C6=0,C7=-4150400.

Hence, C0=C1==C6=0 and C7=-(41/5040)0 is the error constant.

The corrector of the direct method is of order five and the error constant is -(41/5040). 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 Rj of the first characteristic polynomial ρ(R) specified as ρ(R)=det[i=0kA(i)Rk-i]=0 and satisfy |Rj|1.

We rewrite (10) and (11) in the matrix form: (17)[yn+1yn+1]=[ynyn]+h[yn+1yn+1]+h[fn+1fn+1]+h[fnfn]+  h[0-26472000][fn-1fn-1]+h[fn-2fn-2]+  h[0-1972000][fn-3fn-3]+h2[fn+1fn+1]+h2[fnfn]+h2[000-2461440][fn-1fn-1]+h2[fn-2fn-2]+h2[000-171440][fn-3fn-3].

The first characteristic polynomial of the method is given as

ρ ( R ) = det [ R A 0 - A 1 ] = 0 , where A0= and A1=. Consider that (18)ρ(R)=det[R-100R-1]=0,(R-1)2=0,R=1,1.

Since |Rj|1, 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: (19)f=λy(x)+μy(x-τ) into the proposed method (10) and (11). The method can be described in the following matrix form: (20)A0YN+1=A1YN+hi=04Bi+1FN-i+h2i=04Ci+1FN-i, where (21)YN+1=[yn+1yn+1],YN=[ynyn],FN+i=[yn+iyn+i],A0=[1-251720hλ01-332h2λ],A1=,B1=[0323360hλ+251720hμ10],B2=[0-1130hλ+323360hμ00],B3=[053360hλ-1130hμ00],B4=[0-19720hλ+53360hμ00],B5=[0-19720hμ00],C1=[0004790hλ+332hμ],C2=[000-1160hλ+4790hμ],C3=[000115hλ-1160hμ],C4=[000-171440hλ+115hμ],C5=[000-171440hμ].

We solve the determination of d=0, where (22)d=t5A0-t4(A1+hB1+h2C1)-t3(hB2+h2C2)-t2(hB3+h2C3)-t(hB4+h2C1)-(hB5+h2C5).

The following stability polynomial is obtained by letting H1=h2μ and H2=h2λ: (23)(1-332H2)t10+(-2+332H1-373480H2)t9+(1-373480H1-23120H2)t8+(-23120H1+760H2)t7+(760H1-11160H2)t6+(-11160H1+7480H2)t5+7480H1=0.

The boundary of the stability region in H1-H2 plane is determined by substituting the values of t=1,-1, and eiθ into the stability polynomial, where 0θ2π. Figure 1 shows the stability region of the direct method and the stable region is the bounded shaded region.

Stability region of the direct method.

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 .

By definition, a linear multistep method of the form (24)j=0kαiyn+j=h2j=0kβifn+j is said to be consistent if the LMM is of order p1.

The proposed direct method is of order five, where p=5 and has error constant [-(3/160)-(41/5040)].

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 P stands for an application of a predictor, E stands for an evaluation of a function f, and C 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 xn-τ0, the delay term is calculated using the initial function given, ϕ(x). Otherwise the delay term depends on the location of (x-τ). 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 C language.

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

3.1. Algorithm of Direct Method Step 1.

Set starting value a, ending value b, and step size h, given initial value and given initial function g(x).

Step 2.

For n=1,2,3, set xn+1=a+nh, compute function fn, and delay term dn.

Evaluate the approximate value yn+1 with direct Adams-Bashforth method.

Step 3.

While xn<b, do Step 4.

Step 4.

Set xn+1=xn+h, compute function fn, and delay term dn.

Evaluate the approximate value yn+1 with proposed method.

Computing yn+1 and yn+1, we use the predictor formulas as follows: (25)y(xn+1)=y(xn)+h24(55fn-59fn-1+37fn-2-9fn-3),y(xn+1)=y(xn)+hy(xn)+h2360(323fn-264fn-1+159fn-2-38fn-3).

Computing yn+1 and yn+1, we use the corrector formulas as follows: (26)y(xn+1)=y(xn)-h720×(-251fn+1-646fn+264fn-1-106fn-2+19fn-3),y(xn+1)=y(xn)+hy(xn)-h21440×(-135fn+1-752fn+246fn-1-96fn-2+17fn-3).

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 , variable multistep method (VMM) in , and dde23 in MATLAB solver, respectively.

Problem 1.

Consider (27)y(t)=-12y(t)+12y(t-π),t[0,π],y(t)=1-sin(t),-πt0.

Exact solution (28)y(t)=1-sin(t).

Problem 2.

Consider (29)y(t)+y(t)=y(t-1),t[0,1],y(t)=t2+3t+2,-1t0,y(0)=0.

Exact solution (30)y(t)=4cos(t)-sin(t)+t2+t-2.

Problem 3.

Consider (31)y′′(t)  =y(t-π),t[0,π],y(t)=sin(t),-πt0.

Exact solution (32)y(t)=sin(t).

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 13.

Comparison of the numerical results for solving Problem 1.

i Cubic spline  h=π/(10*2i) Direct method h=π/(10*2i)
MAXE MAXE FCN
0 1.84 E - 02 6.12 E - 06 122
1 4.62 E - 03 3.10 E - 07 288
2 1.16 E - 03 2.92 E - 08 494
3 2.89 E - 04 2.87 E - 09 819
4 7.23 E - 05 2.31 E - 10 1231
5 1.81 E - 05 2.10 E - 11 1960
6 4.52 E - 06 6.37 E - 12 3331

Comparison of the numerical results for solving Problem 2.

Variable multistep method  Direct method
t MAXE t h MAXE FCN
0.1280 4.981077 E - 08 0.1280 0.01280 1.187189 E - 09 61
0.2360 1.726081 E - 07 0.2360 0.02360 1.376962 E - 08 67
0.3418 3.588844 E - 07 0.3418 0.03418 6.102021 E - 08 67
0.4444 5.915465 E - 07 0.4444 0.04444 1.761052 E - 07 67
0.5440 8.587104 E - 07 0.5440 0.05440 7.825735 E - 07 67
0.6412 1.149535 E - 06 0.6412 0.06412 2.571413 E - 07 67
0.7346 1.449843 E - 06 0.7346 0.07346 1.366551 E - 06 67
0.8264 1.756201 E - 06 0.8264 0.08264 2.218134 E - 06 69
0.9136 2.051398 E - 06 0.9136 0.09136 3.353080 E - 06 73
1.0000 2.341980 E - 06 1.0000 0.10000 4.862444 E - 06 73

Comparison of the numerical results for solving Problem 3.

MATLAB solver dde23 Direct method
RT AT MAXE TS TFS FCN h MAXE TS TFS FCN
1 E - 3 1 E - 6 6.5248 E - 05 20 1 64 Pi/10 9.9016 E - 05 7 0 62
1 E - 4 1 E - 6 7.1874 E - 06 37 1 115 Pi/20 7.7395 E - 06 17 0 82
1 E - 5 1 E - 6 7.1018 E - 07 74 0 233 Pi/50 2.4408 E - 07 47 0 142
1 E - 6 1 E - 7 7.1144 E - 08 158 0 475 Pi/100 1.6530 E - 08 97 0 242
1 E - 7 1 E - 8 7.1382 E - 09 340 0 1021 Pi/200 1.0953 E - 09 197 0 442
1 E - 8 1 E - 9 7.1507 E - 10 732 0 2197 Pi/250 4.6437 E - 10 247 0 542
1 E - 9 1 E - 10 7.1574 E - 11 1577 0 4732 Pi/500 4.8654 E - 11 497 0 1042

The numerical results for solving Problems 13 are displayed in Tables 13.

In Problem 1, we solved the DDEs by the direct method and compare our results with the cubic spline method in . Table 1 shows that the direct method managed to obtain highly accurate results compared to the cubic spline method at the same values of h. At larger step size, that is, h=(π/10), we observed that the maximum error obtained by the direct method and the cubic spline is 6.12E-06and 1.84E-02, respectively. We could also observe that the maximum error for the direct method and the cubic spline was comparable, that is, 6.12E-06 and 4.52E-06 at h=(π/10) and π/(10*26), 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.

Comparison of maximum error between cubic spline and direct method 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  with varies step sizes (range from 0.0016 to 0.002) at different values of t 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 t.

Comparison of maximum error between variable multistep method and direct method for solving Problem 2.

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.

Comparison of maximum error and function calls between dde23 and direct method for solving Problem 3.

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 h :

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 .

Acknowledgment

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

San H. C. Majid Z. A. Othman M. Solving delay differential equations using coupled block method Proceedings of the 4th International Conference on Modeling, Simulation and Applied Optimization (ICMSAO '11) April 2011 2-s2.0-79959684437 10.1109/ICMSAO.2011.5775484 Ismail F. Al-Khasawneh R. A. Lwin A. S. Suleiman M. B. Numerical Treatment of Delay Differential Equations By Runge-Kutta Method Using Hermite Interpolation 2002 Matematika Radzi H. M. Majid Z. A. Ismail F. Suleiman M. Two and three point one-step block methods for solving delay differential equations Journal of Quality Measurement and Analysis 1823 82 1 29 41 Ishak F. Suleiman M. B. Omar Z. Two-point predictor-corrector block method for solving delay differential equations Matematika 2008 24 2 131 140 El-Safty A. Approximate solution of the delay differential equation y=f(x,y(x),y(α(x))) with cubic spline functions Bulletin of the Faculty of Science Assiut University 1993 22 67 73 Evans D. J. Raslan K. R. The Adomian decomposition method for solving delay differential equation International Journal of Computer Mathematics 2005 82 1 49 54 2-s2.0-27944439311 10.1080/00207160412331286815 ZBL1069.65074 Majid Z. A. Azmi N. A. Suleiman M. Solving second order ordinary differential equations using two point four step direct implicit block method European Journal of Scientific Research 2009 31 1 29 36 2-s2.0-67649801832 Majid Z. A. Suleiman M. B. Direct integration implicit variable steps method for solving higher order systems of ordinary differential equations directly Sains Malaysiana 2006 35 2 63 68 2-s2.0-34548712293 ZBL1128.65056 Majid Z. A. See P. P. Suleiman M. Solving directly two point non linear boundary value problems using direct Adams Moulton method Journal of Mathematics and Statistics 2011 7 2 124 128 2-s2.0-84857529689 10.3844/jmssp.2011.124.128 Gear C. W. Numerical Initial Value Problems in Ordinary Differential Equations 1971 Englewood Cliffs, NJ, USA Prentice-Hall Henrici P. Discrete Variable Methods in Ordinary Differential Equations 1962 New York, NY, USA John Wiley & sons Lambert J. D. Computational Methods in Ordinary Differential Equations 1973 New York, NY, USA John Wiley & Sons Majid Z. A. Mokhtar N. Z. Suleiman M. Direct two-point block one-step method for solving general second-order ordinary differential equations Mathematical Problems in Engineering 2012 2012 16 2-s2.0-84858126713 10.1155/2012/184253 184253 ZBL1264.65112 Fatunla S. O. Block methods for second order ODEs International Journal of Computer Mathematics 1991 41 55 63 10.1080/00207169108804026 Ehigie J. O. Okunuga S. A. Sofoluwe A. B. 3-point block methods for direct integration of general second-order ordinary differential equations Advances in Numerical Analysis 2011 2011 14 513148 10.1155/2011/513148 Martín J. A. García O. Variable multistep methods for higher-order delay differential equations Mathematical and Computer Modelling 2002 36 7-8 805 820 2-s2.0-0037069620 Kierzenka J. Shampine L. F. Thompson S. Solving delay differential equations with dde23 http://www.mathworks.com/dde_tutorial