Abstract

A numerical method for solving a class of fractional partial differential equations with variable coefficients based on Legendre polynomials is proposed. A fractional order operational matrix of Legendre polynomials is also derived. The initial equations are transformed into the products of several matrixes by using the operational matrix. A system of linear equations is obtained by dispersing the coefficients and the products of matrixes. Only a small number of Legendre polynomials are needed to acquire a satisfactory result. Results obtained using the scheme presented here show that the numerical method is very effective and convenient for solving fractional partial differential equations with variable coefficients.

1. Introduction

The subject of factional calculus was found over 300 years ago. The theory of integrals and derivatives of noninteger order goes back to Leibnitz, Liouville, and Letnikov. In recent years, fractional derivative and fractional differential equations have played a very significant role in many areas in fluid flow, physics, mechanics, and other applications. A lot of practical problems can be elegantly modeled with the help of the fractional derivative [1ā€“5]. Fractional derivatives provide an excellent instrument for the description of memory and hereditary properties of various materials and processes. Due to the increasing applications, a lot of attention has been paid to numerical and exact solution of fractional differential equations and fractional partial equations. The analytical solutions of fractional differential equations are still in a preliminary stage. Except in a limited number of these equations, we have difficulty in seeking their analytical as well as numerical solutions. Thus there have been attempts to develop the methods for getting analytical and numerical solutions of fractional differential equations. Recently, some methods have drawn attention, such as Adomian decomposition method (ADM) [6, 7], variational iteration method (VIM) [8], generalized differential transform method (GDTM) [9ā€“11], finite difference method (FDM) [12], and wavelet method [13, 14].

In this paper, our study focuses on a class of fractional partial differential equations as follows:such that the initial conditionswhere and are fractional derivatives of Caputo sense, , , , and are the known and is the unknown.

There have been several methods for solving the fractional partial differential equation. Doha et al. used Jacobi tau approximation to solve the numerical solution of the space fractional diffusion equation [15]. Yi et al. [16] applied block pulse functions method to obtain the fractional partial equations. Podlubny [17] obtained the numerical solution of the fractional partial differential equations with constant coefficients by using Laplace transform method.

2. Definitions of Fractional Derivatives and Integrals

Definition 1. Riemann-Liouville fractional integral of order is defined as follows [17]:where is the gamma function.
The Riemann-Liouville fractional integral satisfies the following properties:

Definition 2. Caputoā€™s fractional derivative of order is defined as follows [17]:Particularly, the operator satisfies the following properties ( is a constant):

3. Legendre Polynomials and Some of Their Properties

The Legendre basis polynomials of degree in (see [18]) are defined bywhere ,ā€‰ā€‰. The Legendre polynomials of degree can be also written asLetThe Legendre polynomials given by (7) can be expressed in the matrix formwhereObviouslyA function can be expressed in terms of the Legendre basis. In practice, only the first term of Legendre polynomials is considered. Hencewhere ,ā€‰ā€‰ā€‰ā€‰ are called Legendre coefficients.

We extend the notion to two-dimensional space and define two-dimensional Legendre polynomials of order as a product function of two Legendre polynomials: For the function , we can also get its approximation by using Legendre polynomials:where

Theorem 3 (see [19]). If a continuous function , defined on , has bounded mixed fourth partial derivative , then the Legendre expansion of the function converges uniformly to the function.
For sufficiently smooth function on , the error of the approximation is given bywhereWe refer the reader to [20] for the proof of the above result.

4. Numerical Solution of the Fractional Partial Differential Equation

Consider the fractional partial differential equation with variable coefficients equation (1). If we approximate the function with the Legendre polynomials, it can be written as (15). Then we haveLetSubstituting (19) into (1), we haveDispersing (21) by the points ā€‰ā€‰, we can obtain which is unknown.

5. Error Analysis

In this part, in order to illustrate the effectiveness of , we have given the following theorem. Let be the following approximation of :Then we have

Theorem 4. Suppose that the function obtained by using Legendre polynomials is the approximation of , and has bounded mixed fractional partial derivative ; then we have the following upper bound of error:where and

Proof. The property of the sequence on implies thatthenThe Legendre polynomials coefficients of function are given byTherefore, we obtainNow, let ; then we haveBy solving this equation, we haveSo we haveMoreover, it was easily obtained thatthus, we haveNamelyTherefore, we havethusThis completes the proof.

6. Numerical Examples

Example 1. Consider the following nonhomogeneous partial differential equation:where . The exact solution of this equation is . Tables 1ā€“3 show the absolute errors for , , and of different .

From Tables 1ā€“3, we can see that the absolute error is very small when . Also, when is fixed, the more points we take, the more accurate numerical solutions we obtain. Figures 1ā€“3 show the fact that is the number of , .

Example 2. Consider the following fractional partial differential equation:whereThe exact solution is . The numerical solutions for , are displayed in Figures 4 and 5 and the exact solution is shown in Figure 6.

Example 3. Consider this equation:whereThe exact solution is . The numerical solutions for , are displayed in Figures 7 and 8. The absolute errors are shown in Figures 9 and 10 when and .

From Examples 1ā€“3, we can see that the method in this paper can be effectively used to solve the numerical solution of fractional partial differential equation with variable coefficients. From the above results, the absolute errors between the numerical solutions and the exact solution are rather small. What is more, due to the absolute error in this paper is about , the Legendre polynomials method can reach higher degree of accuracy by comparing the approximations obtained by block pulse method [16].

7. Conclusion

In this paper, we use the Legendre polynomials method to solve a class of fractional partial differential equations with variable coefficients. The Legendre polynomials operational matrix of fractional differentiation is derived from the property of Legendre polynomials. The initial equation is translated into the product of some relevant matrixes, which can also be regarded as the system of linear equations. The error analysis of Legendre polynomials is also given. The numerical results show that numerical solutions obtained by our method are in very good agreement with the exact solution.

Conflict of Interests

The authors declare that there is no conflict of interests regarding the publication of this paper.