The numerical solution of second-order boundary-value problems by collocation method with the Haar...

14
Mathematical and Computer Modelling 52 (2010) 1577–1590 Contents lists available at ScienceDirect Mathematical and Computer Modelling journal homepage: www.elsevier.com/locate/mcm The numerical solution of second-order boundary-value problems by collocation method with the Haar wavelets Siraj-ul-Islam a,* , Imran Aziz b , Božidar Šarler a a Laboratory for Multiphase Processes, University of Nova Gorica, Vipavska 13, SI-5000 Nova Gorica, Slovenia b Department of Mathematics, University of Peshawar, Pakistan article info Article history: Received 3 March 2010 Accepted 8 June 2010 Keywords: The Haar wavelets Second-order boundary-value problems Cantilever beam Obstacle problems Multi-point boundary-value problems Radiation fin 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. The Haar wavelet basis permits to enlarge the class of functions used so far in the collocation framework. The 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. A more accurate solution can be obtained by wavelet decomposition in the form of a multi-resolution analysis of the function which represents the 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 wavelet based method is its efficiency and simple applicability for a variety of boundary conditions. The 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. © 2010 Elsevier Ltd. All rights reserved. 1. Introduction Second-order boundary-value problems arise in the mathematical modeling of deflection of cantilever beams under concentrated load [1,2], deformation of beams and plate deflection theory [3], obstacle problems [4], Troesch’s problem relating to the confinement of a plasma column by radiation pressure [5,6], temperature distribution of the radiation fin of trapezoidal profile [1,7], 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 Refs. [1,3,4,8–13]. The Walsh wavelets and the semi-orthogonal B-spline wavelets are used in [3,10] to construct the numerical algorithm for the solution of second-order BVPs with Dirichlet and Neumann boundary conditions. Na [1] has found the numerical solution 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 a slight modification, but without the transformation of BVPs into IVPs or vice versa. * Corresponding author. E-mail address: [email protected] ( Siraj-ul-Islam). 0895-7177/$ – see front matter © 2010 Elsevier Ltd. All rights reserved. doi:10.1016/j.mcm.2010.06.023

Transcript of The numerical solution of second-order boundary-value problems by collocation method with the Haar...

Page 1: The numerical solution of second-order boundary-value problems by collocation method with the Haar wavelets

Mathematical and Computer Modelling 52 (2010) 1577–1590

Contents lists available at ScienceDirect

Mathematical and Computer Modelling

journal homepage: www.elsevier.com/locate/mcm

The numerical solution of second-order boundary-value problems bycollocation method with the Haar wavelets

Siraj-ul-Islam a,∗, Imran Aziz b, Božidar Šarler aa Laboratory for Multiphase Processes, University of Nova Gorica, Vipavska 13, SI-5000 Nova Gorica, Sloveniab Department of Mathematics, University of Peshawar, Pakistan

a r t i c l e i n f o

Article history:Received 3 March 2010Accepted 8 June 2010

Keywords:The Haar waveletsSecond-order boundary-value problemsCantilever beamObstacle problemsMulti-point boundary-value problemsRadiation fin

a b s t r a c t

An efficient numerical method based on uniform Haar wavelets is proposed for thenumerical solution of second-order boundary-value problems (BVPs) arising in themathematicalmodeling of deformation of beams andplate deflection theory, deflection of acantilever beamunder a concentrated load, obstacle problems andmany other engineeringapplications. The Haar wavelet basis permits to enlarge the class of functions used sofar in the collocation framework. The performance of the Haar wavelets is comparedwith the Walsh wavelets, semi-orthogonal B-spline wavelets, spline functions, Adomiandecompositionmethod (ADM), finite differencemethod, and Runge–Kuttamethod coupledwith nonlinear shooting method. A more accurate solution can be obtained by waveletdecomposition in the form of a multi-resolution analysis of the function which representsthe solution of a given problem. Through this analysis the solution is found on the coarsegrid points, and then refined towards higher accuracy by increasing the level of the Haarwavelets. Neumann’s boundary conditionswhich are problematic formost of the numericalmethods are automatically coped with. The main advantage of the Haar wavelet basedmethod is its efficiency and simple applicability for a variety of boundary conditions. Theconvergence analysis of the proposed method alongside numerical procedure for multi-point boundary-value problems are given to test wider applicability and accuracy of themethod.

© 2010 Elsevier Ltd. All rights reserved.

1. Introduction

Second-order boundary-value problems arise in the mathematical modeling of deflection of cantilever beams underconcentrated load [1,2], deformation of beams and plate deflection theory [3], obstacle problems [4], Troesch’s problemrelating to the confinement of a plasma column by radiation pressure [5,6], temperature distribution of the radiationfin of trapezoidal profile [1,7], and a number of other engineering applications. Many authors have used numerical andapproximate methods to solve second-order BVPs. The details about the related numerical methods can be found in theRefs. [1,3,4,8–13]. The Walsh wavelets and the semi-orthogonal B-spline wavelets are used in [3,10] to construct thenumerical algorithm for the solution of second-order BVPs with Dirichlet and Neumann boundary conditions. Na [1] hasfound the numerical solution of second-, third- and fourth-order BVPs by converting them into initial value problems andapplying a class ofmethods like nonlinear shooting,method of reduced physical parameters, method of invariant imbeddingetc. The present approach can be applied to both BVPs and IVPs with a slight modification, but without the transformationof BVPs into IVPs or vice versa.

∗ Corresponding author.E-mail address: [email protected] ( Siraj-ul-Islam).

0895-7177/$ – see front matter© 2010 Elsevier Ltd. All rights reserved.doi:10.1016/j.mcm.2010.06.023

Page 2: The numerical solution of second-order boundary-value problems by collocation method with the Haar wavelets

1578 Siraj-ul-Islam et al. / Mathematical and Computer Modelling 52 (2010) 1577–1590

In the recent years the wavelet approach is becoming more popular in the field of numerical approximations. Differenttypes of wavelets and approximating functions have been used for this purpose. A short introduction to the Haar waveletsand its applications can be found in [14,15,3,16,17]. The Haar wavelets have gained popularity among researchers for theiruseful properties such as simple applicability, orthogonality and compact support. Compact support of the Haar waveletbasis permits straight inclusion of the different types of boundary conditions in the numeric algorithms. Due to the linearand piecewise nature, the Haar wavelet basis lacks differentiability and hence the integration approach will be used insteadof the differentiation for calculation of the coefficients. The attributes of other differentiable wavelets like the waveletsof the higher order spline basis are overshadowed by the computational cost of the algorithm obtained from the splinewavelets.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 themathematical modeling of different engineeringapplications. To test applicability of the Haar wavelets, we focus on the following type of boundary-value problems definedin the interval [a, b]:

y′′ = φ(x, y, y′) (1)

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

Case (i) y′(a) = α1, y′(b) = β1; (2)

Case (ii) y(a) = α2, y(b) = β2; (3)

Case (iii) y′(a) = α3, y(b) = β3; (4)

Case (iv) y(a) = α4, y′(b) = β4; (5)

Case (v) y(a) = y(b), y′(a) = y′(b); (PBCs) (6)Case (vi) y(a) = α5, y(c) = y(b), for c ∈ (a, b); (7)

where α1, α2, α3, α4, α5, β1, β2, β3, β4, are real constants and a = 0, b = 1.The paper is organized in the following structure. In Section 2, Haar wavelets are introduced. A general formulation of

the numerical technique based on the Haar wavelets is presented in Section 3. In Section 4, a brief convergence analysisand some numerical examples are given. In Section 5 verification of the method is performed. Section 6 represents theconcluding remarks and future research.

2. The Haar wavelets

The Haar wavelet family for x ∈ [0, 1) is defined as

hi(x) =

{1 for x ∈ [α, β),−1 for x ∈ [β, γ ),0 elsewhere,

(8)

where

α =km, β =

k+ 0.5m

, γ =k+ 1m

. (9)

In the abovedefinition the integerm = 2j, j = 0, 1, . . . , J , indicates the level of thewavelet and integer k = 0, 1, . . . ,m−1 isthe 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 functionh1(x) is the scaling function for the family of the Haar wavelets which is defined as

h1(x) ={1 for x ∈ [0, 1),0 elsewhere. (10)

The following notations are introduced:

pi,1(x) =∫ x

0hi(x′)dx′, (11)

pi,ν+1(x) =∫ x

0pi,ν(x′)dx′, ν = 1, 2, . . . . (12)

Page 3: The numerical solution of second-order boundary-value problems by collocation method with the Haar wavelets

Siraj-ul-Islam et al. / Mathematical and Computer Modelling 52 (2010) 1577–1590 1579

These integrals can be evaluated by using Eq. (8) and the first two of them are given by

pi,1(x) =

{x− α for x ∈ [α, β),γ − x for x ∈ [β, γ ),0 elsewhere,

(13)

pi,2(x) =

12(x− α)2 for x ∈ [α, β),

14m2−12(γ − x)2 for x ∈ [β, γ ),

14m2

for x ∈ [γ , 1),

0 elsewhere.

(14)

We also introduce the following notation

Ci,1 =∫ 1

0pi,1(x′)dx′. (15)

Any function f (x) which is square integrable in the interval (0, 1) can be expressed as an infinite sum of Haar waveletsas

f (x) =∞∑i=1

aihi(x). (16)

The above series terminates at finite terms if f (x) is piecewise constant or can be approximated as piecewise constantduring each subinterval.The bestway to understandwavelets is through amulti-resolution analysis. Given a function f ∈ L2(R) amulti-resolution

analysis (MRA) of L2(R) produces a sequence of subspaces Vj, Vj+1, . . . such that the projections of f onto these spaces givefiner 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 subspacesVj ⊂ L2(R), j ∈ Zwith the following properties

(i) · · · ⊂ V−1 ⊂ V0 ⊂ V1 ⊂ · · ·.(ii) The spaces Vj satisfy

⋃j∈Z Vj is dense in L2(R) and

⋂j∈Z Vj = 0.

(iii) If f (x) ∈ V0, f (2jx) ∈ Vj, i.e. the spaces Vj are scaled versions of the central space V0.(iv) If f (x) ∈ V0, f (2jx− 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 thesespaces. Since the union of all the Vj is dense in L2(R), so it guarantees that any function in L2(R) can be approximatedarbitrarily 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 anMRA for the sequence of spaces {Vj, j ∈ Z} by translation and dilation as definedin Eqs. (8) and (10). For each j the spaceWj serves as the orthogonal complement of Vj in Vj+1. The spaceWj include all thefunctions in Vj+1 that are orthogonal to all those in Vj under some chosen inner product. The set of functions which formbasis for the spaceWj are called wavelets [18,19].

3. Method of solution

Following Lepik [16,17], we assume that

y′′(x) =2M∑i=1

aihi(x). (17)

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

xj =j− 0.52M

, j = 1, 2, . . . , 2M. (18)

Page 4: The numerical solution of second-order boundary-value problems by collocation method with the Haar wavelets

1580 Siraj-ul-Islam et al. / Mathematical and Computer Modelling 52 (2010) 1577–1590

The expressions of y(x), y′(x) and y′′(x) are substituted in the given differential equation and discretization is appliedusing 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 theHaar coefficients in the formofMRA. Themethod is further explainedwith the help of specific boundary conditions describedin cases (i)–(vi).

3.1. Case (i)

The boundary conditions given in Eq. (2) are considered first. Integrating Eq. (17) we obtain

y′(x)− α1 =2M∑i=1

aipi,1(x), (19)

β1 − y′(x) = a1 −2M∑i=1

aipi,1(x). (20)

Eqs. (19) and (20) yield

a1 = β1 − α1. (21)

The derivatives y′′(x) and y′(x) can be expressed as

y′′(x) = (β1 − α1)h1(x)+2M∑i=2

aihi(x), (22)

y′(x) = α1 + (β1 − α1)p1,1(x)+2M∑i=2

aipi,1(x). (23)

Finally by integrating the Eq. (23) from 0 to x, we get

y(x) = y(0)+ α1x+ (β1 − α1)p1,2(x)+2M∑i=2

aipi,2(x). (24)

Substituting these values of y(x), y′(x) and y′′(x) in the given differential equationwe obtain system of equations. Solvingthis system we get the unknown quantity y(0) and the Haar coefficients.

3.2. Case (ii)

For boundary conditions given in Eq. (3), we integrate Eq. (17) twice from 0 to x to obtain

y′(x) = y′(0)+2M∑i=1

aipi,1(x), (25)

y(x)− α2 = xy′(0)+2M∑i=1

aipi,2(x). (26)

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

y′(0) = β2 − α2 −2M∑i=1

aiCi,1. (27)

Using Eq. (27), the approximate solution y(x) and its derivative y′(x) can be expressed as

y(x) = α2 + (β2 − α2)x+2M∑i=1

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

), (28)

y′(x) = β2 − α2 +2M∑i=1

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

). (29)

Page 5: The numerical solution of second-order boundary-value problems by collocation method with the Haar wavelets

Siraj-ul-Islam et al. / Mathematical and Computer Modelling 52 (2010) 1577–1590 1581

3.3. Case (iii)

The boundary conditions given in Eq. (4) are considered. Integrating Eq. (17) and using boundary conditions we canexpress y′(x) and y(x) as

y′(x) = α3 +2M∑i=1

aipi,1(x), (30)

y(x) = β3 − α3(1− x)−2M∑i=1

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

3.4. Case (iv)

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

y′(x) = β4 − a1 +2M∑i=1

aipi,1(x), (32)

y(x) = α4 + (β4 − a1)x+2M∑i=1

aipi,2(x). (33)

3.5. Case (v)

We consider boundary conditions given in Eq. (6). Integrating Eq. (17) and using the boundary condition y′(0) = y′(1),we obtain

a1 = 0, (34)

y′(x) = y′(0)+2M∑i=2

aipi,1(x). (35)

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

y′(0) = −2M∑i=2

aiCi,1. (36)

The numerical solution y(x) is given by

y(x) = y(0)+2M∑i=2

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

). (37)

3.6. Case (vi)

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

y′(x) = y′(0)+2M∑i=1

aipi,1(x). (38)

The unknown quantity y′(0) is calculated as

y′(0) =1c − 1

2M∑i=1

ai(Ci,1 − Ei,1(c)), (39)

where

Ei,1(c) =∫ c

0pi,1(x) dx. (40)

The numerical solution y(x) is expressed as

y(x) = α5 +x

c − 1

2M∑i=1

ai(Ci,1 − Ei,1(c))+2M∑i=1

aipi,2(x). (41)

Page 6: The numerical solution of second-order boundary-value problems by collocation method with the Haar wavelets

1582 Siraj-ul-Islam et al. / Mathematical and Computer Modelling 52 (2010) 1577–1590

4. Algorithm

The aim of this section is to implement the Haar wavelet algorithm for second-order boundary-value problems with allpossible boundary conditions. The procedure to approximate the solution of the nonlinear boundary-value problem

y′′ = φ(x, y, y′), 0 ≤ x ≤ 1, with the boundary conditions specified in case (i)–case (vi)

is as follows:Input Boundary conditions cases (i)–(vi), value of c ∈ (0, 1); level of resolutionM .Output Approximations y(xj) for each j = 1, 2, . . . , 2M .Step 1 For j = 1, 2, . . . , 2M

Set xj =j−0.52M ;

Set Cj,1 =∫ 10 pj,1(x) dx; for case (ii), (iii), (v) and (vi) only.

Set Ej,1 =∫ c0 pj,1(x) dx; for case (vi) only.

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∑i=1

aihi(xj) = φ

(xj, y(0)+ α1xj + (β1 − α1)p1,2(xj)+

2M∑i=2

aipi,2(xj), α1

+ (β1 − α1)p1,1(xj)+2M∑i=2

aipi,1(xj)

),

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

2M∑i=1

aihi(xj) = φ

(xj, α2 + (β2 − α2)xj +

2M∑i=1

ai(pi,2(xj)− xjCi,1

), β2 − α2 +

2M∑i=1

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

)),

with unknowns a1, a2, . . . , a2M .Case (iii)

2M∑i=1

aihi(xj) = φ

(xj, β3 − α3(1− xj)−

2M∑i=1

ai (Ci,1 − pi,2(xj)), α3 +2M∑i=1

ai pi,1(xj)

),

with unknowns a1, a2, . . . , a2M .Case (iv)

2M∑i=1

aihi(xj) = φ

(xj, α4 + (β4 − a1)xj +

2M∑i=1

ai pi,2(xj), β4 − a1 +2M∑i=1

ai pi,1(xj)

),

with unknowns a1, a2, . . . , a2M .Case (v)

2M∑i=1

aihi(xj) = φ

(xj, y(0)+

2M∑i=2

ai(pi,2(xj)− xjCi,1

),

2M∑i=2

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

)),

with unknowns y(0), a2, a3, . . . , a2M .

Page 7: The numerical solution of second-order boundary-value problems by collocation method with the Haar wavelets

Siraj-ul-Islam et al. / Mathematical and Computer Modelling 52 (2010) 1577–1590 1583

Case (vi)

2M∑i=1

aihi(xj) = φ

(xj, α5 +

xjc − 1

2M∑i=1

ai(Ci,1 − Ei,1)+2M∑i=1

ai pi,2(xj),1c − 1

2M∑i=1

ai(Ci,1 − Ei,1)+2M∑i=1

ai pi(xj)

),

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

Step 4 For j = 1, 2, . . . , 2M ,

Case (i) Set y(xj) = y(0)+ α1xj + (β1 − α1)p1,2(xj)+∑2Mi=2 ai pi,2(xj);

Case (ii) Set y(xj) = α2 + (β2 − α2)xj +∑2Mi=1 ai

(pi,2(xj)− xjCi,1

);

Case (iii) Set y(xj) = β3 − α3(1− xj)−∑2Mi=1 ai (Ci,1 − pi,2(xj));

Case (iv) Set y(xj) = α4 + (β4 − a1)xj +∑2Mi=1 ai pi,2(xj);

Case (v) Set y(xj) = y(0)+∑2Mi=2 ai

(pi,2(xj)− xjCi,1

);

Case (vi) y(xj) = α5 +xjc−1

∑2Mi=1 ai(Ci,1 − Ei,1)+

∑2Mi=1 ai pi,2(xj).

Output (y(xj)).

5. Convergence analysis of the Haar wavelets

Lemma 1. Assume that y(x) ∈ L2(R) with the bounded first derivative on (0, 1), then the error norm at Jth level satisfies thefollowing inequality

‖eJ(x)‖ ≤

√K7C2−(3/2)M . (42)

Proof. The error at Jth level may be defined as

∣∣eJ(x)∣∣ = ∣∣y(x)− yJ(x)∣∣ =∣∣∣∣∣ ∞∑i=2j+1+1

aihi(x)

∣∣∣∣∣ where uJ(x) =2J+1∑i=1

aihi(x). (43)

‖eJ(x)‖2 =∫∞

−∞

(∞∑

i=2J+1+1

aihi(x),∞∑

l=2J+1+1

alhl(x)

)dx =

∞∑i=2J+1+1

∞∑l=2J+1+1

aial

∫∞

−∞

hi(x)hl(x) dx

‖eJ(x)‖2 ≤∞∑

i=2J+1+1

|ai|2 .

But |ai| ≤ C2−3i2 max

∣∣y′(η)∣∣where C = ∫ 10 |xh2(x)| dx and η ∈ (k2−j, (k+ 1)2−j) [20–22].Then

‖eJ(x)‖2 ≤∞∑

i=2J+1+1

KC22−3i

where∣∣u′(x)∣∣ ≤ K ∀x ∈ (0, 1)where K is positive constant.‖eJ(x)‖2 ≤ KC2

172−3M

‖eJ(x)‖ ≤

√K7C2−(3/2)M . �

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

6. Numerical examples

In this section, we test the Haar wavelet collocation algorithm on benchmark problems related to all possible six casesof the given boundary conditions. The accuracy of the algorithm is assessed in terms of the following error norms

Page 8: The numerical solution of second-order boundary-value problems by collocation method with the Haar wavelets

1584 Siraj-ul-Islam et al. / Mathematical and Computer Modelling 52 (2010) 1577–1590

Table 1Haar solution, L∞ and Lmre for Example 1.

J 2M L∞ Lmre

3 16 2.9051E−04 7.4256E−044 32 7.4812E−05 1.9715E−045 64 1.8956E−05 5.0732E−056 128 4.7694E−06 1.2864E−057 256 1.1961E−06 3.2386E−068 512 2.9948E−07 8.1249E−07

Table 2Haar solution, L∞ and Lmre for Example 2.

J 2M L∞ Lmre

3 16 5.9492E−04 6.1351E−044 32 1.5545E−04 1.5788E−045 64 3.9757E−05 4.0068E−056 128 1.0055E−05 1.0094E−057 256 2.5283E−06 2.5333E−068 512 6.33925E−07 6.3454E−07

L∞ = Max.|yej − yaj | (44)

Maximum Relative Error = Lmre =L∞|yej |

(45)

Relative Power Deviations (%) = Lrpd =2M∑j=1

|yej − yaj |2

|yej |2× 100 (46)

where yej and yaj are the exact and approximate solution respectively at the jth collocation point xj, j = 1, 2, . . . , 2M . We

choose the computational domain [0, 1] for each numerical example.

Example 1. Consider a linear BVP with Neumann boundary conditions

− y′′ = (2− 4x2)y, y′(0) = 0, y′(1) = −2/e. (47)

The exact solution is e−x2. The method developed is applied to this problem and error estimates for different values ofM are

shown in Table 1. The L∞ errors of semi-orthogonal second-order B-splinewavelets reported in [10] are 2.5E−05 forM = 64and 5.9E−06 forM = 128 whereas the L∞ errors of our algorithm given in Table 1 are 1.8956E−05 and 4.769E−06 for thecorresponding values ofM . Apart frommarginal improvement in the accuracy for higher values ofM , the Haarwavelet basedalgorithm is free from complicated operations derived for function approximation and operational matrices of derivativesrequired in the case of semi-orthogonal second-order B-spline wavelets [10]. Comparison of the exact versus numericalsolution is shown in Fig. 1.

Example 2. Consider a nonlinear BVP with Neumann boundary conditions

y′′ = 2y3, y′(0) = −1, y′(1) = −14. (48)

The exact solution is given by

y(x) =11+ x

. (49)

Maximum absolute errors for different values of M are shown in Table 2. The same problem is solved in [10] by usingsecond-order B-splinewavelets and themaximumabsolute errors recorded therein are 9.0E−05 and 2.6E−05 for 32 and 128collocation pointswhereas themaximumabsolute errors of our algorithm as listed in Table 2 are 1.554E−04 and 1.005E−05for the same number of collocation points. Marginal improvement in the accuracy is observed for large values of M in thiscase as well. Apart from the accuracy, the quantity of derivations increases many fold in semi-orthogonal second-orderB-spline wavelet algorithm [10] when compared with simplified Haar wavelet based algorithm. Comparison of the exactversus numerical solution is shown in Fig. 2.

Page 9: The numerical solution of second-order boundary-value problems by collocation method with the Haar wavelets

Siraj-ul-Islam et al. / Mathematical and Computer Modelling 52 (2010) 1577–1590 1585

Fig. 1. Comparison of the Haar solution with the exact solution of Example 1 for 2M = 16.

Fig. 2. Comparison of the Haar solution with the exact solution of Example 2 for 2M = 32.

Example 3. Consider a system of differential equations [4]

y′′ =

0, for 0 ≤ x <

π

4,

y− 1, forπ

4≤ x ≤

3π4,

0, for3π4< x ≤ π,

(50)

with the boundary conditions y(0) = y(π) = 0, and the condition of continuity of y and y′ at x = π/4 and x = 3π/4. Theanalytical solution is given by

y(x) =

4γ1x, 0 ≤ x <

π

4,

1−4γ2cosh

(π2− x

),

π

4≤ x ≤

3π4,

4γ1(π − x),

3π4≤ x ≤ π,

(51)

where γ1 = π + 4 coth π4 and γ2 = π sinhπ4 + 4 cosh

π4 .

Page 10: The numerical solution of second-order boundary-value problems by collocation method with the Haar wavelets

1586 Siraj-ul-Islam et al. / Mathematical and Computer Modelling 52 (2010) 1577–1590

Fig. 3. Comparison of the Haar solution with the exact solution of Example 3 for 2M = 64.

Table 3Haar solution, L∞ and Lmre for Example 3.

J 2M L∞ Lmre

3 16 3.6374E−04 1.2228E−034 32 9.7774E−05 3.0678E−045 64 2.5281E−05 7.6762E−056 128 6.4235E−06 1.9195E−057 256 1.6187E−06 4.7990E−06

The proposed method is applied to this problem and L∞ for different values of M are shown in Table 3. It can be seenfrom Table 3 that the Haar wavelet based algorithm produces stable and converging solution by increasing the level ofresolution M . These types of BVPs (50) arise in the context of obstacle, unilateral, and contact problems [4]. Numericalsolution of the problem has been a challenge for many finite difference and splines based methods (for details see [4,9,13]and the references therein). Performance of the existing methods is handicapped due to accumulation of the maximumerror around the break up points at x = π/4 and x = 3π/4. The existing methods do not retain their convergence orderwhen the number n of nodes is increased beyond a certain level (n > 80 in this case). From Table 3 it is clear that the Haarwavelet algorithm circumvent this instability problem due to its excellent interpolation properties. Finally Haar waveletsyield both an effective and rapidly convergent scheme and the accuracy of the present algorithm is not hampered by thebreak up points. The accuracy of the new method increases steadily with contribution of more nodes. Comparison of theexact versus the 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-valueproblem [1]

y′′ + λx cos y = 0, y′(0) = 0, y(1) = 0. (52)

Na [1] has found numerical solution of this problemby finite differencemethod,method of reduced physical parameters andmethod of invariant imbedding (by transforming BVP to IVP). We find numerical solution of the model (52) by the proposedHaar wavelet method for λ = 8. The numerical results are shown in Table 4. It is clear from Table 4 that the present methodproduces a converging solution for different values ofM . The value of first derivative reported in Na [1] 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 [1]. For thepurpose of validation, we compared the solution of the Haar wavelets with the ODEs solver of Mathematica which is basedon adaptive 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 trapezoidalprofile [1,7]:

y′′ +(1

R+ ρ−

tanα(1− R) tanα + θ

)y′ −

βy4

(1− R) tanα + θ= 0, (53)

subject to the boundary conditions

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

Page 11: The numerical solution of second-order boundary-value problems by collocation method with the Haar wavelets

Siraj-ul-Islam et al. / Mathematical and Computer Modelling 52 (2010) 1577–1590 1587

Table 4Numerical results for Example 4.

x Haar solution2M = 32 2M = 64 2M = 128 2M = 256 2M = 512

0.0 0.94047 0.94021 0.94014 0.94013 0.940120.1 0.93964 0.93941 0.93935 0.93934 0.939340.2 0.93409 0.93389 0.93384 0.93383 0.933820.3 0.91901 0.91883 0.91878 0.91877 0.918770.4 0.88931 0.88916 0.88912 0.88911 0.889110.5 0.83938 0.83925 0.83922 0.83921 0.839210.6 0.76261 0.76250 0.76247 0.76246 0.762460.7 0.65096 0.65088 0.65086 0.65085 0.650850.8 0.49459 0.49454 0.49453 0.49452 0.494520.9 0.28180 0.28177 0.28177 0.28177 0.281771.0 0.00003 0.00003 0.00003 0.00003 0.00003

Table 5Numerical results for Example 5.

x Haar solution Na solution [1]2M = 32 2M = 64 2M = 128 2M = 256

0.0 1.00000 1.00000 1.00000 1.00000 1.00000.2 0.90438 0.90439 0.90440 0.90440 0.90440.4 0.83998 0.83999 0.84000 0.84000 0.84000.6 0.79566 0.79567 0.79567 0.79567 0.79560.8 0.76746 0.76746 0.76746 0.76746 0.76731.0 0.75658 0.75656 0.75656 0.75656 0.7564

Fig. 4. Comparison of the Haar solution with the Runge–Kutta method (ODEs Solver) for Example 4 for 2M = 16.

Fig. 5. Comparison of the Haar solution with the Runge–Kutta method (ODE Solver) for Example 5 for 2M = 16.

Themodel given in Eq. (53) with boundary conditions (54) is solved by Na [1] using nonlinear shooting method andmethodof reduced physical parameters after converting it into an IVP. We have found numerical solution of the above model asa BVP without transforming it to an IVP. For numerical solution, we assume that α = 6°, ρ = 0.5, θ = 0.05, β = 0.1.Numerical results shown in Table 5 are in complete agreement with Na [1]. We have also used ODEs solver of Mathematicato validate the method. This comparison is shown in Fig. 5.

Page 12: The numerical solution of second-order boundary-value problems by collocation method with the Haar wavelets

1588 Siraj-ul-Islam et al. / Mathematical and Computer Modelling 52 (2010) 1577–1590

Fig. 6. Comparison of the Haar solution with the exact solution of Example 6 for 2M = 64.

Fig. 7. Comparison of the Haar solution with the Runge–Kutta method (ODEs Solver) for Example 7 for 2M = 16.

Table 6Haar solution, L∞ and Lrpd for Example 6.

J 2M L∞ (Present method) Lrpd (Present method) Lrpd [3]

4 32 5.1818E−03 1.5951 6.007465 64 1.3008E−03 9.9137E−02 1.240866 128 3.2608E−04 6.1874E−03 0.297877 256 8.1646E−05 3.8658E−04 –8 512 2.0428E−05 2.4159E−05 –

Example 6. We consider a two-point boundary-value problem [8]

y′′ − y− sin(2πx)(−1− 4π2

) (x3 −

43x2 +

x3

)−

(6x−

83

)sin(2πx)− 4π cos(2πx)

(3x2 −

83x+

13

)= 0, (55)

subject to the periodic boundary conditions

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

The exact solution is given by [3]

y(x) =(x3 −

43x2 +

x3

)sin(2πx). (57)

Katti and Baboo [12] have obtained the numerical solution of the problem by the finite difference method while Glabisz [3]has used the Walsh wavelets to investigate the problem numerically. For different values of M , the L∞ and Lrpd are shownin Table 6. From the comparison given in Table 6 it is clear that performance of the Haar wavelets is better than the Walshwavelets [3]. Comparison of the exact solution versus the numerical solution is shown in Fig. 6.

Page 13: The numerical solution of second-order boundary-value problems by collocation method with the Haar wavelets

Siraj-ul-Islam et al. / Mathematical and Computer Modelling 52 (2010) 1577–1590 1589

Table 7Numerical results for Example 7.

x Haar solution ADM solution [8] Runge–Kutta method

0.0 0.00000 0.0000 0.000000.1 0.06561 0.0656 0.065610.2 0.12097 0.1209 0.120970.3 0.16588 0.1658 0.165880.4 0.20016 0.2001 0.200160.5 0.22369 0.2236 0.223690.6 0.23639 0.2363 0.236390.7 0.23821 0.2382 0.238210.8 0.22913 0.2291 0.229130.9 0.20910 0.2092 0.20920

Example 7. We consider a nonlinear BVP

y′′ +38y+

21089

(y′)2 + 1 = 0, 0 ≤ x ≤ 1, (58)

subject to the boundary conditions

y(0) = 0, y(1/3) = y(1). (59)

The proposed Haarmethod is applied to the problem and the numerical solution is shown in Table 7. Due to non-availabilityof the exact solution we compare our results with ADM solution [8] and ODEs Solver fromMathematica. This comparison isshown in Fig. 7 and Table 7. Excellent agreement of the newmethod in comparison with the established methods is found.

7. Conclusion

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

Acknowledgements

The authors would like to thank the Slovenian Grant Agency for support in the framework of the programme group:P2-0379Modelling ofMaterials and Processes. The first author is grateful for sabbatical leave fromUniversity of Engineeringand Technology Peshawar Pakistan.

References

[1] T.Y. Na, Computational Methods in Engineering Boundary Value Problems, Academic Press, New York, 1979.[2] K. Bisshopp, D.C. Drucker, Appl. Math. 3 (1945) 272–275.[3] W. Glabisz, The use of Walsh-wavelets packets in linear boundary value problems, Comput. Struct. 82 (2004) 131–141.[4] Siraj-ul-Islam, M.A. Noor, I.A. Tirmizi, M.A. Khan, Quadratic non-polynomial spline approach to the solution of a system of second-order boundary-value problems, Appl. Math. Comput. 179 (2006) 153–160.

[5] S. Robert, J. Shipman, Solution of Troesch’s two-point boundary value problems by shooting techniques, J. Comput. Phys. 10 (1972) 232–241.[6] E. Wiebel, Confinement of a Plasma Column by Radiation Pressure in the Plasma in a Magnetic Field, Stanford University Press, California, 1958.[7] H.H. Keller, E.S. Holdrege, Radiation heat transfer for annular fins of trapezoidal profile, Int. J. High Perform. Comput. Appl. 92 (1970) 113–116.[8] M. Tatari, M. Dehgan, The use of the Adomian decomposition method for solving multipoint boundary value problems, Phys. Scr. 73 (2006) 672–676.[9] E. Al-Said, The use of cubic splines in the numerical solution of system of second-order boundary-value problems, Int. J. Comput. Math. Appl. 42 (2001)861–869.

[10] M. Lakestani, M. Dehgan, The solution of a second-order nonlinear differential equation with Neumann boundary conditions using semi-orthogonalB-spline wavelets, Int. J. Comput. Math. 83 (2006) 685–694.

[11] I.A. Tirmizi, E.H. Twizell, Higher-order finite-difference methods for nonlinear second-order two-point boundary-value problems, Appl. Math. Lett.15 (2002) 897–902.

[12] C.P. Katti, S. Baboo, Radiation heat transfer for annular fins of trapezoidal profile, Appl. Math. Comput. 75 (1996) 287–302.[13] Siraj-ul-Islam, I.A. Tirmizi, F. Haq, Quartic non-polynomial splines approach to the solution of a system of second-order boundary-value problems,

Int. J. High Perform. Comput. Appl. 21 (2007) 42–49.[14] C.H. Hsiao, W.-J. Wang, Haar wavelet approach to nonlinear stiff systems, Math. Comput. Simulation 57 (2001) 347–353.[15] C.H. Hsiao, Haar wavelet approach to linear stiff systems, Math. Comput. Simulation 64 (2004) 561–567.[16] U. Lepik, Numerical solution of differential equations using Haar wavelets, Math. Comput. Simulation 68 (2005) 127–143.[17] U. Lepik, Numerical solution of evolution equations by the Haar wavelet method, Appl. Math. Comput. 185 (2007) 695–704.

Page 14: The numerical solution of second-order boundary-value problems by collocation method with the Haar wavelets

1590 Siraj-ul-Islam et al. / Mathematical and Computer Modelling 52 (2010) 1577–1590

[18] J.C. Goswami, Chan, Fundamentals of Wavelets. Theory, Algorithms, and Applications, John Wiley and Sons, New York, 1999.[19] S. Mallat, A Wavelet Tour of Signal Processing, 2nd ed., Academic Press, New York, 1999.[20] L. Jameson, T. Waseda, Error estimation using wavelet analysis for data assimilation: Eewadai, J. Atmos. Ocean. Technol. 17 (2000) 1235–1246.[21] G. Strang, T. Nguyen, Wavelets and Filter Banks, Wellesley-Cambridge Press, 1996.[22] H. Hashih, S. Behiry, N. El-Shamy, Numerical integration using wavelets, Appl. Math. Comput. (2009).