# Approximate Solutions of Singular Two-Point BVPs Using Legendre Operational Matrix of Differentiation

Authors: A. Sami Bataineh; A. K. Alomari; I. Hashim
Journal: Journal of Applied Mathematics
 (2013)

---

## Abstract

Exact and approximate analytical solutions of linear and nonlinear singular two-point boundary value problems (BVPs) are obtained for the first time by the Legendre operational matrix of differentiation. Different from other numerical techniques, shifted Legendre polynomials and their properties are employed for deriving a general procedure for forming this matrix. The accuracy of the technique is demonstrated through several linear and nonlinear test examples.


---

## Body

## 1. Introduction

In this work, we consider the singular two-point boundary value problems (BVPs) of the type(1)1p(x)u′′(x)+1q(x)u′(x)+1r(x)(u(x))n=g(x),0<x≤1,
subject to the boundary conditions
(2)u(0)=α1,u(1)=β,
or
(3)u′(0)=α2,u(1)=β,
where p, q, r, and g are continuous functions on (0,1], and the parameters α1, α2, β are real constants.Problems of form (1) and (2) have been studied in many areas of science and engineering, for example, fluid mechanics, quantum mechanics, optimal control, chemical reactor theory, aerodynamics, reaction-diffusion process, geophysics, and so forth. Exact/approximate solutions of these problems are of great importance due to their wide applications in scientific research. Singular BVPs have been studied by several authors. Bataineh  et al.  [1] used the modified homotopy analysis method (MHAM) to search for approximate solutions of a certain class of singular two-point BVPs. Ravi Kanth and Aruna. [2] and Lu [3] used differential transform method (DTM) and variational iteration method (VIM), respectively, for solving singular two-point boundary value problems. Abu-Zaid and Gebeily [4] provided a finite difference approximation to the solution of the above problems. Ravi Kanth and Reddy [5] presented a method based on cubic splines for solving a class of singular two-point BVPs. The existence of a unique solution of (1) and (2) was discussed in [4].Legendre operational matrix of differentiation, first proposed by Saadatmandi and Dehghan [6], is a powerful method for solving linear and nonlinear problems. They extended the application of Legendre polynomials to solve fractional differential equations. Recently, Pandey  et al.  [7] employed the Legendre operational matrix of differentiation to solve Lane-Emden type equations. Most recently, Kazem et al. [8] constructed a general formulation for the fractional-order Legendre functions to obtain the solution of fractional-order differential equations. To the best of the authors' knowledge, the present work demonstrates for the first time the applicability of the method of Legendre operational matrix of differentiation for obtaining the exact/approximate solutions of the singular two-point BVPs of the type (1) and (2). Several examples are studied to demonstrate the capability of the method.


## 2. Legendre Polynomials and Operational Matrix of Differentiation

Themth-order Legendre polynomials, Lm(z), on the interval [-1,1] are defined as
(4)L0(z)=1,L1(z)=z,Lm+1(z)=2m+1m+1zLm(z)-mm+1zLm-1(z),m=1,2,….These polynomials on the intervalz∈[0,1], so-called shifted Legendre polynomials, can be defined by introducing the change of variable z=2x-1. The shifted Legendre polynomials Lm(2x-1) denoted by Pm(x) can be obtained as
(5)Pm+1(x)=(2m+1)(2x-1)(m+1)Pm(x)-mm+1Pm-1(x),m=1,2,…,
where P0(x)=1 and P1(x)=2x-1. The analytic form of the shifted Legendre polynomial Pm(x) of degree m is given by
(6)Pm(x)=∑i=1m(-1)m+i(m+i)!xi(m-i)(i!)2.
Note that Pm(0)=(-1)m and Pm(1)=1 satisfy the orthogonality condition
(7)∫01Pm(x)Pj(x)dx={12m+1form=j,0form≠j.A functionu(x) square integrable in [0,1] may be expressed in terms of shifted Legendre polynomials as
(8)u(x)=∑j=0∞cjPj(x),
where the coefficients cj are given by
(9)cj=(2j+1)∫01u(x)Pj(x)dx,j=1,2….In practice, we consider the(m+1)-term-shifted Legendre polynomial so that
(10)u(x)=∑j=0mcjPj(x)=CTϕ(x),
where the shifted Legendre coefficient vector C and the shifted Legendre vector ϕ(x) are given by
(11)CT=[c0,c1,…,cm],ϕ(x)=[P0(x),P1(x),…,Pm(x)]T.The derivative of the vectorϕ(x) can be expressed as
(12)dϕ(x)dx=D1ϕ(x),d2ϕ(x)dx2=(D1)2ϕ(x),…,dnϕ(x)dxn=(D1)nϕ(x),
where D1 is the (m+1)×(m+1) operational matrix of derivative. A general method of constructing such operational matrix of derivative could be presented as follows.(1)
Differentiate analytically some polynomials of first degree,(2)
express these derivatives as a linear combination of polynomials of lower degree, and(3)
find a general formula.Now, the general formula of the operational matrix of derivativeD1 is given by(13)D1=(dij)={2(2j-1),forj=i-k,{k=1,3,…,m,ifmodd,k=1,3,…,m-1,ifmeven,0Otherwise.For example, for oddm we have
(14)(0000⋯0002000⋯0000600⋯000⋮⋮⋮⋮⋮⋮⋮⋮20100⋯(2m-3)0006014⋯0(2m-1)0).


## 3. Applications of the Operational Matrix of Derivative

To solve (1) and (2) by means of the operational matrix of derivative method [6], we approximate (u(x))n and g(x) by the shifted Legendre polynomials as
(15)(u(x))n≃(CTϕ(x))n,(16)g(x)≃GTϕ(x),
where the vector GT=[g0(x),…,gm(x)]T represents the nonhomogenous term. By using (12), (15), and (16) we have
(17)u′′(x)≃CT(D1)2ϕ(x),(18)u′(x)≃CTD1ϕ(x).Employing (15)–(18), the residual ℜ(x) for (1) can be written as
(19)ℜ(x)≃1p(x)CT(D1)2ϕ(x)+1q(x)CTD1ϕ(x)+1r(x)(CTϕ(x))n-GTϕ(x).Now, finding the solutionu(x) given in (10) can be divided into two cases: linear and nonlinear.


### 3.1. Linear Case

Forn=1, we generate m-1 linear equations as in a typical tau method [9] by applying
(20)∫01ℜ(x)Pj(x)dx=0,j=0,1,…,m-2.
Also, by substituting boundary conditions (2) and (3) into (15) and (18) we have
(21)u(0)=CTϕ(0)=α1,u(1)=CTϕ(1)=β,
or
(22)u′(0)=CTD1ϕ(0)=α2,u(1)=CTϕ(1)=β,
Equations (20)–(22) generate (m+1) set of linear equations, respectively. These linear equations can be solved for unknown coefficients of the vector C. Consequently, u(x) given in (15) can be easily calculated.


### 3.2. Nonlinear Case

Forn=2,3,…, we first collocate (19) at (m-1) points. For suitable collocation points, we use the first (m-1) shifted Legendre roots of Pm+1(x). These equations together with (21) or (22) generate (m+1) nonlinear equations which can be solved using Newton’s iterative method. Consequently, u(x) given in (10) can be calculated.


## 3.1. Linear Case

Forn=1, we generate m-1 linear equations as in a typical tau method [9] by applying
(20)∫01ℜ(x)Pj(x)dx=0,j=0,1,…,m-2.
Also, by substituting boundary conditions (2) and (3) into (15) and (18) we have
(21)u(0)=CTϕ(0)=α1,u(1)=CTϕ(1)=β,
or
(22)u′(0)=CTD1ϕ(0)=α2,u(1)=CTϕ(1)=β,
Equations (20)–(22) generate (m+1) set of linear equations, respectively. These linear equations can be solved for unknown coefficients of the vector C. Consequently, u(x) given in (15) can be easily calculated.


## 3.2. Nonlinear Case

Forn=2,3,…, we first collocate (19) at (m-1) points. For suitable collocation points, we use the first (m-1) shifted Legendre roots of Pm+1(x). These equations together with (21) or (22) generate (m+1) nonlinear equations which can be solved using Newton’s iterative method. Consequently, u(x) given in (10) can be calculated.


## 4. Numerical Experiments

To illustrate the effectiveness of the presented method, we will consider the following examples of singular two-point BVPs.Example 1.
We first consider the linear singular two-point BVP [1, 10],
(23)u′′(x)+1xu′(x)+u(x)=g(x),0<x≤1,
subject to the boundary conditions of the form (2)
(24)u(0)=0,u(1)=0.
The exact solution of (23) subject to (24) in the case of g(x)=4-9x+x2-x3 is
(25)u(x)=x2-x3.
To solve (23) and (24) we apply the technique described in Section 3.1. With m=3, we approximate the solution as
(26)u(x)=c0P0(x)+c1P1(x)+c2P2(x)+c3P3(x)=CTϕ(x).
According to (14), we have
(27)D1=(00002000060020100),(D1)2=(000000001200006000).
Therefore, using (20) we obtain
(28)1920+12c0+136c1+6c2+12c3=0,4960+16c0+16c1+6115c2+10c3=0.
Now, from (21) we have
(29)c0-c1+c2-c3=0,c0+c1+c2+c3=0.
Solving the linear system (28)-(29) yields
(30)c0=112,c1=120,c3=-112,c4=-120.
Thus,
(31)u(x)=(112120-112-120)(12x-16x2-6x+120x3-30x2+12x-1)=x2-x3,
which is the exact solution (25).Example 2.
Consider the linear singular two-point BVPs [1],
(32)(1-x2)u′′(x)+32(1x-1)u′(x)+(x2-1)u(x)=g(x),0<x≤1,
subject to the boundary conditions of the form (3)
(33)u′(0)=0,u(1)=0.
The exact solution of (32) subject to (33) in the case
(34)g(x)=5-29x2+13x22+3x32-x42,
is
(35)u(x)=x2-x3.
By the same manipulations as in the previous example and assumingm=3, we have
(36)c0=112,c1=120,c3=-112,c4=-120.
Thus,(37)u(x)=(112120-112-120)(12x-16x2-6x+120x3-30x2+12x-1)=x2-x3,
which is the exact solution (35).Example 3.
We next consider the linear singular two-point BVPs [11],
(38)u′′(x)+1xu′(x)=g(x),0<x≤1,
subject to the boundary conditions
(39)u′(0)=0,u(1)=cos1.
The exact solution of (38) subject to (39) in the case
(40)g(x)=-cosx-1xsinx,
is
(41)u(x)=cosx.
By using the technique described in Section3.1, with m=9 and m=8, the values of the unknown matrix CT are given in Table 1. Figure 1 shows the absolute errors of u(x) in the interval x∈[0,1] for different values of m. Obviously, increasing the number of terms of the Legendre polynomials has the effect of increasing the solution accuracy.Table 1
The values of the unknown matrixCT for m=8 and m=9 of Example 3.
c
i
m
=
9
m
=
8
c
0
0.8414709848
0.8414709848
c
1
-
0.2337732110
-
0.233773211
c
2
-
0
.
718349800
E
-
1
-
0.7183498
E
-
1
c
3
0.394000000
E
-
2
0.394000000
E
-
2
c
4
0.512000000
E
-
3
0.512000000
E
-
3
c
5
0.0000000000
0.0000000000
c
6
0.0000000000
0.0000000000
c
7
-
0.100000000
E
-
2
0.100000000
E
-
3
c
8
0.0000000000
0.0000000000
c
9
0.0000000000Figure 1
Absolute errors ofu(x) in the interval x∈[0,1] for different values of m of Example 3.Example 4.
Finally, consider the nonlinear singular two-point BVP [12]
(42)u′′(x)+2xu′(x)+(u(x))5=g(x),0<x<1
subject to the boundary conditions
(43)u(0)=1,u(1)=32.
The exact solution of (42) subject to (43) in the case g(x)=0 is
(44)u(x)=11+(x2/3).
We approximate the solution as(45)u(x)=∑j=010cjPj(x)=CTϕ(x).
Here,D1 and (D1)2 are as given in (27). Using (19), we have
(46)CT(D1)2ϕ(x)+2xCTD1ϕ(x)+(CTϕ(x))5=0.
Now, we collocate (46) at the first nine roots of P11(x), that is
(47)x0≈0.01088567093,x1≈0.05646870012,…,x8≈0.8650760028.Also (21) gives
(48)CTϕ(0)=c0-c1+c2-c3+c4-c5+c6-c7+c8-c9+c10=1,CTϕ(1)=c0+c1+c2+c3+c4+c5+c6+c7+c8+c9+c10=32.Equations (46) and (48) generate 11 nonlinear equations which can be solved using Newton's iterative method. The values of the unknown matrix CT for m=8, m=9, and m=10 are given in Table 2. Figure 2 shows the absolute errors of u(x) in the interval x∈[0,1] for different values of m.Table 2
The values of the unknown matrixCT for m=8, m=9, and m=10 of Example 4.
c
i
m
=
10
m
=
9
m
=
8
c
0
9.514261509
E
-
01
9.514261511
E
-
01
9.514261551
E
-
01
c
1
-
6.966876186
E
-
02
-
6.966876151
E
-
02
-
6.966879907
E
-
02
c
2
-
1.857026292
E
-
02
-
1.857026217
E
-
02
-
1.857018754
E
-
02
c
3
2.743692722
E
-
03
2.743693272
E
-
03
2.743858911
E
-
03
c
4
1.552129543
E
-
04
1.552138998
E
-
04
1.549045730
E
-
04
c
5
-
6.327914767
E
-
05
-
6.327882993
E
-
05
-
6.349471339
E
-
05
c
6
1.707748370
E
-
06
1.708463078
E
-
06
1.940268030
E
-
06
c
7
1.062085947
E
-
06
1.061824274
E
-
06
1.136868997
E
-
06
c
8
-
1.096567492
E
-
07
-
1.092619480
E
-
07
-
1.103651304
E
-
07
c
9
-
1.180570173
E
-
08
-
1.275316483
E
-
08
c
10
2.978752464
E
-
09Figure 2
Absolute errors ofu(x) in the interval x∈[0,1] for different values of m of Example 4.


## 5. Conclusions

In this paper, the Legendre operational matrix of derivative was applied to solve a class of linear and nonlinear singular two-point BVPs. Different from other numerical techniques, only a small size operational matrix is required to provide the solution at high accuracy. It can be clearly seen in the paper that the proposed method is working well even with a few number of terms of the Legendre polynomials.



---

*Source: 547502-2013-04-07.xml*