1 Introduction

Over the past few decades, several physical models have been developed in the form of fractional differential equations. Fractional differential equations have been found to be appropriate models for certain phenomena in astro-physics, fractal networks, signal processing, chaotic dynamics, turbulent flow, continuum mechanics, and wave propagation [17]. These models admit non-local memory effects in the mathematical formulation and thus overcome certain shortcomings in integer-based models.

An important fractional partial differential equation is the fractional advection–diffusion equation. It is important to solve this equation for a better understanding of advection and diffusion phenomena in a fractional setting, and for this purpose, numerical and approximate analytical methods are usually required. The finite element method was constructed for the space fractional advection–diffusion equation by Zheng et al. [8]. Wang and Wang [9] developed a fast characteristic finite difference scheme for space fractional advection–diffusion equation. For the space–time fractional advection–diffusions, explicit and implicit difference approximations were developed by Shen et al. [10]. Jiang et al. [11] presented analytical solutions for the multi-term time–space Caputo–Riesz fractional advection–diffusion equations on a finite domain with Dirichlet nonhomogeneous boundary conditions. In [11], the spectral representation of the fractional Laplacian operator was used to derive the analytical solution. A scheme based on the finite volume method for the solution of space fractional diffusion equation was investigated by Liu et al. [12]. A finite element multigrid method was developed for multi-term time fractional advection–diffusion equations by Bu et al. [13]. Parvizi et al. [14] presented a Jacobi collocation method for numerical solution of classical fractional advection–diffusion equation with a nonlinear source term. Rubab et al. [15] discussed analytical solutions to the time fractional advection–diffusion equation with time-dependent pulses on the boundary. In [15], the Laplace and Fourier transforms were utilized to determine the analytical solutions of fractional advection–diffusion equation with time fractional Caputo–Fabrizio derivative. Povstenko and Kyrylych [16] discussed two approaches to obtaining the space–time fractional advection–diffusion equations. In this paper, Caputo time fractional derivative and Riesz fractional Laplacian were used.

Many researchers used a spline function for solving fractional differential equations. B-spline functions can give good approximation due to their small, compact support and continuity of order 2 [17, 18]. However, there is relatively not much work on the use of B-splines for solving fractional advection–diffusion equation. B-spline collocation methods were proposed for the solutions of time fractional diffusion problems by Esen et al. [19, 20]. Sayevand et al. [21] solved anomalous time fractional diffusion problems in transport dynamic systems using a B-spline collocation scheme. In [21], the fractional derivative in Caputo sense was utilized to represent the time derivative. A cubic trigonometric B-spline collocation scheme for the time fractional diffusion problem was presented by Yaseen et al. [22]. In this paper, the Grunwald–Letnikov representation was used for Riemann–Liouville derivative, and the stability of the scheme (based on the finite difference method and cubic trigonometric B-spline) was discussed. Zhu and Nie [23] obtained a scheme based on exponential B-spline and wavelet operational matrix method for the time fractional convection–diffusion problem with variable coefficients. Yaseen et al. [24] constructed a finite difference method for solving time fractional diffusion problem via trigonometric B-spline. Zhu et al. [25] derived an efficient differential quadrature scheme based on modified trigonometric cubic B-spline for the solution of 1D and 2D time fractional advection–diffusion equations. Yuan and Chen [26] presented an expanded mixed finite element method for the two-sided time-dependent fractional diffusion problem with two-sided Riemann–Liouville fractional derivatives.

In this paper, a fully implicit finite difference scheme using extended cubic B-spline is formulated for the numerical solution of time fractional advection–diffusion equation. A finite difference scheme, with Caputo’s formula, is applied to discretize the temporal derivative, while extended cubic B-spline is employed to discretize the spatial derivatives.

The model problem fractional advection–diffusion equation considered in this paper is given by

$$ \frac{\partial ^{\gamma }u(x,t)}{\partial t^{\gamma }}+p\frac{\partial u}{\partial x}-q\frac{\partial ^{2}u}{\partial x^{2}}=f(x,t), \quad a\leq x\leq b, 0< t\leq T $$
(1)

with initial condition

$$ u(x,0)=\omega (x), \quad a\leq x\leq b, $$
(2)

and boundary conditions

$$ u(a,t)=g_{1}(t),\qquad u(b,t)=g_{2}(t), \quad t\geq 0. $$
(3)

The advection coefficient p is a constant and the diffusivity coefficient q is a positive constant, where \(g_{1}(t)\), \(g_{2}(t)\), and \(f(x,t)\) are continuous functions as the problem required. \(\frac{\partial ^{\gamma }}{\partial t^{\gamma }}\) denotes the Caputo fractional derivative of order γ for the function \(u(x,t)\), described as

$$ \frac{\partial ^{\gamma }u(x,t)}{\partial t^{\gamma }}=\frac{1}{\Gamma (1-\gamma )} \int ^{t}_{0}\frac{\partial u(x,\tau )}{\partial \tau } \frac{d \tau }{(t-\tau )^{\gamma }}. $$

The paper is organized as follows. Extended cubic B-spline basis functions are described in Sect. 2. In Sect. 3, a fully implicit finite difference scheme based on extended cubic B-spline is presented. The initial state \(C^{0}\) is discussed in Sect. 4. Stability and convergence are discussed in Sect. 5 and Sect. 6, respectively. Lastly the numerical experiments and discussions are presented in Sect. 7.

2 Extended cubic B-spline functions

Assume that \(a=x_{0}< x_{1}<\cdots<x_{N-1}<x_{N}=b\) are the spatial knots on the interval \([a,b]\) with equal length \(h=x_{i}-x_{i-1}\), \(i=1,\ldots,N\). The extended cubic B-spline basis functions, which preserve identical properties and are twice differentiable at the knots \(x_{i}\) over the interval \([a,b]\), can be presented as follows [18]:

$$\begin{aligned} \phi _{i}(x,\lambda )=\frac{1}{24 h^{4}} \textstyle\begin{cases} 4h(1-\lambda )(x-x_{i-2})^{3}+3\lambda (x-x_{i-2})^{4}, & x_{i-2}\leq x < x_{i-1}, \\ (4-\lambda )h^{4}+12h^{3}(x-x_{i-1})+6h^{2}(2+\lambda )(x-x_{i-1})^{2}\\ \quad {}- {}12h(x-x_{i-1})^{3}-3\lambda (x-x_{i-1})^{4}, & x_{i-1}\leq x< x_{i}, \\ (4-\lambda )h^{4}+12h^{3}(x_{i+1}-x)+6h^{2}(2+\lambda )(x_{i+1}-x)^{2}\\ \quad {}- 12h(x_{i+1}-x)^{3}-3\lambda (x_{i+1}-x)^{4}, & x_{i}\leq x< x_{i+1}, \\ 4h(1-\lambda )(x_{i+2}-x)^{3}+3\lambda (x_{i+2}-x)^{4}, & x_{i+1}\leq x< x_{i+2}, \\ 0, & \mbox{otherwise,} \end{cases}\displaystyle \end{aligned}$$
(4)

where x and \(\lambda \in \mathbf{R}\) are a variable and a free parameter, respectively. For \(-8\leq \lambda \leq 1\), the extended cubic B-spline functions preserve identical properties as B-spline. When \(\lambda =0\), it should be noted that extended B-spline basis functions become a cubic B-spline basis. The splines \(\phi _{-1},\phi _{0},\ldots,\phi _{N+1}\) form a basis over the domain \([a,b]\).

The values of \(\phi _{i}(x,\lambda )\) and their derivatives at different knots are as follows [18]:

$$\begin{aligned}& \phi _{i}(x_{j},\lambda )= \textstyle\begin{cases} \frac{8+\lambda }{12}, & \mbox{if }i-j=0, \\ \frac{4-\lambda }{24}, & \mbox{if }i-j=\pm 1, \\ 0, & \mbox{else}, \end{cases}\displaystyle \end{aligned}$$
(5)
$$\begin{aligned}& \phi '_{i}(x_{j},\lambda )= \textstyle\begin{cases} 0, & \mbox{if } i-j=0, \\ \mp \frac{1}{2h}, & \mbox{if }i-j=\pm 1, \\ 0, & \mbox{else}, \end{cases}\displaystyle \end{aligned}$$
(6)
$$\begin{aligned}& \phi ''_{i}(x_{j},\lambda )= \textstyle\begin{cases} -\frac{2+\lambda }{h^{2}}, & \mbox{if } i-j=0, \\ \frac{2+\lambda }{2h^{2}}, & \mbox{if }i-j=\pm 1, \\ 0, & \mbox{else}. \end{cases}\displaystyle \end{aligned}$$
(7)

3 Description of the scheme based on extended cubic B-spline

Let \(u(x,\lambda )\) be an analytical solution of the given differential equation. The approximated solution in terms of the extended cubic B-spline is defined as follows:

$$ u(x_{i},t_{n})=\sum^{i+1}_{k=i-1}C^{n}_{k}(t) \phi _{k}(x,\lambda ), $$
(8)

where \(i=0,1,2,\ldots,N\). The time-dependent unknowns \(C^{n}_{k}(t)\)’s are to be manipulated from the initial, boundary, and extended cubic B-spline collocation conditions. Each extended cubic B-spline covers four elements so that each subinterval \([x_{i},x_{i+1}]\) holds only three non-zero basis functions \(\phi _{i-1}\), \(\phi _{i}\), \(\phi _{i+1}\). Thus the approximated solution and its derivatives in terms of parameters can be described as follows [17]:

$$ \textstyle\begin{cases} u^{n}_{i}=u(x_{i},t^{n})=a_{1}C^{n}_{i-1}+a_{2}C^{n}_{i}+a_{1}C^{n}_{i+1},\\ (u_{x})^{n}_{i}=u_{x}(x_{i},t^{n})=a_{3}C^{n}_{i-1}-a_{3}C^{n}_{i+1},\\ (u_{xx})^{n}_{i}=u_{xx}(x_{i},t^{n})=a_{4}C^{n}_{i-1}+a_{5}C^{n}_{i}+a_{4}C^{n}_{i+1}, \end{cases} $$
(9)

where \(a_{1}=\frac{4-\lambda }{24}\), \(a_{2}=\frac{8+\lambda }{12}\), \(a_{3}=\frac{1}{2h}\), \(a_{4}=\frac{2+\lambda }{2h^{2}}\), \(a_{5}=-\frac{2+\lambda }{h^{2}}\).

Caputo’s formula [12] can be written as follows:

$$\begin{aligned} \frac{\partial ^{\gamma }(x,t_{n})}{\partial t^{\gamma }}=\frac{1}{\Gamma (2-\gamma )}\sum ^{n-1}_{s=0}b_{s}\frac{u(x,t_{n-s})-u(x,t_{n-s-1})}{\tau ^{\gamma }}+R^{n}_{\tau }, \end{aligned}$$
(10)

where \(b_{s}=(s+1)^{1-\gamma }-s^{1-\gamma }\). The truncation error \(R^{n}_{\tau }\) is bounded, i.e.,

$$\begin{aligned} \bigl\vert R^{n}_{\tau } \bigr\vert \leq I \tau ^{2-\gamma }, \end{aligned}$$
(11)

where I is a constant.

Lemma 3.1

The coefficients \(b_{s}\) fulfill the following properties [21]:

  • \(b_{0}=1\);

  • \(b_{0}>b_{1}>b_{2}>\cdots>b_{s}\), \(b_{s}\rightarrow 0\) as \(s\rightarrow \infty \);

  • \(b_{s}>0\) for \(s=0,1,\ldots,n\);

  • \(\sum^{n}_{s=0}(b_{s}-b_{s+1})+b_{n+1}=(1-b_{1})+\sum^{n-1}_{s=1}(b_{s}-b_{s+1})+b_{n}=1\).

3.1 Fully implicit scheme

Let \(u^{n}_{i}=u(x_{i},t^{n})\), \(f^{n}_{i}=f(x_{i},t^{n})\), and \(C^{n}_{i}=C_{i}(t^{n})\) for \(i=0,1,\ldots,N\), \(n=0,1,\ldots,M\). Then, substituting (5), (6), (7) in (1), we have

$$\begin{aligned} &\frac{1}{\tau ^{\gamma }\Gamma (2-\gamma )}\sum^{n}_{s=0}b_{s} \bigl[ a_{1}\bigl(C^{n-s+1}_{i-1}-C^{n-s}_{i-1} \bigr)+a_{2}\bigl(C^{n-s+1}_{i}-C^{n-s}_{i} \bigr) +a_{1}\bigl(C^{n-s+1}_{i+1}-C^{n-s}_{i+1} \bigr) \bigr] \\ &\quad {}+(p a_{3}-q a_{4})C^{n+1}_{i-1} +(-q a_{5})C^{n+1}_{i}+(-p a_{3}-q a_{4})C^{n+1}_{i+1}=f^{n+1}_{i}. \end{aligned}$$
(12)

After some simplification, the following recurrence relation is obtained:

$$\begin{aligned}& (r a_{1}+p a_{3}-q a_{4})C^{n+1}_{i-1}+(r a_{2}+0-q a_{5})C^{n+1}_{i}+(r a_{1}-p a_{3}-q a_{4})C^{n+1}_{i+1} \\& \quad =r\bigl(a_{1}C^{n}_{i-1}+a_{2}C^{n}_{i}+a_{1}C^{n}_{i+1} \bigr) r\sum^{n}_{s=1}b_{s} \bigl[a_{1}\bigl(C^{n-s+1}_{i-1}-C^{n-s}_{i-1} \bigr) +a_{2}\bigl(C^{n-s+1}_{i}-C^{n-s}_{i} \bigr) \\& \quad \quad {}+a_{1}\bigl(C^{n-s+1}_{i+1}-C^{n-s}_{i+1} \bigr)\bigr]+f^{n+1}_{i}, \end{aligned}$$

where \(r=\frac{1}{\tau ^{\gamma }\Gamma (2-\gamma )}\). The above system has \((N+1)\) linear equations and \((N+3)\) unknowns. To obtain a unique solution, two additional equations are required. These additional equations are obtained from boundary conditions. The system then becomes

$$\begin{aligned}& AC^{n+1}=B \Biggl( b_{n}C^{0}+\sum ^{n-1}_{s=0}(b_{s}-b_{s+1})C^{n-s} \Biggr) +F \end{aligned}$$
(13)
$$\begin{aligned}& A=\left [ \textstyle\begin{array}{@{}c@{\quad}c@{\quad}c@{\quad}c@{}} a_{1} & a_{2} & a_{1} & \ldots \\ ra_{1}+pa_{3}-q a_{4} & ra_{2}-q a_{5} & ra_{1}-pa_{3}-q a_{4} & \\ 0 & ra_{1}+pa_{3}-q a_{4} & ra_{2}-q a_{5} & ra_{1}-pa_{3}-q a_{4} \\ \vdots & \ddots & \ddots & \ddots \\ \vdots & & \ddots & \ddots \\ \vdots & & & \ddots \\ \vdots & & & \\ 0 & \ldots & \ldots & \ldots \end{array}\displaystyle \right . \\& \quad \left .\textstyle\begin{array}{@{}c@{\quad}c@{\quad}c@{}} \ldots & \ldots & 0 \\ & & \vdots \\ & & \vdots \\ \ddots & & \vdots \\ \ddots & \ddots & \vdots \\ \ddots & \ddots & \vdots \\ ra_{1}+pa_{3}-q a_{4} & ra_{2}-q a_{5} & ra_{1}-pa_{3}-q a_{4} \\ a_{1} & a_{2} & a_{1} \end{array}\displaystyle \right ] , \\& B=\left [ \textstyle\begin{array}{@{}c@{\quad}c@{\quad}c@{\quad}c@{\quad}c@{\quad}c@{\quad}c@{}} 0 & 0 & 0 & 0 & \ldots & \ldots & 0 \\ a_{1} & a_{2} & a_{1} & 0 & \ldots & \ldots & 0 \\ 0 & a_{1} & a_{2} & a_{1} & \ldots & \ldots & 0 \\ \vdots & \ldots & \ddots & \ddots & \ddots & \ldots & \vdots \\ \vdots & \ldots & \ldots & \ldots & a_{1} & a_{2} & a_{1} \\ 0& \ldots & \ldots & \ldots & 0 & 0 & 0 \end{array}\displaystyle \right ] \end{aligned}$$
(14)

and \(F=[g^{n+1}_{1},f^{n+1}_{0},\ldots,f^{n+1}_{N},g^{n+1}_{2}]^{T}\). Consequently, we have \((N+3)\times (N+3)\) system of linear equations.

4 Initial state \(C^{0}\)

To start iteration on Eq. (12), a suitable initial vector \(C^{0}=[C^{0}_{-1},C^{0}_{0},\ldots,C^{0}_{N+1}]^{T}\) is constructed from the initial conditions. We utilize the initial condition together with its derivatives as follows:

  • \((u^{0}_{i})_{x}=\frac{d}{dx}(\omega (x_{i}))\), \(i=0,N\);

  • \(u^{0}_{i}=u(x_{i},0)=\sum^{N+1}_{i=1}C^{0}_{i}(0)\phi (x_{i})\), \(i=0,1,\ldots,N\).

This gives a linear system of order \((N+3)\times (N+3)\). The above system can be written in the matrix form as follows:

$$\begin{aligned}& DC^{0}=E. \\& D=\left [ \textstyle\begin{array}{@{}c@{\quad}c@{\quad}c@{\quad}c@{\quad}c@{\quad}c@{\quad}c@{}} a_{3} & 0 & -a_{3} & 0 & \ldots & \ldots & 0 \\ a_{1} & a_{2} & a_{1} & 0 & \ldots & \ldots & 0 \\ 0 & a_{1} & a_{2} & a_{1} & \ldots & \ldots & 0 \\ \vdots & \ldots & \ddots & \ddots & \ddots & \ldots & \vdots \\ \vdots & \ldots & \ldots & \ldots & a_{1} & a_{2} & a_{1} \\ 0& \ldots & \ldots & \ldots & a_{3} & 0 & -a_{3} \end{array}\displaystyle \right ] \end{aligned}$$

and \(E=[\omega '_{0},\omega _{0},\omega _{1},\ldots,\omega _{N},\omega '_{N}]^{T}\).

5 Stability

The concept of stability is associated with the requirement that errors which are introduced in the computational procedure die out as the procedure continues [27]. As the fractional advection–diffusion equation is linear, the stability of proposed schemes can be investigated by the Fourier method. Suppose \(U(x,t)\) in the approximation of (12). We define

$$\begin{aligned} \xi ^{n}_{i}=u^{n}_{i}-U^{n}_{i},\quad i=1,\ldots,N-1,n=0,1,\ldots,M, \end{aligned}$$
(15)

and vector

$$\begin{aligned} \xi ^{n}=\bigl[\xi ^{n}_{1},\xi ^{n}_{2},\ldots,\xi ^{n}_{N-1} \bigr]^{T}. \end{aligned}$$
(16)

Equation (15) satisfies Eq. (12), we obtain the round-off error equations as follows:

$$\begin{aligned}& (r a_{1}+p a_{3}-q a_{4})\xi ^{n+1}_{i-1}+(r a_{2}-q a_{5})\xi ^{n+1}_{i}+(r a_{1}-p a_{3}-q a_{4})\xi ^{n+1}_{i+1} \\& \quad =r\bigl(a_{1}\xi ^{n}_{i-1}+a_{2}\xi ^{n}_{i}+a_{1}\xi ^{n}_{i+1} \bigr) -r\sum^{n}_{s=1}b_{s} \bigl[a_{1}\bigl(\xi ^{n-s+1}_{i-1}-\xi ^{n-s}_{i-1}\bigr) +a_{2}\bigl(\xi ^{n-s+1}_{i}-\xi ^{n-s}_{i}\bigr) \\& \quad \quad {}+a_{1}\bigl(\xi ^{n-s+1}_{i+1}-\xi ^{n-s}_{i+1}\bigr) \bigr]. \end{aligned}$$
(17)

Then initial and boundary conditions become

$$\begin{aligned} \xi ^{0}_{i}=\omega (x_{i}),\quad i=1,2,\ldots,N, \end{aligned}$$
(18)

and

$$\begin{aligned} \xi ^{n}_{0}=g_{1}(t_{n}),\qquad \xi^{n}_{N}=g_{2}(t_{n}),\quad n=0,1, \ldots,M. \end{aligned}$$
(19)

Define grid functions based on the Fourier method as follows:

$$\begin{aligned} \xi ^{n}= \textstyle\begin{cases} \xi ^{n}_{i}, &x_{i}-\frac{h}{2}< x\leq x_{i}+\frac{h}{2}, i=1,2,\ldots,N-1, \\ 0,& a\leq x\leq a+\frac{h}{2}\mbox{ or }b-\frac{h}{2}\leq x\leq b. \end{cases}\displaystyle \end{aligned}$$
(20)

Then \(\xi ^{n}(x)\) can be expressed in the form of Fourier series

$$\begin{aligned} \xi ^{n}(x)=\sum^{\infty }_{-\infty }\eta _{n}(m)\exp \bigl(i2\pi mx/(b-a)\bigr),\quad n=1,2,\ldots,M, \end{aligned}$$
(21)

where

$$\begin{aligned} \eta _{n}(m)=\frac{1}{b-a} \int ^{b}_{a}\xi ^{n}(x)\exp \bigl(-i2\pi mx/(b-a)\bigr)\,dx. \end{aligned}$$
(22)

Note the natural definition of norm:

$$\begin{aligned} \bigl\Vert \xi ^{n} \bigr\Vert _{2} =& \Biggl( \sum ^{N-1}_{i=1}h\bigl\vert \xi ^{n}_{i} \bigr\vert ^{2} \Biggr) ^{1/2} \\ =& \Biggl[ \int ^{a+h/2}_{a}\bigl\vert \xi ^{n} \bigr\vert ^{2}\,dx+\sum^{M-1}_{i=1} \int ^{x_{i}+h/2}_{x_{i}-h/2}\bigl\vert \xi ^{n} \bigr\vert ^{2}\,dx+ \int ^{b}_{b-h/2}\bigl\vert \xi ^{n} \bigr\vert ^{2}\,dx \Biggr] ^{1/2} \\ =& \biggl[ \int ^{b}_{a}\bigl\vert \xi ^{n} \bigr\vert ^{2}\,dx \biggr] ^{1/2}. \end{aligned}$$

Using the Parseval equality [28], we have

$$\begin{aligned} \int ^{b}_{a}\bigl\vert \xi ^{n} \bigr\vert ^{2}\,dx=\sum^{\infty }_{-\infty }\bigl\vert \eta _{n}(m) \bigr\vert ^{2}\,dx, \end{aligned}$$

we get

$$\begin{aligned} \bigl\Vert \xi ^{n} \bigr\Vert ^{2}_{2}= \sum^{\infty }_{-\infty }\bigl\vert \eta _{n}(m) \bigr\vert ^{2}\,dx. \end{aligned}$$
(23)

5.1 Stability for a fully implicit scheme

Let the solution in the form of Fourier series analysis be described as follows:

$$\begin{aligned} \xi ^{n}_{j}=\eta _{n}e^{i\sigma jh}, \end{aligned}$$
(24)

where \(i=\sqrt{-1}\) and \(\sigma =2\pi m/(b-a)\). Using expression (24) in (17), we obtain

$$\begin{aligned}& (r a_{1}+p a_{3}-q a_{4})\eta _{n+1}e^{i\sigma (j-1)h}+(r a_{2}-q a_{5})\eta _{n+1}e^{i\sigma jh}+(r a_{1}-p a_{3}-q a_{4})\eta _{n+1}e^{i\sigma (j+1)h} \\& \quad =r\bigl(a_{1}\eta _{n}e^{i\sigma (j-1)h}+a_{2}\eta _{n+1}e^{i\sigma jh}+a_{1}\eta _{n+1}e^{i\sigma (j+1)h} \bigr) -r\sum^{n}_{s=1}b_{s} \bigl[a_{1}\bigl(\eta _{n-s+1}-\eta ^{n-s} \bigr)e^{i\sigma (j-1)h} \\& \quad \quad {}+a_{2}(\eta _{n-s+1}-\eta _{n-s})e^{i\sigma jh} +a_{1}(\eta _{n-s+1}-\eta _{n-s})e^{i\sigma (j+1)h} \bigr]. \end{aligned}$$

After some calculation and collection of likewise terms, we obtain

$$\begin{aligned} \eta _{n+1}=\frac{1}{w_{1}}\eta _{n}- \frac{1}{w_{1}}\sum^{n}_{s=1}b_{s}( \eta _{n-s+1}-\eta _{n-s}), \end{aligned}$$
(25)

where \(w_{1}=1+\frac{24q(2+\lambda )\sin ^{2}(\sigma h/2)-12phi\sin (\sigma h)}{r h^{2}[12+(\lambda -4)2\sin ^{2}(\sigma h/2)]}\), clearly \(w_{1}\geq 1\) for \(\lambda >-2\).

Proposition 5.1

Suppose that \(\eta _{n}\), \(n=1,2,\ldots,T\times M\), is the solution of (25), we have

$$\begin{aligned} \vert \eta _{n} \vert \leq \vert \eta _{0} \vert , \quad n=1,2,\ldots,T \times M. \end{aligned}$$
(26)

Proof

Apply the mathematical induction to verify inequality (26). Put \(n=0\) in (25) which now takes the form

$$\begin{aligned} \vert \eta _{1} \vert =\frac{1}{w_{1}} \vert \eta _{0} \vert \leq \vert \eta _{0} \vert , \qquad \frac{1}{w_{1}}\geq 1. \end{aligned}$$

Suppose that \(\vert \eta _{n} \vert \leq \vert \eta _{0} \vert \) is true for \(n=1,2,\ldots,T\times M-1\). From Eq. (25) we have

$$\begin{aligned} \vert \eta _{n+1} \vert \leq &\frac{1}{w_{1}} \vert \eta _{n} \vert -\frac{1}{w_{1}}\sum^{n}_{s=1} \bigl(\vert \eta _{n+1-s} \vert -\vert \eta _{n-s} \vert \bigr) \\ \leq & \frac{1}{w_{1}}\vert \eta _{0} \vert - \frac{1}{w_{1}}\sum^{n}_{s=1}\bigl(\vert \eta _{0} \vert -\vert \eta _{0} \vert \bigr) \\ \leq & \vert \eta _{0} \vert . \end{aligned}$$

Hence (26) is true. □

Theorem 1

The implicit scheme (12) is unconditionally stable.

Proof

Utilizing the above proposition and noticing (23), we obtain

$$\begin{aligned} \bigl\Vert \xi ^{n} \bigr\Vert _{2}\leq \bigl\Vert \xi ^{0} \bigr\Vert _{2}, \quad n=0,1,\ldots,M, \end{aligned}$$

which shows that implicit scheme (12) with initial and boundary conditions is unconditionally stable. □

6 Convergence

In this section, we follow Kadalbajoo and Arora’s [29] technique to examine the convergence of the proposed method.

Theorem 2

([30, 31])

Assume that \(u(x,t)\in C^{4}[a,b]\), \(f\in C^{2}[a,b]\), and \(\Omega =[a=x_{0},x_{1},\ldots, x_{N}=b]\) is the equidistant partition of \([a,b]\) with step size h. If \(\hat{U}(x,t)\) is the unique spline interpolating the solution of the proposed problem at knots \(x_{0},\ldots,x_{N} \in \Omega \), then there is a constant \(m_{i}\) independent of h, so that for every \(t\geq 0\), we have

$$ \bigl\Vert D^{i}\bigl(u(x,t)-U(x,t)\bigr) \bigr\Vert _{\infty }\leq m_{i} h^{4-i}, \quad i=0,1,2. $$
(27)

Lemma 6.1

The extended B-spline set \(\{\phi _{-1},\phi _{0},\ldots,\phi _{N+1}\}\) described in definition (4) fulfills the inequality

$$ \sum_{i=-1}^{N+1}\bigl\vert \phi _{i}(x,\lambda ) \bigr\vert \leq \frac{7}{4},\quad 0\leq x\leq 1. $$
(28)

Proof

By the triangular inequality, we obtain

$$\begin{aligned} \Biggl\vert \sum_{i=-1}^{N+1}\phi _{i}(x,\lambda ) \Biggr\vert \leq \sum_{i=-1}^{N+1} \bigl\vert \phi _{i}(x,\lambda ) \bigr\vert . \end{aligned}$$

For any knot \(x_{i}\), we have

$$\begin{aligned} \sum_{i=-1}^{N+1}\bigl\vert \phi _{i}(x_{i},\lambda ) \bigr\vert =\bigl\vert \phi _{i-1}(x_{i},\lambda ) \bigr\vert +\bigl\vert \phi _{i}(x_{i},\lambda ) \bigr\vert +\bigl\vert \phi _{i+1}(x_{i},\lambda ) \bigr\vert =\frac{4-\lambda }{24}+ \frac{8+\lambda }{12}+\frac{4-\lambda }{24}=1< \frac{7}{4}. \end{aligned}$$

Also, for \(x\in [x_{i},x_{i+1}]\), we have

$$\begin{aligned} \bigl\vert \phi _{i}(x,\lambda ) \bigr\vert \leq &\frac{8+\lambda }{12},\qquad \bigl\vert \phi _{i+1}(x,\lambda ) \bigr\vert \leq \frac{8+\lambda }{12}, \\ \bigl\vert \phi _{i-1}(x,\lambda ) \bigr\vert \leq & \frac{4-\lambda }{24},\qquad \bigl\vert \phi _{i+2}(x,\lambda ) \bigr\vert \leq \frac{4-\lambda }{24}. \end{aligned}$$

Then, for any point \(x\in [x_{i},x_{i+1}]\), we have

$$\begin{aligned} \sum_{i=-1}^{N+1}\bigl\vert \phi _{i}(x,\lambda ) \bigr\vert =\bigl\vert \phi _{i-1}(x, \lambda ) \bigr\vert +\bigl\vert \phi _{i}(x,\lambda ) \bigr\vert +\bigl\vert \phi _{i+1}(x,\lambda ) \bigr\vert +\bigl\vert \phi _{i+2}(x,\lambda ) \bigr\vert =\frac{20+\lambda }{12}. \end{aligned}$$

Since \(-8\leq \lambda \leq 1\), thus we have \(1\leq \frac{20+\lambda }{12} \leq \frac{7}{4}\). □

Theorem 3

The approximate solution \(U(x,t)\) to the exact solution \(u(x,t)\) of the time-dependent fractional partial differential problem (1)(3) exists. Moreover, if \(f\in C^{2}[0,1]\), we have

$$\begin{aligned} \bigl\Vert u(x,t)-U(x,t) \bigr\Vert _{\infty } \leq M h^{2} \end{aligned}$$
(29)

for every \(t\geq 0\) and sufficiently small h, where M is a positive constant independent of h.

Proof

Let \(\hat{U}(x,t)\) be the computed spline approximation to the approximated solution \(U(x,t)\), where \(\hat{U}(x,t)=\sum_{i=-1}^{N+1}d_{i}(t)\phi _{i}(x)\). By the triangular inequality, we can write it as follows:

$$\begin{aligned} \bigl\Vert u(x,t)-U(x,t) \bigr\Vert _{\infty }\leq \bigl\Vert u(x,t)-\hat{U}(x,t) \bigr\Vert _{\infty }+\bigl\Vert \hat{U}(x,t)-U(x,t) \bigr\Vert _{\infty }. \end{aligned}$$
(30)

Using Theorem 2 error approximation, we get

$$\begin{aligned} \bigl\Vert D^{i}\bigl(u(x,t)-\hat{U}(x,t)\bigr) \bigr\Vert _{\infty }\leq m_{i}h^{4-i}, \quad i=0,1,2. \end{aligned}$$
(31)

Using the above estimate inequality (31), we obtain

$$\begin{aligned} \bigl\Vert u(x,t)-U(x,t) \bigr\Vert _{\infty }\leq m_{0}h^{4}+\bigl\Vert \hat{U}(x,t)-U(x,t) \bigr\Vert _{\infty }. \end{aligned}$$
(32)

The collocation conditions are

$$\begin{aligned} Lu(x_{i},t)=LU(x_{i},t)=f(x_{i},t),\quad i=0,1, \ldots,N. \end{aligned}$$

Let

$$\begin{aligned} L\hat{U}(x,t)=\hat{f}(x_{i},t),\quad i=0,1,\ldots,N. \end{aligned}$$

Thus the given problem in the form of difference equation \(L(\hat{U}(x_{i},t)-U(x_{i},t))\) at any time level n can be written as follows:

$$\begin{aligned}& (ra_{1}+pa_{3}-q a_{4})\delta _{i-1}^{n+1}+(ra_{2}-q a_{5})\delta _{i}^{n+1}+(r a_{1}-pa_{3}-q a_{4})\delta _{i+1}^{n+1} \\& \quad =r\bigl(a_{1}\delta ^{n}_{i-1}+a_{2} \delta ^{n}_{i}+a_{1}\delta ^{n}_{i+1} \bigr)-r\sum_{s=1}^{n}b_{s} \bigl[a_{1}\bigl(\delta ^{n-s+1}_{i-1}-\delta ^{n-s}_{i-1}\bigr) +a_{2}\bigl(\delta ^{n-s+1}_{i}-\delta ^{n-s}_{i}\bigr) \\& \quad \quad {}+a_{1}\bigl(\delta ^{n-s+1}_{i+1}-\delta ^{n-s}_{i+1}\bigr)\bigr]+f^{n+1}, \end{aligned}$$
(33)

and the boundary conditions are as follows:

$$\begin{aligned} a_{1}\delta _{i-1}^{n+1}+a_{2}\delta_{i}^{n+1}+a_{1}\delta _{i+1}^{n+1}=0,\quad i=0,N, \end{aligned}$$

where

$$\begin{aligned} \delta ^{n}_{i}=C_{i}^{n}-d^{n}_{i},\quad i=-1,0,1, \ldots,N+1. \end{aligned}$$

From inequality (31), we obtain

$$\begin{aligned} \beta ^{2}_{i}=h^{2}\bigl[f_{i}^{n}- \hat{f^{n}_{i}}\bigr]\leq m h^{4}, \quad i=0,1, \ldots,N. \end{aligned}$$

Define \(\beta ^{n}=\max\{\vert \beta ^{n}_{i} \vert ; 0\leq i \leq N\}\), \(e^{n}_{i}=\vert \delta ^{n}_{i} \vert \) and \(e^{n}=\max \{\vert e^{n}_{i} \vert ; 0\leq i\leq N\}\). Now Eq. (33) becomes

$$\begin{aligned}& (r a_{1}+p a_{3}-q a_{4})\delta ^{1}_{i-1}+(r a_{2}-q a_{5})\delta ^{1}_{i}+(r a_{1}-p a_{3}-q a_{4})\delta ^{1}_{i+1} \\& \quad =r \bigl(a_{1} \delta ^{0}_{i-1}+a_{2}\delta ^{0}_{i}+a_{1} \delta ^{0}_{i+1}\bigr)+\frac{1}{h^{2}}\beta ^{1}_{i},\quad i=0,1,\ldots,N. \end{aligned}$$

From the initial condition, \(e^{0}=0\).

$$\begin{aligned} (r a_{2}-q a_{5})\delta ^{1}_{i}=-(r a_{1}-q a_{4}) \bigl(\delta ^{1}_{i-1}+ \delta ^{1}_{i+1}\bigr)-p a_{3}\bigl(\delta ^{1}_{i-1}-\delta ^{1}_{i+1}\bigr)+ \frac{1}{h^{2}}\beta ^{1}_{i}. \end{aligned}$$

Taking absolute values of \(\beta ^{n}_{i}\) and \(\delta ^{n}_{i}\) with sufficiently small h gives

$$\begin{aligned} e^{1}_{i}\leq \frac{6 m h^{4}}{2 r h^{2}(2+\lambda )+12(2+\lambda )q+12 p h}, \quad i=0,1,\ldots,N. \end{aligned}$$

From the boundary conditions, we get

$$\begin{aligned}& e^{1}_{-1}\leq \biggl( \frac{20+\lambda }{(4-\lambda )((r h^{2}+6 q)(2+\lambda )+12ph)} \biggr) 3mh^{4}, \\& e^{1}_{N+1}\leq \biggl( \frac{20+\lambda }{(4-\lambda )((r h^{2}+6 q)(2+\lambda )+12ph)} \biggr) 3mh^{4}. \end{aligned}$$

This implies

$$\begin{aligned} e^{1}\leq m_{1}h^{2}, \end{aligned}$$
(34)

where \(m_{1}\) is independent of h. Here mathematical induction on n is utilized. Suppose that \(e^{l}_{i}\leq m_{l}h^{2}\) for \(l=1,2,\ldots,n\) is true and \(m=\max\{m_{l}:0\leq l \leq n\}\), then from Eq. (33), we have

$$\begin{aligned}& (r a_{1}+p a_{3}-q a_{4})\delta ^{n+1}_{i-1}+(r a_{2}-q a_{5})\delta ^{n+1}_{i}+(r a_{1}+p a_{3}-q a_{4})\delta ^{n+1}_{i+1} \\& \quad =r\bigl[(b_{0}-b_{1}) \bigl(a_{1}\delta ^{n}_{i-1}+a_{2}\delta ^{n}_{i}+a_{1} \delta ^{n}_{i+1}\bigr)+(b_{1}-b_{2}) \bigl(a_{1}\delta ^{n-1}_{i-1}+a_{2}\delta ^{n-1}_{i}+a_{1}\delta ^{n-1}_{i+1} \bigr)+\cdots \\& \quad \quad {}+(b_{n-1}-b_{n}) \bigl(a_{1}\delta ^{1}_{i-1}+a_{2}\delta ^{1}_{i}+a_{1} \delta ^{1}_{i+1}\bigr)+b_{n}\bigl(a_{1} \delta ^{0}_{i-1}+a_{2}\delta ^{0}_{i}+a_{1} \delta ^{0}_{i+1}\bigr)\bigr] +\frac{1}{h^{2}}\beta ^{2}. \end{aligned}$$

Taking absolute values of \(\delta ^{n}_{i}\) and \(\beta ^{n}_{i}\), we have

$$\begin{aligned} e^{n+1}_{i}\leq \frac{6 m h^{2}}{2 r h^{2}(2+\lambda )+12(2+\lambda )q+12 p h} \Biggl( r\sum ^{n-1}_{s=0}(b_{s}-b_{s+1}) m h^{2}+m h^{2} \Biggr) \end{aligned}$$

from the boundary conditions

$$\begin{aligned} e^{n+1}_{i}\leq m h^{2},\quad i=-1,N+1. \end{aligned}$$

Then, for every n, we have

$$\begin{aligned} e^{n+1}_{i}\leq m h^{2}. \end{aligned}$$
(35)

Now we can write, from inequality (35) and Lemma 6.1,

$$\begin{aligned} \hat{U}(x,t)-U(x,t)=\sum^{N+1}_{i=-1} \bigl(d_{i}(t)-C_{i}(t)\bigr)\phi _{i}(x,\lambda ). \end{aligned}$$

Taking the norm, we obtain

$$\begin{aligned} \bigl\Vert \hat{U}(x,t)-U(x,t) \bigr\Vert _{\infty }\leq 1.75m h^{2}. \end{aligned}$$

From Eq. (35) and the above inequality, we obtain

$$\begin{aligned} \bigl\Vert u(x,t)-\hat{U}(x,t) \bigr\Vert _{\infty }+\bigl\Vert \hat{U}(x,t)-U(x,t) \bigr\Vert _{\infty }\leq m_{0}h^{4}+1.75m h^{2}=Mh^{2}, \end{aligned}$$

where \(M=m_{0}h^{2}+1.75m\). □

From relation (11) and the above theorem, it is deduced that the present scheme is convergent, i.e.,

$$ \bigl\Vert u(x,t)-U(x,t) \bigr\Vert _{\infty }\leq M h^{2}+I \tau ^{2-\gamma }, $$

where M and I are constants.

7 Illustrative examples and discussions

Some numerical experiments are described in this section to illustrate the performance of the present scheme. The calculated absolute errors are found by absolute \(\Vert e \Vert _{\infty }\) and Euclidean \(\Vert e \Vert _{2}\) norms, i.e.,

$$\begin{aligned}& \Vert e \Vert _{\infty } = \bigl\Vert U(x_{i},t)-u(x_{i},t) \bigr\Vert _{\infty }=\max_{0\leq i\leq N}\bigl\vert u(x_{i}, t)-u(x_{i},t) \bigr\vert , \\& \Vert e \Vert _{2} = \bigl\Vert U(x_{i},t)-u(x_{i},t) \bigr\Vert _{2}=\sqrt{h\sum^{N}_{i=0} \bigl\vert u(x_{i}, t)-u(x_{i},t) \bigr\vert ^{2}}. \end{aligned}$$

The numerical order of convergence is calculated by the following formula [32]:

$$ Order=\frac{\log (\Vert e \Vert _{\infty }(N_{i}))-\log (\Vert e \Vert _{\infty }(N_{i+1}))}{\log (N_{i+1})-\log (N_{i})}, $$

where \(\Vert e \Vert _{\infty }(N_{i})\) and \(\Vert e \Vert _{\infty }(N_{i+1})\) are the absolute error at the number of partitioning \(N_{i}\) and \(N_{i+1}\), respectively.

7.1 Problem 1

Consider \(p=1\), \(q=2\), solve (1)–(3) with initial and boundary conditions \(\omega (x)=e^{x}\), \(g_{1}(t)=E(t^{\gamma })\), \(g_{2}(t)=e E(t^{\gamma })\), respectively, and the homogeneous source term is considered on \([0,1]\). The exact analytical solution [25] is

$$ u(x,t)=e^{x}E\bigl(t^{\gamma }\bigr), $$

where \(E_{\gamma }\) is the Mittag–Leffler function

$$ E_{\gamma }(z)=\sum^{\infty }_{k=0} \frac{z^{k}}{\Gamma (\gamma k+1)}, \quad 0< \gamma < 1. $$

Tables 13 show the comparison of \(\Vert \cdot \Vert _{\infty }\) and \(\Vert \cdot \Vert _{2}\) between MCTB-DQM [25] and the proposed method based on extended cubic B-spline for different values of λ. Our technique yields better accuracy compared to MCTB-DQM method with \(O(\tau ^{3}+h^{2})\) [25]. By choosing \(N=100\), \(\gamma =0.5\) at time \(T=1\), Table 4 shows the comparison at different values of x. Figure 1 depicts the comparison between approximated and exact values for a fully implicit scheme. Table 5 reflects the comparison of max error \((\Vert \cdot \Vert _{\infty })\) and Euclidean norm \((\Vert \cdot \Vert _{2})\) at \(T=1\) for problem-2.

Figure 1
figure 1

Comparison graph of approximated values and exact values with \(\gamma =0.5\), \(N=50\), \(\tau =0.01\)

Table 1 A comparison of maximum error \((\Vert \cdot \Vert _{\infty })\) and Euclidean norm \((\Vert \cdot \Vert _{2})\) at \(T=1\) for problem-1
Table 2 A comparison of maximum error \((\Vert \cdot \Vert _{\infty })\) and Euclidean norm \((\Vert \cdot \Vert _{2})\) at \(T=1\) for problem-1
Table 3 A comparison of maximum error \((\Vert \cdot \Vert _{\infty })\) and Euclidean norm \((\Vert \cdot \Vert _{2})\) at \(T=1\) for problem-1
Table 4 A comparison of exact solution and approximated solution at \(T=1\) for problem-1
Table 5 A comparison of maximum error \((\Vert \cdot \Vert _{\infty })\) and Euclidean norm \((\Vert \cdot \Vert _{2})\) at \(T=1\) for problem-2

7.2 Problem 2

Consider \(p=0\), \(q=1\), solve (1)–(3) with initial and boundary conditions \(\omega (x)=0\), \(g_{1}(t)=0\), \(g_{2}(t)=0\), respectively, and the homogeneous source term is

$$ f(x,t)=\frac{2t^{2-\gamma }\sin (2\pi x)}{\Gamma (3-\gamma )}+4\pi ^{2}t^{2}\sin (2\pi x) $$

on \([0,1]\). The exact analytical solution [25] takes the form

$$ u(x,t)=t^{2}\sin (2\pi x). $$

Table 6 displays the errors between exact analytical solutions and approximated solutions at different knots corresponding to \(N=100\), \(\gamma =0.5\), \(\lambda =-0.00065\), \(\tau =1.0\times 10^{-2}\), and \(T=1\). Table 7 shows the absolute error for problem 2 corresponding to \(N=50\), \(\gamma =0.3\), \(\lambda = -0.0026305\), \(\tau =0.1\), and \(T=10\). All the graphical results can also be seen in Figs. 2 and 3.

Figure 2
figure 2

Comparison of approximated and exact solution for \(N=16\), \(\gamma =0.3\), \(\tau =0.01\) of problem-2

Figure 3
figure 3

3D plot for \(N=50\), \(\gamma =0.3\), \(T=1\) of problem-2

Table 6 A comparison of exact values and approximated values at different knots
Table 7 A comparison of exact values and approximated values at different knots at time \(T=10\)

7.3 Conclusion

A fully implicit finite difference scheme based on extended cubic B-spline has been formulated to solve the time fractional advection–diffusion equation. The proposed technique was examined and found to be unconditionally stable and convergent with \(O(\tau +h^{2})\). This technique was tested on two test problems, and the results indicated that the method is feasible and accurate.