- Research
- Open access
- Published:

# Operational matrix approach for solving the variable-order nonlinear Galilei invariant advection–diffusion equation

*Advances in Difference Equations*
**volume 2018**, Article number: 102 (2018)

## Abstract

In this paper, we investigate numerical solution of the variable-order fractional Galilei advection–diffusion equation with a nonlinear source term. The suggested method is based on the shifted Legendre collocation procedure and a matrix form representation of variable-order Caputo fractional derivative. The main advantage of the proposed method is investigating a global approximation for the spatial and temporal discretizations. This method reduces the problem to a system of algebraic equations, which is easier to solve. The validity and effectiveness of the method are illustrated by an easy-to-follow example.

## 1 Introduction

Recently, kinetic equations with fractional derivatives were recognized as a useful tool for description of anomalous diffusion phenomena. Examples include systems exhibiting underground water pollution, Hamiltonian chaos, disordered medium, dynamics of protein molecules, reactions in complex systems, motions under the influence of optical tweezers, and more; see reviews on fractional kinetics [1–4]. The kinetic equations with time-fractional derivative are used for description of subdiffusion processes, that is, those for which the mean-squared displacement grows in time slower than linearly [5]. Also, it describes slow relaxation processes that are characterized by stretched exponential or power-law response function [6]. It became clear that further theoretical investigations are required to incorporate adequate tools for description of more realistic random processes, which are described by a set of characteristic exponents and are therefore of multifractional type. An adequate kinetic description of these processes requires the use of generalized fractional kinetics based on the concept of variable-order fractional (V-OF) operators. This calculus was proposed in [7, 8] and very recently was introduced in physics [9, 10].

The V-OF operators are nonlocal with singular kernels, which makes the V-OF models complicated. Hence, solving V-OF models is also more complicated. Numerical computation of the V-OF operators is the key to understand the behavior and physical meaning of the V-OF models. Lin et al. [11] investigated the stability and convergence of an explicit finite-difference approximation for a nonlinear V-OF diffusion equation. Chen et al. [12] proposed two numerical schemes for a V-OF anomalous subdiffusion equation, one with first-order temporal accuracy and fourth-order spatial accuracy and the other with second-order temporal accuracy and fourth-order spacial accuracy. Yang et al. [13] proposed a finite difference scheme for solving V-OF reaction–diffusion equation. Abdelkawy et al. [14] proposed a new spectral method to achieve high accurate solution for the V-OF mobile–immobile advection–dispersion model. Chen et al. [15] proposed a numerical method to estimate the V-OF derivatives of an unknown signal in noisy environment. Tavares et al. [16] presented a numerical tool to solve partial differential equations involving V-OF Caputo derivatives. Bhrawy and Zaky [17] proposed a numerical method for solving the V-OF nonlinear cable equation based on shifted Jacobi collocation procedure together with the shifted Jacobi operational matrix for V-OF derivatives. They also proposed an accurate and robust approach to approximate solutions of V-OF functional boundary value problems[18]. Zaky et al. [19] proposed the Jacobi wavelets collocation approach based on the Jacobi wavelets operational matrix of V-OF derivative for solving a general class of V-OF differential equations arising in turbulent fluid dynamics. Doha et al. [20, 21] used polynomial collocation techniques to solve V-OF integro–differential equations. Moghaddam and Tenreiro Machado [22–24] proposed algorithms based on finite difference approximations and B-spline interpolation for different definitions of V-OF derivatives.

Spectral methods are of fundamental importance in computational physics because of their ability in achieving desired solution with a small number of degrees of freedom, which often allows gains in accuracy with considerable reduction in computational cost [25]. Collocation method is one of more applicable types of the spectral methods and is frequently used to solve various types of differential equations, such as the Schrödinger equation [26, 27], Rayleigh–Stokes equation [28], diffusion equation [29], mobile–immobile advection–dispersion equation [14], and cable equation [17]. It is well known that the majority of the fractional differential equations have no exact solutions. Therefore, numerical methods to obtain an approximate solution have become the preferred approach for such equations [30–37]. Approaches for numerically approximating the solution of fractional differential equations have been extensively studied; see, e.g., [38–42].

In this paper, we consider the following V-OF Galilei invariant advection–diffusion equation [43]:

where \(0<\gamma_{\min }\leq \gamma (x,t)\leq \gamma_{\max }<1\), \(\kappa_{\gamma }, \kappa >0\), and \({}_{0}\mathscr{D}_{t}^{1 - \gamma (x,t) }v(x,t)\) is the V-OF Riemann–Liouville derivative. The proposed method is based on the shifted Legendre collocation procedure and a matrix form representation of variable-order Caputo fractional derivative.

This paper is organized as follows. In Sect. 2, we first present some preliminaries from fractional calculus and introduce some properties of the shifted Legendre polynomials. In Sect. 3, we derive the operational matrix of the V-OF derivative for the shifted Legendre polynomials. In Sect. 4, the V-OF Galilei invariant advection–diffusion equation with a nonlinear source term is numerically investigated. In Sect. 5, numerical results are discussed. Finally, In Sect. 6, we outline the main conclusions.

## 2 Preliminaries

In this section, we recall some mathematical preliminaries of the V-OF operators (see [44]) and relevant properties of Legendre polynomials (see [25, 45–48]).

### Definition 2.1

The Caputo and Riemann–Liouville derivatives of a function \(v(t)\) of order *γ*, when \(n-1<\gamma \leq n \in \mathbb{N}\), are defined, respectively, as

where Γ represents the Euler gamma function.

### Definition 2.2

The V-OF Riemann–Liouville derivative \(\gamma (t)\) is given by

where \(n-1 < \gamma_{\min } < \gamma (t) < \gamma_{\max } < n\), \(n \in \mathbb{N}\).

### Definition 2.3

The V-OF Caputo derivative is given by

where \(n-1 < \gamma_{\min } < \gamma (t) < \gamma_{\max } < n\), \(n \in \mathbb{N}\).

The two previous V-OF operators are related by

We introduce the following important relations for the V-OF Caputo derivative \((0< \gamma (t)\leq 1)\):

Now, we present some useful mathematical relations for the shifted Legendre polynomials. The classical Legendre polynomials are defined on \([-1, 1]\) and may be generated from the three-term recurrence relation:

Let us consider the transform \(t=\frac{2x}{L}-1\) to define the orthogonal shifted Legendre polynomials \(P_{L,i}{(x)}\) in \(x \in [0,L]\). They satisfy the recurrence relation

where \(P_{L,0}{(x)}=1\) and \(P_{L,1}{(x)}=\frac{2x}{L}-1\). The orthogonality property of the shifted Legendre polynomials is

where \(w_{L}(x)=1\), \(\hbar^{L}_{k} =\frac{L}{2k+1}\), and \(\delta_{jk}\) is the Kronecker symbol.

An explicit analytic form of \(P_{L,i}{(x)}\) is given by

where

which alternatively may be written in the following matrix form:

where \(z_{L,i,k}\), \(i,k =0,1,\dots,M\), are the matrix entries of \(Z_{L}\),

Due to property (2.8), the vector \(X_{M} (x)\) may be expressed by means of \(\Psi_{L,M} (x)\) as

Two relations at the endpoints

will be further useful.

Assume that \(v(x)\) is a square-integrable function with respect to the shifted Legendre weight function. Then, it can be expressed by means of \(P_{L,j} (L)\) as

where the coefficients \(c_{j}\) are defined by

The function \(v(x)\) can be approximated by the first \((M+1)\) terms as

where the shifted Legendre coefficient vector **C** is given by \(\mathbf{C}^{T}=[c_{0},c_{1},\ldots,c_{M}]\). Accordingly, a function \(v(x,t)\) of two variables \(x \in [0,L]\) and \(t \in [0,\tau ]\) can be approximated by means of the double-shifted Legendre polynomials as

where the shifted Legendre vectors \(\Psi_{\tau,N} (t)\) and \(\Psi_{L,M}(x)\) are defined similarly to (2.12), and **A** is an \((N +1)\times (M +1)\) matrix of the form

where

## 3 Operational matrices based on Legendre polynomials

The first-order derivative of the shifted Legendre vector \(\Psi_{L,M}(x)\) may be written as

where \(\mathbf{D}^{(1)}_{L}\) is the \((M+1)\times (M+1)\) operational matrix of derivatives. Accordingly,

where the dimension of the square matrix \(\Lambda _{M}\) is \((M+1)\times (M+1)\); this matrix is the operational matrix of derivatives of \(X_{M} (x)\), and

Employing expressions (3.2) and (2.13), we have

Accordingly, we provide

Repeated use of (3.4) enables us to write

### Theorem 3.1

*The V*-*OF Caputo derivative of the shifted Legendre vector*
\(\Psi_{ \tau,N}(t)\)
*is given by*

*where*
\(n-1 < \gamma _{\min } < \gamma (t) < \gamma _{\max } < n\), \(n \in \mathbb{N}\), *and*
\(\mathbf{D}_{\tau,\gamma (t) } \)
*is an*
\((N+1)\times (N+1)\)
*matrix of the form*

*where*
\(Z_{\tau }\)
*is defined in* (2.11), *and*
**B**
*is an*
\((N+1)\times (N+1)\)
*matrix with elements*
\(b_{ij}, 0 \leq i,j \leq N \), *defined by*

### Proof

Using (2.12) and (2.13) yields

This, together with (2.6), leads to

where **B** is an \((N +1)\times (N +1)\) matrix with entries \(b_{ij}\), \(0 \leq i,j \leq N\). Equations (3.10) and (3.11) yield

Since \({Z_{\tau }}\) is invertible, we have

where \(\mathbf{D}_{\tau,\gamma (t) } = {Z_{\tau }} \mathbf{B} {Z_{\tau }} ^{ - 1}\) is an upper triangular matrix. □

This theorem is a generalization of that in [48], where \(0 < \gamma _{\min } < \gamma (t) < \gamma _{\max } < 1\) and \(\tau=1\).

## 4 The collocation method

After the construction of the V-OF differentiation matrices of Caputo type, we now use the Legendre–Gauss–Lobatto collocation technique in combination with the shifted Legendre operational matrix of V-OF fractional differentiation.

First, \(v(x,t)\) is approximated by means of the double-shifted Legendre polynomials as

where **A** is an \((N+1)\times (M+1)\) unknown matrix.

Employing Eqs. (2.4), (2.5), (3.6), (3.7), and (4.1), we obtain

Let \(x_{i}\) (\(0\leq i\leq M\)) be the shifted Legendre–Gauss–Lobatto nodes, and let \(t_{j}\) (\(0\leq j\leq N-1\)) be the shifted Legendre roots of \(P_{\tau,N}(t)\), where \(P_{\tau,N}{(t_{j})} =0\) (\(0\leq j\leq N-1\)). Substituting these nodes into (4.6)–(4.7), we can rewrite the collocation scheme as follows:

These equations can be combined to produce a nonlinear algebraic system. Therefore, the coefficients \(a_{i,j}\), \(i=0,1,\ldots,M\), \(j=0,1,\ldots,N\), can be achieved. As a result, the approximate solution \(v_{N,M}(x,t)\) can be evaluated.

## 5 Numerical example

Consider the V-OF Galilei invariant advection–diffusion equation

with the initial and boundary conditions

where

The exact solution is

We compare our results with those obtained by Chen et al. [43]. For various choices of \(\gamma (x,t)\), *N*, and *M*, the maximum absolute errors are listed in Table 1. Meanwhile, the results of [43] are presented in the first column of this table. Obviously, our method is more accurate than the method proposed in [43]. Moreover, Fig. 1 displays the space-time graph of the absolute error (AE) functions between the approximate and exact solutions for \(\gamma (x,t)=\frac{16+(xt)^{2}- \sin^{3}(xt)+\cos^{4}(xt)}{500}\) with \(N=M=6\) and \(N=M=12\), respectively. To demonstrate the convergence of the proposed method, in Fig. 2, we plot the logarithmic graph of the maximum absolute errors \((\log_{10} Error)\) with \(\gamma (x,t)=\frac{10- \sin (xt)}{310}\). The numerical results of this example show that the numerical errors decay rapidly as *N* increases. Also, all values of \(\gamma (x,t)\) are accurate and can be simply obtained.

## 6 Conclusions

In this paper, we proposed an efficient method for solving the V-OF Galilei invariant advection–diffusion equation with a nonlinear source term. The proposed method based on the Legendre–Gauss–Lobatto collocation technique combined with the associated operational matrices of V-OF derivatives. This algorithm was employed for solving a class of variable-order fractional differential equations. The method has the advantage of transforming the problem into the solution of a system of algebraic equations, which greatly simplifies it. Finally, we presented a numerical example to demonstrate the efficiency of the proposed method.

## References

Wyss, W.: The fractional diffusion equation. J. Math. Phys.

**27**(11), 2782–2785 (1986)Hilfer, R.: Applications of Fractional Calculus in Physics. World Scientific, Singapore (2000)

Gorenflo, R., Mainardi, F., Moretti, D., Pagnini, G., Paradisi, P.: Discrete random walk models for space-time fractional diffusion. Chem. Phys.

**284**(1), 521–541 (2002)Chechkin, A.V., Gorenflo, R., Sokolov, I.M.: Fractional diffusion in inhomogeneous media. J. Phys. A, Math. Gen.

**38**(42), L679–L684 (2005)Metzler, R., Klafter, J.: The random walk’s guide to anomalous diffusion: a fractional dynamics approach. Phys. Rep.

**339**(1), 1–77 (2000)Sokolov, I.M., Klafter, J., Blumen, A.: Fractional kinetics. Phys. Today

**55**, 48–54 (2000)Samko, S., Ross, B.: Integration and differentiation to a variable fractional order. Integral Transforms Spec. Funct.

**1**, 277–300 (1993)Samko, S.: Fractional integration and differentiation of variable order: an overview. Nonlinear Dyn.

**71**, 653–662 (2013)Lorenzo, C.F., Hartley, T.T.: Variable order and distributed order fractional operators. Nonlinear Dyn.

**29**(1–4), 57–98 (2002)Coimbra, C.F.M.: Mechanics with variable-order differential operators. Ann. Phys.

**12**, 692–703 (2003)Lin, R., Liu, F., Anh, V., Turner, I.: Stability and convergence of a new explicit finite-difference approximation for the variable-order nonlinear fractional diffusion equation. Appl. Math. Comput.

**212**(2), 435–445 (2009)Chen, C.M., Liu, F., Anh, V., Turner, I.: Numerical schemes with high spatial accuracy for a variable-order anomalous subdiffusion equation. SIAM J. Sci. Comput.

**32**(4), 1740–1760 (2010)Yang, Q., Moroney, T., Liu, F., Turner, I.: Computationally efficient methods for solving time-variable-order time-space fractional reaction–diffusion equation. In: Proceedings of the 5th IFAC Symposium on Fractional Differentiation and its Applications (2012)

Abdelkawy, M.A., Zaky, M.A., Bhrawy, A.H., Baleanu, D.: Numerical simulation of time variable fractional order mobile–immobile advection–dispersion model. Rom. Rep. Phys.

**67**, 773–791 (2015)Chen, Y., Weia, Y., Liu, D., Boutat, D., Chen, X.: Variable-order fractional numerical differentiation for noisy signals by wavelet denoising. J. Comput. Phys.

**311**, 338–347 (2016)Tavares, D., Almeida, R., Torres, D.F.M.: Caputo derivatives of fractional variable order: numerical approximations. Commun. Nonlinear Sci. Numer. Simul.

**35**, 69–87 (2016)Bhrawy, A.H., Zaky, M.A.: Numerical simulation for two-dimensional variable-order fractional nonlinear cable equation. Nonlinear Dyn.

**80**, 101–116 (2015)Bhrawy, A.H., Zaky, M.A.: Numerical algorithm for the variable-order Caputo fractional functional differential equation. Nonlinear Dyn.

**85**, 1815–1823 (2016)Zaky, M.A., Ameen, I.G., Abdelkawy, M.A.: A new operational matrix based on Jacobi wavelets for a class of variable-order fractional differential equations. Proc. Rom. Acad., Ser. A

**18**, 315–322 (2017)Doha, E.H., Abdelkawy, M.A., Amin, A.Z.M., Lopes, A.M.: On spectral methods for solving variable-order fractional integro-differential equations. Comput. Appl. Math. (2017). https://doi.org/10.1007/s40314-017-0551-9

Doha, E.H., Abdelkawy, M.A., Amin, A.Z.M., Baleanu, D.: Spectral technique for solving variable-order fractional Volterra integro-differential equations. Numer. Methods Partial Differ. Equ. (2017). https://doi.org/10.1002/num.22233

Moghaddam, B.P., Tenreiro Machado, J.A.: A computational approach for the solution of a class of variable-order fractional integro-differential equations with weakly singular kernels. Fract. Calc. Appl. Anal.

**20**, 1023–1042 (2017)Moghaddam, B.P., Tenreiro Machado, J.A.: A stable three-level explicit spline finite difference scheme for a class of nonlinear time variable order fractional partial differential equations. Comput. Math. Appl.

**73**, 1262–1269 (2017)Moghaddam, B.P., Tenreiro Machado, J.A.: SM-algorithms for approximating the variable-order fractional derivative of high order. Fundam. Inform.

**151**, 293–311 (2017)Canuto, C., Hussaini, M.Y., Quarteroni, A., Zang, T.A.: Spectral Methods in Fluid Dynamics. Springer, Berlin (1988)

Bhrawy, A.H., Zaky, M.A.: Highly accurate numerical schemes for multi-dimensional space variable-order fractional Schrödinger equations. Comput. Math. Appl.

**73**, 1100–1117 (2017)Bhrawy, A.H., Zaky, M.A.: An improved collocation method for multi-dimensional space-time variable-order fractional Schrödinger equations. Appl. Numer. Math.

**111**, 197–218 (2017)Bhrawy, A.H., Zaky, M.A., Alzaidy, J.F.: Two shifted Jacobi–Gauss collocation schemes for solving two-dimensional variable-order fractional Rayleigh–Stokes problem. Adv. Differ. Equ.

**2016**, 272 (2016)Zaky, M.A., Ezz-Eldien, S.S., Doha, E.H., Machado, J.T., Bhrawy, A.H.: An efficient operational matrix technique for multi-dimensional variable-order time fractional diffusion equations. J. Comput. Nonlinear Dyn.

**11**, 061002 (2016)Langlands, T.A.M., Henry, B.I.: The accuracy and stability of an implicit solution method for the fractional diffusion equation. J. Comput. Phys.

**205**(2), 719–736 (2005)Mainardi, F., Mura, A., Pagnini, G., Gorenflo, R.: Sub-diffusion equations of fractional order and their fundamental solutions. In: Mathematical Methods in Engenering, pp. 20–48 (2006)

Liu, F., Zhuang, P., Anh, V., Turner, I., Burrage, K.: Stability and convergence of the difference methods for the space-time fractional advection–diffusion equation. Appl. Math. Comput.

**191**, 12–20 (2007)Chen, C., Liu, F., Burrage, K.: Finite difference methods and a Fourier analysis for the fractional reaction–subdiffusion equation. Appl. Math. Comput.

**198**(2), 754–769 (2008)Podlubny, I., Chechkin, A., Skovranek, T., Chen, Y.Q., Vinagre Jara, B.M.: Matrix approach to discrete fractional calculus II: partial fractional differential equations. J. Comput. Phys.

**228**(8), 3137–3153 (2009)Yuste, S.B., Acedo, L.: On an explicit finite difference method for fractional diffusion equations. SIAM J. Numer. Anal.

**42**(5), 1862–1874 (2005)MacDonald, C.L., Bhattacharya, N., Sprouse, B.P., Silva, G.A.: Efficient computation of the Grünwald–Letnikov fractional diffusion derivative using adaptive time step memory. J. Comput. Phys.

**297**, 221–236 (2015)Jin, B., Lazarov, R., Liu, Y., Zhou, Z.: The Galerkin finite element method for a multi-term time-fractional diffusion equation. J. Comput. Phys.

**281**, 825–843 (2015)Bhrawy, A.H., Zaky, M.A., Baleanu, D., Abdelkawy, M.A.: A novel spectral approximation for the two-dimensional fractional sub-diffusion problems. Rom. J. Phys.

**60**, 344–359 (2015)Bhrawy, A.H., Zaky, M.A.: A method based on the Jacobi tau approximation for solving multi-term time-space fractional partial differential equations. J. Comput. Phys.

**281**(15), 876–895 (2015)Bhrawy, A.H., Zaky, M.A.: Shifted fractional-order Jacobi orthogonal functions: application to a system of fractional differential equations. Appl. Math. Model.

**40**, 832–845 (2016)Bhrawy, A.H., Zaky, M.A.: A fractional-order Jacobi tau method for a class of time-fractional PDEs with variable coefficients. Math. Methods Appl. Sci.

**39**, 1765–1779 (2016)Zaky, M.A.: A Legendre spectral quadrature tau method for the multi-term time-fractional diffusion equations. Comput. Appl. Math. (2017). https://doi.org/10.1007/s40314-017-0530-1

Chen, C.M., Liu, F., Anh, V., Turner, I.: Numerical simulation for the variable-order Galilei invariant advection diffusion equation with a nonlinear source term. Appl. Math. Comput.

**217**(12), 5729–5742 (2011)Zhuang, P., Liu, F., Anh, V., Turner, I.: Numerical method for the variable-order fractional advection–diffusion equation with a nonlinear source term. SIAM J. Numer. Anal.

**47**(3), 1760–1781 (2009)Bhrawy, A.H., Zaky, M.A., Van Gorder, R.A.: A space-time Legendre spectral tau method for the two-sided space-time Caputo fractional diffusion-wave equation. Numer. Algorithms

**71**(1), 151–180 (2016)Zaky, M.A.: An improved tau method for the multi-dimensional fractional Rayleigh–Stokes problem for a heated generalized second grade fluid. Comput. Math. Appl. (2017). https://doi.org/10.1016/j.camwa.2017.12.004

Bhrawy, A.H., Zaky, M.A., Baleanu, D.: New numerical approximations for space-time fractional Burgers’ equations via a Legendre spectral-collocation method. Rom. Rep. Phys.

**67**(2), 340–349 (2015)Wang, L., Ma, Y., Yang, Y.: Legendre polynomials method for solving a class of variable order fractional differential equation. Comput. Model. Eng. Sci.

**101**(2), 97–111 (2014)

## Acknowledgements

The authors would like to express their gratitude to the anonymous reviewers for their constructive comments, which gave the paper its final form.

## Author information

### Authors and Affiliations

### Contributions

The authors have equal contributions to each part of this paper. All the authors read and approved the final manuscript.

### Corresponding author

## Ethics declarations

### Competing interests

The authors declare that they have no competing interests.

## Additional information

### Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Rights and permissions

**Open Access** This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.

## About this article

### Cite this article

Zaky, M.A., Baleanu, D., Alzaidy, J.F. *et al.* Operational matrix approach for solving the variable-order nonlinear Galilei invariant advection–diffusion equation.
*Adv Differ Equ* **2018**, 102 (2018). https://doi.org/10.1186/s13662-018-1561-7

Received:

Accepted:

Published:

DOI: https://doi.org/10.1186/s13662-018-1561-7