# A New Legendre Spectral Galerkin and Pseudo-Spectral Approximations for Fractional Initial Value Problems

Authors: A. H. Bhrawy; M. A. Alghamdi
Journal: Abstract and Applied Analysis
 (2013)

---

## Abstract

We extend the application of the Galerkin method for treating the multiterm fractional differential equations (FDEs) subject to initial conditions. A new shifted Legendre-Galerkin basis is constructed which satisfies exactly the homogeneous initial conditions by expanding the unknown variable using a new polynomial basis of functions which is built upon the shifted Legendre polynomials. A new spectral collocation approximation based on the Gauss-Lobatto quadrature nodes of shifted Legendre polynomials is investigated for solving the nonlinear multiterm FDEs. The main advantage of this approximation is that the solution is expanding by a truncated series of Legendre-Galerkin basis functions. Illustrative examples are presented to ensure the high accuracy and effectiveness of the proposed algorithms are discussed.


---

## Body

## 1. Introduction

Many practical problems arising in engineering, physical, biological, and biomedical sciences require solving fractional differential equations (FDEs), (see, e.g., [1–4]). For that reason, accurate and efficient numerical approaches for solving FDEs are needed. Several methods have also been proposed in the literature to solve ordinary or partial fractional differential equations (see, for instance, [5–8]). In contrast, there is a relatively small literature on spectral methods for direct solution of such fractional-order problems, (see, for instance, [9–11]).The aim of this paper is to design some spectral techniques based on the shifted Legendre-Galerkin (SLG) method and shifted Legendre-Gauss-Lobatto collocation (SL-G-LC) method in modal basis for the solution of linear and nonlinear multi-term FDEs, respectively. Indeed, this is the first work concerning the spectral Galerkin method and pseudo-spectral method in modal basis for solving such problems.In the tau, Galerkin, or pseudo-spectral approximations, the spectral solution is represented by a truncated series of smooth global trial functions, in such a representation the coefficients of the expansion are the unknown to be determined. An explicit expression for the derivatives of an infinitely differentiable function of any degree and for any fractional order in terms of the function itself is needed for tackling FDEs. In this direction, Doha et al. [9] have derived such a formula in the case of the trial functions of truncated expansion that are Chebyshev polynomials and implemented such a relation for solving two classes of FDEs. Furthermore, the fractional derivative of shifted Jacobi polynomials is derived in [12]. Ahmadian et al. [13] proposed an accurate and reliable computational scheme based Jacobi polynomials for fuzzy linear FDEs.The pseudo-spectral methods for the numerical approximations of the solution of several types of FDEs have been proposed and developed. Maleki et al. [14] proposed an efficient and accurate pseudo-spectral method based on shifted Legendre-Gauss quadrature nodes for solving a class of FDEs with boundary conditions. The authors of [15] used the spline functions methods for tackling the linear and nonlinear FDEs. The authors of [16] proposed two types of spectral approximations based on shifted Legendre polynomials for solving two classes of FDEs with multipoint boundary conditions. Yüzbaşı [17] proposed the Bessel pseudo-spectral method to introduce an approximate solution of a class of FDEs. A collocation method based on Bernstein polynomials has recently been proposed and analyzed for solving fractional order Riccati differential equation in [18]. Moreover, the authors in [11] computed the fractional derivative of the new fractional Legendre functions (FLF), also they developed an efficient spectral tau approximations based on FLF to approximate the FDEs. Recently, Bhrawy et al. [19] investigated the fractional integrals of modified generalized Laguerre operational matrix to implement a numerical solution of the integrated form of the linear FDEs on semi-infinite interval. Meanwhile, Baleanu et al. [20] proposed and developed two efficient generalized Laguerre spectral algorithms based on the operational matrix of derivative for the solution of linear and nonlinear fractional initial value problems. We refer also to the recent papers [21–27] where several numerical methods are developed to approximate the solution of various kinds of FDEs.The fundamental goal of this paper is to develop a direct solution technique to approximate linear FDEs subject to homogeneous initial conditions, using the shifted Legendre spectral Galerkin (SLG) approximations. We start by constructing a new appropriate shifted Legendre basis functions which satisfy the homogeneous initial equations and then are used for the approximation of the fractional differential operators. We also present an explicit expression for the derivatives of any fractional order for the shifted Legendre basis functions in terms of the shifted Legendre polynomials. Moreover, the matrices corresponding to shifted Legendre-Galerkin approximation are clearly described, including the modes required to impose nonhomogeneous initial conditions.Another goal of this paper is to treat the nonlinear FDEs subject to nonhomogeneous initial conditions by implementing a new pseudo-spectral approximation based on Legendre polynomials. This approach is characterized by the representation of the solution by a truncated series of Legendre-Galerkin basis functions. The proposed technique differs from the classical pseudo-spectral approximation in that the homogeneous initial conditions are satisfied exactly. Finally, the accuracy and effectiveness of the proposed algorithms are demonstrated by some numerical examples.The outline of the paper is as follows. Section2 introduces necessary definitions of fractional derivatives and shifted Legendre polynomials. In Section 3, we construct an appropriate shifted Legendre basis function for initial FDEs and prove a formula that gives the fractional derivatives of the shifted Legendre basis function in terms of the shifted Legendre polynomials. In Section 4, we present and develop the Legendre-Gauss-Lobatto collocation algorithm in modal basis for solving nonlinear FDEs. In Section 5, some numerical results are discussed. Section 6 is devoted to concluding remarks.


## 2. Preliminaries and Notations

We present recall and in this section recall some properties of the fractional calculus (see, e.g., [1–4]) and Legendre polynomials.The Riemann-Liouville fractional integral operator is given by(1)Jμf(x)=1Γ(μ)∫0x‍(x-t)μ-1f(t)dt,μ>0,x>0,J0f(x)=f(x).
The Caputo fractional derivatives operator is given by
(2)Dμf(x)=Jm-μDmf(x)=1Γ(m-μ)∫0x‍(x-t)m-μ-1dmdtmf(t)dt,m-1<μ≤m,x>0,
where Dm is mth order differential operator.The set of Legendre polynomials (Li(x)) forms a complete L2[-1,1]-orthogonal system, and
(3)∥Li(x)∥2=hi=22i+1.LetLt,i(x)=Li(2x-1), x∈[0,1] be the shifted Legendre polynomial of degree i, then it is given by
(4)Lt,i(x)=∑k=0i‍(-1)i+k(i+k)!xk(i-k)!(k!)2.
Next, let wt(x)=w(x)=1, then we define the weighted space Lwt2[0,1] in the usual way, with the following inner product and norm:
(5)(u,v)wt=∫01‍u(x)v(x)wt(x)dx,∥u∥wt=(u,u)wt1/2.The set of shifted Legendre polynomials forms a completeLwt2[0,1]-orthogonal system. According to (3), we have
(6)∥Lt,i(x)∥wt2=12hi=ħi.
The shifted Legendre expansion of a function u(x)∈Lwt2[0,1] is
(7)u(x)=∑j=0∞‍ajLt,j(x),
where aj are given by
(8)aj=1ħj∫01‍u(x)Lt,j(x)dx,j=0,1,2,….In the following theorem, we state the Caputo fractional derivative of orderμ for the shifted Legendre polynomials, for more details, see [16].Theorem 1 (see [16]).
The Caputo fractional derivative of orderμ of the shifted Legendre polynomials is given by
(9)DμLt,i(x)=∑l=0∞‍Πμ(i,l)Lt,l(x),i=⌈μ⌉,⌈μ⌉+1,…,
where
(10)Πμ(i,l)=∑k=⌈μ⌉i‍(-1)i+k(2l+1)(i+k)!(k-l-μ+1)l(i-k)!k!Γ(k-μ+1)(k-μ+1)l+1,
and ⌈μ⌉ is the ceiling function.


## 3. Legendre-Galerkin Method for Fractional IVPs

In this section, we are interested in employing the SLG method for solving the FDE:(11)Dνu(x)+∑σ=1r-1‍γσDβσu(x)+γru(x)=f(x),x∈I=[0,1],
subject to the homogeneous initial conditions
(12)u(q)(0)=0,q=0,…,m-1,
where γσ(σ=1,…,r) and 0<β1<β2<⋯<βr-1<ν, m-1<ν≤m are real constants, and f(x) is a source function.Let us present some basic notations which will be used in the sequel. We set(13)SN=span{Lt,0(x),Lt,1(x),…,Lt,N(x)},VN={v∈SN:v(j)(0)=0,j=0,1,…,m-1},
where v(j)(x) is the jth-order derivative of v(x).The shifted Legendre-Galerkin approximation to (11) and (12) is to find uN∈VN such that
(14)(DνuN,v(x))wt+∑σ=1r-1‍γσ(DβσuN,v(x))wt+γr(uN,v(x))wt=(f,v(x))wt,N,∀v∈VN,
where (·,·)wt, is defined in the space Lwt2[0,1] and (·,·)wt,N is the discrete inner product which will be defined later in (48).The problem of approximating solutions of multi-term fractional differential equations by shifted Legendre-Galerkin approximation involves the projection onto the span of some appropriate sets of shifted Legendre basis function. The members of the basis may satisfy automatically the given initial conditions imposed on the multi-term FDEs (11). The following lemma provides a shifted Legendre basis function which satisfies the homogeneous initial conditions (12).Lemma 2.
Let one defines(15)ηi,m(k)=(2i+1+2k)i!(i+1+2k)∏n=1i‍(m-n+1)(2k+n+1)(2k+m+n+1)
with η0,m(k)=1, then a linear combination of shifted Legendre polynomials
(16)ϕk(x)=Lt,k(x)+∑i=1mηi,m(k)Lt,k+i(x),k=0,1,…,N-m
satisfies the homogeneous initial conditions (12).Proof.
As a general rule, for fractional-order differential equations withm initial conditions, one may choose the basis function  ϕk(x), in the form (see, [28, 29])
(17)ϕk(x)=Lt,k(x)+∑i=1m‍ηi,m(k)Lt,k+i(x),k=0,1,…,N-m.
The coefficients {ηi,m(k)} may be chosen such that ϕk(x) exactly satisfy the homogeneous initial conditions (12). In virtue of Lt,k(0)=(-1)k and
(18)DqLt,k(0)=(-1)k+qΓ(1+k+q)Γ(1+k-q)Γ(1+q),k≥q,q=1,2,…,
then the initial conditions (12) are reduced to the following system for {ηi,m(k)}:
(19)∑i=1m‍(-1ii)iηi,∑i=1m‍(-1)iηi,m(k)=-1,∑i=1m‍(-1)iηi,m(k)(k+q+1)i(k-q+1)i=-1,∑i=1m‍(-1)iηi,m(.)k=0,1,…,N-m.
The determinant of the previous system is different from zero, hence {ηi,m(k)} can be uniquely determined to give
(20)ηi,m(k)=(2i+1+2k)i!(i+1+2k)∏n=1i‍(m-n+1)(2k+n+1)(2k+m+n+1).Remark 3.
The computation of the exact solution of the linear system (19) for the unknown coefficients {ηi,m(k)} is extremely tedious by hand and we have resorted to the symbolic computation software Mathematica 8.If we substitute (15) into (16) it gives
(21)ϕk(x)=Lt,k(x)+∑i=1m‍(2i+1+2k)i!(i+1+2k)×∏n=1i‍(m-n+1)(2k+n+1)(2k+m+n+1)Lt,k+i(x),k=0,1,2,…,N-m.Now, it is clear that{ϕk(x)} are linearly independent. Therefore by dimension argument we get
(22)VN=span{ϕk(x):k=0,1,2,…,N-m}.In the following theorem, we introduce a formula expanding explicitly the fractional derivatives of the basis functions for any fractional-order in terms of shifted Legendre polynomials.Theorem 4.
The Caputo fractional derivative for the shifted Legendre basis functions is given by(23)Dμϕj(x)=∑ℓ=0∞‍Θm,μ(j,ℓ)Lt,ℓ(x),
where
(24)Θm,μ(j,ℓ)=∑i=0m‍ηi,m(j)Πμ(j+i,ℓ),
and Πμ(i,ℓ),ηi,m(j), are defined in (10), (15), respectively.Proof.
The proofs of the this theorem can be immediately obtained on similar lines to that of Theorem1 and Lemma 2.
Let us denote that(25)fk=(f(x),ϕk(x))wt,N,f=(f0,f1,…,fN-m)T,uN(x)=∑ℓ=0N-m‍aℓϕℓ(x),a=(a0,a1,…,aN-m)T,A=(akj)0≤k,j≤N-m,Bσ=(bkjσ)0<k,j<N-m;σ=1,2,…,r-1,C=(ckj)0≤k,j≤N-m.
Then, the variational formulation (14) can be written as
(26)∑j=0N‍aj[(Dνϕj(x),ϕk(x))wt+∑σ=1r-1‍γσ(Dβσϕj(x),ϕk(x))wt+γr(ϕj(x),ϕk(x))wt∑σ=1r-1‍]=(f,ϕk(x))wt,N,k=0,1,…,N-m.
In view of (25), the Galerkin formulation (26) is equivalent to the following linear system:
(27)(A+∑σ=1r-1‍γσBσ+γrC)a=f,
where the nonzero elements of the matrices A, Bσ for σ=0,1,…,r-1 and C are given explicitly in the following theorem.Theorem 5.
If one takesϕk(x) as defined in (21), and if one denotes akj=(Dνϕj(x),ϕk(x))wt, bkjσ=(Dβσϕj(x),ϕk(x))wt, and ckj=(ϕj(x),ϕk(x))wt, then
(28)VN=span{ϕ0(x),ϕ1(x),…,ϕN-m(x)},
and the elements akj, bkjσ, ckjfor0≤k,j≤N-m are given by
(29)akj=Θm,ν(j,k)hk+∑l=lm‍ηl,m(k)Θm,ν(j,k+l)ħk+l,bkjσ=Θm,βσ(j,k)hk+∑l=lm‍ηl,m(k)Θm,βσ(j,k+l)ħk+l,ck+p,k=ck,k+p=∑i=0m-p‍((16(1+k)2(3+2k)2(1+2i+2k))×((1+i+2k)3(1+i+2k+p)3×(4-i)!i!Γ(3-i-p)×Γ(1+i+p)(2k+2i+2p+1))-1),0≤p≤m.Proof.
The basis functionsϕk(x) are chosen such that ϕk(x)∈VN for k=0,1,…,N-m, and the dimension of  VN is equal to N-m+1. Hence,
(30)VN=span{ϕ0(x),ϕ1(x),…,ϕN-m(x)}.
To obtain the elementsakj for  0≤k,j≤N-m, we set μ=ν in Theorem 4 to get, for j≥⌈ν⌉,
(31)Dνϕj(x)=∑s=0∞‍Θm,ν(j,s)Lt,s(x),
where Θm,ν(j,s) is defined by relation (24). Due to (21) and (31), akj takes the form
(32)akj=(∑s=0∞‍Θm,ν(j,s)Lt,s(x),Lt,k(x))wt+∑ℓ=1m‍ηℓ,m(k)(∑s=0∞‍Θm,ν(j,s)Lt,s(x),Lt,k+ℓ(x))wt.
Making use of the orthogonality relation (6), we obtain
(33)akj=Θm,ν(j,k)ħk+∑ℓ=1m‍ηℓ,m(k)Θm,ν(j,k+ℓ)ħk+ℓ,
this proves the first part of Theorem 5. To prove the second part, we make use of relations (21) and (31), to obtain
(34)bkjσ=(∑s=0∞‍Θm,βσ(j,s)Lt,s(x),Lt,k(x))wt+∑ℓ=1m‍ηℓ,m(k)(∑s=0∞‍Θm,βσ(j,s)Lt,s(x),Lt,k+ℓ(x))wt,
then, it can be easily shown that
(35)bkjσ=Θm,βσ(j,k)ħk+∑ℓ=1m‍ηℓ,m(k)Θm,βσ(j,k+ℓ)ħk+ℓ,
which proves the second part of Theorem 5. It can be shown, by using (21) and with the aid of (6), and after performing some manipulations, that the nonzero elements of  ckj are given as in the following formula
(36)ck+p,k=ck,k+p=∑i=0m-p‍ηi+p,m(k)ηi,m(k+p)ħk+i+p,0≤p≤m,
and this proves the last part of the theorem and completes its proof.
Now, we will transform FDEs with nonhomogeneous initial conditions to other ones with homogeneous initial conditions. Consider the multi-term fractional differential equation (11) subject to the nonhomogeneous initial conditions
(37)u(j)(0)=bj,j=0,1,…,m-1.
Let us present the following transformation:
(38)V(x)=u(x)+∑i=0m-1‍Eixi,
where
(39)Ei=-bii!,i=0,1,…,m-1.
The transformation (38) turns the nonhomogeneous initial conditions (37) into the conditions
(40)V(j)(0)=0,j=0,1,…,m-1.
Hence, it suffices to solve the following modified multi-term fractional differential equation:
(41)DνV(x)+∑σ=1r-1‍γσDβσV(x)+γrV(x)=f*(x),x∈I,
subject to the homogeneous initial conditions (40), and
(42)f*(x)=f(x)+γr∑i=0m-1‍Eixi+∑σ=1r-1‍γσDβσ(∑i=0m-1‍Eixi).
If we employ the shifted Legendre-Galerkin approximation to the modified problem (41), based on the basis function ϕk(x) which given in (21), we obtain the following system of linear algebraic equations:
(43)(A+∑σ=1r-1‍γσBσ+γrC)a=F*,
where F*=(f0*,f1*,…,fN-m*)T; fk*=(f*,ϕk(x))wt,N and the elements of A, Bσ for  σ=0,1,…,r-1 and C are given in Theorem 5.


## 4. Shifted Legendre Pseudospectral Approximation in Modal Basis

The main advantage of pseudo-spectral approximation in solving differential equations [30, 31] lies in its high accuracy for a given number of unknowns. In the proposed shifted Legendre-Gauss-Lobatto collocation method in modal basis, there are two successive steps for obtaining the approximate solution of nonlinear fractional initial value problem. First, an appropriate finite set of shifted Legendre basis functions must be chosen for the representation of the truncated solution, and then the nonlinear FDE may be collocated by the well known shifted Legendre-Gauss-Lobatto quadrature nodes. Consequently, The nonlinear FDE is reduced to a system of algebraic equations. In the second step, we implement any standard numerical solver for solving such system of nonlinear algebraic equations.In this section, we employ the shifted Legendre pseudo-spectral approximation in modal basis for the numerical solution the nonlinear fractional initial value problem:(44)Dνu(x)=F(x,u(x),Dβ1u(x),…,Dβru(x)),x∈I,
subject to the initial conditions (12), where m-1<ν≤m, 0<β1<β2<⋯<βr<ν. It is to be noted here that F can be nonlinear in general.If we denote byxN,j(xt,N,j), 0⩽j⩽N, and ϖN,j(ϖt,N,j), 0≤j≤N, the zeros and the weights of the standard (resp., shifted) Legendre-Gauss-Lobatto quadratures on [-1,1] (resp., [0,1]), then we may deduce that
(45)xt,N,j=12(xN,j+1),ϖt,N,j=12ϖN,j,0≤j≤N,
and if S`N[0,1] denotes the set of all polynomials of degree ⩽N, then for any ψ∈S`2N-1[0,1], we get
(46)∫01wt(x)ψ(x)dx=12∫-11w(x)ψ(12(x+1))dx=12∑j=0N‍ϖN,jψ(12(xN,j+1))=∑j=0N‍ϖt,N,jψ(xt,N,j),
where  xN,j are the zeros of (1-x2)∂xLN, and
(47)ϖN,j=2N(N+1)1(LN(xN,j))2,0≤j≤N.
In fact, the discrete inner product and norm as are defined by
(48)(u,v)wt,N=∑k=0N‍u(xt,N,k)v(xt,N,k)ϖt,N,k,∥u∥wt,N=(u,u)wt,N.
Recalling
(49)SN=span{Lt,0(x),Lt,1(x),…,Lt,N(x)},VN={v∈SN:v(j)(0)=0,j=0,1,…,m-1},
then the shifted Legendre-Gauss-Lobatto collocation method for solving (44)-(12) is to seek uN(x)∈VN, such that
(50)Dνu(xt,N-m,k)=F(Dβru(xt,N-m,k)xt,N-m,k,u(xt,N-m,k),Dβ1u(xt,N-m,k),…,Dβru(xt,N-m,k)),k=0,1,…,N-m,
where xt,N-m,k(k=0,1,…,N-m) are the nodes of the shifted Legendre-Gauss-Lobatto quadratures on the interval [0,1].We now derive the algorithm for solving (44)–(12). To do this, let
(51)uN(x)=∑j=0N-m‍ajϕj(x),a=(a0,a1,…,aN-m)T,
where ϕj(x) are the shifted Legendre basis of functions defined in (16). The members of the basis may satisfy automatically the given initial conditions (12), imposed on the nonlinear FDEs. Then, by virtue of (51), we deduce that
(52)∑j=0N-m‍ajDνϕj(x)=F(x,∑j=0N-m‍ajϕj(x),∑j=0N-m‍ajDβ1ϕj(x),…,∑j=0N-m‍ajDβrϕj(x)).
Making use of (16) and Theorem 4 (relation (23)) for approximating Dνϕj(x),Dβ1ϕj(x),…,Dβrϕj(x) in terms of the shifted Legendre polynomials. By substituting these approximations in (52), it yields
(53)∑j=0N-m‍aj(∑ℓ=0N‍Θm,μ(j,ℓ)Lt,ℓ(x))=F(x,∑j=0N-m‍aj(∑ℓ=0m‍ηℓ,m(j)Lt,j+ℓ(x)),∑j=0N-m‍aj(∑ℓ=0N‍Θm,β1(j,ℓ)Lt,ℓ(x)),…,∑j=0N-m‍aj(∑ℓ=0N‍Θm,βr(j,ℓ)Lt,ℓ(x))).To find the solutionuN(x), we collocate (53) at the Gauss-Lobatto collocation points xt,N-m,k, k=0,1,…,N-m, yields
(54)∑j=0N-m‍(∑ℓ=0N‍Θm,μ(j,ℓ)Lt,ℓ(xt,N-m,k))aj=F(xt,N-m,k,∑j=0N-m‍(∑ℓ=0m‍ηℓ,m(j)Lt,j+ℓ(xt,N-m,k))aj,∑j=0N-m‍(∑ℓ=0N‍Θm,β1(j,ℓ)Lt,ℓ(xt,N-m,k))aj,…,∑j=0N-m‍(∑ℓ=0N‍Θm,βr(j,ℓ)Lt,ℓ(xt,N-m,k))aj).
Equation (54) constitutes a system of N-m nonlinear algebraic equations in the unknown expansion coefficients aj;j=0,1,…,N-m which may be solved by using Newton’s iteration method.


## 5. Numerical Examples

In this section, we implement several numerical examples to demonstrate the accuracy and applicability of the proposed spectral algorithms. Comparison of the results obtained by our methods with shifted Jacobi pseudo-spectral approximation [12] reveals that the present algorithms are very convenient and produces high accurate solutions to multi-term FDEs.Example 1.
Consider the linear FDE equation with homogeneous initial conditions(55)Dνu(x)+5D11/3u(x)+3D11/5u(x)-4D11/7u(x)-6D11/13u(x)=f(x),5<ν≤6,u(j)(0)=0,j=0,1,…,5,
where
(56)f(x)=31135104000x28/3Γ[31/3]+18681062400x54/5Γ[59/5]-24908083200x80/7Γ[87/7]-37362124800x158/13Γ[171/13]+6227020800x13-νΓ[14-ν].
The exact solution is given by u(x)=x13.Table1 lists the maximum absolute error, using the shifted Legendre-Galerkin (SLG) method with various choices of ν and N.Table 1
Maximum absolute error with various choices ofN, for Example 1.
N
-
6
ν
SLG method
ν
SLG method
ν
SLG method
8
5.1
1.00
×
1
0
-
3
5.5
2.30
×
1
0
-
3
5.9
2.88
×
1
0
-
3
16
1.19
×
1
0
-
7
1.11
×
1
0
-
6
1.47
×
1
0
-
6
24
7.15
×
1
0
-
10
1.08
×
1
0
-
8
1.86
×
1
0
-
8Example 2.
Consider the linear FDE equation(57)D2u(x)+D3/2u(x)+D1/2u(x)=g(x),u(0)=1,u′(0)=0,x∈[0,1],
whose exact solution is given by u(x)=cos(γx). The right-hand side g(x) can be obtained from the substitution of the exact solution in (57).Table2 lists the maximum absolute error, using the SLG method with various choices of γ and N. Moreover, the approximate solution obtained by the SLG method at γ=4π and N=16 is shown in Figure 1 to make it easier to compare with the analytic solution.Table 2
Maximum absolute error with various choices ofN, for Example 2.
N
-
2
ν
SLG method
ν
SLG method
ν
SLG method
16
1
2.87
×
1
0
-
4
π
3.21
×
1
0
-
3
2
π
3.99
×
1
0
-
1
20
2.47
×
1
0
-
5
2.43
×
1
0
-
4
9.96
×
1
0
-
4
24
6.05
×
1
0
-
6
6.01
×
1
0
-
5
2.55
×
1
0
-
4Figure 1
Comparison ofuN(x), for ν=4π and N=16, and u(x), for Example 2.Example 3.
Consider the nonlinear fractional initial value problem [12]
(58)Dζu(x)+Dηu(x)·Dθu(x)+u2(x)=x6+6x3-ζΓ(4-ζ)+36x6-η-θΓ(4-η)Γ(4-θ),ζ∈(2,3),η∈(1,2),θ∈(0,1),u(0)=u′(0)=u′′(0)=0.
The exact solution is u(x)=x3.In Table3, we introduce maximum absolute error, using SL-G-LC method for ζ=2.5, η=1.5, θ=0.9 with various choices of N.Table 3
Maximum absolute error forζ=2.5, η=1.5, and θ=0.9 and different choices of N, for Example 3.
N
SL-G-LC
SJ-GC(α=β=0)
SL-GLC(α=β=1/2)
SL-GLC(α=β=1)
4
4.06
×
1
0
-
4
3.91
×
1
0
-
3
2.73
×
1
0
-
3
1.84
×
1
0
-
3
8
1.61
×
1
0
-
4
1.42
×
1
0
-
3
8.66
×
1
0
-
4
5.40
×
1
0
-
4
16
7.06
×
1
0
-
5
1.24
×
1
0
-
4
1.17
×
1
0
-
4
1.03
×
1
0
-
4
24
2.33
×
1
0
-
5
3.37
×
1
0
-
5
3.50
×
1
0
-
5
3.39
×
1
0
-
5This problem was solved in [12] using shifted Jacobi-Gauss collocation (SJ-GC) method based on Jacobi operational matrix, the results provided by Doha et al. [12] have been presented in the third, fourth, and fifth columns of Table 3 for Jacobi parameters α=β=0, α=β=1/2,  and α=β=1, respectively. Numerical results of this FDE demonstrate that the SL-G-LC method is more accurate than the SJ-GC method, see Table 5.7 in [12].Example 4.
Consider the nonlinear fractional initial value problem(59)Dζu(x)+eu(x)+up(x)=f(x),ζ∈(m-1,m),m≤5,uj(0)=0,j=0,1,…,m-1,
where
(60)f(x)=360x5-ζΓ(6-ζ)-1440x6-ζΓ(7-ζ)-Γ(1+ζ)+(-xζ+3x5-2x6)p+e-xζ+3x5-2x6.
The exact solution of this problem is u(x)=-xζ+3x5-2x6.In Table4, we introduce the maximum absolute error, using the shifted Legendre collocation method based on Gauss-Lobatto points, with various choices of ζ, m and N at p=4.Table 4
Maximum absolute error with various choices ofN,m,ζ, and p=4, for Example 4.
N
-
m
m
ζ
SL-G-LC
ζ
SL-G-LC
4
3
2.5
9.29
×
1
0
-
3
2.9
4.80
×
1
0
-
3
8
3.29
×
1
0
-
3
2.44
×
1
0
-
3
16
1.34
×
1
0
-
3
2.65
×
1
0
-
4
24
4.89
×
1
0
-
4
2.63
×
1
0
-
4
4
5
4.2
1.16
×
1
0
-
2
4.8
1.98
×
1
0
-
2
8
3.69
×
1
0
-
3
4.31
×
1
0
-
3
16
1.47
×
1
0
-
4
1.89
×
1
0
-
3
24
1.19
×
1
0
-
4
7.90
×
1
0
-
4The approximated solutions are evaluated forζ=4.1,4.3,4.5,4.7,4.9,5 with m=5 and p=2 and 12 nodes. The results of the numerical simulations are plotted in Figure 2. It is evident from Figure 2 that, as ζ approaches close to 5, the numerical solution by shifted Legendre-Gauss-Lobatto collocation method for such FDE approaches to the solution of integer order differential equation. In the case of 4<ζ≤5, p=2 with m=5, and 12 nodes, the results of the numerical simulations are shown in Figure 3. In Figure 4, we plotted the approximated solutions for different choices of ζ, m=4, p=3, and 12 nodes. Moreover, the approximate solutions obtained by the present method at 3<ζ≤4, p=3 with m=4, and 12 nodes are shown in Figure 5 to make it easier to show that; as ζ approaches to its integer value, the solution of FDE approaches to the solution of integer order differential equation.Figure 2
Approximated solution forζ=4.1,4.3,4.5,4.7,4.9,5, p=2 with 12 nodes, for Example 4.Figure 3
Approximated solution for4<ζ≤5, p=2 with 12 nodes, for Example 4.Figure 4
Approximated solution forζ=3.1,3.3,3.5,3.7,3.9,5, p=3 with 12 nodes, for Example 4.Figure 5
Approximated solution for3<ζ≤4, p=3 with 12 nodes, for Example 4.


## 6. Conclusion

We have extended the application of the shifted Legendre spectral Galerkin approximation for treating fractional initial value problems. In this approximation, the initial conditions are satisfied exactly for each member of shifted Legendre basis functions. In particular, any fractional-order Caputo derivative of such basis functions is expanded in terms of the shifted Legendre polynomials. In addition, we have proposed an accurate direct solvers for the general multi-term FDEs with nonhomogeneous initial conditions using the Legendre spectral Galerkin approximation.In this paper, we proposed a Legendre-Gauss-Lobatto collocation algorithm in model basis for solving the nonlinear FDEs in which the numerical solution was approximated directly using the shifted Legendre basis functions. The results from numerical examples demonstrate the accuracy and stability of these spectral approximations for treating linear and nonlinear FDEs. In the forthcoming works, we hope that similar techniques can be applied to Chebyshev polynomials or other Jacobi polynomials.



---

*Source: 306746-2013-08-27.xml*