Nonpolynomial spline approach to the solution of a system of second-order boundary-value problems

11

Click here to load reader

Transcript of Nonpolynomial spline approach to the solution of a system of second-order boundary-value problems

Page 1: Nonpolynomial spline approach to the solution of a system of second-order boundary-value problems

Applied Mathematics and Computation 173 (2006) 1208–1218

www.elsevier.com/locate/amc

Nonpolynomial spline approachto the solution of a system

of second-order boundary-value problems

Siraj-ul-Islam *, Ikram A. Tirmizi

GIK Institute of Engineering Sciences and Technology, Topi (NWFP), Pakistan

Abstract

We use a cubic spline equivalent nonpolynomial spline functions to develop a numer-

ical method for computing approximations to the solution of a system of second-order

boundary-value problems associated with obstacle, unilateral, and contact problems.

We show that the present method gives approximations which are better than those

produced by other collocation, finite difference and spline methods. Convergence

analysis of the method is discussed. A numerical example is given to illustrate practical

usefulness of our method.

� 2005 Elsevier Inc. All rights reserved.

Keywords: Nonpolynomial splines; Finite-difference methods; Obstacle problems; Boundary-value

problems

0096-3003/$ - see front matter � 2005 Elsevier Inc. All rights reserved.

doi:10.1016/j.amc.2005.04.064

* Corresponding author.

E-mail addresses: [email protected] ( Siraj-ul-Islam), [email protected] (I.A. Tirmizi).

Page 2: Nonpolynomial spline approach to the solution of a system of second-order boundary-value problems

Siraj-ul-Islam, I.A. Tirmizi / Appl. Math. Comput. 173 (2006) 1208–1218 1209

1. Introduction

In this paper, we apply nonpolynomial spline functions to develop a numer-

ical method for obtaining smooth approximations to the solution of a system

of second-order boundary-value problems of the type

y00 ¼f ðxÞ a 6 x 6 c;

gðxÞyðxÞ þ f ðxÞ þ r c 6 x 6 d;

f ðxÞ d 6 x 6 b;

8><>: ð1:1Þ

with the boundary conditions

yðaÞ ¼ a1 and yðbÞ ¼ a2 ð1:2Þand the continuity conditions of y and y 0 at c and d. Here, f and g are contin-

uous functions on [a,b] and [c,d] respectively. The parameters a1, a2 and r are

real finite constants. Such type of systems arise in the study of obstacle, unilat-eral, moving and free boundary-value problems, see, for example [1–8,

12–15,20,25,26] and the references therein. In general, it is not possible to

obtain the analytical solution of (1.1) for arbitrary choices of f(x) and g(x),

we usually resort to some numerical methods for obtaining an approximate

solution of (1.1). Villagio [26] used the classical Rayleigh–Ritz method for solv-

ing a special form of (1.1), namely,

y00 ¼

0 0 6 x 6p4;

yðxÞ � 1p46 x 6

3p4;

03p4

6 x 6 p;

8>>>>><>>>>>:

ð1:3Þ

with boundary conditions

yð0Þ ¼ 0; yðpÞ ¼ 0

and the continuity conditions of y, and y 0 at p4and 3p

4. After this, Noor and Kha-

lifa [16] have solved problem (1.1) and (1.2) using collocation method with cu-

bic splines as basis functions. They have shown that this collocation methodgives approximation with first-order accuracy. Similar conclusions were

pointed out by Noor and Tirmizi [19], where second-order finite difference

methods were used to solve the problem (1.1). On the other hand, Al-Said

[2,5] has developed and analyzed quadratic and cubic splines for solving

(1.1). They proved that both quadratic and cubic splines methods can be used

to produce second-order smooth approximation for the solution of Eq. (1.1)

and its first derivative over the whole range of integration. More recently

Siraj-ul-Islam et al. [24] have established and analyzed smooth approximationfor third-order nonlinear boundary-value problems and a system of third-order

Page 3: Nonpolynomial spline approach to the solution of a system of second-order boundary-value problems

1210 Siraj-ul-Islam, I.A. Tirmizi / Appl. Math. Comput. 173 (2006) 1208–1218

boundary-value problems based on nonpolynomial splines which provides

bases for our method.

In the present paper, we apply nonpolynomial spline functions that have a

polynomial and trigonometric parts to develop a new numerical method for

obtaining smooth approximations to the solution of such system of second-

order differential equations. The new method is of order 2 for arbitrary aand b if 2a + 2b � 1 = 0 and method of order 4 if a ¼ 1

12along with 2a +

2b � 1 = 0. Our method performs better than the other collocation, finite dif-

ference, and spline methods of same order and thus represents an improvement

over existing methods (see [2,5,11,16,19,22,23], and the references therein). The

spline function we propose in this paper has the form Span{1,x, coskx, sinkx}

where k is the frequency of the trigonometric part of the splines function which

can be real or pure imaginary and which will be used to raise the accuracy of

the method. Thus, in each subinterval xi 6 x 6 xi+1, we have

span 1; x; sin kx; cos kxf g or

span 1; x; sinh kx; cosh kxf g or

span 1; x; x2; x3� �

ðwhen k ¼ 0Þ.

This approach has the advantage over finite difference methods [4,10,11]

that it provides continuous approximations to not only for y(x), but also for

y 0, y00 and higher derivatives at every point of the range of integration. Also,

the C1-differentiability of the trigonometric part of nonpolynomial splines

compensates for the loss of smoothness inherited by polynomial splines. In Sec-

tion 2, we develop the new nonpolynomial spline method for solving (1.1). The

convergence analysis of the method is considered in Section 3. Section 4 is de-voted to the application to a system of second-order boundary-value problems

and comparison of numerical results with other known methods.

2. Numerical method

For simplicity, we take c ¼ 3aþb4

and d ¼ aþ3b4

in order to develop the numer-

ical method for approximating solution of a system of differential equations(1.1). For this purpose, we divide the interval [a,b] into n equal subintervals

using the grid points xi = a + ih, i = 0,1, . . ., N, x0 = a, xn = b and h ¼ b�aN .

For each segment, the polynomial Pi(x) has the form

P iðxÞ ¼ ai sin kðx� xiÞ þ bi cos kðx� xiÞ þ ciðx� xiÞ þ di

i ¼ 0; 1; . . . ;N ; ð2:1Þ

where ai, bi, ci and di are constants and k is free parameter and reduces to usual

cubic spline in [a,b] when k! 0.

Page 4: Nonpolynomial spline approach to the solution of a system of second-order boundary-value problems

Siraj-ul-Islam, I.A. Tirmizi / Appl. Math. Comput. 173 (2006) 1208–1218 1211

Let yi be an approximation to y(xi), obtained by the segment Pi(x) of the

mixed splines function passing through the points (xi,yi) and (xi+1,yi+1). To

obtain the necessary conditions for the coefficients introduced in Eq. (2.1),

we do not only require that Pi(x) satisfies (1.1) at xi and xi+1 and that the

boundary conditions (1.2) are fulfilled, but also the continuity of first and

second derivatives at the common nodes (xi,yi).To derive expression for the coefficients of Eq. (2.1) in terms of yi, yi+1, Di,

Di+1, Si and Si+1, we need to define

P iðxiÞ ¼ yi; P iðxiþ1Þ ¼ yiþ1; P 0iðxiÞ ¼ Di; P 0

iðxiþ1Þ ¼ Diþ1;

P 00i ðxiÞ ¼ Si; P 00

i ðxiþ1Þ ¼ Siþ1. ð2:2Þ

After some algebraic manipulation we get the following expressions:

ai ¼ h2�Siþ1 þ Si cosðhÞ

h2 sinðhÞ; bi ¼ �h2

Si

h2;

ci ¼yiþ1 � yi

hþ h Siþ1 þ Sið Þ

h2; di ¼ yi þ

h2Si

h2; ð2:3Þ

where by h = kh and i = 0,1,2, . . . ,N.

and Si ¼fi for 0 6 i <

n4

and3n4

6 i < n;

giyi þ fi þ ri forn46 i <

3n4.

8><>: ð2:4Þ

Using the continuity condition of the first derivative at (xi,yi), i.e.

P ð1Þi�1ðxiÞ ¼ P ð1Þ

i ðxiÞ, we get the following consistency relation

yi�1 � h2Si�1

1

h sin h� 1

h2

� �� 2yi � 2h2Si

1

h2� cos hh sin h

� �þ yiþ1

� h2Siþ1

1

h sin h� 1

h2

� �¼ 0; i ¼ 1; . . . ;N . ð2:5Þ

For simplicity we re-write Eq. (2.5)

�yi�1 þ 2yi � yiþ1 þ h2½aSi�1 þ 2bSi þ aSiþ1� ¼ 0; ð2:6Þ

where

a ¼ 1

h sin h� 1

h2

� �; b ¼ 1

h2� cos hh sin h

� �i ¼ 1; . . . ;N .

The local truncation errors ti, i = 1, . . ., N, associated with our scheme (2.6)

is

Page 5: Nonpolynomial spline approach to the solution of a system of second-order boundary-value problems

1212 Siraj-ul-Islam, I.A. Tirmizi / Appl. Math. Comput. 173 (2006) 1208–1218

ti ¼ h2ð1� 2a� 2bÞyð2Þi þ h41� 12a

12

� �yð4Þi ðfiÞ

þ h61� 30a360

� �yð6Þi ; 1 6 i 6 N . ð2:7Þ

Thus, for any choice of arbitrary a and b satisfying the condition

1 � 2a � 2b = 0, indicates that method (2.6) is second-order convergent. The

method is fourth-order convergent if 1 � 2a � 2b = 0 and a ¼ 112.

Remark 1. For a ¼ 16, b ¼ 2

3our method (2.6) reduces to the method given in

[1].

3. Convergence analysis

The method is described in matrix form in the following way. LetA ¼ ðaijÞNi;j¼1 denote the four diagonal matrix. Clearly the system (2.6) can be

expressed in matrix form as

AY ¼ Cþ T; ð3:1Þ

A~Y ¼ C; ð3:2Þ

AE ¼ T; ð3:3Þwhere Y = (yi), eY ¼ ð~yiÞ C = (ci), T = (ti), E ¼ ðeiÞ ¼ Y� eY be N-dimensional

column vectors, with ei is the discretization error, A = A0 + Q, Q = h2BG,

G = diag(gi), with gi 5 0 for ðnþ1Þ4

< i 6 3ðnþ1Þ4

, i = 1,2, . . ., N and the matrices

A0 and B are defined by

A0 ¼

3 �1

�1 2 �1

�1 2 �1

�1 2 �1

. . .

. . .

. . .

. . .

�1 2 �1

�1 3

26666666666666666666664

37777777777777777777775

; ð3:4Þ

Page 6: Nonpolynomial spline approach to the solution of a system of second-order boundary-value problems

Siraj-ul-Islam, I.A. Tirmizi / Appl. Math. Comput. 173 (2006) 1208–1218 1213

B ¼

2b a

a 2b a

a 2b a

a 2b a

. . .

. . .

. . .

. . .

a 2b a

a 2b

2666666666666666664

3777777777777777775

; ð3:5Þ

ci ¼

a1 � h2S1; i ¼ 1;

�h2Si; 2 6 i 6n4

and3n4þ 1 6 i 6 n� 1;

�h2½Si þ ar�; i ¼ n4

and i ¼ 3n4þ 1;

�h2½Si þ ðaþ 2bÞr�; i ¼ n4þ 1 and i ¼ 3n

4;

�h2½Si þ ð2aþ 2bÞr�; n4þ 2 6 i 6

3n4� 1;

a2 � h2Sn; i ¼ n;

8>>>>>>>>>>>>><>>>>>>>>>>>>>:

ð3:6Þwhere

Si ¼½2bf1 þ af2�; i ¼ 1;

½afi�1 þ 2bfi þ afiþ1�; 2 6 i 6 n� 1;

½afn�2 þ 2bfn�1�; i ¼ n.

8<: ð3:7Þ

Our main purpose is to derive a bound on kEk. From Eq. (3.3), we have

E ¼ A�1T ¼ ðA0 þ QÞ�1T ¼ ðI þ A�1

0 Q�1A0T;

kEk 6 kðI � A�10 QÞ�1k.kA�1

0 k.kTk;ð3:8Þ

where k Æ krepresents the 1-norm in matrix vector. Using the result kIk = 1,

and k(I + A)�1k 6 (I � kAk)�1 with kAk < 1, we get the following expression

from Eq. (3.8)

kEk 6kA�1

0 k.kTk1� kA�1

0 k.kQkð3:9Þ

provided that kA�10 k.kQk < 1. It was shown in [2,9,21] that

kA�10 k 6

ðb� aÞ2 þ h2

8h2

����� ¼ Oðh�2Þ. ð3:10Þ

Page 7: Nonpolynomial spline approach to the solution of a system of second-order boundary-value problems

1214 Siraj-ul-Islam, I.A. Tirmizi / Appl. Math. Comput. 173 (2006) 1208–1218

Now from Eq. (2.7) we have

kTk ¼ h41� 12a

12

� �M4; M4 ¼ max jyð4ÞðxÞj. ð3:11Þ

Thus, using Eqs. (3.9)–(3.11) and the fact that kBk = 1, and kGk 6 jg(x)j, weget

kEk 6kA�1

0 kM5h2

1� kkBkgMffi Oðh2Þ ð3:12Þ

provided gM < 1kBkk where k ¼ 1

8½ðb�aÞ2þh2�. The relation (3.12) shows that our

method (2.6) is second-order convergent.

Also for

1� 2a� 2b ¼ 0 and a ¼ 1

12; kTk ¼ h6

1

240

� �M6; M6 ¼ max jyð6ÞðxÞj.

ð3:13ÞThus, using Eqs. (3.9), (3.10) and (3.13) and the fact that kB k = 1, and

kGk 6 jg(x)j, we get

kEk 6kA�1

0 kM6h4

240½1� kkBkgM �ffi Oðh4Þ ð3:14Þ

provided gM < 1kBkk where k ¼ 1

8½ðb�aÞ2þh2�. The relation (3.14) shows that our

method (2.6) is fourth-order convergent.

4. Application

To illustrate the application of the numerical method developed in the pre-

vious sections we consider the second-order obstacle boundary-value problem

of finding y such that

�y00 P f ðxÞ; on X ¼ ½0; 1�

yðxÞ P wðxÞ; on X ¼ ½0; 1�

½y00ðxÞ þ f ðxÞ�½yðxÞ � wðxÞ� ¼ 0 on X ¼ ½0; 1�

yð0Þ ¼ yðpÞ ¼ 0;

9>>>>>=>>>>>;

ð4:1Þ

where f(x) is a given force on the string and w(x) is the elastic obstacle function.We study the problem (4.1) in the framework of variational inequality ap-

proach, it can be shown that, see [4,6,12,17,18], the problem (4.1) is equivalent

to the variational inequality problem

aðy; v� yÞ P hf ; v� yi for all v 2 k. ð4:2Þ

Page 8: Nonpolynomial spline approach to the solution of a system of second-order boundary-value problems

Siraj-ul-Islam, I.A. Tirmizi / Appl. Math. Comput. 173 (2006) 1208–1218 1215

This equivalence has been used to study the existence of a unique solution of

(4.1) see, for example [6,14,17]. Following the idea and technique of Lewy

and Stampacchia [12], the variational inequality (4.2) can be written as

y00 � 1ðy � wÞðy � wÞ ¼ 0; 0 < x < p;

yð0Þ ¼ yðpÞ ¼ 0;ð4:3Þ

where l(t) is the discontinuous function defined by

lðtÞ ¼1; for t P 0;

0; for t < 0

�ð4:4Þ

is known as the penalty function and w is the given obstacle function defined by

wðxÞ ¼

�1 for 0 6 x 6p4;

1 forp46 x 6

3p4;

�1 for3p4

6 x 6 p.

8>>>>>><>>>>>>:

ð4:5Þ

Eq. (4.3) describes the equilibrium configuration of an obstacle string pulled

at the ends and lying over elastic step of constant height 1 and unit rigidity.

Since obstacle function w is known, so it is possible to find the solution of

the problem in the interval [0,p].From Eqs. (4.3)–(4.5), we obtain the following system of differential

equations

y00 ¼f for 0 6 x 6

p4

and3p4

6 x 6 p;

y þ f � 1 forp46 x 6

3p4;

8>><>>: ð4:6Þ

with boundary conditions

yð0Þ ¼ yðpÞ ¼ 0 ð4:7Þand the condition of continuity of y and y 0 at x ¼ p

4and

3p4.

Example. We consider the system of differential Eq. (4.6) when f = 0,

y00 ¼0 for 0 6 x 6

p4

and3p4

6 x 6 p;

y � 1 forp46 x 6

3p4;

8>><>>: ð4:8Þ

with boundary condition (4.7). The analytical solution for this problem is given

by

Page 9: Nonpolynomial spline approach to the solution of a system of second-order boundary-value problems

Table 1

Observed maximum errors in absolute values associated with yi

h p20

p40

p80

Our method (2.10) a = 1/12, 2b = 1 � 2a 6.43 · 10�4 1.83 · 10�4 4.87 · 10�5

Al-Said [5] cubic spline 1.94 · 10�3 4.99 · 10�4 1.27 · 10�4

Al-Said [2] quadratic spline 2.2 · 10�3 5.87 · 10�4 1.51 · 10�4

Noor and Tirmizi [19] 2.50 · 10�2 1.29 · 10�2 6.58 · 10�3

Numerov [19] 2.32 · 10�2 1.21 · 10�2 6.17 · 10�3

Colloc-cubic [16] 1.40 · 10�2 7.71 · 10�3 4.04 · 10�3

1216 Siraj-ul-Islam, I.A. Tirmizi / Appl. Math. Comput. 173 (2006) 1208–1218

yðxÞ ¼

4xc1

0 6 x 6p4;

1� 4 coshðp=2� xÞc2

p46 x 6

3p4;

4ðp� xÞc1

3p4

6 x 6 p;

8>>>>>>><>>>>>>>:

ð4:9Þ

where c1 = p + 4coth(p/4) and c2 = p sinh(p/4) + 4cosh(p/4). The problem (4.8)

was solved using the method described in Sections 2 and 3 with a variety of hvalues. The observed maximum errors (in absolute value) are given in Table 1.

It may be noted from the Table 1 that having step size h reduces the value of

the maximum errors associated with both yi by a factor of approximately 1/4,which confirms that our method is a second-order convergent as predicted in

Section 3.

The system of differential Eqs. (4.8) along with the boundary conditions

(4.7) was solved by Al-Said [2,5] using quadratic and cubic spline schemes.

The same problem was also solved by Noor and Tirmizi [19] using classical sec-

ond-order finite difference scheme and the well known Numerov�s method.

Noor and Khalifa [16] used collocation method with cubic B-spline as basis

functions. A comparison between our method and other methods is given inTable 1. It is clear from the table that the present method gives better results

than those given in [2,5,16,19]. We would like to emphasize that our method

has the advantage of the ability of approximating the derivative of y at different

nodal values of x, whereas finite difference methods do not have this ability.

5. Conclusion

In this paper, we have developed a new numerical method for solving a sys-

tem of second-order boundary-value problems based on nonpolynomial

splines. The present method enables us to approximate the solution at every

point of the range of integration. A class of obstacle, unilateral, and contact

problems can be characterized by this system of boundary-value problems by

Page 10: Nonpolynomial spline approach to the solution of a system of second-order boundary-value problems

Siraj-ul-Islam, I.A. Tirmizi / Appl. Math. Comput. 173 (2006) 1208–1218 1217

using the penalty function method. The results obtained are very encouraging

and our method performs better than other existing methods of the same order.

Acknowledgements

The First author is grateful to Higher Education Commission, Pakistan, for

granting scholarship for PhD studies and University of Engg & Tech Pesha-

war, Pakistan, for study leave.

References

[1] J.H. Ahlberg, E.N. Nilson, J.L. Walsh, The Theory of Splines and Their Applications,

Academic Press, New York, 1967.

[2] E.A. Al-Said, Spline solutions for system of second-order boundary-value problems, Int. J.

Computer Math. 62 (1996) 143–154.

[3] E.A. Al-Said, M.A. Noor, Computational methods for fourth order obstacle boundary value

problems, Commun. Appl. Nonlinear Anal. 2 (3) (1995) 73–83.

[4] E.A. Al-Said, M.A. Noor, A.K. Khalifa, Finite difference scheme for variational inequalities,

J. Opt. Theory Appl. 89 (2) (1996).

[5] E.A. Al-Said, Spline methods for solving system of second-order boundary-value problems,

Int. J. Computer Math. 70 (1999) 717–727.

[6] C. Baiocchi, A. Capelo, Variational and Quasi-variational Inequalities, John Wiley and Sons,

New York, 1984.

[7] R.W. Cottle, F. Giannessi, J.L. Lions, Variational inequalities and complementarity problems,

Theory and Applications, Oxford, UK, 1984.

[8] J. Crank, Free and Moving Boundary Problems, Clarendon Press, Oxford, UK, 1984.

[9] C. Froberg, Numerical Mathematics, Theory and Computer Applications, Benjamin/

Cummings, Reading, MA, 1985.

[10] P. Henrici, Discrete Variable Methods in Ordinary Differential Equations, John Wiley, New

York, 1961.

[11] W.D. Hoskins, D. Meek, Linear dependence relations for polynomials at midknots, BIT 15

(1975) 272–276.

[12] H. Lewy, G. Stampacchia, On the regularity of the solutions of the variational inequalities,

Commun. Pure Appl. Math. 22 (1960) 153–188.

[13] J.L. Lions, G. Stampacchia, Variational inequalities, Commun. Pure Appl. Math. 20 (1967)

493–519.

[14] N. Kikuchi, J.T. Oden, Contact Problems in Elasticity, SIAM Publishing Co., Philadelphia,

1988.

[15] M.A. Noor, Computational techniques for variational inequalities, J. Nat. Geometry 9 (1996)

41–62.

[16] M.A. Noor, A.K. Khalifa, Cubic splines collocation methods for unilateral problems, Int. J.

Engng. Sci. 25 (1987) 1527–1530.

[17] M.A. Noor, K.I. Noor, Th. Rassias, Some aspects of variational inequalities, J. Computer

Appl. Math. 47 (1993) 285–312.

[18] M.A. Noor, K.I. Noor, Th. Rassias, Introduction to variational inequalities, in: H.M.

Srivastava, Th. Rassias (Eds.), Analysis, Geometry and Groups, A Riemann Legacy,

Hadronic press, Palm Harbor FI, USA, 1993, pp. 373–448.

Page 11: Nonpolynomial spline approach to the solution of a system of second-order boundary-value problems

1218 Siraj-ul-Islam, I.A. Tirmizi / Appl. Math. Comput. 173 (2006) 1208–1218

[19] M.A. Noor, S.I.A. Tirmzi, Finite difference techniques for solving obstacle problems, Appl.

Math Lett. 1 (1988) 267–271.

[20] J.F. Rodrigues, Obstacle Problems in Mathematical Physics, North-Holland, Amsterdam,

1987.

[21] R.A. Usmani, S.A. Warsi, Quintic spline solution of boundary value problems, Comput.

Math. Appl. 6 (2) (1984) 197–203.

[22] M. Sakai, R.A. Usmani, On consistency relations for cubic spline, on spline and their

asymptotic error estimates, J. Approx. Theory 55 (1985) 195–200.

[23] L.L. Schumaker, Spline Functions: Basic Theory, Wiley, New York, 1981.

[24] H. Siraj-ul-Islam, M.A. Khan, S.I.A. Tirmizi, Non polynomial spline approach to the solution

of a system of third-order boundary-value problems, Appl. Math. Comput. (2004), in press.

[25] E. Tonti, Variational formulation for every nonlinear problem, Int. J. Engng. Sci. 22 (1984)

1343–1371.

[26] F. Villagio, The Ritz method in solving unilateral problems in elasticity, Meccanica (1981)

123–127.