## 1 Introduction

The fractional-order differential equations have been widely used for describing a variety of phenomena in physics, astrophysics, medicine, chemistry, optimal control, engineering, biology, fluid dynamics, etc. (see, for instance, [9, 18, 2628]). The ordinary/partial differential equations that contain fractional-order derivatives provide more flexible models compared with the classical ones that are characterized by integer-orders [2, 7, 10]. To understand the idea of the fractional derivative more clearly, see the example of the Lane–Emden-type equations of the fractional-order derivatives that include aspects of a stellar structure, the thermal history of a spherical cloud of the gas, isothermal gas spheres, and thermionic currents [19]. It is well known that the ordinary Lane–Emden equation does not provide the correct description of the dynamics for the systems in the complex media [5]. This example proves and supports the fractional-order derivative representation of equations such as the diffusion equation, advection–dispersion equation, wave equation, heat equation, Bagley–Torvik equation, as well as other applications [13, 16, 17, 24, 34, 36].

In many fractional-order models, the analytical solution is more complicated, therefore the numerical solutions for these models are appropriate [1, 6, 20]. These numerical solutions depend on several techniques such as finite difference, finite volume, variational iteration, Legendre polynomials, Chebyshev collocation, homotopy perturbation, operational matrix, variational iteration, Adams–Bashforth, nonstandard finite difference, sinc-collocation, compact finite difference, tau method, block pulse, decomposition, radial basis, Taylor collocation, and wavelets spectral (see, for example, [5, 11, 24, 25, 35, 38]). All these methods introduce numerical solutions for many types of fractional-order differential equations. In this work, we strive to solve the fractional-order advection–dispersion equation numerically via a nonstandard finite difference method besides a collocation method that depends on a new class of orthogonal polynomials (Vieta–Lucas).

Therefore, consider the following formula of the fractional-order advection–dispersion equation (FADE) [15, 30, 31, 34]:

\begin{aligned} &\frac{\partial u(x,t)}{\partial t} = \lambda \frac{\partial ^{\alpha } u(x,t)}{\partial x^{\alpha }}- \mu \frac{\partial ^{\beta }u(x,t)}{\partial x^{\beta }}+ s(x,t), \\ &\quad 0< x < 1, 0< t \leq T, 1< \alpha \leq 2, 0< \beta \leq 1, \end{aligned}
(1)

with the initial condition

$$u(x,0)=u{(x)},\quad 0 < x < 1,$$
(2)

and the boundary conditions

$$u(0,t)= u(1,t)=0,\quad 0 < t\leq T.$$
(3)

Here $$u(x,t)$$ refers to the solute concentration, the fractional derivative term $$\frac{\partial ^{\alpha }u(x,t)}{\partial x^{\alpha }}$$ is a dispersion function with the dispersion coefficient λ, the second fractional derivative $$\frac{\partial ^{\beta }u(x,t)}{\partial x^{\beta }}$$ is the advection term with the average fluid velocity coefficient μ, and the last term $$s(x,t)$$ is the source/sink term. Besides that, the fractional-order terms are considered as the fractional derivatives in the Caputo operator of differentiation.

The classical order advection–dispersion equation can be obtained by using the values $$\alpha =2$$, $$\beta =1$$ in Eq. (1) to have:

$$\frac{\partial u(x,t)}{\partial t} = \lambda \frac{\partial ^{2} u(x,t)}{\partial x^{2}}- \mu \frac{\partial u(x,t)}{\partial x}+ s(x,t),\quad 0< x < 1, 0< t \leq T.$$
(4)

Equation (1) is a generalization of Eq. (4), therefore, the researchers have a big chance for modeling many problems in various areas of science such as anomalous diffusion, biology problems, petroleum engineering, heat transfer, physical problems, and others [3, 4, 33, 37].

The fractional-order advection–dispersion equation is solved numerically through different approximation methods (see, for instance, [8, 14, 15, 21, 23, 29]). Despite the big efforts of the researchers and mathematicians for solving this type of equations, many other researchers still research new techniques and methods that give high accuracy solutions for the same equations. We believe that the proposed shifted Vieta–Lucas orthogonal polynomials are a new method to solve FADE, and no one used this approach to date. Consequently, the main idea behind this work is to introduce a new numerical technique for solving the FADE. This technique depends on the shifted Vieta–Lucas polynomials as a family of the desired numerical solution, besides the nonstandard finite difference method, and the spectral collocation technique. As the final step, the obtained algebraic system of equations will be solved numerically via any iteration method.

This paper is structured as follows. In the next section, some necessary mathematical tools required for the construction of this work will be given. In addition, the derivation of some important relations for shifted Vieta–Lucas polynomials will be introduced in the same section. The desired series solution will be presented in Sect. 3. In Sect. 4, the error bound are investigated. Construction methodology for solving the FADE that is given in Eq. (1) via the spectral collocation method, together with the nonstandard method, will be proposed in Sect. 5. For the demonstration of the accuracy, efficiency, and applicability of the suggested technique, some numerical applications will be presented in Sect. 6. Lastly, concluding remarks are reported.

## 2 Main mathematical tools

### Definition 2.1

([1])

Let the function $$h(x)$$ be differentiable, and let α be the order of the derivative. Then Caputo operator of the fractional derivative can be defined as follows:

$$D^{\alpha }{h}(x)=\frac{1}{\Gamma (m-\alpha )} \int _{0}^{x}{h^{(m)}(t)} {(x-t)^{m-( \alpha +1)}}\,dt , \quad \alpha >0, x>0,$$
(5)

where $$m-1<\alpha \leq m$$, $$m\in \mathbb{N}$$.

The Caputo operator is linear. Moreover, via Definition 2.1, the following can be claimed:

\begin{aligned}& D^{\alpha }{K}=0, \quad {K} \text{ is a constant}, \end{aligned}
(6)
\begin{aligned}& D^{\alpha }x^{m} = \textstyle\begin{cases} 0,& m \in \{0,1,2,\ldots ,\lceil \alpha \rceil -1\}, \\ \frac{\Gamma {(m+1)}}{\Gamma {(m+1-\alpha )}}x^{m-\alpha }, & m \in \mathbb{N} \wedge m\geq \lceil \alpha \rceil , \end{cases}\displaystyle \end{aligned}
(7)

where the ceiling function of r is $$\lceil r\rceil$$.

### 2.2 Nonstandard finite difference scheme notations

The discrete first derivative can be described by:

$$\frac{dy}{dt}\rightarrow \frac{y_{r+1}-\psi (h)y_{r}}{\phi (h)},$$

where $$\psi (h)$$ and $$\phi (h)$$ are functions in the step-size discretization $$h=\Delta t$$ and

$$\psi (h)=1+O \bigl(h^{2} \bigr)\quad \text{and} \quad \phi (h)=h+O \bigl(h^{2} \bigr).$$

This formula for the first derivative is called the nonstandard finite difference method presentation. Also, the denominator function satisfies the condition $$0 <\phi (h)<1$$, $$h \rightarrow 0$$. There is no determined base for the best choice of the function $$\phi (h)$$, but we can introduce the most popular functions in the nonstandard finite difference technique as follows:

$$\phi (h)=\exp (h)-1, \qquad \phi (h)=h,\qquad \phi (h)=\sinh (h),\qquad \phi (h)= \frac{1-\exp (-\lambda h)}{\lambda },\quad \text{etc.}$$

For more details, see some of Mickens’s publications [22].

### 2.3 Vieta–Lucas polynomials

In this part of the paper, we study a class of orthogonal polynomials, which, to the best of our knowledge, are presented here for the first time. These polynomials can be created by means of the recurrence relations and analytical formula to build a new family of orthogonal polynomials that will be well-known as Vieta–Lucas polynomials.

### Definition 2.2

([12])

Consider $$|x|\leq 2$$, then the class of polynomials of degree $$n\in \mathbb{N}_{0}$$ in the variable x can be defined as:

$$\operatorname{VL}_{n}(x)= 2\cos (n\theta ),\quad \theta =\cos ^{-1} \biggl( \frac{x}{2} \biggr), \theta \in [0,\pi ].$$

This family of polynomials is called the Vieta–Lucas polynomials ($$\operatorname{VL}_{n}(x)$$) and $$\mathbb{N}_{0}=\{0,1,2,\ldots \}$$.

Polynomial $$\operatorname{VL}_{n}(x)$$ can be created by means of the following iterative formula:

$$\operatorname{VL}_{n}(x)=x \operatorname{VL}_{n-1}(x)- \operatorname{VL}_{n-2}(x),\quad n=2,3,\ldots ,\qquad \operatorname{VL}_{0}(x)=2,\qquad \operatorname{VL}_{1}(x)=x.$$

Also, $$\operatorname{VL}_{n}(x)$$ can be obtained through the following explicit power series formula:

$$\operatorname{VL}_{n}(x)=\sum _{i=0}^{\lceil \frac{n}{2}\rceil } (-1)^{i} \frac{n \Gamma (n-i)}{\Gamma (i+1)\Gamma (n+1-2i)} x^{n-2i},\quad n=\{2,3, \ldots \},$$
(8)

where $$\lceil \frac{n}{2}\rceil$$ is the ceiling function.

Moreover, $$\operatorname{VL}_{n}(x)$$ are orthogonal polynomials with respect to the following integral:

$$\bigl\langle \operatorname{VL}_{m}(x), \operatorname{VL}_{n}(x) \bigr\rangle = \int _{-2}^{2} \frac{1}{\sqrt{4-x^{2}}} \operatorname{VL}_{m}(x) \operatorname{VL}_{n}(x) \,dx= \textstyle\begin{cases} 0,& m\neq n\neq0, \\ {4\pi }, & m=n=0, \\ {2\pi }, & m=n\neq0, \end{cases}$$
(9)

where $$\frac{1}{\sqrt{4-x^{2}}}$$ is the weight function corresponding to $$\operatorname{VL}_{n}(x)$$.

### 2.4 Shifted Vieta–Lucas polynomials

In this subsection, the relevant properties and relations of Vieta–Lucas polynomials and their shifts will be concluded. The shifted Vieta–Lucas polynomials ($$\operatorname{VL}^{*}_{n}(x)$$) can be considered as a new class of orthogonal polynomials defined on the closed interval $$[0,1]$$.

### Definition 2.3

The shifted Vieta–Lucas polynomials of degree n on $$[0,1]$$ can be obtained from $$\operatorname{VL}_{n}(x)$$ as follows:

$$\operatorname{VL}^{*}_{n}(x)=\operatorname{VL}_{n}(4x-2)= \operatorname{VL}_{2n}(2\sqrt{x}).$$

Also, $$\operatorname{VL}^{*}_{n}(x)$$ are created by utilizing the following recurrence formula:

$$\operatorname{VL}^{*}_{n+1}(x)=(4x-2) \operatorname{VL}^{*}_{n}(x)-\operatorname{VL}^{*}_{n-1}(x), \quad n=1,2,\ldots ,$$
(10)

with the starting values

$$\operatorname{VL}^{*}_{0}(x)=2,\qquad \operatorname{VL}^{*}_{1}(x)=4x-2.$$
(11)

Moreover, the explicit analytical formula for $$\operatorname{VL}^{*}_{n}(x)$$ can be obtained through the following expression:

$$\operatorname{VL}^{*}_{n}(x)=2n\sum _{i=0}^{n}(-1)^{i} \frac{4^{n-i} \Gamma (2n-i)}{\Gamma (i+1)\Gamma (2n-2i+1)} x^{n-i},\quad n=\{2,3,\ldots \}.$$
(12)

Polynomials $$\operatorname{VL}^{*}_{n}(x)$$ have the orthogonality property with respect to the following inner product:

$$\bigl\langle \operatorname{VL}^{*}_{m}(x), \operatorname{VL}^{*}_{n}(x) \bigr\rangle = \int _{0}^{1}\operatorname{VL}^{*}_{m}(x) \operatorname{VL}^{*}_{n}(x) \omega (x) \,dx= \textstyle\begin{cases} 0, & n\neq m\neq0, \\ 4\pi ,& n=m=0, \\ 2\pi , & n=m\neq0, \end{cases}$$
(13)

where $$\omega (x)=\frac{1}{\sqrt{x-x^{2}}}$$ is the wight function.

Let the function $$u(x)$$ be Lebesgue-square-integrable on the interval $$[0,1]$$ and suppose that it can be expressed as a linear combination of the independent power functions in terms of $$\operatorname{VL}^{*}_{n}(x)$$ as follows:

$$u(x)=\sum_{i=0}^{\infty } c_{i} \operatorname{VL}^{*}_{i}(x),$$
(14)

where $${c_{i}}$$ are the unknown coefficients.

Generally, only the first $$n+1$$ terms of the series in Eq. (14) is appropriate in all cases of the approximation theory. Therefore, we have

$$u_{n}(x)=\sum_{i=0}^{n} c_{i} \operatorname{VL}^{*}_{i}(x),$$
(15)

where the undetermined coefficients $$c_{i}$$, $$i=0,2,\ldots ,n$$ can be obtained via one of the following expressions:

$$c_{i}=\frac{1}{\delta _{i}\pi } \int _{-2}^{2} \frac{u{ (\frac{x+2}{4} )} \operatorname{VL}_{i}(x)}{\sqrt{4-x^{2}}} \,dx,$$
(16)

or

$$c_{i}=\frac{1}{\delta _{i}\pi } \int _{0}^{1} \frac{u(x) \operatorname{VL}^{*}_{i}(x)}{\sqrt{x-x^{2}}} \,dx,$$
(17)

where

$$\delta _{i}= \textstyle\begin{cases} 4,& i=0, \\ 2,& i=\{1,2,\ldots ,n\}. \end{cases}$$
(18)

## 3 Derivation of the main scheme

### Theorem 1

Consider the approximate solution of the main problem described in Eq. (1) expressed in the terms of shifted Vieta–Lucas polynomials as in Eq. (15). Then, the fractional-order terms can be transformed into algebraic equations as follows:

$$D^{\alpha } \bigl(u_{n}(x) \bigr)=\sum _{i=\lceil \alpha \rceil }^{n} \sum _{k=0}^{i- \lceil \alpha \rceil } {c_{i}} {\eta ^{(\alpha )}_{i,k}} {x^{i-k- \alpha }},$$
(19)

where

$${\eta ^{(\alpha )}_{i,k}}=(-1)^{k} \frac{4^{i-k} {2i} {\Gamma (2i-k)} {\Gamma (i-k+1)}}{{\Gamma (k+1) \Gamma (2i-2k+1)} {\Gamma (i-k+1-\alpha )}}.$$
(20)

### Proof

Consider the approximate solution for Eq. (1) as given in Eq. (15). Then applying the fractional operator gives

$$D^{\alpha } \bigl(u_{n}(x) \bigr)=\sum _{i=0}^{n}{c_{i}} {D^{\alpha } \bigl(\operatorname{VL}^{*}_{i}(x) \bigr)}.$$
(21)

Using Caputo’s operator definition (7), we have

$${D^{\alpha } \bigl(\operatorname{VL}^{*}_{i}(x) \bigr)}=0, \quad i=0,1,\ldots ,\lceil \alpha \rceil , 1< \alpha \leq 2.$$
(22)

$${D^{\alpha } \bigl(\operatorname{VL}^{*}_{i}(x) \bigr)}=\sum_{k=0}^{i}{(-1)^{k}} \frac{4^{i-k} {2i} {\Gamma (2i-k)}}{{\Gamma (k+1)} {\Gamma (2i-2k+1)}} {D^{\alpha }x^{i-k}}.$$
(23)

Using Eqs. (6) and (7), Eq. (23) is reformulated as

$${D^{\alpha } \bigl(\operatorname{VL}^{*}_{i}(x) \bigr)}=\sum_{k=0}^{i-\lceil \alpha \rceil } {(-1)^{k}} \frac{4^{i-k} {2i} {\Gamma (2i-k)} {\Gamma (i-k+1)}}{{\Gamma (k+1)} {\Gamma (2i-2k+1)} {\Gamma (i-k+1-\alpha )}} {x^{i-k- \alpha }}.$$
(24)

Collocating Eqs. (21), (22), and (24), we have

$$D^{\alpha } \bigl(u_{n}(x) \bigr)=\sum _{i=\lceil \alpha \rceil }^{n} \sum _{k=0}^{i- \lceil \alpha \rceil } {c_{i}} {(-1)^{k}} \frac{4^{i-k} {2i} {\Gamma (2i-k)} {\Gamma (i-k+1)}}{{\Gamma (k+1)} {\Gamma (2i-2k+1)} {\Gamma (i-k+1-\alpha )}} {x^{i-k- \alpha }}.$$
(25)

Here, Eq. (25) can be rewritten in the following form:

$$D^{\alpha } \bigl(u_{n}(x) \bigr)=\sum _{i=\lceil \alpha \rceil }^{n} \sum_{k=0}^{i- \lceil \alpha \rceil } {c_{i}} {\eta ^{(\alpha )}_{i,k}} {x^{i-k- \alpha }},$$
(26)

where

$${\eta ^{(\alpha )}_{i,k}}=(-1)^{k} \frac{4^{i-k} {2i} {\Gamma (2i-k)} {\Gamma (i-k+1)}}{{\Gamma (k+1)} {\Gamma (2i-2k+1)} {\Gamma (i-k+1-\alpha )}}.$$
(27)

The proof is completed. □

### Remark

The second term of fractional-order given in our problem Eq. (1) can be transferred into an algebraic term by using the same theorem (Theorem (1)).

## 4 Discussion of error estimate

### Theorem 2

Suppose that the function $$u(x)\in L_{\omega }^{2}[0,1]$$ and $$u''(x)\leq M$$, where M is a constant. Then $$u(x)$$ can be expressed as an infinite linear combination of shifted Vieta–Lucas polynomials, and $$u_{n}(x)$$ has only $$n+1$$ terms of this expression. Also, this numerical solution converges uniformly to the function $$u(x)$$ ($$u_{n}(x) \rightarrow u(x)$$ as $$n\rightarrow \infty$$). Moreover, the coefficients given in Eq. (17) are bounded, i.e.,

$$u(x)=\sum_{i=0}^{\infty } c_{i} \operatorname{VL}^{*}_{i}(x),$$
(28)

where

$$\vert c_{i} \vert \leq \frac{M}{4 i(i^{2}-1)}, \quad i>2.$$
(29)

### Proof

Consider the function $$u(x)$$ satisfying the stated conditions and having expression as in Eq. (28). Use the approximation theory to take only $$n+1$$ terms of this series as follows:

$$u_{n}(x)=\sum_{i=0}^{n} c_{i} \operatorname{VL}^{*}_{i}(x),$$
(30)

where the coefficients $$c_{i}$$, $$i=0,1,\ldots ,n$$ can be determined via Eq. (17). To compute the integrals, use the substitution $$4x-2=2\cos (\theta )$$ in Eq. (17), and then the following is gained:

$$c_{i}=\frac{2}{\delta _{i} \pi } \int _{0}^{\pi }u \biggl( \frac{2+2\cos (\theta )}{4} \biggr) \cos (i\theta ) \,d\theta .$$
(31)

Integrating twice by parts in Eq. (31) gives

$$c_{i}=\frac{1}{4 \delta _{i} \pi } \int _{0}^{\pi }u'' \biggl( \frac{1+\cos (\theta )}{2} \biggr) \sin (\theta ) \Omega _{i}( \theta ) \,d\theta ,$$
(32)

where

$$\Omega _{i}(\theta )=\frac{\sin (i-1)\theta }{i-1}- \frac{\sin (i+1)\theta }{i+1}.$$
(33)

Applying the absolute value properties on Eq. (32) produces

$$\vert c_{i} \vert = \biggl\vert \frac{1}{4 \delta _{i} \pi } \int _{0}^{\pi }u'' \biggl( \frac{1+\cos (\theta )}{2} \biggr) \sin (\theta ) \Omega _{i}( \theta ) \,d\theta \biggr\vert .$$
(34)

From the properties of the function $$u(x)$$ and of the trigonometric functions, Eq. (34) is transformed into the inequality

$$\vert c_{i} \vert \leq \frac{M}{4 \delta _{i} \pi } \int _{0}^{\pi } \bigl\vert \Omega _{i}( \theta ) \bigr\vert \,d\theta .$$
(35)

By rearranging the integration and performing some analytical manipulations, we have

$$\vert c_{i} \vert \leq \frac{M}{4 i(i^{2}-1)}, \quad i>2.$$
(36)

Hence, the proof is completed. □

### Lemma 4.1

([32])

Let $$f(x)$$ be a function such that $$f(k) = c_{k}$$ and assume the following:

• $$f(x)$$ is a continuous, positive, decreasing function for $$x \geq n$$.

• $$\sum c_{n}$$ is convergent, and $$R_{n} =\sum_{k=n+1}^{\infty } c_{k}$$.

Then

$$R_{n}\leq \int _{n}^{\infty } f(x) \,dx.$$
(37)

Lemma 4.1 is necessary for the following theorem.

### Theorem 3

If the function $$u(x)$$ satisfies the conditions of Theorem 2, and $$u_{n}(x)=\sum_{i=0}^{n} c_{i} \operatorname{VL}^{*}_{i}(x)$$ has only $$n+1$$ terms of this function, then an estimate of the error (in $$L_{\omega }^{2}[0,1]$$ norm) can be described by the following inequality:

$$\bigl\Vert u(x)-u_{n}(x) \bigr\Vert _{\omega } < \frac{M}{12 n^{\frac{3}{2}}}.$$
(38)

### Proof

The error in $$L_{\omega }^{2}[0,1]$$ is defined by

$$\bigl\Vert u(x)-u_{n}(x) \bigr\Vert _{\omega }^{2}= \biggl( \int _{0}^{1} \bigl\vert u(x)-u_{n}(x) \bigr\vert ^{2} \omega (x)\,dx \biggr)^{\frac{1}{2}}.$$
(39)

Using Eqs. (14) and (15), in addition to the orthogonality property of $$\operatorname{VL}^{*}_{i}(x)$$ that was introduced in Eq. (13), we have the following result:

$$\bigl\Vert u(x)-u_{n}(x) \bigr\Vert _{\omega }^{2}= \frac{1}{\delta _{i} \pi } \sum _{i=n+1}^{\infty }{ \vert c_{i} \vert ^{2}}.$$
(40)

By Eq. (40) of Theorem 2, we acquire the following inequality:

$$\bigl\Vert u(x)-u_{n}(x) \bigr\Vert _{\omega }^{2} \leq \frac{M^{2}}{16\delta _{i} \pi }\sum _{i=n+1}^{\infty }{ \frac{1}{i^{4}}}.$$
(41)

An application of Lemma 4.1 leads to

$$\bigl\Vert u(x)-u_{n}(x) \bigr\Vert _{\omega }^{2} < \frac{M^{2}}{16\delta _{i} \pi } \int _{n}^{\infty }{\frac{1}{x^{4}}}\,dx = \frac{M^{2}}{96 \pi N^{3}}.$$
(42)

Finally, Eq. (42) describes the error bound as the following formula:

$$\bigl\Vert u(x)-u_{n}(x) \bigr\Vert _{\omega } < \frac{M}{12 n^{\frac{3}{2}}}.$$
(43)

The theorem is proved. □

### Theorem 4

If the function $$u(x)\in [0,1]$$ is n times continuously differentiable and the most square-suitable approximation for this function is $$u_{n}(x)$$ defined in Eq. (15), then we have

$$\bigl\Vert u(x)-u_{n}(x) \bigr\Vert \leq \frac{N W^{n+1}}{(n+1)!}\sqrt{\pi },$$
(44)

where

$$N=\max_{x\in [0,1]} u^{(n+1)}(x) \quad \textit{and} \quad W= \max \{1-x_{0},x_{0}\}.$$

### Proof

The function $$u(x)$$ can be expanded in the following series:

$$u(x)=u(x_{0})+(x-x_{0})u'(x_{0})+ \cdots +\frac{(x-x_{0})^{n}}{(n)!}u^{(n)}(x_{0})+ \frac{(x-x_{0})^{n+1}}{(n+1)!}u^{(n+1)}(\xi ),$$
(45)

where $$x_{0}\in [0,1]$$ and $$\xi \in \, ]x_{0},x[$$. Assume

$$\bar{u}_{n}(x)=u(x_{0})+(x-x_{0})u'(x_{0})+ \cdots + \frac{(x-x_{0})^{n-1)}}{(n-1)!}u^{(n-1)}(x_{0})+ \frac{(x-x_{0})^{n}}{(n)!}u^{(n)}(x_{0}).$$
(46)

Then

$$\bigl\Vert u(x)-\bar{u}_{n}(x) \bigr\Vert = \biggl\vert \frac{(x-x_{0})^{n+1}}{(n+1)!}u^{(n+1)}( \xi ) \biggr\vert .$$
(47)

If $$u_{n}(x)$$ is as in Theorem (4), then

\begin{aligned} \bigl\Vert u(t)-u_{n}(x) \bigr\Vert ^{2}&\leq \bigl\Vert u(x)-\bar{u}_{n}(x) \bigr\Vert ^{2} = \int _{0}^{1} \omega (x) \bigl[u(x)- \bar{u}_{n}(x) \bigr]^{2}\,dx \\ &= \int _{0}^{1}\omega (x) \biggl[ \frac{(x-x_{0})^{n+1}}{(n+1)!}u^{(n+1)}( \xi ) \biggr]^{2}\,dx \\ &\leq \frac{N^{2}}{[(n+1)!]^{2}} \int _{0}^{1}\omega (x) \bigl[(x-x_{0})^{n+1} \bigr]^{2}\,dx. \end{aligned}
(48)

Now, let $$W=\max \{1-x_{0},x_{0}\}$$, thus

$$\bigl\Vert u(x)-u_{n}(x) \bigr\Vert ^{2}\leq \frac{N^{2}[W^{n+1}]^{2}}{[(n+1)!]^{2}} \int _{0}^{1}\omega (x)\,dx.$$
(49)

Since $$\omega (x)=\frac{1}{\sqrt{x-x^{2}}}$$,

\begin{aligned} \bigl\Vert u(x)-u_{n}(x) \bigr\Vert ^{2}&\leq \frac{N^{2}[W^{n+1}]^{2}}{[(n+1)!]^{2}} \int _{0}^{1}\frac{1}{\sqrt{x-x^{2}}}\,dx \\ &=\frac{N^{2}[W^{n+1}]^{2}}{[(n+1)!]^{2}}\cdot {\pi }. \end{aligned}
(50)

Hence,

$$\bigl\Vert u(x)-u_{n}(x) \bigr\Vert \leq \frac{N W^{n+1}}{(n+1)!} \sqrt{\pi }.$$
(51)

The proof is complete. □

## 5 Suggested technique for the main problem (FADE)

This section concerns the numerical solution scheme for the fractional-order advection–dispersion equation via our proposed technique in this work. Therefore, assume the problem given in Eqs. (1)–(3).

Firstly, propose the approximate solution of this problem presented in terms of shifted Vieta–Lucas polynomials as follows:

$$u_{n}(x,t)=\sum_{i=0}^{n} c_{i}(t) \operatorname{VL}^{*}_{i}(x).$$
(52)

Based on Theorem 1, along with substituting Eq. (52) into Eq. (1), we have the following equation:

\begin{aligned} \sum_{i=0}^{n} \frac{d{c_{i}(t)}}{dt} \operatorname{VL}^{*}_{i}(x)={}& \lambda \sum_{i=\lceil \alpha \rceil }^{n} \sum _{k=0}^{i-\lceil \alpha \rceil } {c_{i}(t)} {\eta ^{(\alpha )}_{i,k}} {x^{(i-k-\alpha )}} \\ & {} -\mu \sum_{i=\lceil \beta \rceil }^{n} \sum _{k=0}^{i-\lceil \beta \rceil } {c_{i}(t)} {\eta ^{(\beta )}_{i,k}} {x^{(i-k-\beta )}}+ s(x,t), \\ &{} 0< x < 1, 0< t \leq T, 1< \alpha \leq 2, 0< \beta \leq 1. \end{aligned}
(53)

Now, collocate Eq. (53) at the roots of the function $$\operatorname{VL}^{*}_{n+1-\lceil \alpha \rceil }(x)$$, which are named the collocation points $$x_{p}$$, as follows:

\begin{aligned} \sum_{i=0}^{n} \frac{d{c_{i}(t)}}{dt} \operatorname{VL}^{*}_{i}(x_{p})={}& \lambda \sum_{i=\lceil \alpha \rceil }^{n} \sum _{k=0}^{i-\lceil \alpha \rceil } {c_{i}(t)} {\eta ^{(\alpha )}_{i,k}} {x_{p}^{(i-k- \alpha )}} \\ &{} -\mu \sum_{i=\lceil \beta \rceil }^{n} \sum _{k=0}^{i-\lceil \beta \rceil } {c_{i}(t)} {\eta ^{(\beta )}_{i,k}} {x_{p}^{(i-k- \beta )}}+ s(x_{p},t), \\ &{} p=0,1,\ldots , \bigl(n-\lceil \alpha \rceil \bigr). \end{aligned}
(54)

where $$c_{i}$$ ($$i=0,1,\ldots ,n$$) are $$n+1$$ unknown coefficients. For obtaining these coefficients $$n+1$$ algebraic equations are needed, but Eq. (54) gives us only $$n+1-\lceil \alpha \rceil$$ ordinary differential equations that are transformed into algebraic equations. So $$\lceil \alpha \rceil$$ equations are required for completing the desired system. For this aim, substitute the numerical approach (52) in the boundary conditions, Eq. (3). Moreover, for obtaining the initial values of the coefficients $$c_{i}$$ ($$i=0,1,\ldots ,n$$) at the initial state, we use Eq. (52) with Eq. (2) in addition to Eq. (17). The general formula of the boundary conditions given in Eq. (3) via the terms of $$\operatorname{VL}^{*}_{n}$$ can be determined through the following equations:

\begin{aligned}& \sum_{i=0}^{n}{2 (-1)^{(i)}} {c_{i}(t)}=0, \end{aligned}
(55)
\begin{aligned}& \sum_{i=0}^{n}2 {c_{i}(t)}=0. \end{aligned}
(56)

Lastly, the nonstandard finite difference method will be used for the transformation of Eq. (54) into $$n+1-\lceil \alpha \rceil$$ algebraic equations. Hence, combining these results with Eqs. (55) and (56) will constitute a linear system of $$n+1$$ equations. This system can be solved numerically via any suitable procedure for obtaining the unknowns $$c_{i}$$ ($$i=0,1,\ldots ,n$$) and therefore the desired approximate solution $$u_{n}(x)$$ of FADE can be calculated.

## 6 Numerical experiments

In this section, we introduce some examples that are solved numerically via the suggested method. Also, comparisons of our results with other published numerical results will be made. These examples and numerical benchmarks will be constructed to illustrate the accuracy, applicability, and efficiency of our proposed method for solving the FADE numerically.

### Example 6.1

Consider the following fractional-order advection–dispersion equation [15, 30, 31, 34]:

\begin{aligned} &\frac{\partial u(x,t)}{\partial t}= \frac{\partial ^{\alpha } u(x,t)}{\partial x^{\alpha }}- \frac{\partial ^{\beta }u(x,t)}{\partial x^{\beta }}+ s(x,t), \\ &\quad 0< x < 1, 0< t \leq T,1< \alpha \leq 2, 0< \beta \leq 1, \end{aligned}
(57)

with the source function

$$s(x,t)={e^{-2t}} \biggl(2 \bigl(x^{\beta }-x^{\alpha } \bigr)- \bigl(\Gamma (\alpha +1)+ \Gamma (\beta +1) \bigr)+ \frac{\Gamma (\alpha +1)}{\Gamma (\alpha +1-\beta )}x^{\alpha -\beta } \biggr),$$
(58)

the initial condition

$$u(x,0)=x^{\alpha }-x^{\beta },\quad 0 < x < 1,$$
(59)

and the boundary conditions

$$u(0,t)= u(1,t)=0, \quad 0 < t\leq T.$$
(60)

The analytic solution of Eqs. (58)–(60) is given by

$$u(x,t)={e^{-2t}} \bigl({x^{\alpha }-x^{\beta }} \bigr).$$

Apply our proposed method as follows;

$$u_{3}(x,t)=\sum_{i=0}^{3} {c_{i}(t)} \operatorname{VL}^{*}_{i}(x).$$
(61)

Use Eq. (61) together with (54) to obtain

\begin{aligned} \sum_{i=0}^{3} \frac{d{c_{i}(t)}}{dt} \operatorname{VL}^{*}_{i}(x_{p})={}& \sum_{i= \lceil \alpha \rceil }^{3} \sum _{k=0}^{i-\lceil \alpha \rceil } {c_{i}(t)} {\eta ^{(\alpha )}_{i,k}} {x_{p}^{(i-k-\alpha )}} \\ &{} -\sum_{i=\lceil \beta \rceil }^{3} \sum _{k=0}^{i-\lceil \beta \rceil } {c_{i}(t)} {\eta ^{(\beta )}_{i,k}} {x_{p}^{(i-k-\beta )}}+ s(x_{p},t),\quad p=0,1, \end{aligned}
(62)

where the collocation points $$x_{p}$$ are the roots for the shifted Vieta–Lucas polynomials of the second degree. Also, Eqs. (55) and (56) are used respectively to have

\begin{aligned}& \sum_{i=0}^{3}{2 (-1)^{(i)}} {c_{i}(t)}=0, \end{aligned}
(63)
\begin{aligned}& \sum_{i=0}^{3}2 {c_{i}(t)}=0. \end{aligned}
(64)

The nonstandard finite difference method given in Sect. 2.2 is applied here to convert the two generated equations of Eq. (62) into two algebraic equations. These equations are combined with Eqs. (63) and (64) to have a system of algebraic equations. Now, we have four equations in four unknown coefficients $$c_{i}$$ ($$i=0,1,2,3$$). This system can be presented in the following matrix formula:

$$AC^{n}=BC^{n-1}+{\phi (h)} {s^{n}},\quad \text{or}\quad C^{n}=A^{-1}AC^{n-1}+{ \phi (h)} {A^{-1}} {s^{n}},$$
(65)

where

\begin{aligned}& A= \begin{pmatrix} 2 & R_{1}-\phi (h)G_{1} & R_{2}-\phi (h)G_{2} & R_{3} - \phi (h)G_{3} \\ 2 & K_{1}-\phi (h)H_{1} & K_{2}-\phi (h)H_{2} & K_{3} - \phi (h)H_{3} \\ 2 & -2 & 2 & -2 \\ 2 & 2 & 2 & 2 \end{pmatrix},\qquad \\& B= \begin{pmatrix} 2 & R_{1} & R_{2} & R_{3} \\ 2 & K_{1} & K_{2} & K_{3} \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \end{pmatrix}, \\& R_{1}=\operatorname{VL}^{*}_{1}{(x_{0})},\qquad R_{2}=0,\qquad R_{3}=\operatorname{VL}^{*}_{3}{(x_{0})}, \\& K_{1}=\operatorname{VL}^{*}_{1}{(x_{1})},\qquad K_{2}=0, \qquad K_{3}=\operatorname{VL}^{*}_{3}{(x_{1})}, \\& G_{1}=-\eta ^{(\beta )}_{1,0} {x_{0}^{(1-\beta )}},\qquad G_{2} = \eta ^{(\alpha )}_{2,0} {x_{0}^{(2-\alpha )}} - \eta ^{(\beta )}_{2,0}{x_{0}^{(2- \beta )}}- \eta ^{(\beta )}_{2,1}{x_{0}^{(1-\beta )}}, \\& G_{3} = \eta ^{(\alpha )}_{3,0} {x_{0}^{(3-\alpha )}} + \eta ^{( \alpha )}_{3,1} {x_{0}^{(2-\alpha )}}- \eta ^{(\beta )}_{3,0}{x_{0}^{(3- \beta )}}- \eta ^{(\beta )}_{3,1}{x_{0}^{(2-\beta )}}- \eta ^{(\beta )}_{3,2}{x_{0}^{(1- \beta )}}, \\& H_{1}=-\eta ^{(\beta )}_{1,0} {x_{1}^{(1-\beta )}},\qquad H_{2} = \eta ^{(\alpha )}_{2,0} {x_{1}^{(2-\alpha )}} - \eta ^{(\beta )}_{2,0}{x_{1}^{(2- \beta )}}- \eta ^{(\beta )}_{2,1}{x_{1}^{(1-\beta )}}, \\& H_{3} = \eta ^{(\alpha )}_{3,0} {x_{1}^{(3-\alpha )}} + \eta ^{( \alpha )}_{3,1} {x_{1}^{(2-\alpha )}}- \eta ^{(\beta )}_{3,0}{x_{1}^{(3- \beta )}}- \eta ^{(\beta )}_{3,1}{x_{1}^{(2-\beta )}}- \eta ^{(\beta )}_{3,2}{x_{1}^{(1- \beta )}}, \end{aligned}

$$C^{n}={{(c^{n}_{0}, c^{n}_{1}, c^{n}_{2}, c^{n}_{3})}}^{T}$$, and $$s^{n}={{(s^{n}_{0}, s^{n}_{1}, 0, 0, )}}^{T}$$.

At this time, the matrix equation Eq. (65) will be solved numerically via any suitable iteration method with the initial values of the coefficients $$C^{0}={{(c^{0}_{1}, c^{0}_{2}, c^{0}_{3}, c^{0}_{4})}}^{T}$$. These starting values are obtained through Eq. (59) in addition to Eq. (17). Consequently, the coefficients $$c_{i}$$ ($$i=0,1,2,3$$) are obtained. Hence, the desired approximate solution of the problem (57)–(60) is calculated.

The numerical results obtained through our suggested method for the first Example 6.1 in different cases are reported in Table 1 in addition to Figs. 1, 2, 3, and 4. In Table 1, the numerical results were obtained in published articles [15] and [31], and are compared with ours. These numerical results are reported when the parameters are $$\alpha =2$$, $$\beta =1$$, $$T=2$$ at $$n=5$$ for [15] and [31] while for the proposed technique $$n=3$$, in addition to the nonstandard term $$\phi (h)=0.5 (\exp (2h)-1)$$ with $$\Delta t=h=0.0004$$. All the results of the following figures are calculated under the same conditions, the main differences are the nonstandard term and the final time T except in Fig. 4. Figure 1 shows the numerical and exact solutions for Example 6.1 with the same parameters of Table 1, only the different the final times $$(T=1, T=2)$$. Also, Fig. 2 describes the results with a large enough time domain in Example 6.1. Moreover, Fig. 3 presents the results of the suggested method with different values of the final time and the truncation terms of the approximate solutions $$n=5$$. Furthermore, Fig. 4 provides the results for different fractional parameters α and β with $$T=15$$. From Table 1, and the results in Figs. 1, 2, 3, and 4, the suggested method is applicable and more accurate than those in [15] and [31]. Also, it is obvious that our proposed method can be used for large enough times of the problem and gives good accuracy. Finally, this discussion supported and proved the truth of the theoretical technique and theorems introduced in this article.

### Example 6.2

([30, 31])

$$\frac{\partial u(x,t)}{\partial t}= \frac{\partial ^{1.5} u(x,t)}{\partial x^{1.5}}- 2 \frac{\partial u(x,t)}{\partial x}+ s(x,t),\quad 0< x < 1, 0< t \leq T,$$
(66)

with the source function

$$s(x,t)= \bigl(x^{2}-x \bigr) (2t-1)+(4x-2) \bigl(t^{2}-t \bigr)-4{\sqrt{\frac{x}{\pi }}} \bigl(t^{2}-t \bigr),$$
(67)

the initial condition

$$u(x,0)=0,\quad 0 < x < 1,$$
(68)

and the conditions

$$u(0,t)= u(1,t)=0,\quad 0 < t\leq T.$$
(69)

The exact solution of Eqs. (66)–(69) is

$$u(x,t)= \bigl(x^{2}-x \bigr) \bigl(t^{2}-t \bigr).$$

Suppose that

$$u_{3}(x,t)=\sum_{i=0}^{3} {c_{i}(t)} \operatorname{VL}^{*}_{i}(x).$$
(70)

We use the presented method to obtain the approximate solution of this problem.

The numerical results via our suggested technique for Example 6.2 are presented in Table 2 and the three figures thereafter. Table 2 lists the absolute error in the three cases, $$T=0.3, 0.6$$, and 0.9, with same step size $$\Delta t=h=0.00025$$ (which will be considered in all results of this example), $$\phi (h)=-(\exp (-1.2h)-1)/1.2$$ at $$n=3$$. In Fig. 5, the graphs of the exact and numerical solutions for Example 6.2 for $$n=3$$ and $$\phi (h)=-(\exp (-1.2h)-1)/1.2$$ with $$T=0.3$$ and $$T=0.6$$ are respectively shown. The curves of the exact and numerical solutions are plotted in Fig. 6 for Example 6.2 at $$n=3$$ and $$\phi (h)=4\sinh (h/4)$$ with $$T=5$$ and $$T=10$$, respectively. Moreover, the last figure (Fig. 7) shows the analytical and approximate solutions of Example 6.2 for $$n=5$$ and $$\phi (h)=2\sin (h/2)$$ with $$T=20$$ and $$T=30$$, respectively. Consequently, these obtained results show us the fact that our proposed method is efficient and gives a high accuracy for different cases.

## 7 Conclusions

In the present article, we have introduced a trustworthy method for solving a mathematical physics model of fractional-order, advection–dispersion equation, numerically. This method was based on a class of orthogonal polynomials which is called the shifted Vieta–Lucas polynomials. The principle strategy of the suggested treatment is transforming the original equation into a system of ODEs by applying the spectral collocation method. Next, we used the nonstandard finite difference method to transform these equations into algebraic equations. After that, the Gaussian elimination method was used (or any appropriate iterative technique). Actually, we have proposed an accurate technique that converges fast to the real solution for solving the FADEs. Also, an error estimate of our method was derived. Some numerical applications were introduced for demonstrating the accuracy, efficiency, and applicability of the current method. Moreover, our numerical results were compared with other published approximation data in the literature, showing reliability and accuracy of the proposed technique. Furthermore, this method gives us flexibility for solving different equations appearing in applications in many fields such as physics, engineering, chemistry, and others, because the given problems are solved at different values of T. All computed results were obtained using MATLAB program. In the future, we can apply this technique for solving many equations from applications in one and two dimensions, especially in physics, such as diffusion equation, wave equation, telegraph equation, and so on.