_{1}

^{*}

Fractional calculus has been used in many fields , such as engineering, population, medicine, fluid mechanics and different fields of chemistry and physics. These fields were found to be best described using fractional differential equations (FDEs) to model their processes and equations. One of the well-known methods for solving fractional differential equations is the Shifted Legendre operational matrix (LOM) method. In this article, I proposed a numerical method based on Shifted Legendre polynomials for solving a class of fractional differential equations. A fractional order operational matrix of Legendre polynomials is also derived where the fractional derivatives are described by the Caputo derivative sense. By using the operational matrix , the initial and boundary equations are transformed into the products of several matrixes and by scattering the coefficients and the products of matrixes . I got a system of linear equations. Results obtained by using the proposed method (LOM) presented here show that the numerical method is very effective and appropriate for solving initial and boundary value problems of fractional ordinary differential equations. Moreover, some numerical examples are provided and the comparison is presented between the obtained results and those analytical results achieved that have proved the method’s validity.

Fractional calculus, the theory of differentiation and integration to non-integer order, is very useful for the description of various physical phenomena, such as damping laws, diffusion process, etc. Fractional differential equations extend prominent tools that are perfectly representing many engineering and physical problems. However, solving fractional differential equations are a challenging and stimulating area of research in mathematics and engineering since these fractional equations do not have exact and analytic solutions and that is the main reason made accurate numerical techniques preferable for solving fractional differential equations.

Many applications of shifted Legendre polynomials have been exemplified in research [

The proposed method is to obtain the numerical solution for FDE of the form [

A 1 D 2 y ( x ) + A 2 D 1 y ( x ) + A 3 D α y ( x ) + A 4 D β y ( x ) + A 5 y ( x ) = f ( x ) (I)

subject to the conditions

y ( 0 ) = δ , y ( 0 ) ′ = δ 1 (II)

or the boundary conditions

y ( 0 ) = γ 0 , y ( R ) = γ 1 (III)

where A 1 , A 2 , A 3 , A 4 , A 5 , δ 0 , δ 1 , γ 0 , γ 1 are constants.

m − 1 < α , β < m and f(x) are the source terms.

The fractional derivatives are defined in the Caputo sense. The main idea in the current work is to apply the shifted Legendre polynomials and the operational matrix of fractional derivative together to discretize Equation (1) to get a satisfactory result. Figures 1-3 and results in next sections show the effectiveness of the proposed method in comparison with the analytical results.

The remainder of the article is organized as follows. In the next section, some mathematical preliminaries of the fractional calculus theory are introduced in addition to some relevant properties of the Legendre polynomials. Section 3 summarizes the application of the shifted Legendre method to the solution of problems (I)-(III). As a result, a system of algebraic equations is obtained and the solution of the considered problem is given. Section 4 illustrates applying the Legendre operational matrix of fractional derivative for solving multi-order fractional differential equation. In Section 5, the proposed method is applied to several examples. Finally, conclusion is given in Section 6. The numerical results are all computed using Mathematica Development Environment.

In this section, some basic definitions and properties of fractional calculus theory are given that are further used in this article.

The fractional calculus is a name for the theory of integrals and derivatives of arbitrary order, which unifies and generalizes the notions of integer-order differentiation and n-fold integration [

Definition 2.1. The Caputo definition of the fractional-order derivative is defined as

D α f ( x ) = 1 Γ ( n − α ) ∫ 0 x f ( n ) ( t ) ( x − t ) α + 1 − n d t , n − 1 < α ≤ n , n ∈ N , (1)

where, α > 0 is the order of the derivative and n is the smallest integer greater than α For the Caputo derivative I have [

D α C = 0 (C is a constant), (2)

D α x β = { 0 , for β ∈ N 0 and β < α Γ ( β + 1 ) Γ ( β + 1 − α ) x β − α , for β ∈ N 0 and β ≥ α or β ∉ N and β > α (3)

I use the ceiling function, ⌈ α ⌉ to denote the smallest integer greater than or equal to α , and the floor function ⌊ α ⌋ to denote the largest integer less than or equal to α . Also N = { 1 , 2 , ⋯ } and N 0 = { 0 , 1 , 2 , ⋯ } . Recall that for α ∈ N , the Caputo differential operator coincides with the usual differential operator of an integer order.

The well-known Legendre polynomials are defined on the interval [ − 1 , 1 ] and can be determined with the aid of the following recurrence formulae:

L i + 1 ( z ) = 2 i + 1 i + 1 z L i ( z ) − i i + 1 L i − 1 ( z ) , i = 1 , 2 , ⋯

where L 0 ( z ) = 1 and L 1 ( z ) = z . In order to use these polynomials on the interval x ∈ [ 0 , 1 ] I define the so-called shifted Legendre polynomials by introducing the change of variable.

z = 2 x − 1 . Let the shifted Legendre polynomials L i ( 2 x − 1 ) be denoted by P i ( x ) . Then P i ( x ) can be obtained as follows:

P i + 1 ( x ) = ( 2 i + 1 ) ( 2 x − 1 ) i + 1 P i ( x ) − i i + 1 P i − 1 ( x ) , i = 1 , 2 , ⋯ , (5)

where P 0 ( x ) = 1 and P 1 ( x ) = 2 x − 1 . The analytic form of the shifted Legendre polynomial P i ( x ) of degree i given by

P i ( x ) = ∑ k = 0 i ( − 1 ) i + k ( i + k ) ! ( i − k ) ! ( k ! ) 2 x k (6)

Note that P i ( 0 ) = ( − 1 ) i and P i ( 1 ) = 1 The orthogonality condition is

∫ 0 1 p i ( x ) p j ( x ) d x = { 1 2 i + 1 for i = j 0 for i ≠ j (7)

A function y ( x ) , square integrable in [ 0 , 1 ] , may be expressed in terms of shifted Legendre polynomials as

y ( x ) = ∑ j = 0 ∞ c j P j ( x ) ,

where c j the coefficients are given by P j (x)

c j = ( 2 j + 1 ) ∫ 0 1 y ( x ) p j ( x ) d x , j = 1 , 2 , ⋯

In practice, only the first ( m + 1 ) - terms shifted Legendre polynomials are considered. Then I have

y ( x ) = ∑ j = 0 m c j P j ( x ) = C T ϕ ( x ) ,

where the shifted Legendre coefficient vector C and the shifted Legendre vector ϕ ( x ) are given by

C T = [ c 0 , ⋯ , c m ] ,

ϕ ( x ) = [ P 0 ( x ) , P 1 ( x ) , ⋯ , P m ( x ) ] T (8)

The derivative of the vector ϕ ( x ) can be expressed by

d ϕ ( x ) d x = D ( 1 ) ϕ ( x ) , (9)

where D ( 1 ) is the ( m + 1 ) × ( m + 1 ) operational matrix of derivative given by

D ( 1 ) = ( d i j ) = { 2 ( 2 j + 1 ) , for j = i − k , { k = 1 , 3 , ⋯ , m , if m odd k = 1 , 3 , ⋯ , m − 1 , if m even 0 , otherwise ,

for example for even m I had

D ( 1 ) = 2 ( 0 0 0 0 ⋯ 0 0 0 1 0 0 0 ⋯ 0 0 0 0 3 0 0 ⋯ 0 0 0 1 0 5 0 ⋯ 0 0 0 ⋮ ⋮ ⋮ ⋮ ⋱ ⋮ ⋮ ⋮ 1 0 5 0 ⋯ 2 m − 3 0 0 0 3 0 7 ⋯ 0 2 m − 1 0 )

By using Equation (9), it is clear that

d n ϕ ( x ) d x n = ( D ( 1 ) ) n ϕ ( x ) , (10)

where n ∈ N and the superscript, in D ( 1 ) , denotes matrix powers. Thus

D ( n ) = ( D ( 1 ) ) n , n = 1 , 2 , ⋯ (11)

Lemma 1. Let P i ( x ) be a shifted Legendre polynomial then

D ( α ) P i ( x ) = 0 , i = 0 , 1 , ⋯ , ⌈ α ⌉ − 1 , α > 0 (12)

Proof. Using Equations (2), (3) in Equation (6) the lemma can be proved.

In the following theorem I generalize the operational matrix of derivative of shifted Legendre polynomials given in (9) for fractional derivative.

Theorem 1. Let ϕ ( x ) be shifted Legendre vector defined in (8) and also suppose, α > 0 then

D α ϕ ( x ) ≃ D ( α ) ϕ ( x ) (13)

where D ( α ) is the ( m + 1 ) × ( m + 1 ) operational matrix of fractional derivative of order α in the Caputo sense and is defined as follows:

D ( α ) = ( 0 0 ⋯ 0 ⋮ ⋮ ⋱ ⋮ 0 0 ⋯ 0 ∑ k = ⌈ α ⌉ ⌈ α ⌉ θ ⌈ α ⌉ , 0 , k ∑ k = ⌈ α ⌉ ⌈ α ⌉ θ ⌈ α ⌉ , 1 , k ⋯ ∑ k = ⌈ α ⌉ ⌈ α ⌉ θ ⌈ α ⌉ , m , k ⋮ ⋮ ⋱ ⋮ ∑ k = ⌈ α ⌉ i θ i , 0 , k ∑ k = ⌈ α ⌉ i θ i , 1 , k ⋯ ∑ k = ⌈ α ⌉ i θ i , m , k ⋮ ⋮ ⋱ ⋮ ∑ k = ⌈ α ⌉ m θ m , 0 , k ∑ k = ⌈ α ⌉ m θ m , 1 , k ⋯ ∑ k = ⌈ α ⌉ m θ m , m , k ) (14)

where θ i , j , k is given by

θ i , j , k = ( 2 j + 1 ) ∑ i = 0 j ( − 1 ) i + j + k + l ( i + k ) ! ( l + j ) ! ( i − k ) ! ( k ! ) Γ ( k − α + 1 ) ( j − l ) ! ( l ! ) 2 ( k + l − α + 1 ) (15)

Note that in D ( α ) the first ⌈ α ⌉ rows, are all zero.

Proof. Using Equations (3), (4) and (6) I have

D α p i ( x ) = ∑ k = 0 i ( − 1 ) i + k ( i + k ) ! ( i − k ) ! ( k ! ) 2 D α ( x k ) = ∑ k = ⌈ α ⌉ i ( − 1 ) i + k ( i + k ) ! ( i − k ) ! ( k ! ) Γ ( k − α + 1 ) x k − α , i = ⌈ α ⌉ , ⋯ , m (16)

Now, approximate x k − α by ( m + 1 ) terms of shifted Legendre series, I have

x k − α ≃ ∑ j = 0 m b k , j P j ( x ) , (17)

where

b k , j = ( 2 j + 1 ) ∫ 0 1 x k − α p j ( x ) d x = ( 2 j + 1 ) ∑ l = 0 j ( − 1 ) j + l ( j + l ) ! ( j − l ) ! ( l ! ) 2 ∫ 0 1 x k + l − α d x = ( 2 j + 1 ) ∑ l = 0 j ( − 1 ) j + l ( j + l ) ! ( j − l ) ! ( l ! ) 2 ( k + l − α + 1 ) (18)

Employing Equations (16)-(18) I get

D α P i ( x ) ≈ ∑ k = ⌈ α ⌉ i ∑ j = 0 m ( − 1 ) i + k ( i + k ) ! ( i − k ) ! ( k ! ) Γ ( k − α + 1 ) b k , j P j ( x ) = ∑ j = 0 m ( ∑ k = ⌈ α ⌉ i θ i , j , k ) P j ( x ) , i = ⌈ α ⌉ , ⋯ , m (19)

where θ i , j , k is given in Equation (15). Rewrite Equation (19) as a vector form I have

D ( α ) P i ( x ) ≃ [ ∑ k = ⌈ α ⌉ i θ i , 0 , k , ∑ k = ⌈ α ⌉ i θ i , 1 , k , ⋯ , ∑ k = ⌈ α ⌉ i θ i , m , k ] ϕ ( x ) , i = ⌈ α ⌉ , ⋯ , m (20)

Also according to Lemma 1, I can write

D ( α ) P i ( x ) = [ 0 , 0 , ⋯ , 0 ] ϕ ( x ) , i = 0 , 1 , ⋯ , ⌈ α ⌉ − 1 (21)

A combination of Eqs. (20) and (21) leads to the desired result.

Remark. If α = n ∈ N Then Theorem 1 gives the same result as Equation (11).

Operational matrix of fractional derivative is applied to solve multi-order fractional differential equation. The existence and uniqueness and continuous dependence of the solution to this problem are discussed in [

Consider the linear multi-order fractional differential equation

D α y ( x ) = a 1 D β 1 y ( x ) + ⋯ + a k D β k y ( x ) + a k + 1 y ( x ) − a k + 2 g ( x ) (22)

with initial conditions

y ( i ) ( 0 ) = d i , i = 0 , ⋯ , n (23)

where j = 1 , ⋯ , k + 2 are real constant coefficients and also n < α ≤ n + 1 , 0 < β 1 < β 2 < ⋯ < β k < α and D α denotes the Caputo fractional derivative of order α

To solve problem (22) and (23) I approximate y ( x ) and g ( x ) by the shifted Legendre polynomials as

y ( x ) ≃ ∑ i = 0 m c i P i ( x ) = C T ϕ ( x ) (24)

g ( x ) ≃ ∑ i = 0 m g i P i ( x ) = G T ϕ ( x ) (25)

where vector G = [ g 0 , ⋯ , g m ] T is known but C = [ c 0 , ⋯ , c m ] T is an unknown vector. By using Equations (13) and (24) I have

D α y ( x ) ≃ c T D α ϕ ( x ) ≃ c T D ( α ) ϕ ( x ) (26)

D β j y ( x ) ≃ c T D β j ϕ ( x ) ≃ c T D ( β j ) ϕ ( x ) , j = 1 , ⋯ , k (27)

Employing Equations (24)-(27) the residual R m ( x ) for Equation (22) can be written as

R m ( x ) ≃ ( c T D ( α ) − c T ∑ i = 1 k a j D ( β j ) − c T a k + 1 − G T a k + 2 ) ϕ ( x ) (28)

As in a typical tau method [

〈 R m ( x ) , P j ( x ) 〉 = ∫ 0 1 R m ( x ) P j ( x ) d x = 0 , j = 0 , 1 , ⋯ , m − n − 1 (29)

Also, by substituting Equations (11) and (24) in Equation (23) I get

y ( 0 ) = c T ϕ ( 0 ) = d 0 y ( 1 ) ( 0 ) = c T D ( 1 ) ϕ ( 0 ) = d 1 ⋮ y ( n ) ( 0 ) = c T D ( n ) ϕ ( 0 ) = d n (30)

Equations (29) and (30) generate m − n and n +1 set of linear equations, respectively. These linear equations can be solved for unknown coefficients of the vector C. Consequently, y(x) given in Equation (24) can be calculated.

To solve Equation (22) with respect to the following boundary conditions (for n is even),

u ( i ) ( 0 ) = a i , u ( i ) ( L ) = b i , i = 0 , 1 , ⋯ , n 2 − 1 (31)

The same technique described in Section 4.1 was applied, but the (n) set of linear equations resulting from (31) is changed to be obtained from

u ( i ) ( 0 ) = c T D ( i ) ϕ ( 0 ) = a i , u ( i ) ( L ) = c T D ( i ) ϕ ( L ) = b i , i = 0 , 1 , ⋯ , n 2 − 1 (32)

Equations (29) and (31) generate (N + 1) system of linear equations. This system can be solved to determine the unknown coefficients of the vector C.

D α y ( x ) = F ( x , y ( x ) , D β 1 y ( x ) , ⋯ , D β k y ( x ) ) , (33)

with initial conditions

y ( i ) ( 0 ) = d i , i = 0 , ⋯ , n (34)

where n < α ≤ n + 1 , 0 < β 1 < β 2 < ⋯ < β k < α and D α denotes the Caputo fractional derivative of order α . It should be noted that F can be nonlinear in general.

In order to use shifted Legendre polynomials for this problem, I first approximate y ( x ) , D α y ( x ) and D β j y ( x ) for j = 0 , ⋯ , k as Equations (24), (26) and (27) respectively. By substituting these equations in Equation (33) I get

C T D ( α ) φ ( x ) ≈ F ( x , C T φ ( x ) , C T D ( β 1 ) φ ( x ) , ⋯ , C T D ( β k ) φ ( x ) ) (35)

Also, by substituting Equations (11) and (24) in Equation (34) I obtain

y ( 0 ) = c T ϕ ( 0 ) = d 0 ,

y ( i ) ( 0 ) = c T D ( i ) ϕ ( 0 ) = d i , i = 1 , 2 , ⋯ , n (36)

To find the solution y(x), I first collocate Equation (35) at m − n points. For suitable collocation points I use the first (m-n) shifted Legendre roots of P m + 1 ( x ) . These equations together with Equation (36) generate a system of (.m + 1) nonlinear equations which can be solved using Newton’s iterative method. Consequently y(x) given in Equation (24) can be calculated.

Consider the nonlinear FDE (33) with boundary conditions (31). I apply the same technique described in Section 4.3.1, but Equation (36) shall be changed to be (32)., I have a system of (N + 1) nonlinear algebraic equations, which can be solved using Newton’s iterative method.

The presented method in the previous two sections has been applied to solve some examples. In this section, the results for the examples are shown along with their figures and a comparison with the analytical results was also presented in order to show the effectiveness of the technique.

Example 1. [

y ( 2 ) ( x ) + 3 y ( 1 ) ( x ) + 2 y ( 0.1379 ) ( x ) + y ( 0.0159 ) ( x ) + 5 y ( x ) = f ( x ) , x ∈ ( 0 , 1 ) , (37)

Subject to the initial conditions

y ( 0 ) = 1 , y ′ ( 0 ) = 0 (38)

where f(x) is chosen such that the exact solution of (37) is y ( x ) = 1 + x 2 2

By applying the technique described in Section 4.1 with m = 3, solution approximated as

y ( x ) = c 0 p 0 ( x ) + c 1 p 1 ( x ) + c 2 p 2 ( x ) + c 3 p 3 ( x ) = c T φ (x)

Here, I have

D ( 1 ) = ( 0 0 0 0 2 0 0 0 0 6 0 0 2 0 10 0 ) D ( 2 ) = ( 0 0 0 0 0 0 0 0 12 0 0 0 0 60 0 0 )

D ( 1.379 ) = ( 0 0 0 0 1.1313681331 1.0223463203 − 0.0608397666 0.0199340611 − 1.0223463203 0.36356929917 1.196322451 − 0.093190361 1.07052836676 − 0.17397613077 0.3074747759 1.2963937228 )

D ( 0.0159 ) = ( 0 0 0 0 1.01472967373 1.0039162279 − 0.00667748802491 0.00190548426 − 1.0039162279 0.03644683 1.0231320558 − 0.00944784045 1.0080521857 − 0.01921582796 0.02742824636 1.03280174727 )

G = ( 9.2199297 4.10949395 0.918660451 0.03295167 )

Therefore using Equation (29) I obtain

− 9.2199297 + 5 c 0 + 9.2774659 c 1 + 8.95139113 c 2 + 9.1491089 c 3 = 0 (39)

− 4.1094939 + 8.04860886 c 1 + 18.763585 c 2 + 59.6328319 c 3 = 0 (40)

Now, by applying Equation (30) I have

− 1 + c 0 − c 1 + c 2 − c 3 = 0 (41)

2 c 1 − 6 c 2 + 12 c 3 = 0 (42)

Finally by solving Equations (39)-(42) I got

c 0 = 1.17436533 ; c 1 = 0.2662085 ; c 2 = 0.09495018 ; c 3 = 0.003107

Thus I can write

y ( x ) = ( 1.17436533 0.2662085 0.09495018 0.003107 ) × ( 1 − 1 + 2 x 1 − 6 x + 6 x 2 − 1 + 12 x − 30 x 2 + 20 x 3 ) = 1 + x 2 2

which is the exact solution.

Example 2. Consider the boundary value problem

D 3 2 y ( x ) + y ( x ) = x 5 − x 4 + 128 7 π x 3.5 − 64 5 π x 2.5

subject to boundary conditions (43)

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

where the exact solution of this problem is y ( x ) = x 4 ( x − 1 ) .

This fractional boundary value problem is solved by applying the method described in Section 4.2 by using shifted Legendre expansion and its operational matrices of derivatives with m = 5. Using (43) four linear equations obtained, and by applying boundary condition I had two linear equations. By solving this linear system I got the unknown vector C. By substituting this vector in Equation (43), I had the exact solution.

y ( x ) = ∑ i = 0 5 c i p i (x)

Then, the 6 unknown coefficients will be in the form

c 0 = − 0.033333 ; c 1 = − 0.042857 ; c 2 = 0.0119047 ; c 3 = 0.0388888 ; c 4 = 0.02142857 ; c 5 = 0.00396825

Therefore, I can write

y ( x ) = ( − 0.033333 − 0.042857 0.0119047 0.0388888 0.02142857 0.00396825 ) × ( 1 − 1 + 2 x 1 − 6 x + 6 x 2 − 1 + 12 x − 30 x 2 + 20 x 3 1 − 20 x + 90 x 2 − 140 x 3 + 70 x 4 − 1 + 30 x − 210 x 2 + 560 x 3 − 630 x 4 + 252 x 5 ) = x 4 ( x − 1 )

Numerical results will not be presented since the exact solution is obtained.

Example 3. [

D 2 u ( x ) + D 3 4 u ( x ) + u ( x ) = x 3 + 6 x + 128 15 Γ ( 1 4 ) x 9 4 (44)

Subject to initial conditions u ( 0 ) = 0 , u ′ ( 0 ) = 0

where the exact solution of this problem is u ( x ) = x 3

By applying the technique described in Section 4.1 with m = 3, the approximate solution and the right hand side may be written in the form

u ( x ) ≃ ∑ i = 1 3 c i p i ( x ) = c T ϕ (x)

g ( x ) ≃ ∑ i = 1 3 g i p i ( x ) = G T ϕ (x)

Here, I have

D ( 2 ) = ( 0 0 0 0 0 0 0 0 12 0 0 0 0 60 0 0 ) G = ( 13 4 + 512 195 Gamma [ 1 4 ] 3 ( 23 20 + 1536 1105 Gamma [ 1 4 ] ) 5 ( 1 20 + 512 1547 Gamma [ 1 4 ] ) 7 ( 1 140 + 512 38675 Gamma [ 1 4 ] ) )

D ( 3 / 4 ) = ( 0 0 0 0 8 5 8 15 − 8 39 392 3315 − 8 15 216 65 56 51 − 88 195 272 195 − 48 85 1264 273 5488 3315 )

Therefore, using Equation (4.8) I obtain

8 c 1 5 + 172 c 2 15 + 272 c 3 195 − 13 4 − 512 195 Gamma [ 1 4 ] + c 0 = 0 (45)

( 8 c 1 15 + 216 c 2 65 + 5052 c 3 85 ) − 153 20 − 22016 3315 Gamma [ 1 4 ] + c 1 = 0 (46)

Now, by applying Equation (4.9), I have

c T φ ( 0 ) = c 0 − c 1 + c 2 − c 3 = 0 (47)

c T D ( 1 ) φ ( 0 ) = 2 c 1 − 6 c 2 + 12 c 3 = 0 (48)

Finally, by solving linear system of four Equations (45)-(48), I obtained

u ( x ) = ( 0.25 0.45 0.25 0.05 ) ( 1 − 1 + 2 x 1 − 6 x + 6 x 2 − 1 + 12 x − 30 x 2 + 20 x 3 ) = x 3

which is the exact solution.

It is clear that in Examples 1 - 3 the present method can be considered as an efficient method.

Shifted Legendre approximation method for solving higher order fractional differential equations has been presented. These equations are transformed to a system of algebraic equations to provide a matrix representation. The solution is expressed as a truncated Legendre series, and so it can be easily evaluated for arbitrary values by using computer program. From illustrative examples, it can be seen that this matrix approach can obtain very accurate and satisfactory results. The solution obtained is in very excellent agreement with the already existing ones and shows that this approach can solve the problems effectively. Comparisons between approximate solutions and analytical solutions illustrate the validity and the great potential of the technique.

The author declares no conflicts of interest regarding the publication of this paper.

Kawala, A.M. (2018) Numerical Solution for Initial and Boundary Value Problems of Fractional Order. Advances in Pure Mathematics, 8, 831-844. https://doi.org/10.4236/apm.2018.812051