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.

1. Introduction

Many practical problems arising in engineering, physical, biological, and biomedical sciences require solving fractional differential equations (FDEs), (see, e.g., [14]). 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, [58]). In contrast, there is a relatively small literature on spectral methods for direct solution of such fractional-order problems, (see, for instance, [911]).

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 [2127] 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.

2. Preliminaries and Notations

We present recall and in this section recall some properties of the fractional calculus (see, e.g., [14]) and Legendre polynomials.

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 -orthogonal system, and

Let , be the shifted Legendre polynomial of degree , then it is given by Next, let , then we define the weighted space in the usual way, with the following inner product and norm:

The set of shifted Legendre polynomials forms a complete -orthogonal system. According to (3), we have The shifted Legendre expansion of a function is 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].

Theorem 1 (see [16]). The Caputo fractional derivative of order of the shifted Legendre polynomials is given by where 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: subject to the homogeneous initial conditions where and , are real constants, and is a source function.

Let us present some basic notations which will be used in the sequel. We set where is the th-order derivative of .

The shifted Legendre-Galerkin approximation to (11) and (12) is to find such that where , is defined in the space and 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 with , then a linear combination of shifted Legendre polynomials 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 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.

Theorem 4. The Caputo fractional derivative for the shifted Legendre basis functions is given by where and ,, are defined in (10), (15), respectively.

Proof. The proofs of the this theorem can be immediately obtained on similar lines to that of Theorem 1 and Lemma 2.
Let us denote that Then, the variational formulation (14) can be written as In view of (25), the Galerkin formulation (26) is equivalent to the following linear system: where the nonzero elements of the matrices , for and are given explicitly in the following theorem.

Theorem 5. If one takes as defined in (21), and if one denotes , , and , then and the elements , , are given by

Proof. The basis functions are chosen such that for , and the dimension of is equal to . Hence,
To obtain the elements for , we set in Theorem 4 to get, for , where is defined by relation (24). Due to (21) and (31), takes the form Making use of the orthogonality relation (6), we obtain this proves the first part of Theorem 5. To prove the second part, we make use of relations (21) and (31), to obtain then, it can be easily shown that 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 are given as in the following formula 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 Let us present the following transformation: where
The transformation (38) turns the nonhomogeneous initial conditions (37) into the conditions Hence, it suffices to solve the following modified multi-term fractional differential equation: subject to the homogeneous initial conditions (40), and
If we employ the shifted Legendre-Galerkin approximation to the modified problem (41), based on the basis function which given in (21), we obtain the following system of linear algebraic equations: where ; and the elements of , for and 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: subject to the initial conditions (12), where , . It is to be noted here that can be nonlinear in general.

If we denote by , , and , , the zeros and the weights of the standard (resp., shifted) Legendre-Gauss-Lobatto quadratures on (resp., ), then we may deduce that and if denotes the set of all polynomials of degree , then for any , we get where are the zeros of , and In fact, the discrete inner product and norm as are defined by Recalling then the shifted Legendre-Gauss-Lobatto collocation method for solving (44)-(12) is to seek , such that where are the nodes of the shifted Legendre-Gauss-Lobatto quadratures on the interval .

We now derive the algorithm for solving (44)–(12). To do this, let where 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 Making use of (16) and Theorem 4 (relation (23)) for approximating in terms of the shifted Legendre polynomials. By substituting these approximations in (52), it yields

To find the solution , we collocate (53) at the Gauss-Lobatto collocation points , , yields Equation (54) constitutes a system of nonlinear algebraic equations in the unknown expansion coefficients 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 where The exact solution is given by .

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 . The right-hand 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 and is shown in Figure 1 to make it easier to compare with the analytic solution.

Example 3. Consider the nonlinear fractional initial value problem [12] The exact solution is .

In Table 3, we introduce maximum absolute error, using SL-G-LC method for , , 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 , , and , 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 where The exact solution of this problem is .

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 .

The approximated solutions are evaluated for with and 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 , with , 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 , , , and 12 nodes. Moreover, the approximate solutions obtained by the present method at , with , 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.

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.