The Numerical Solution of Second-Order Boundary ...

23 downloads 0 Views 661KB Size Report
Siraj-ul-Islama∗, Imran Azizb, Bozidar Sarlera. aLaboratory for Multiphase Processes, University of Nova Gorica, Vipavska 13, SI-5000 Nova Gorica, Slovenia.
The Numerical Solution of Second-Order Boundary-Value Problems by Collocation with Haar Wavelets Siraj-ul-Islama∗, Imran Azizb , Bozidar Sarlera

a Laboratory

for Multiphase Processes, University of Nova Gorica, Vipavska 13, SI-5000 Nova Gorica, Slovenia. b Department of Mathematics, University of Peshawar, Pakistan.

Abstract An efficient numerical method Based on uniform Haar wavelets is proposed for the numerical solution of second-order boundary-value problems (BVPs) arising in the mathematical modeling of deformation of beams and plate deflection theory, deflection of a cantilever beam under a concentrated load, obstacle problems and many other engineering applications. Haar wavelets basis in the collocation framework permits to enlarge the class of functions used so far. Performance of the Haar wavelets is compared with the Walsh wavelets, semi orthogonal B-spline wavelets, spline functions, Adomian decomposition method (ADM), finite difference method, and Runge-Kutta method coupled with nonlinear shooting method. More accurate solution can be obtained by wavelets decomposition in the form of a multiresolution analysis of the function which represents solution of a given problem. Through this analysis the solution is found on the coarse grid points and then refined towards higher accuracy by increasing the level of the Haar wavelets. Neumann’s boundary conditions which are problematic for most of the numerical methods are automatically coped with. The main advantage of the Haar wavelets based method is its efficiency and simple applicability for a variety of boundary conditions. Convergence analysis of the proposed method alongside numerical procedure for multi-point boundary-value problems are given to test wider applicability and accuracy of the method. Keywords: Haar wavelets, Second-order boundary-value problems, Cantilever beam, Obstacle problems, Radiation fin

1

Introduction

Second-order boundary value problems arise in the mathematical modeling of deflection of cantilever beams under concentrated load [Na, 1979, Bisshopp and Drucker, 1945], deformation of beams and plate deflection theory [Glabisz, 2004], obstacle problems [ul Islam et al., 2006], Troeshs problem relating to the confinement of a plasma column by radiation pressure [Robert and Shipman, 1972, Wiebel, 1958], temperature distribution of the radiation fin of trapezoidal profile [Na, 1979,Keller and Holdrege, 1970], and a number of other engineering applications. Many authors have used numerical and approximate methods to solve second-order BVPs. The details about the related numerical methods can be found in the references [Na, 1979, Glabisz, 2004, ul Islam et al., 2006, Tatari and Dehgan, 2006,Al-Said, 2001,Lakestani and Dehgan, 2006,Tirmizi and Twizell, 2002,Katti and Baboo, 1996,ul Islam et al., 2007]. Walsh wavelets and semi-orthogonal B-spline wavelets are used in [Glabisz, 2004, Lakestani and Dehgan, 2006] to construct numerical algorithm for the solution of second-order BVPs with Dirichlet and Neumann boundary conditions. Na [Na, 1979] has found numerical solution ∗

The author to whom all the correspondence should be addressed. Email: [email protected]

1

of second-, third- and fourth-order BVPs by converting them into initial value problems and applying a class of methods like nonlinear shooting, method of reduced physical parameters, method of invariant imbedding etc. The present approach can be applied to both BVPs and IVPs with slight modification but without transformation of BVPs into IVPs or vice versa. In the recent years the wavelet approach is becoming more popular in the field of numerical approximations. Different types of wavelets and approximating functions have been used for this purpose. A short introduction to Haar wavelets and its applications can be found in Chen and Hsiao [Hsiao and Wang, 2001, Hsiao, 2004], W. Glabisz [Glabisz, 2004] and Lepik [Lepik, 2005, Lepik, 2007]. Haar wavelets have gained popularity among researchers for their useful properties such as simple applicability, orthogonality and compact support. Compact support of the Haar-wavelet basis permits straight inclusion of the different types boundary conditions in the numeric algorithms. Due to the linear and piecewise nature, Haar wavelet basis lacks differentiability and hence the integration approach will be used instead of the differentiation for calculation of the coefficients. The attributes of other differentiable wavelets like the wavelets of high order spline basis are overshadowed by the computational cost of the algorithm obtained from the spline wavelets. The objective of this research is to construct a simple collocation method with the Haar basis functions for the numerical solution of linear and nonlinear second-order BVPs arising in the mathematical modeling of different engineering applications. To test applicability of the Haar wavelets, we focus on the following type of boundary-value problems defined in the interval [a, b]: 00

y = φ(x, y, y 0 ).

(1)

subject to the following six sets of different boundary conditions that cope a reasonable spectrum of possible cases including two different types of periodic boundary conditions (PBCs)

Case(i)

y 0 (a) = β1 ,

y 0 (b) = β1 ;

(2)

Case(ii)

y(a) = α2 ,

y(b) = β2 ;

(3)

y(b) = β3 ;

(4)

Case(iii) Case(iv)

0

y (a) = α3 ,

0

y(a) = α4 ,

y (b) = β4 ; 0

0

Case(v)

y(a) = y(b), y (a) = y (b);

Case(vi)

y(a) = α5 ,

(5) (PBCs)

y(c) = y(b), for c ∈ (a, b);

(6) (7)

where α1 , α2 , α3 , α4 , α5 β1 , β2 , β3 , β4 , are real constants. The paper is organized in the following structure. In section 2, Haar wavelets are introduced. A general formulation of the numerical technique based on Haar wavelets is presented in section 3. In section 4, we present a brief convergence analysis and some numerical examples are given in section 5 to validate the method. Section 6 represents the concluding remarks and future research.

2

Haar Wavelets

The Haar wavelet family for x ∈ [0, 1) is defined   1 hi (x) = −1   0 where α=

k , m

β=

as for x ∈ [α, β), for x ∈ [β, γ), elsewhere,

k + 0.5 , m 2

γ=

k+1 . m

(8)

(9)

In the above definition the integer m = 2j , j = 0, 1, . . . , J, indicates the level of the wavelet and integer k = 0, 1, . . . , m − 1 is the translation parameter. Maximum level of resolution is J. The index i in Eq. (8) is calculated using the formula i = m + k + 1. In case of minimal values m = 1, k = 0, we have i = 2. The maximal value of i is i = 2M = 2J+1 . For i = 1, the function h1 (x) is the scaling function for the family of Haar wavelets which is defined as ( 1 for x ∈ [0, 1), h1 (x) = (10) 0 elsewhere. The following notations are introduced: x

Z pi,1 (x) =

hi (x0 ) dx0 ,

(11)

0 x

Z pi,ν+1 (x) =

pi,ν (x0 ) dx0 .

(12)

0

These integrals can be evaluated using Eq. (8) and first two of them are given by   x − α for x ∈ [α, β), pi,1 (x) = γ − x for x ∈ [β, γ),   0 elsewhere,  1 2  for x ∈ [α, β),  2 (x − α)    1 − 1 (γ − x)2 for x ∈ [β, γ), 2 2 pi,2 (x) = 4m 1  for x ∈ [γ, 1),  2 4m   0 elsewhere.

(13)

(14)

We also introduce the following notation Z Ci,1 =

1

pi,1 (x0 ) dx0 .

(15)

0

Any function f (x) which is square integrable in the interval (0, 1) can be expressed as an infinite sum of Haar wavelets as ∞ X f (x) = ai hi (x). (16) i=1

The above series terminates at finite terms if f (x) is piece-wise constant or can be approximated as piecewise constant during each subinterval. The best way to understand wavelets is through a multi resolution analysis. Given a function f ∈ L2 (R) a multi-resolution analysis (MRA) of L2 (R) produces a sequence of subspaces Vj , Vj+1 , ... such that the projections of f onto these spaces give finer and finer approximations of the function f as j→∞. Definition 1. (Multi-resolution analysis) A multi-resolution analysis of L2 (R) is defined as a sequence of closed subspaces Vj ⊂ L2 (R), j ∈ Z with the following properties i ... ⊂ V−1 ⊂ V0 ⊂ V1 ⊂ ... ii The spaces Vj satisfy

S

Vj is dense in L2 (R) and

j∈Z

T j∈Z

3

Vj = 0.

iii If f (x) ∈ V0 , f (2j x) ∈ Vj , i.e. the spaces Vj are scaled versions of the central space V0 . iv If f (x) ∈ V0 , f (2j x − k) ∈ Vj i.e all the Vj are invariant under translation v There exists Φ ∈ V0 such that Φ(x − k); k ∈ Z is a Riesz basis in V0 . The space Vj is used to approximate general functions by defining appropriate projection of these functions onto these spaces. Since the union of all the Vj is dense in L2 (R), so it guarantees that any function in L2 (R) can be approximated arbitrarily close by such projections. As an example the space Vj can be defined like Vj = Wj−1 ⊕ Vj−1 = Wj−1 ⊕ Wj−2 ⊕ Vj−2 = · · · = ⊕J+1 j=1 Wj ⊕ V0 then the scaling function h1 (x) generates an MRA for the sequence of spaces {Vj , j ∈ Z} by translation and dilation as defined in Eqs. 8 and 10. For each j the space Wj serves as the orthogonal complement of Vj in Vj+1 . The space Wj include all the functions in Vj+1 that are orthogonal to all those in Vj under some chosen inner product. The set of functions which form basis for the space Wj are called wavelets [Goswami and Chan, 1999].

3

Method of solution

We assume that y 00 (x) =

2M X

ai hi (x).

(17)

i=1

Eq. (17) is integrated twice from 0 to x or from x to 1 depending upon the boundary conditions. Hence the solution y(x) with its derivatives y 0 (x) and y 00 (x) are expressed in terms of Haar functions and their integrals. We consider the collocation points xj =

j − 0.5 , 2M

j = 1, 2, . . . , 2M.

(18)

The expressions of y(x), y 0 (x) and y 00 (x) are substituted in the given differential equation and discretization is applied using the collocation points (18) resulting into a 2M × 2M linear or nonlinear system. The Haar coefficients ai , i = 1, 2, . . . , 2M are calculated by solving this system. The approximate solution can easily be recovered with the help of Haar coefficients. The method is further explained with the help of specific boundary conditions described in cases (i) − (vi).

3.1

Case (i)

The boundary conditions given in Eq. (??) are considered first. Integrating Eq. (17) we obtain y 0 (x) − α1 =

2M X

ai pi,1 (x),

(19)

i=1

β1 − y 0 (x) = a1 −

2M X

ai pi,1 (x).

(20)

i=1

Eqs. (19) and (20) yield a1 = β1 − α1 . 4

(21)

The derivatives y 00 (x) and y 0 (x) can be expressed as 00

y (x) = β1 − α1 +

2M X

ai hi (x),

(22)

i=2 0

y (x) = α1 + (β1 − α1 )p1,1 (x) +

2M X

ai pi,1 (x).

(23)

i=2

Finally by integrating the Eq. (23) from 0 to x, we get y(x) = y(0) + α1 x + (β1 − α1 )p1,2 (x) +

2M X

ai pi,2 (x).

(24)

i=2

Substituting these values of y(x), y 0 (x) and y 00 (x) in the given differential equation we obtain system of equations. Solving this system we get the unknown quantity y(0) and Haar coefficients.

3.2

Case (ii)

For boundary conditions given in Eq. (??), we integrate Eq. (17) twice from 0 to x to obtain y 0 (x) = y 0 (0) +

2M X

ai pi,1 (x),

(25)

i=1

y(x) − α2 = xy 0 (0) +

2M X

ai pi,2 (x).

(26)

ai Ci,1 .

(27)

i=1

The value of unknown term y 0 (0) is calculated as 0

y (0) = β2 − α2 −

2M X i=1

Using Eq. (27), the approximate solution y(x) and its derivative y 0 (x) can be expressed as y(x) = α2 + (β2 − α2 )x +

2M X

ai (pi,2 (x) − xCi,1 ) ,

(28)

i=1 0

y (x) = β2 − α2 +

2M X

ai (pi,1 (x) − Ci,1 ) .

(29)

i=1

3.3

Case (iii)

The boundary conditions given in Eq. (??) are considered. Integrating Eq. (17) and using boundary conditions we can express y 0 (x) and y(x) as 0

y (x) = α3 +

2M X

ai pi,1 (x),

(30)

i=1

y(x) = β3 − α3 (1 − x) −

2M X i=1

5

ai (Ci,1 − pi,2 (x).

(31)

3.4

Case (iv)

For boundary conditions given in Eq. (??), we have 0

y (x) = β4 − a1 +

2M X

ai pi,1 (x),

(32)

i=1

y(x) = α4 + (β4 − a1 )x +

2M X

ai pi,2 (x).

(33)

i=1

3.5

Case (v)

We consider boundary conditions given in Eq. (??). Integrating Eq. (17) and using the boundary condition y 0 (0) = y 0 (1), we obtain a1 = 0, (34) y 0 (x) = y 0 (0) +

2M X

ai pi,1 (x).

(35)

i=2

Next, integrating Eq. (35) and using the boundary condition y(0) = y(1), we get 0

y (0) = −

2M X

ai Ci,1 .

(36)

i=2

The numerical solution y(x) is given by y(x) = y(0) +

2M X

ai (pi,2 (x) − xCi,1 ) .

(37)

i=2

3.6

Case (vi)

The boundary conditions given in Eq. (??) are considered. Integrating Eq. (17) we obtain 0

0

y (x) = y (0) +

2M X

ai pi,1 (x).

(38)

i=1

The unknown quantity y 0 (0) is calculated as 2M

y 0 (0) =

1 X (Ci,1 − Ei,1 (c)), c−1

(39)

i=1

where

c

Z Ei,1 (c) =

pi,1 (x) dx.

(40)

0

The numerical solution y(x) is expressed as 2M

2M

i=1

i=1

X x X ai (Ci,1 − Ei,1 (c)) + ai pi,2 (x). y(x) = α5 + c−1

6

(41)

4

Algorithm

To approximate the solution of the nonlinear boundary-value problem y 00 = φ(x, y, y 0 ), 0 ≤ x ≤ 1, y(0) = α5 , y(c) = y(1) INPUT Boundary conditions cases (i) − (vi), value of c ∈ (0, 1); level of resolution M . OUTPUT Approximations y(xj ) for each j = 1, 2, . . . , 2M . Step 1 For j = 1, 2, . . . , 2M Set xj = j−0.5 ; R2M 1 Set Cj = R0 pj,1 (x) dx; c Set Ej = 0 pj,1 (x) dx; Step 2 Case(i) Set a1 = β1 − α1 ; Case(ii) Go to Step 3; Case(iii) Go to Step 3; Case(iv) Go to Step 3; Case(v) Set a1 = 0; Case(vi) Go to Step 3; Step 3 For j=1,2,. . . ,2M, apply Newton’s method to the system Case(i) 2M X

ai hi (xj ) = φ xj , y(0) + α1 xj + (β1 − α1 )p1,2 (xj ) +

2M X

ai pi,2 (xj ), α1 + (β1 − α1 )p1,1 (xj ) +

i=2

i=1

2M X i=2

with unknowns y(0), a2 , a3 , . . . , a2M . Case(ii) 2M X

ai hi (xj ) = φ xj , α2 + (β2 − α2 )xj +

i=1

2M X

ai (pi,2 (xj ) − xj Ci ) , β2 − α2 +

2M X

i=1

! ai (pi,1 (xj ) − Ci ) ,

i=1

with unknowns a1 , a2 , . . . , a2M . Case(iii) 2M X

ai hi (xj ) = φ xj , β3 − α3 (1 − xj ) −

i=1

2M X i=1

with unknowns a1 , a2 , . . . , a2M .

7

ai (Ci − pi,2 (xj ), α3 +

2M X i=1

! ai pi,1 (xj ) ,

! ai pi,1 (xj ) ,

Case(iv) 2M X

ai hi (xj ) = φ xj , α4 + (β4 − a1 )xj +

i=1

2M X

ai pi,2 (xj ), β4 − a1 +

i=1

2M X

! ai pi,1 (xj ) ,

i=1

with unknowns a1 , a2 , . . . , a2M . Case(v) 2M X

ai hi (xj ) = φ xj , y(0) +

i=1

2M X

ai (pi,2 (xj ) − xj Ci ) ,

i=2

2M X

! ai (pi,1 (x) − Ci ) ,

i=2

with unknowns y(0), a2 , a3 , . . . , a2M . Case(vi) 2M X i=1

! 2M 2M 2M 2M X X xj X 1 X ai (Ci − Ei ) + (Ci − Ei ) + ai pi,2 (xj ), ai pi (xj ) , ai hi (xj ) = φ xj , α5 + c−1 c−1 i=1

i=1

i=1

i=1

with unknowns a1 , a2 , . . . , a2M . Step 4 For j = 1, 2, . . . , 2M , Case(i) Set y(xj ) = y(0) + α1 xj + (β1 − α1 )p1,2 (xj ) + Case(ii) Set y(xj ) = α2 + (β2 − α2 )xj + Case(iii) Set y(xj ) = β3 − α3 (1 − xj ) −

Case(v) Set y(xj ) = y(0) + Case(vi) y(xj ) = α5 +

xj c−1

P2M

P2M

i=1 ai (pi,2 (xj )

P2M

Case(iv) Set y(xj ) = α4 + (β4 − a1 )xj +

i=1 ai (Ci

i=1 ai (Ci

i=2 ai

pi,2 (xj );

− xj Ci );

− pi,2 (xj );

P2M

i=1 ai pi,2 (xj );

i=2 ai (pi,2 (xj )

P2M

P2M

− xj Ci,1 );

− Ei ) +

P2M

i=1 ai pi,2 (xj ).

Output(y(xj )).

5

Convergence Analysis of the Haar Wavelets

Lemma 1. Assume that u(x) ∈ L2 with the bounded first derivative on (0, 1), then the error norm at Jth level satisfies the following inequality r K k eJ (x) k≤ C 2−(3/2)M . (42) 7

8

Proof. The error at J th level may be defined as ∞ X |eJ (x)| = |u(x) − uJ (x)| = ai hi (x) where i=2j+1 +1 2

Z



k eJ (x) k = −∞



∞ X

ai hi (x),

 i=2J+1 +1



∞ X

∞ X

al hl (x) dx =

l=2J+1 +1

uJ (x) =

J +1 2X

ai hi (x).

∞ X

Z

∞ X



ai al

i=2J+1 +1 l=2J+1 +1

k eJ (x) k2 ≤

(43)

i=1

hi (x)hl (x) dx −∞

|ai |2 .

i=2J+1 +1

R1 3i But |ai | ≤ C 2− 2 max |u0 (η)| where C = 0 |xh2 (x)| dx and η ∈ (k2−j , (k + 1)2−j ) [Jameson and Waseda, 2000, Strang and Nguyen, 1996, Hashih et al., 2009]. 2

k eJ (x) k ≤

∞ X

KC 2 2−3i

i=2J+1 +1

where |u0 (x)| ≤ K

∀ x ∈ (0, 1). 1 k eJ (x) k2 ≤ KC 2 2−3M . 7 r K k eJ (x) k≤ C 2−(3/2)M . 7

From the above equation, it is obvious that the error bound is inversely proportional to the level of resolution of Haar wavelet. This ensures the convergence of Haar wavelet approximation when M is increased.

6

Numerical examples

In this section, we test the Haar wavelets based algorithms on some benchmark problems related to all possible six cases of of the boundary conditions. The accuracy of the algorithm is assessed in terms of the following error norms L∞ = M ax. |yje − yja | (44) Max.Rel.Error =

L∞ |yje |

Relative Power Deviations (%) = ∆(%) =

(45) 2M X |yje − yja |2 j=1

|yje |2

× 100

(46)

where yje and yja are the exact and approximate solution respectively at the jth collocation point. Example 1. Consider a linear BVP with Neumann boundary conditions − y 00 = (2 − 4x2 )y,

y 0 (0) = 0, y 0 (1) = −2/e.

2

(47)

The exact solution is e−x . The method developed is applied to this problem and error estimates for different values of M are shown in Table 1. The maximum absolute errors of semi-orthogonal second-order B-spline wavelets reported in [Lakestani and Dehgan, 2006] are 2.5E − 05 for M = 64 9

Table 1: Maximum absolute and relative errors for Ex. 1 J 3 4 5 6 7 8

1.0 æ à æ à æ à

2M 16 32 64 128 256 512

L∞ 2.9051E − 04 7.4812E − 05 1.8956E − 05 4.7694E − 06 1.1961E − 06 2.9948E − 07

Max. Rel. Errors 7.4256E − 04 1.9715E − 04 5.0732E − 05 1.2864E − 05 3.2386E − 06 8.1249E − 07

æ à æ à

0.9

æ à æ à æ à

0.8

æ à à æ

0.7

à æ

0.6

à æ à æ

0.5

æ

Exact Solution

à

Haar Solution

à æ à æ

0.2

0.4

0.6

0.8

à æ

Figure 1: Comparison of Haar solution with exact solution of Ex. 1 for 2M = 16 and 5.9E −06 for M = 128 whereas the maximum absolute errors of our algorithm given in Table 1 are 1.8956E − 05 and 4.769E − 06 for the corresponding values of M. Apart from marginal improvement in the accuracy for higher values of M , the Haar wavelets based algorithm is free from complicated operations derived for function approximation and operational matrices of derivatives required in the case of semi-orthogonal second-order B-spline wavelets [Lakestani and Dehgan, 2006]. Comparison of the exact versus numerical solution is shown in Fig. 1. Example 2. Consider a nonlinear BVP with Neumann boundary conditions y 00 = 2y 3 ,

1 y 0 (0) = −1, y 0 (1) = − . 4

(48)

The exact solution is given by 1 . (49) 1+x Maximum absolute errors for different values of M are shown in Table 2. The same problem is solved in [Lakestani and Dehgan, 2006] by using second-order B-spline wavelets and the maximum absolute errors recorded therein are 9.0E − 05 and 2.6E − 05 for 32 and 128 collocation points whereas the maximum absolute errors of our algorithm as listed in Table 2 are 1.554E − 04 and 1.005E − 05 for the same number of collocation points. Marginal improvement in the accuracy is observed for large values of M in this case as well. Apart from the accuracy, the quantity of derivations increases manyfold in semi-orthogonal second-order B-spline wavelets algorithm [Lakestani and Dehgan, 2006] when compared with simplified Haar wavelets based algorithm. Comparison of the exact versus numerical solution is shown in Fig. 2. y(x) =

10

Table 2: Maximum absolute and relative errors for Ex. 2 J 3 4 5 6 7 8

2M 16 32 64 128 256 512

L∞ 5.9492E − 04 1.5545E − 04 3.9757E − 05 1.0055E − 05 2.5283E − 06 6.33925 − 07

Max. Rel. Errors 6.1351E − 04 1.5788E − 04 4.0068E − 05 1.0094E − 05 2.5333E − 06 6.3454E − 07

à æ à æ à æ

0.9

à æ à æ à æ à æ à æ

0.8

à æ à æ à æ

0.7

à æ

à æ

à æ

à æ

à æ

à æ

à æ

à æ

à æ

0.6

0.2

0.4

0.6

à æ

à æ

à æ

à æ

àæ æ à

àæ æ à

0.8

àæ æ à

æ

Exact Solution

à

Haar Solution

àæ æ à 1.0

Figure 2: Comparison of Haar solution with exact solution of Ex. 2 for 2M = 32

11

Table 3: Maximum absolute and relative errors for Ex. 3 J 3 4 5 6 7

2M 16 32 64 128 256

L∞ 3.6374E − 04 9.7774E − 05 2.5281E − 05 6.4235E − 06 1.6187E − 06

Example 3. Consider the system of differential   0, 00 y = y − 1,   0,

Max. Rel. Errors 1.2228E − 03 3.0678E − 04 7.6762E − 05 1.9195E − 05 4.7990E − 06

equations [ul Islam et al., 2006] for 0 ≤ x < π4 , for π4 ≤ x ≤ 3π 4 , 3π for 4 < x ≤ π,

(50)

with the boundary conditions y(0) = y(π) = 0, and the condition of continuity of y and y 0 at x = π/4 and x = 3π/4. The analytic solution is given by 4 0 ≤ x < π4 ,   γ1 x, y(x) = 1 − γ42 cosh( π2 − x), π4 ≤ x ≤ 3π (51) 4 ,  4 3π γ1 (π − x), 4 ≤ x ≤ π, where γ1 = π + 4 coth π4 and γ2 = π sinh π4 + 4 cosh π4 . The proposed method is applied to this problem and maximum absolute errors for different values of M are shown in Table 3. It can be seen from Table 3 that the Haar wavelets based algorithm produces stable and converging solution by increasing the value of M . These types of BVPs (50) arise in the context of obstacle, unilateral, and contact problems [ul Islam et al., 2006]. Numerical solution of the problem has been a challenge for many finite-difference and splines based methods (for details see [ul Islam et al., 2006, Al-Said, 2001, ul Islam et al., 2007] and the references therein). Performance of the existing methods is handicapped due to accumulation of maximum error around the break up points at x = π/4 and x = 3π/4. The existing methods do not retain their convergence order when the number n ofnodes is increased beyond certain level (n > 80 in this case). From Table 3 it is clear that the Haar wavelets algorithm circumvent this instability problem due to its excellent interpolation properties. Finally Haar wavelets yield both an effective and rapidly convergent scheme and the accuracy of the present algorithm is not hampered by the break up points. The accuracy of the new method increases steadily with contribution of more nodes. Comparison of the exact versus numerical solution is shown Fig. 3. Example 4. The deflection of a cantilever beam under a concentrated load can be found by solving the boundary value problem [Na, 1979] y 00 + λx cos y = 0,

y 0 (0) = 0, y(1) = 0.

(52)

Na [Na, 1979] has found numerical solution of this problem by finite difference method, method of reduced physical parameters and method of invariant imbedding (by transforming BVP to IVP). We find numerical solution of the model (52) by the proposed Haar wavelets method for λ = 8. The numerical results are shown in Table 4. It is clear from Table 4 that the present method produces a converging solution for different values of M . The value of first derivative reported in Na [Na, 1979] 12

àæ àæ àæ àæ àæ àæ àæ àæ àæ àæ àæ àæ æ àæ àæ æ à àæ æ à àæ æ à à æ æ à à æ æ à à æ æ à à 0.4 æ æ à à æ æ à à æ æ à à æ æ à à æ æ à à 0.3 æ æ à à æ æ à à æ æ à à æ æ à à æ æ à à 0.2 æ æ à à æ æ à à æ æ à à æ æ à à 0.1 æ æ à à æ æ à à æ æ à à æ æ à à æ à æ à 0.5 1.0 1.5 2.0 2.5 3.0

0.5

æ

Exact Solution

à

Haar Solution

Figure 3: Comparison of Haar solution with exact solution of Ex. 3 for 2M = 64 Table 4: Numerical results for Ex. 4

x 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0

2M=32 0.94047 0.93964 0.93409 0.91901 0.88931 0.83938 0.76261 0.65096 0.49459 0.28180 0.00003

2M =64 0.94021 0.93941 0.93389 0.91883 0.88916 0.83925 0.76250 0.65088 0.49454 0.28177 0.00003

Solution 2M=128 0.94014 0.93935 0.93384 0.91878 0.88912 0.83922 0.76247 0.65086 0.49453 0.28177 0.00003

2M=256 0.94013 0.93934 0.93383 0.91877 0.88911 0.83921 0.76246 0.65085 0.49452 0.28177 0.00003

2M=512 0.94012 0.93934 0.93382 0.91877 0.88911 0.83921 0.76246 0.65085 0.49452 0.28177 0.00003

is dy(1) dx = −3.194. A complete agreement about this value is found between our results for M = 8 and the results given in Na [Na, 1979]. For the purpose of validation, we compared the solution of the Haar wavelets with Runge-Kutta method coupled with shooting method. This comparison is shown in Fig. 4. Example 5. Consider the following differential equation for the temperature distribution of the radiation fin of trapezoidal profile [Na, 1979, Keller and Holdrege, 1970]:   tan α βy 4 1 00 − y0 − = 0, (53) y + R + ρ (1 − R) tan α + θ (1 − R) tan α + θ subject to the boundary conditions y(0) = 1, y 0 (1) = 0.

(54)

The model given in Eq. (53) with boundary conditions (54) is solved by Na [Na, 1979] using nonlinear shooting method and method of reduced physical parameters after converting it into an IVP. We have found numerical solution of the above model as a BVP without transforming it to an IVP. For 13

à æ à æ ææ à æ à æ à æ à æ à æ à à æ 0.8 à æ à æ à æ

0.6

à æ à æ

0.4

æ à

à æ

0.2

0.2

0.4

0.6

0.8

Rnuge-Kutta Method Haar Solution

à æ æ 1.0

Figure 4: Comparison of Haar solution with Runge-Kutta method for Ex. 4 for 2M = 16 Table 5: Numerical results for Ex. 5

x 0.0 0.2 0.4 0.6 0.8 1.0

Our Solution 2M =64 2M=128 1.00000 1.00000 0.90439 0.90440 0.83999 0.84000 0.79567 0.79567 0.76746 0.76746 0.75656 0.75656

2M=32 1.00000 0.90438 0.83998 0.79566 0.76746 0.75658

Na Solution [Na, 1979] 2M=256 1.00000 0.90440 0.84000 0.79567 0.76746 0.75656

1.0000 0.9044 0.8400 0.7956 0.7673 0.7564

numerical solution, we assume that α = 6◦ , ρ = 0.5, θ = 0.05, β = 0.1. Numerical results shown in Table 5 are in complete agreement with Na [Na, 1979]. We have also used NDSolve command of Mathematica to validate our method. For the purpose of validation, we compared the solution of the Haar wavelets with Runge-Kutta method coupled with shooting method. This comparison is shown in Fig. 5. Example 6. We consider a two-point boundary value problem [Tatari and Dehgan, 2006]    3 4 2 x 00 2 y − y − sin(2πx) −1 − 4π x − x + 3 3     8 8 1 2 − 6x − sin(2πx) − 4π cos(2πx) 3x − x + = 0, 3 3 3

æ à

0.95

æ à æ à

0.90

æ à æ à æ à

0.85

æ à

æ à æ à

0.2

0.4

æ à

æ à à 0.6 æ

Runge-Kutta Method Haar Solution

0.8 æ à æ à æ à æ à æ à

Figure 5: Comparison of Haar solution with Runge-Kutta method for Ex. 5 for 2M = 16

14

(55)

Table 6: Maximum absolute and relative power deviations for Ex. 6 J 4 5 6 7 8

2M 32 64 128 256 512

L∞ 5.1818E − 03 1.3008E − 03 3.2608E − 04 8.1646E − 05 2.0428E − 05

0.08

∆(%) 1.5951 9.9137E − 02 6.1874E − 03 3.8658E − 04 2.4159E − 05

∆(%) [Glabisz, 2004] 6.00746 1.24086 0.29787 − − −− − − −−

àæ àà àæ àæ æà àæ æ æ à æ à æ à æ à æ à æ à æ à à æ æ à à æ æ

0.06

0.04

à æ à æ à æ àæ àæ àæ àà 0.02 àæ à ææ æ àæ à æ à à æ àæ à à æ æ àæ à æ àæ à æ æ à à æà àæ à æà àæ æ àæ æ æà à æà0.4 æ 0.2 0.6 àæ ææ à ààà àæ àæ æææ

à æ à æ à æ à æ à æ à æ àà æ æ 1.0

0.8

æ

Exact Solution

à

Haar Solution

Figure 6: Comparison of Haar solution with exact solution of Ex. 6 for 2M = 64 subject to periodic boundary conditions y(0) = y(1),

y 0 (0) = y 0 (1).

The exact solution is given by [Glabisz, 2004]   4 2 x 3 y(x) = x − x + sin(2πx). 3 3

(56)

(57)

Katti and Baboo [Katti and Baboo, 1996] have obtained numerical solution of the problem by finitedifference method while W. Glabisz [Glabisz, 2004] has used Walsh wavelets to investigate the problem numerically. For different values of M , maximum absolute errors and relative power deviations are shown in Table 6. The relative power deviations ∆(%) are defined as P2M e 2 a j=1 |y (xj ) − y (xj )| ∆= 100%, (58) P2M e 2 j=1 |y (xj )| where y e (xj ) and y a (xj ) are exact and approximate values respectively at the points xj , j = 1, 2, . . . , 2M . From the comparison given in Table 6 it is clear that performance of Haar wavelets is better than Walsh wavelets [Glabisz, 2004]. Comparison of the exact solution versus numerical solution is shown in Fig. 6. Example 7. We consider nonlinear BVP 3 2 y 00 + y + (y 0 )2 + 1 = 0, 8 1089 15

0 ≤ x ≤ 1,

(59)

Table 7: Numerical results for Ex. 7

x 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9

Haar Solution 0.00000 0.06561 0.12097 0.16588 0.20016 0.22369 0.23639 0.23821 0.22913 0.20910

ADM solution [Tatari and Dehgan, 2006] 0.0000 0.0656 0.1209 0.1658 0.2001 0.2236 0.2363 0.2382 0.2291 0.2092

æ à

à æ à æ à æ à æ à æ æ à

æ à

0.20

Runge-Kutta Method 0.00000 0.06561 0.12097 0.16588 0.20016 0.22369 0.23639 0.23821 0.22913 0.20920

æ à æ à

æ à æ à

0.15 æ à

0.10

æ à æ à

æ à

0.05

Runge-Kutta Method Haar Solution

æ à

0.2

0.4

0.6

0.8

Figure 7: Comparison of Haar solution with Runge-Kutta method for Ex. 7 for 2M = 16 subject to boundary conditions y(0) = 0, y(1/3) = y(1).

(60)

The proposed method was applied and numerical solution is shown in Table 7. Due to non-availability of the exact solution we compare our results with ADM solution [Tatari and Dehgan, 2006] and RungeKutta method with adaptive step-size control coupled with parallel shooting form Mathematica. This comparison is shown in Fig. 7 and Table 7. Excellent agreement of the new method to the established methods is found.

7

Conclusion

In this paper, a simple and straight forward numerical technique based on Haar wavelets is proposed for the numerical solution of different types of linear and nonlinear second-order ODEs. Minor modifications are needed to apply the same method to different sets of boundary conditions. The distinctive feature is that it can be applied to initial and boundary value problem without transformation of BVPs into IVPs as needed for Runge-Kutta methods. The new method gives excellent performance for highly nonlinear BVPs. Simple applicability and fast convergence of the Haar wavelets provide a solid foundation for using these functions in the context of numerical approximation of integral equations, partial differential equations and ordinary differential equations. The only limitation of the approach in multi-dimensional problems is the increased computational cost due to inversion of 2M by2M sparse coefficient matrix. 16

References [Al-Said, 2001] Al-Said, E. (2001). The use of cubic splines in the numerical solution of system of second-order boundary-value problems. Int. J. Comput. Math. Appl., 42:861–869. [Bisshopp and Drucker, 1945] Bisshopp, K. and Drucker, D. C. (1945). Appl. Math., 3:272–275. [Glabisz, 2004] Glabisz, W. (2004). The use of walsh-wavelets packets in linear boundary value problems. Comput. and Struct., 82:131–141. [Goswami and Chan, 1999] Goswami, J. C. and Chan (1999). Fundamentals of wavelets.Theory, algorithms, and applications. John Wiley and Sons, New York. [Hashih et al., 2009] Hashih, H., Behiry, S., and El-Shamy, N. (2009). Numerical integration using wavelets. Appl. Math. Comput. [Hsiao, 2004] Hsiao (2004). Haar wavelet approach to linear stiff systems. Math. Comput. Simul., 64:561–567. [Hsiao and Wang, 2001] Hsiao and Wang, W.-J. (2001). Haar wavelet approach to nonlinear stiff systems. Math. Comput. Simul., 57:347–353. [Jameson and Waseda, 2000] Jameson, L. and Waseda, T. (2000). Error estimation using wavelet analysis for data assimilation: Eewadai. Journal of Atmospheric and Ocean Technology, 17:1235– 1246. [Katti and Baboo, 1996] Katti, C. P. and Baboo, S. (1996). Radiation heat transfer for annular fins of trapezoidal profile. Appl. Math. Comput., 75:287–302. [Keller and Holdrege, 1970] Keller, H. H. and Holdrege, E. S. (1970). Radiation heat transfer for annular fins of trapezoidal profile. Inter. J. High Perf. Comput. Appl., 92:113–116. [Lakestani and Dehgan, 2006] Lakestani, M. and Dehgan, M. (2006). The solution of a second-order nonlinear differential equation with neumann boundary conditions using semi-orthogonal b-spline wavelets. Int. J. Comput. Math., 83(8-9):685–694. [Lepik, 2005] Lepik, U. (2005). Numerical solution of differential equations using haar wavelets. Math. Comput. Simul., 68:127–143. [Lepik, 2007] Lepik, U. (2007). Numerical solution of evolution equations by the haar wavelet method. Appl. Math. Comput., 185:695–704. [Na, 1979] Na, T. Y. (1979). Computational Methods in Engineering Boundary value problems. Academic Press, New York. [Robert and Shipman, 1972] Robert, S. and Shipman, J. (1972). Solution of troeschs two-point boundary value problems by shooting techniques. J. Comput. Phy., 10:232–241. [Strang and Nguyen, 1996] Strang, G. and Nguyen, T. (1996). Wavelets and Filter Banks. WellesleyCambridge Press. [Tatari and Dehgan, 2006] Tatari, M. and Dehgan, M. (2006). The use of the adomian decomposition method for solving multipoint boundary value problems. Phys. Scr., 73:672–676. [Tirmizi and Twizell, 2002] Tirmizi, I. A. and Twizell, E. H. (2002). Higher-order finite-difference methods for nonlinear second-order two-point boundary-value problems. Appl. Math. Lett., 15:897– 902. 17

[ul Islam et al., 2006] ul Islam, S., Noor, M. A., Tirmizi, I. A., and Khan, M. A. (2006). Quadratic non-polynomial spline approach to the solution of a system of second-order boundary-value problems. Appl. Math. Comput., 179:153–160. [ul Islam et al., 2007] ul Islam, S., Tirmizi, I. A., and Haq, F. (2007). Quartic non-polynomial splines approach to the solution of a system of second-order boundary-value problems. Inter. J. High Perf. Comput. Appl., 21(1):42–49. [Wiebel, 1958] Wiebel, E. (1958). Confinement of a plasma column by radiation pressure in the plasma in a magnetic field. Stanford University Press, California.

18

Suggest Documents