#### Abstract

The Legendre multiwavelet Galerkin method is adopted to give the approximate solution for the nonlinear fractional partial differential equations (NFPDEs). The Legendre multiwavelet properties are presented. The main characteristic of this approach is using these properties together with the Galerkin method to reduce the NFPDEs to the solution of nonlinear system of algebraic equations. We presented the numerical results and a comparison with the exact solution in the cases when we have an exact solution to demonstrate the applicability and efficiency of the method. The fractional derivative is described in the Caputo sense.

#### 1. Introduction

Nowadays, fractional differential equations have garnered a great deal of attention and appreciation recently due to its ability to provide an accurate description of different nonlinear phenomena. The process of development of models based on fractional order differential systems has lately gained popularity in the investigation of dynamical systems. The advantage of fractional order systems is that they allow greater degrees of freedom in the model. The field of chaos has also snatched the attention of the researchers and this contributes to a large amount of the current research these days.

In recent decades, fractional calculus has found diverse applications in different scientific and technological fields [15], such as thermal engineering, acoustics, electromagnetism, control, robotics, viscoelasticity, diffusion, edge detection, turbulence, signal processing, information sciences, communications, and many other physical processes and also in medical sciences. Fractional differential equations (FDEs) have also been applied in modeling many physical and engineering problems and fractional differential equations in nonlinear dynamic [6, 7]. The importance of getting approximate and exact solutions of nonlinear fractional differential equations in mathematics and physics remains an important problem that requires to discover new methods of approximate and exact solutions. However, finding exact solutions to these nonlinear fractional differential equations are difficult to obtain it [8]. Therefore, the numerical methods used to deal with these equations [9] and they have largely been using some semianalytical techniques to solve these equations such as, differential transform method [1017], Adomian decomposition method [1821], Laplace decomposition method [2224], homotopy perturbation method [2529], and variational iteration method [3032]. The majority of these methods have shortcomings inbuilt such as calculating Adomian’s polynomials, the Lagrange multiplier, mixed results, and the large computational work.

The aim of this paper is to expand the application of Legendre multiwavelet Galerkin method to provide approximate solutions for initial value problems of fractional nonlinear partial differential equations and to make comparison with that obtained by other numerical methods.

#### 2. Preliminaries and Notations

In this section, we give the definition of the Riemann-Liouville fractional derivative and fractional integral with some basic properties.

Definition 1. The left sided Riemann-Liouville fractional integral of order , [3335] of a function ,, is defined as

Definition 2. The (left sided) Caputo fractional derivative of , ,, is defined as [33] Note that [3335] (i)(ii)(iii)

#### 3. Properties of Legendre Multiwavelets

##### 3.1. Wavelets [35, 36]

Wavelets constitute a family of functions constructed from dilation and translation of a single function called the mother wavelet. When the dilation parameterand the translation parametervary continuously we have the following family of continuous wavelets: If we restrict the parameters and to discrete values as ,,,, and we have the following family of discrete wavelets: where form a wavelet basis for . In particular, when and then forms an orthonormal basis [35].

##### 3.2. Legendre Multiwavelets [36]

Legendre multiwavelets have four arguments; ,, can assume any positive integer; is the order for Legendre polynomials and is the normalized time. They are defined on the interval where ,. The coefficient is for orthonormality; are the well-known shifted Legendre polynomials of orderwhich are defined on the interval and can be determined with the aid of the following recurrence formula: Also the two-dimensional Legendre multiwavelet is defined as where , and are defined similarly to , and can assume any positive integer, and are the order for the Legendre polynomials, and forms a basis for .

##### 3.3. Function Approximation

A function) defined over can expand as If the infinite series in (11) is truncated, it can be written as whereand are and matrices, respectively, given by In addition, is a matrix whose elements can be calculated from with ,,,.

#### 4. Solution of Nonlinear Fractional Partial Differential Equations

Consider the nonlinear fractional partial differential equation with initial condition .

Let

A Galerkin approximation to (16) is constructed as follows. The approximation is sought in the form of the truncated series where are the Legendre multiwavelet basis.

The expansion coefficients are determined by Galerkin equations: where denotes inner product defined as Galerkin equations (18) give a system of equations that can be solved for the elements of

#### 5. Illustrative Example

To demonstrate the effectiveness of the method, here we consider some linear fractional partial differential equations. The Legendre wavelets are defined only for ; we take , . The computations associated with the examples were performed using Mathematica and Maple.

Example 1. Consider the nonlinear time-fractional diffusion equation in absence of both external force and reaction term [37] with initial condition .
We applied the method presented in this paper for and ; from (17) we have Substituting (22) into (21) and using (18) and (19) we obtained the solution of (21) for different values of . Table 1 shows the approximate solutions for (21) obtained for different values of using the Legendre multiwavelet method and the Homotopy perturbation method [37]. The values of are the only case for which we know the exact solution and our approximate solution using Legendre multiwavelet method coincides with the approximate solution obtained using the Homotopy perturbation method [37]. It is noted that only two bases of Legendre multiwavelet and fourth-order term of Homotopy perturbation method were used in evaluating the approximate solution of Table 1. Figure 1 shows a plot of with respect to and for different values of . Figure 2 shows a plot of for various values of and different values of , .

Example 2. Consider the fractional nonlinear Klein-Gordon equation [38] with initial condition .
We applied the method presented in this paper for and ; from (17) we have Substituting (24) into (23) and using (17) we obtained the solution of (23) for different values of . Table 2 shows the approximate solutions for (23) obtained for different values ofusing the Legendre multiwavelet method. We have given the solution simulations in Figure 3 according to different values of . Figure 4 shows a plot of for various values of and different values of ,.

Example 3. Consider the following nonlinear time-fractional equation [28, 39, 40]: with initial condition.
We applied the method presented in this paper for and ; from (17) we have Substituting (26) into (25) and using (17) we obtained the solution of (25) for different values of . We have given the solution simulations in Figure 5 according to different values of . Figure 6 shows a plot of for various values ofand different values of. Tables 3, 4, and 5 show the approximate solutions for (25) obtained using the Legendre multiwavelet method, the decomposition method [39], the variational iteration method [39], Homotopy perturbation method [28], and generalized differential transform method (GDTM) [40] for different values of . The values of are the only case for which we know the exact solution and Table 4 provides that our approximate solution using Legendre multiwavelet is more accurate than the approximate solution obtained using the decomposition method, Homotopy perturbation method, and the variational iteration method. In addition to that, our approximate solution using Legendre multiwavelet as the approximate solution was obtained using GDTM and exact solution.

Example 4. Consider the following time fractional advection nonhomogeneous equation [41, 42]: with initial condition
We applied the method presented in this paper for and ; from (17) we have
Substituting (28) into (27) and using (17) we obtained the solution of (27) for different values of . Table 6 shows the approximate solutions for (27) obtained for different values of using the Legendre multiwavelet method and the Homotopy perturbation method [41]. The values of are the only case for which we know the exact solution and our approximate solution using Legendre multiwavelet method coincides with the approximate solution obtained using the Homotopy perturbation method [41, 42] and the approximate solution obtained using Adomian decomposition method and variational iteration method [43]. We have given the solution simulations in Figure 7 according to different values of . Figure 8 shows a plot of for various values of and .

#### 6. Conclusion

In this study, it is shown how Legendre multiwavelet can be applied to provide approximate solutions for initial value problems of fractional nonlinear partial differential equations. The Legendre multiwavelet properties are presented. The main characteristic of this approach is using these properties together with the Galerkin method to reduce the NFPDEs to the solution of nonlinear system of algebraic equations. In addition, we compered our results with that obtained by other numerical methods. The results show that the Legendre multiwavelet is a powerful mathematical tool for fractional nonlinear partial differential equations. We used Mathematica and Maple programs for computations in this paper.

#### Conflict of Interests

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