3-Point Implicit Block Multistep Method for the Solution of First ... - EMIS

1 downloads 0 Views 115KB Size Report
4 Oct 2010 - order is one less than the order of corrector formula. The interpolation ..... [12] J. B. Rosser, A Runge-Kutta for all seasons, SIAM Rev. 9 (1967) ...
BULLETIN of the M ALAYSIAN M ATHEMATICAL S CIENCES S OCIETY

Bull. Malays. Math. Sci. Soc. (2) 35(2A) (2012), 547–555

http://math.usm.my/bulletin

3-Point Implicit Block Multistep Method for the Solution of First Order ODEs 1

S. M EHRKANOON , 2 Z.A. M AJID , 3 M. S ULEIMAN 4 K.I. OTHMAN AND 5 Z.B. I BRAHIM

1,2,3,5 Department

of Mathematics, Universiti Putra Malaysia, 43400 Serdang, Selangor, Malaysia of Mathematics, Faculty of Information Technology and Quantitative Science, Universiti Technologi MARA, 40450 Shah Alam, Selangor, Malaysia 1 [email protected]

4 Department

Abstract. A new 3-point three step method is developed for solving system of first order ordinary differential equations (ODEs). This method at each step approximates the solution at three points simultaneously using variable step size. The method is in a simple form as Adams Moulton method with the specific aim of gaining efficiency. The Gauss-Seidel style is used for the implementation of the proposed method in PE(CE) mode. The stability regions of the method are discussed. Numerical results show that the proposed method is more efficient than some existent block method, in terms of accuracy, total number of steps and function calls and execution times 2010 Mathematics Subject Classification: Primary: 65L05, 65L06 Keywords and phrases: 3-point block method, ordinary differential equation, numerical method.

1. Introduction In this paper, the initial value problems (IVPs) in the following form will be considered (1.1)

y′ = f (x, y)

y(a) = y0 , a ≤ x ≤ b.

Block methods are one of the numerical methods which have been introduced by several authors such as [2, 7, 11, 12, 13]. One of the advantages of block methods is that at each step of the application we can obtain approximate solution in more than one point. The number of points depends on the construction of the block method. Primary study on this research area may be found in [4, 14]. The authors [7] have introduced 3-point diagonally implicit block method (3P1DI) using the Jacobi iteration approach during the implementation of the 3P1DI code. Zanariah et al. in [8, 9] have used Gauss-Seidel approach for the implementation of 2-point block one step and 3-point block one step methods. In this paper, the same approach as in [8, 9] will be considered for the 3-point implicit block multistep method. The proposed block method will approximate the solutions at three points simultaneously at each step using variable step size. Received: June 22, 2009; Revised: October 4, 2010.

S. Mehrkanoon, Z. A. Majid, M. Suleiman, K. I. Othman and Z. B. Ibrahim

548

The method is derived by using Lagrange interpolation polynomial and the closest point in the interval will be considered for obtaining the corrector and predictor formula. Therefore, the approximation values of yn+1 , yn+2 and yn+3 are obtained by integrating (1.1) over the interval [xn , xn+1 ], [xn+1 , xn+2 ] and [xn+2 , xn+3 ] respectively. 2. Derivation of 3PG method In Figure 1, the approximations of yn+1 , yn+2 and yn+3 with step size h at the points xn+1 , xn+2 and xn+3 respectively are approximated simultaneously using four back values at the points xn , xn−1 , xn−2 and xn−3 of the previous three steps where each interval has step size rh. The set of points {xn−5 , . . . , xn } are used for deriving the predictor formula which its order is one less than the order of corrector formula. The interpolation points involved for obtaining the corrector formula for yn+1 , yn+2 , yn+3 ,

xn−5

rh

qh

qh xn−4

xn−3

xn−2

xn−1

h

h

rh

rh

xn

xn+1

h xn+2

xn+3

Figure 1. 3-point block multistep method

are {(xn−3 , fn−3 ), . . . , (xn+3 , fn+3 )}. The first point, yn+1 , is derived by integrating (1.1) as follow, Z Z xn+1

xn

xn+1

y′ dx =

f (x, y) dx.

xn

Then y(xn+1 ) = y(xn ) +

(2.1)

Z xn+1

f (x, y) dx.

xn

The function f (x, y) in (2.1) is approximated by the Lagrange polynomial which interpolates the set of mentioned points. Evaluating the integral using MAPLE gives the formula for the first point in terms of r as follows:  66 + 357r + 532r2 33 + 238r + 399r2 yn+1 = yn + h − f + fn−2 n−3 7560r3 (1 + r)(1 + 3r)(2 + 3r) 840r3 (1 + r)(1 + 2r)(3 + 2r) −

33 + 357r + 1463r2 + 2835r3 66 + 595r + 1596r2 fn f + n−1 840r3(1 + r)(2 + r)(3 + r) 7560r3

16 + 147r + 462r2 + 525r3 214 + 1680r + 4389r2 + 3990r3 fn+1 − fn+2 840(1 + r)(1 + 2r)(1 + 3r) 840(1 + r)(2 + r)(2 + 3r)  18 + 168r + 539r2 + 630r3 fn+3 . + 7560(1 + r)(3 + r)(3 + 2r)

+

The approximate value for second point, yn+2 , is derived by integrating (1.1) over the interval [xn+1 , xn+2 ] and approximating f using the same Lagrange polynomial. Then evaluating the integral using MAPLE the formula of the second point in terms of r is obtained

3-Point Implicit Block Multistep Method for the Solution of First Order ODEs

549

as follows: yn+2 = yn+1 + h +



59 + 154r + 77r2 354 + 693r + 308r2 f − fn−2 n−3 7560r3(1 + r)(1 + 3r)(2 + 3r) 280r3(1 + r)(1 + 2r)(3 + 2r)

118 + 385r + 308r2 177 + 693r + 847r2 + 315r3 fn fn−1 − 3 280r (1 + r)(2 + r)(3 + r) 7560r3

368 + 1281r + 1386r2 + 455r3 398 + 1680r + 2233r2 + 910r3 fn+1 + fn+2 280(1 + r)(1 + 2r)(1 + 3r) 280(1 + r)(2 + r)(2 + 3r)  402 + 1512r + 1771r2 + 630r3 fn+3 . − 7560(1 + r)(3 + r)(3 + 2r)

+

For deriving the approximate value for the third point, yn+3 , interval [xn+2 , xn+3 ] is applied and after evaluating the integral, the formula for the third point is obtained as follows: 

yn+3 = yn+2 + h − −

873 + 1358r + 399r2 1746 + 2037r + 532r2 f + fn−2 n−3 7560r3(1 + r)(1 + 3r)(2 + 3r) 840r3(1 + r)(1 + 2r)(3 + 2r)

1746 + 3395r + 1596r2 873 + 2037r + 1463r2 + 315r3 fn f + n−1 840r3(1 + r)(2 + r)(3 + r) 7560r3

2866 + 6720r + 4851r2 + 1050r3 4744 + 11613r + 8778r2 + 1995r3 fn+1 + fn+2 840(1 + r)(1 + 2r)(1 + 3r) 840(1 + r)(2 + r)(2 + 3r)  19338 + 42168r + 28259r2 + 5670r3 fn+3 . + 7560(1 + r)(3 + r)(3 + 2r) −

The predictor formula can be derived similarly, but the interpolation points involved are {(xn−5 , fn−5 ), . . . , (xn , fn )}. The step size strategy in the code is the same as [7], the choice for next step size will be limited to half, double or as same as the current step size. In the developed code, when the next successful step size is doubled, the ratio r is 0.5 and q can be 0.5 or 0.25. If the next successful step size remain constant, r is 1 and q can be 1, 2 or 0.5. In case of step size failure, r is 2 and q is 2. Namely taking r = 1 in the above mentioned formulas, we will have the following corrector formulas for the first, second and third point respectively: h (−191 fn−3 + 1608 fn−2 − 6771 fn−1 + 37504 fn + 30819 fn+1 − 2760 fn+2 + 271 fn+3 ) , 60480 h (271 fn−3 − 2088 fn−2 + 7299 fn−1 − 16256 fn + 46989 fn+1 + 25128 fn+2 − 863 fn+3 ) yn+2 = yn+1 + , 60480 yn+3 = yn+2

yn+1 = yn +

+

h (−863 fn−3 + 6312 fn−2 − 20211 fn−1 + 37504 fn − 46461 fn+1 + 65112 fn+2 + 19087 fn+3 ) . 60480

It can be seen that the derived corrector formulas when r = 1, belong to the Generalized Linear Methods (GLM), see [1, 3]. In particular, the formula for approximating the third point, yn+3 coincides with the 6-step Adams method. In our code, an estimation of local truncation error is obtained by comparing the derived corrector formula of seventh order to the the same corrector formula of sixth order at the third point.

550

S. Mehrkanoon, Z. A. Majid, M. Suleiman, K. I. Othman and Z. B. Ibrahim

3. Implementation of 3PG method The code starts by finding the initial points in the starting block for the method. Initially we use the Euler method to find the initial six starting points {xn− j }0j=5 using constant h. Once we find the initial points for the first starting block, then we could implement the proposed block method until the end of the interval. The method is implemented in PE(CE)t mode where 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. During the implementation, the iteration will involve the Gauss Seidel style. The t th iteration process for the corrector formula is as follows: 3

C : ytn+1 = yn +



αn+ j fn+ j

j=−3

E : f (xn+1 , ytn+1 ) C : ytn+2 = ytn+1 +

3



βn+ j fn+ j

j=−3

E : f (xn+2 , ytn+2 ) C : ytn+3 = ytn+2 +

3



γn+ j fn+ j

j=−3

E : f (xn+3 , ytn+3 )

t = 1, 2, ...

where {αn+ j }3j=−3, {βn+ j }3j=−3 and {γn+ j }3j=−3 coincide with the coefficients of the above mentioned corrector formula for the first, second and third point respectively. The estimated value of ytn+1 does not use the approach of Gauss-Seidel iteration. While for obtaining the approximate value of {ytn+i }3i=2 at points {xn+i }3i=2 respectively the Gauss Seidel iteration is involved. In our code, the choice for next step size is limited to half, double or the same as the current step size. If the approximated solution at step i, has desired accuracy, i.e. it is acceptable, therefore the choice for next step will be doubled or the same as current step size which may be specified by step size controller. Otherwise the step size controller will allow the step size to become half. After a successful step, the step size increment is given by: hnew = τ × hold ×



T OL LT Ek

1 k

,

if hnew ≥ 2 × hold then hnew = 2 × hold else hnew = hold where τ = 0.8 is a safety factor. The purpose of having the safety factor is to increase the probability that the next step will be accepted. The algorithm when the step failure occurs is hnew =

1 × hold . 2

3-Point Implicit Block Multistep Method for the Solution of First Order ODEs

551

In the developed code, when the next step size is doubled, the ratio r is 0.5 and q can be 0.5 or 0.25, but if the next step size remains constant, r is 1 and q can be 1 or 2 or 0.5. In case of step size failure, r is 2, and q is 2. 4. Absolute stability The absolute stability of 3PG method using a linear first order test problem (4.1)

y′ = f = λ y

is discussed. The stability region is plotted when the step size ratio is constant, doubled and halved for the method. The test Equation (4.1) is substituted into the corrector formula of the 3PG method. Setting the determinant of the corrector formula written in matrix form to zero will give the stability polynomial. The stability polynomials of 3PG method at r = 1, 0.5, 2 are as follow: For r = 1,     796417h¯ 3 24337h¯ 2 659h¯ 547411h¯ 3 63859h¯ 2 11947h¯ + − + 1 t6 + − − − − 1 t5 − 6048000 120960 10080 756000 25200 315     3 2 3 2 2 3 ¯ ¯ ¯ ¯ ¯ ¯ h t 593h 13063h 559h 4 101h 7879h t + t3 − + + + = 0. + 63000 403200 2016 756000 75600 6048000 For r = 2,   7024939h¯ 3 23795h¯ 2 507h¯ − + − + 1 t6 55566000 37044 392     523433h¯ 3 455029h¯ 2 3133h¯ 4 4281161h¯ 3 706621h¯ 2 163693h¯ 5 t − − −1 t + + + + − 7408800 604800 94080 50803200 13547520 94080   5851h¯ 3 5809h¯ 2 h¯ 3t 2 + + = 0. t3 − 948326400 474163200 14224896000 For r = 0.5,     9633853h¯ 3 306023h¯ 2 46723h¯ 3545993h¯ 3 79099h¯ 2 843h¯ + − + 1 t6 + − + − − 1 t5 − 55566000 185220 784 3704400 264600 11760     3 3 3 2 2 ¯ ¯ ¯ ¯ ¯ ¯ 252761h 15412h 512h t 2 3685h 3011h 4 21248h + t + t3 − + + + = 0. 158760 1323 1470 231525 231525 3472875 where h¯ = hλ and the stability regions are plotted in Figure 2. In Figure 2, the stability region is inside the boundary of the dotted points. The stability region is larger when the step size is halved (r = 2) compared to the step size being doubled (r = 0.5) or constant (r = 1). This is expected since the region should get larger with smaller step size. Since the method is implemented in PE(CE)t mode, we are interested to show the stability region of the predictor and corrector formula that involved for the most cases i.e constant and doubled step size. Substituting the predictor formula into the corrector formula and then applying (4.1) the stability polynomial will be obtained. Figure 3 (a) and (b), illustrate the stability region of the method for t = 1 and 2 when r = q = 0.5 and r = q = 1 respectively where t is the number of iterations. Through our numerical experiences, the number of iterations is at most 2. The stability region of method is inside the boundary of the dotted

552

S. Mehrkanoon, Z. A. Majid, M. Suleiman, K. I. Othman and Z. B. Ibrahim

r=2 r=1 r = 0.5

Figure 2. Stability region of 3PG method

points. It is observed from Figure 3, that the stability region is larger as the number of iterations is increased. The method developed is suitable for the numerical integration of non stiff and mildly stiff differential equations. (a)

(b) t=2

t=2 t=1 t=1

Figure 3. Stability region of 3PG method when both predictor and corrector formula are taken into account, for t=1 and 2

5. Numerical results In order to show the efficiency of our presented method, we consider three given problems to compare our computed solutions with the solutions obtained in [7]. The following notation is used in the tables: Problem 1. Negative exponential problem. (Mildly stiff) y′ = −0.5y, y(0) = 1, [a, b] = [0, 20]. The exact solution is given by y(x) = e−0.5x . Problem 2.( Hairer et al. [5]) A two-body orbit problem (Mildly stiff) q y2 y1 y′1 = y3 , y′2 = y4 , y′3 = − 3 , y′4 = − 3 , r = y21 + y22 r r

3-Point Implicit Block Multistep Method for the Solution of First Order ODEs

TOL MTD TS FS MAXE FN 3PG 3P1DI TIME

553

Tolerance Method Employed Total Successful Steps Total Failure Steps Absolute value of the maximum error of the computed solution Total Function Calls Implementation of the three point block method using half Gauss Seidel iteration Implementation of the three point one block diagonally implicit method using Jacobi iteration in [7] The execution time taken in microsecond

1+ε , 1−ε The values of ε taken in solving the problem 2, are 0 and 0.5. y1 (0) = 1 − ε ,

y2 (0) = 0,

y3 (x) = 0,

y4 (x) =

r

[a, b] = [0, 20].

Problem 3.(Johnson and Barney [6]) Nonlinear non stiff Krogh’s problem y′i = −βi yi + y2i ,

yi (0) = −1, [a, b] = [0, 20], i = 1, 2, 3, 4.

Case (I): β1 = β2 = 0.2, β3 = 0.3, β4 = 0.4. Case (II): β1 = 2, β2 = 3, β3 = 4, β4 = 5. The exact solution is given by yi (x) = βi /(1 + cieβi x ), ci = −(1 + βi). It should be noted that in Problem 3, we consider two cases (I) and (II). Case (I) represents Problem 3 with the same initial values as in [6] and the obtained numerical results are compared with the recorded results in [7]. Case (II) points out the artificial initial values, with emphasis on β1 6= β2 . The error calculated are defined as (yi )t − (y(xi )t ) (ei )t = A + B(y(xi ))t

where (y)t , is the t-th component of the approximate y. A = 1, B = 0 corresponds to the absolute error test, A = 0, B = 1 corresponds to the relative error test and finally A = 1, B = 1 corresponds to the mixed error test (see [10]). The mixed error test is utilized for all tested problems. The maximum error is defined as follows: MAXE = max ( max (ei )t ) 1≤i≤P 1≤t≤N

where N is the number of equation in the system and P is the number of points which at each step their solutions will be estimated. In the code, we iterate the corrector to converge using the convergence criteria: t+1 t y n+3 − yn+3 < 0.1 × TOL

and t is the number of iterations. The code is written in C language and executed on DYNIX/ptx operating system. The numerical results of the above tested problems are tabulated in Table 1–3. Tables 1–3, show that the total number of steps and function calls taken by 3PG method are less than those in 3P1DI method in all tested problems. At larger tolerances, the maximum

554

S. Mehrkanoon, Z. A. Majid, M. Suleiman, K. I. Othman and Z. B. Ibrahim

Table 1. Numerical results of 3PG and 3P1DI methods for solving problem 1 TOL

MTD

TS

FS

MAXE

FN

TIME

10−2

3PG 3P1DI 3PG 3P1DI 3PG 3P1DI 3PG 3P1DI 3PG 3P1DI

18 29 24 38 32 49 50 70 80 95

0 0 0 0 0 0 0 0 0 0

1.10 × 10−4 1.55 × 10−4 9.57 × 10−7 1.16 × 10−5 6.64 × 10−9 7.72 × 10−8 7.46 × 10−11 2.51 × 10−9 5.64 × 10−13 1.42 × 10−10

143 215 206 281 293 398 443 620 749 959

246 525 184 236 206 293 274 419 442 590

10−4 10−6 10−8 10−10

Table 2. Numerical results of 3PG and 3P1DI method for solving problem 2 TOL

ε

MTD

TS

FS

MAXE

FN

TIME

10−2

0

3PG 3P1DI 3PG 3P1DI 3PG 3P1DI 3PG 3P1DI 3PG 3P1DI 3PG 3P1DI 3PG 3P1DI 3PG 3P1DI 3PG 3P1DI 3PG 3P1DI

24 45 56 45 57 95 56 71 187 119 136 330 274 293 614 -

0 0 3 0 0 6 0 0 6 0 0 3 0 0 6 -

4.17 × 10−2 5.17 × 10−2 8.61 × 10−1 5.16 × 10−5 8.57 × 10−5 2.16 × 10−3 1.08 × 10−5 8.43 × 10−6 3.95 × 10−5 1.40 × 10−8 3.36 × 10−8 1.68 × 10−7 2.10 × 10−11 6.11 × 10−10 6.53 × 10−9 -

293 353 581 467 626 1055 701 983 1829 1325 1730 3032 2414 3611 5645 -

877 1331 1423 1206 1559 2398 1595 2277 4851 3117 3978 8143 6244 8422 1267 -

0.5 −4

10

0.5 10−6 0.5 −8

10

0.5 −10

10

0.5

Table 3. Numerical results of 3PG and 3P1DI methods for solving problem 3 TOL

Case

MTD

TS

FS

MAXE

FN

TIME

10−2

(I)

3PG 3P1DI 3PG 3P1DI 3PG 3P1DI 3PG 3P1DI 3PG 3P1DI 3PG 3P1DI 3PG 3P1DI 3PG 3P1DI 3PG 3P1DI 3PG 3P1DI

19 28 70 28 42 75 42 59 97 69 88 115 118 139 184 -

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -

2.45 × 10−4 1.38 × 10−4 1.54 × 10−4 1.14 × 10−6 1.17 × 10−6 1.95 × 10−6 8.31 × 10−9 3.99 × 10−8 1.72 × 10−8 7.79 × 10−11 1.02 × 10−9 2.43 × 10−10 9.82 × 10−13 3.32 × 10−11 1.94 × 10−12 -

179 227 722 254 320 746 392 494 974 650 797 1073 1112 1316 1691 -

560 889 1402 582 754 1448 763 1062 1795 1250 1598 2083 2102 2535 3254 -

(II) −4

10

(I) (II)

10−6

(I) (II)

10−8

(I) (II)

−10

10

(I) (II)

3-Point Implicit Block Multistep Method for the Solution of First Order ODEs

555

error of 3PG is comparable or better compared to 3P1DI. The 3PG method has better accuracy compared to 3P1DI method specially for finer tolerance. It should be noted that, the corrector formula of the 3P1DI for the first, second and third point are of the fourth, sixth and seventh order respectively. While in the new proposed method, all the corrector formula are of the same order i.e. seventh order. It is obvious that 3PG method is faster than 3P1DI method in all tolerance when solving three given problems. 6. Conclusion In this paper, we proposed a 3-point three-step method for solving system of initial value problems of ODEs. From the numerical results we can conclude that the method has superiority in terms of total number of steps, maximum error and function calls over the 3P1DI code in [7]. References [1] L. Brugnano and D. Trigiante, Solving Differential Problems by Multistep Initial and Boundary Value Methods, Stability and Control: Theory, Methods and Applications, 6, Gordon and Breach, Amsterdam, 1998. [2] K. Burrage, Efficient block predictor-corrector methods with a small number of corrections, J. Comput. Appl. Math. 45 (1993), no. 1-2, 139–150. [3] J. C. Butcher, Numerical Methods for Ordinary Differential Equations, Wiley, Chichester, 2003. [4] O.S. Fatunla, Block methods for second order ODEs, Intern. J. Computer Math. 41 (1990), 55–63. [5] E. Hairer, S. P. Nørsett and G. Wanner, Solving Ordinary Differential Equations. I, second edition, Springer Series in Computational Mathematics, 8, Springer, Berlin, 1993. [6] A. I. Johnson and J. R. Barney, Numerical solution of large systems of stiff ordinary differential equations in a modular simulation framework, in Numerical Methods for Differential Systems, 97–124, Academic Press, New York, 1976. [7] Z. A. Majid and M. Suleiman, Variable steps three point diagonally implicit block method for solving ordinary differential equations, Int. J. Appl. Math. Anal. Appl. 3 (2008), no. 1, 79–90. [8] Z.A. Majid, M. Suleiman, F. Ismail and M. Othman, 2-point implicit block one-step method half Gauss-Seidel for solving first order ordinary differential equations, Mathematika 19 (2003), no. 2, 91–100. [9] Z. Abdul Majid, M. B. Suleiman and Z. Omar, 3-point implicit block method for solving ordinary differential equations, Bull. Malays. Math. Sci. Soc. (2) 29 (2006), no. 1, 23–31. [10] F. Mazzia and C. Magherini, Test Set for Initial Value Problem Solvers, Department of Mathematics, University of Bari, February 2008. Available at: http://www.dm.uniba.it/∼testset [11] W. E. Milne, Numerical Solution of Differential Equations, Wiley, New York, 1953. [12] J. B. Rosser, A Runge-Kutta for all seasons, SIAM Rev. 9 (1967), 417–452. [13] L. F. Shampine and H. A. Watts, Block implicit one-step methods, Math. Comp. 23 (1969), 731–740. [14] P. B. Worland, Parallel methods for the numerical solution of ordinary differential equations, IEEE Trans. Computers C-25 (1976), no. 10, 1045–1048.

Suggest Documents