A New Legendre Spectral Galerkin and PseudoSpectral Approximations for Fractional Initial Value Problems

and Applied Analysis 3 Theorem 1 (see [16]). The Caputo fractional derivative of order μ of the shifted Legendre polynomials is given by

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 pseudospectral 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üzbas ¸ı [17] proposed the Bessel pseudospectral 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 semiinfinite 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][22][23][24][25][26][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.Section 2 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.
The Riemann-Liouville fractional integral operator is given by The Caputo fractional derivatives operator is given by where   is th order differential operator.The set of Legendre polynomials (  ()) forms a complete  2 [−1, 1]-orthogonal system, and Let  , () =   (2 − 1),  ∈ [0, 1] be the shifted Legendre polynomial of degree , then it is given by Next, let   () = () = 1, then we define the weighted space  2   [0, 1] in the usual way, with the following inner product and norm: The set of shifted Legendre polynomials forms a complete  2    [0, 1]-orthogonal system.According to (3), we have The shifted Legendre expansion of a function where   are given by In the following theorem, we state the Caputo fractional derivative of order  for the shifted Legendre polynomials, for more details, see [16].
Let us present some basic notations which will be used in the sequel.We set where V () () is the th-order derivative of V().
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).
Proof.As a general rule, for fractional-order differential equations with  initial conditions, one may choose the basis function   (), in the form (see, [28,29]) The coefficients { , ()} may be chosen such that   () exactly satisfy the homogeneous initial conditions (12).In virtue of  , (0) = (−1)  and then the initial conditions (12) are reduced to the following system for { , ()}: The determinant of the previous system is different from zero, hence { , ()} can be uniquely determined to give Remark 3. The computation of the exact solution of the linear system (19) for the unknown coefficients { , ()} is extremely tedious by hand and we have resorted to the symbolic computation software Mathematica 8.
If we substitute (15) into ( 16) it gives Now, it is clear that {  ()} are linearly independent.Therefore by dimension argument we get 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.
Proof.The proofs of the this theorem can be immediately obtained on similar lines to that of Theorem 1 and Lemma 2.

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 pseudospectral approximation in modal basis for the numerical solution the nonlinear fractional initial value problem: subject to the initial conditions (12), where It is to be noted here that  can be nonlinear in general.

Numerical Examples
In this section, we implement several numerical examples to demonstrate the accuracy and applicability of the proposed The exact solution is given by () =  13 .
Table 1 lists the maximum absolute error, using the shifted Legendre-Galerkin (SLG) method with various choices of ] and .
Example 2. Consider the linear FDE equation whose exact solution is given by () = cos().The righthand side () can be obtained from the substitution of the exact solution in (57).
Table 2 lists the maximum absolute error, using the SLG method with various choices of  and .Moreover, the approximate solution obtained by the SLG method at  = 4 and  = 16 is shown in Figure 1 to make it easier to compare with the analytic solution.
In Table 3, we introduce maximum absolute error, using SL-G-LC method for  = 2.5,  = 1.5,  = 0.9 with various choices of .
This 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]. where The exact solution of this problem is () = −  + 3 5 − 2 6 .In Table 4, we introduce the maximum absolute error, using the shifted Legendre collocation method based on Gauss-Lobatto points, with various choices of ,  and  at  = 4.
The approximated solutions are evaluated for  = 4.1, 4.3, 4.5, 4.7, 4.9, 5 with  = 5 and  = 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,  = 2 with  = 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 ,  = 4,  = 3, and 12 nodes.Moreover, the approximate solutions obtained by the present method at 3 <  ≤ 4,  = 3 with  = 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.

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.

Table 1 :
Maximum absolute error with various choices of , for Example 1.

Table 2 :
Maximum absolute error with various choices of , for Example 2.

Table 4 :
Maximum absolute error with various choices of , , , and  = 4, for Example 4.