1 Introduction

The basic concept of anomalous diffusion dates back to Richardson’s treatise on atmospheric diffusion in 1926 [1]. It has increasingly got recognition since the late 1960s within transport theory. In contrast to a typical diffusion, such a process no longer follows Gaussian statistics, then the classic Fick’s law fails to apply. Its most striking characteristic is the temporal power-law pattern dependence of the mean squared displacement [2], i.e., \(\chi^{2}(t)\sim\kappa t^{\alpha}\), for sub-diffusion, \(\alpha<1\), while \(\alpha>1\) for super-diffusion. Anomalous transport behavior is ubiquitous in physical scenarios, and due to its universal mutuality, formidable challenges are introduced. In recent decades, fractional partial differential equations (PDEs) have entered public vision; they compare favorably with the usual models to characterize such transport motions in heterogeneous aquifer and the medium with fractal geometry [3, 4]. An explosive interest has been gained to investigate the theoretical properties, analytic techniques, and numerical algorithms for fractional PDEs [512].

As a model problem of the class of fractional PDEs described above, the fractional sub-diffusion equation is considered here

$$ \frac{\partial^{\alpha}u(x,t)}{\partial t^{\alpha}}-\kappa\frac{\partial^{2} u(x,t)}{\partial x^{2}} =f(x,t), \quad a\leq x\leq b, 0< t\leq T, $$
(1.1)

subjected to the initial and boundary conditions

$$\begin{aligned}& u(x,0)=\varphi(x),\quad a\leq x\leq b, \end{aligned}$$
(1.2)
$$\begin{aligned}& u(a,t)=g_{1}(t), \qquad u(b,t)=g_{2}(t), \quad0< t\leq T, \end{aligned}$$
(1.3)

where \(0<\alpha<1\), κ is the positive viscosity constant, and \(\varphi(x)\), \(g_{1}(t)\), \(g_{2}(t)\) are the prescribed functions with sufficient smoothness. In Eq. (1.1), the time-fractional derivative is defined in the Caputo sense, i.e.,

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

with Gamma function \(\Gamma(\cdot)\). Problem (1.1)-(1.3) describes many natural phenomena and has widely been used in applications such as soft thin films, chemical reactions, optical fiber materials, and wave propagation [1316].

There have been some works dedicated to developing numerical algorithms to obtain the solutions of Eqs. (1.1)-(1.3) apart from a few analytic techniques that are not always available for general situations. Zhang and Liu derived an implicit difference scheme and proved that it is unconditionally stable [17]. Yuste and Acedo studied an explicit difference scheme based on the Grünwald-Letnikov formula [18]. Along the same line, a group of weighted average difference schemes were then obtained [19]. In [20], Cui raised a high-order compact difference scheme and its convergence was detailedly discussed; another similar approach was the compact scheme stated in [21] for the fractional sub-diffusion equation with the Neumann boundary condition. In [22], an effective spectral method was constructed by using the common L1 formula in time and a Legendre spectral approximation in space. Later, this method was extended to the time-space case [23]. The finite element method was considered by Jiang and Ma [24]. The semi-discrete lump finite element method was studied by Jin et al. for a time-fractional model with a nonsmooth right-hand function [25]. Liu et al. described an implicit RBF meshless approach for the time-fractional diffusion equation [26]. Li et al. suggested an adomian decomposition algorithm for the equations of the same type [27]. In [28], the authors solved such equations by employing a fully discrete direct discontinuous Galerkin method. Gao et al. proposed a new effective difference scheme with the Caputo derivative discretized by the L1-2 formula [29]. Recently, Luo et al. established a quadratic spline collocation method for the fractional sub-diffusion equation [30], where the convergence under \(L^{\infty}\)-norm was analyzed. Sayevand et al. gave a cubic B-spline collocation method [31], whose stability was provided. A cubic trigonometric B-spline collocation approach was conducted in [32], and a wavelet Galerkin method was studied in [33]. In [34], a Sinc-Haar collocation method which uses the Haar operational matrix to convert the original problem into a set of linear algebraic equations via expanding the approximation as a truncated series based on Sinc and Haar functions was proposed.

In the present work, regarding the current interest in numerical algorithms for the fractional PDEs, we showcase a robust collocation method based on exponential B-spline trial functions to solve Eqs. (1.1)-(1.3). The resultant algebraic system is proved to be strictly diagonally dominant, and therefore the unique solvability is ensured. A von Neumann like procedure is proceeded, and the system is shown to be unconditionally stable. Its codes are tested on five numerical examples and studied in contrast to other algorithms. The proposed method is highly accurate and calls for a lower cost to implement. This may make sense to treat the equations as the model we consider here with a long time range. The outline is as follows. In Section 2, we give a concise description of exponential B-spline trial basis, which will be useful hereinafter. In Section 3, we construct a fully discrete exponential B-spline approach on uniform meshes to discretize the model and prove that it is stable. The initial vector, which we require to start our method, is addressed in Section 4. To evaluate its accuracy, numerical examples are covered in Section 5.

2 Description of exponential spline functions

Let \(a=x_{0}< x_{1}< x_{2}<\cdots< x_{M-1}<x_{M}=b\) be an equidistant spatial mesh on the interval \([a,b]\), and for \(M\in\mathbb{Z}^{+}\), denote

$$ h=(b-a)/M, \qquad s=\sinh(ph), \qquad c=\cosh(ph), $$

where p is a non-negative value that is well assigned. The exponential splines are a kind of piecewise non-polynomial functions that are known as a generalization of the semi-classical cubic splines. They are recognized as a continuum of interpolants ranging from the cubic splines to the linear cases [35]. Also, like the polynomial splines, a basis of exponential B-splines is admitted and an advisable definition is the one introduced by McCartin [36], each of which is support on finite subsegments. On the above mesh together with another six ghost knots \(x_{j}\), \(j=-3,-2,-1,M+1,M+2,M+3\), beyond \([a,b]\), the mentioned exponential B-splines \(B_{j}(x)\), \(j=-1,0,\ldots,M+1\), are given as follows:

$$ B_{j}(x)= \textstyle\begin{cases} e(x_{j-2}-x)- \frac{e}{p}\sinh (p(x_{j-2}-x) ), &\textrm{if } x\in [x_{j-2},x_{j-1}], \\ \bar{a}+\bar{b}(x_{j}-x)+\bar{c}\exp (p(x_{j}-x) )+d\exp (-p(x_{j}-x) ),& \textrm {if } x \in[x_{j-1},x_{j}], \\ \bar{a}+\bar{b}(x-x_{j})+\bar{c}\exp (p(x-x_{j}) )+d\exp (-p(x-x_{j}) ), &\textrm {if } x \in[x_{j},x_{j+1}], \\ e(x-x_{j+2})-\frac{e}{p}\sinh (p(x-x_{j+2}) ), &\textrm{if } x\in [x_{j+1},x_{j+2}], \\ 0, &\textrm{otherwise}, \end{cases} $$

where

$$\begin{gathered} e=\frac{p}{2(phc-s)},\qquad \bar{a}=\frac{phc}{phc-s},\qquad\bar{b}=\frac {p}{2} \biggl[\frac{c(c-1)+s^{2}}{(phc-s)(1-c)} \biggr], \\ \bar{c}=\frac{1}{4} \biggl[\frac{\exp(-ph)(1-c)+s(\exp (-ph)-1)}{(phc-s)(1-c)} \biggr], \\ d= \frac{1}{4} \biggl[\frac{\exp(ph)(c-1)+s(\exp(ph)-1)}{(phc-s)(1-c)} \biggr]. \end{gathered}$$

The values of \(B_{j}(x)\) at each knot are given as

$$ B_{j}(x_{k})= \textstyle\begin{cases} 1, &\textrm{if } k=j, \\ \frac{s-ph}{2(phc-s)}, &\textrm{if } k=j\pm1, \\ 0, &\textrm{{others.}} \end{cases} $$
(2.1)

The values of \(B'_{j}(x)\) and \(B''_{j}(x)\) at each knot are given as

$$ B'_{j}(x_{k})= \textstyle\begin{cases} 0 &\textrm{if } k=j, \\ \frac{\mp p(c-1)}{2(phc-s)}, &\textrm{if } k=j\pm1, \\ 0, &\textrm{{others,}} \end{cases} $$
(2.2)

and

$$ B''_{j}(x_{k})= \textstyle\begin{cases} \frac{-p^{2}s}{phc-s}, &\textrm{if } k=j, \\ \frac{p^{2}s}{2(phc-s)}, &\textrm{if } k=j\pm1, \\ 0, &\textrm{{others.}} \end{cases} $$
(2.3)

The set of \(B_{j}(x)\in C^{2}(\mathbb{R})\), \(j=-1,0,\ldots,M+1\), are linearly independent and form an exponential spline space on the interval \([a,b]\). The non-negative free p is termed as ‘tension’ parameter and \(p\rightarrow0\) yields cubic spline, whereas \(p\rightarrow\infty\) corresponds to the linear spline. The cubic spline interpolation causes extraneous inflexion points, while the exponential splines can produce co-convex interpolation and allow to remedy this issue.

3 An exponential B-spline collocation method

Let \(t_{n}=n\tau\), \(n=0,1,\ldots,N\), \(T=\tau N\), \(N\in\mathbb{Z}^{+}\), and \(x_{j}=a+jh\), \(j=-1,0,\ldots,M+1\), \(h=(b-a)/M\), \(M\in\mathbb{Z}^{+}\). On this time-space lattice, we set about deriving the desired exponential B-spline collocation method for Eqs. (1.1)-(1.3).

3.1 Discretization of Caputo derivative

We recall the definitions of fractional derivatives. Given a smooth enough \(f(x,t)\), the αth Caputo derivative is defined by

$$ {^{C}_{0}}D^{\alpha}_{t}f(x,t)= \frac{1}{\Gamma(m-\alpha)} \int^{t}_{0}\frac{\partial^{m} f(x,\xi)}{\partial\xi^{m}}\frac{d\xi}{(t-\xi )^{1+\alpha-m}}, $$
(3.1)

and the αth Riemann-Liouville type derivative is defined by

$$ {^{\mathrm{RL}}_{0}}D^{\alpha}_{t}f(x,t)= \frac{1}{\Gamma(m-\alpha)}\frac{\partial ^{m}}{\partial t^{m}} \int^{t}_{0}\frac{f(x,\xi)\,d\xi}{(t-\xi)^{1+\alpha-m}}, $$
(3.2)

where \(m-1<\alpha<m\), \(m\in\mathbb{N}\) is not less than 1. In common sense, (3.1) owns merits in handling the initial-valued problems, and thereby is utilized in time in most instances. (3.1), (3.2) interconvert into each other through

$$ {^{C}_{0}}D^{\alpha}_{t}f(x,t)={^{\mathrm{RL}}_{0}}D^{\alpha}_{t}f(x,t)- \sum^{m-1}_{l=0}\frac {f^{(l)}(x,0)t^{l-\alpha}}{\Gamma(l+1-\alpha)}. $$
(3.3)

They are equal when \(f^{(k)}(x,0)=0\), \(k=0,1,\ldots,m-1\), are fixed; we refer the readers to [15, 16] for deeper insight. An effective approximation for Caputo derivative can be derived by rewriting Eq. (3.3) and using proper schemes to discretize (3.2), i.e.,

$$ {^{C}_{0}}D^{\alpha}_{t}f(x,t_{n}) \approx\frac{1}{\tau^{\alpha}}\sum_{k=0}^{n} \omega^{q,\alpha}_{k}f(x,t_{n-k}) -\frac{1}{\tau^{\alpha}}\sum ^{m-1}_{l=0}\sum^{n}_{k=0} \frac{\omega ^{q,\alpha}_{k} f^{(l)}(x,0)t_{n-k}^{l}}{l!}, $$
(3.4)

with several sets of coefficients \(\omega^{q,\alpha}_{k}\), \(q=1,2,3,4,5\), (see [37]). Let \(\omega^{\alpha}_{k}=\omega^{1,\alpha}_{k}\). Then

$$ \omega^{\alpha}_{k}=(-1)^{k}\binom{\alpha}{k}=\frac{\Gamma{(k-\alpha)}}{\Gamma {(-\alpha)}\Gamma{(k+1)}}, \quad k=0,1,2,\ldots $$
(3.5)

in which case the scheme is the one given by Gorenflo et al. [38]. On imposing \(0<\alpha<1\), (3.4) simply reduces to

$$ {^{C}_{0}}D^{\alpha}_{t}f(x,t_{n})= \frac{1}{\tau^{\alpha}}\sum_{k=0}^{n}\omega ^{q,\alpha}_{k}f(x,t_{n-k}) -\frac{1}{\tau^{\alpha}}\sum _{k=0}^{n}\omega^{q,\alpha}_{k}f(x,0)+{R_{q}( \tau)}, $$
(3.6)

with the truncated error \(R_{q}(\tau)\) satisfying \(R_{q}(\tau)=O(\tau ^{q})\), \(q=1,2,3,4,5\).

Lemma 3.1

The coefficients \(\omega^{\alpha}_{k}\) defined in (3.5) fulfill

  1. (a)

    \(\omega^{\alpha}_{0}=1\), \(\omega^{\alpha}_{k}< 0\), \(\forall k\geq1\),

  2. (b)

    \(\sum_{k=0}^{\infty}\omega^{\alpha}_{k}=0\), \(\sum_{k=0}^{n-1}\omega^{\alpha}_{k}>0\).

Proof

See references [15, 39] for details. □

3.2 A fully discrete exponential B-spline based scheme

Define \(V_{M+3}=\textrm{span}\{B_{-1}(x),B_{0}(x),\ldots ,B_{M}(x),B_{M+1}(x)\}\) over the interval \([a,b]\) referred to as an \((M+3)\)-dimensional exponential spline space. Then an approximate solution to Eqs. (1.1)-(1.3) is sought on \(V_{M+3}\) in the form

$$ u_{N}(x,t)=\sum_{j=-1}^{M+1} \alpha_{j}(t)B_{j}(x), $$
(3.7)

with the unknown weights \(\{\alpha_{j}(t)\}_{j=-1}^{M+1}\) yet to be determined by some certain restrictions. Discretizing Eq. (1.1) by using (3.6) in time, we have

$$\begin{gathered} \omega^{q,\alpha}_{0}u(x,t_{n})-\tau^{\alpha}\kappa\frac{\partial^{2} u(x,t_{n})}{\partial x^{2}}\\\quad= -\sum_{k=1}^{n-1} \omega^{q,\alpha}_{k}u(x,t_{n-k})+\sum _{k=0}^{n-1}\omega ^{q,\alpha}_{k}u(x,0)+ \tau^{\alpha}f(x,t_{n})+{\tau^{\alpha}R_{q}( \tau)}.\end{gathered} $$

Let \(\alpha^{n}_{j}=\alpha_{j}(t_{n})\). On replacing \(u(x,t)\) by \(u_{N}(x,t)\) and imposing the following collocation and boundary conditions

$$\begin{gathered} \omega^{q,\alpha}_{0}u_{N}(x_{j},t_{n})- \tau^{\alpha}\kappa\frac{\partial^{2} u_{N}(x_{j},t_{n})}{\partial x^{2}} \\\quad= -\sum_{k=1}^{n-1} \omega^{q,\alpha}_{k}u_{N}(x_{j},t_{n-k})+ \sum_{k=0}^{n-1}\omega^{q,\alpha}_{k}u_{N}(x_{j},0)+ \tau^{\alpha}f(x_{j},t_{n}), \\ u_{N}(x_{0},t_{n})=g_{1}(t_{n}), \qquad u_{N}(x_{M},t_{n})=g_{2}(t_{n}),\end{gathered} $$

at each nodal point \(x_{j}\), \(j=0,1,\ldots,M\), we obtain

$$ A\alpha^{n}_{j-1}+A' \alpha^{n}_{j}+A\alpha^{n}_{j+1} =-\sum _{k=1}^{n-1}\omega^{q,\alpha}_{k}P^{n-k}_{j}+ \sum_{k=0}^{n-1}\omega ^{q,\alpha}_{k}P_{j}^{0}+R^{n}_{j}, $$
(3.8)

and the boundary sets

$$\begin{aligned}& \frac{s-ph}{2(phc-s)}\alpha^{n}_{-1}+\alpha^{n}_{0}+ \frac {s-ph}{2(phc-s)}\alpha^{n}_{1}=g_{1}^{n}, \end{aligned}$$
(3.9)
$$\begin{aligned}& \frac{s-ph}{2(phc-s)}\alpha^{n}_{M-1}+\alpha^{n}_{M}+ \frac {s-ph}{2(phc-s)}\alpha^{n}_{M+1}=g_{2}^{n}, \end{aligned}$$
(3.10)

owing to (3.7) and (2.1)-(2.3) with

$$\begin{gathered} A=-\tau^{\alpha}\kappa p^{2}s+\omega^{q,\alpha}_{0}(s-ph), \qquad A'=2\tau ^{\alpha}\kappa p^{2}s+2 \omega^{q,\alpha}_{0}(phc-s), \\ P^{m}_{j}=(s-ph)\alpha^{m}_{j-1}+2(phc-s) \alpha^{m}_{j}+(s-ph)\alpha ^{m}_{j+1}, \qquad R^{n}_{j}=2\tau^{\alpha}(phc-s)f_{j}^{n}, \end{gathered}$$

where \(m=0,1,\ldots,n-1\). As a result, using Eqs. (3.9)-(3.10) to remove the unknown variables \(\alpha^{n}_{-1}\), \(\alpha^{n}_{M+1}\) in Eq. (3.8) when \(j=0\), M, the above system admits a linear system of algebraic equations of size \((M+1)\times (M+1)\) as follows:

$$ \textbf{A}\boldsymbol{\alpha}^{n}=-\sum _{k=1}^{n-1}\omega^{q,\alpha }_{k} \textbf{B}\boldsymbol{\alpha}^{n-k} +\sum_{k=0}^{n-1} \omega^{q,\alpha}_{k}\textbf{B}\boldsymbol{\alpha }^{0}+ \textbf{F}^{n}, \quad{q=1,2,3,4,5,} $$
(3.11)

where

$$\begin{gathered} \textbf{A}=\left ( \textstyle\begin{array}{c@{\quad}c@{\quad}c@{\quad}c@{\quad}c} 2\tau^{\alpha}\kappa p^{3}hs(c-1) & 0 & & & \\ A & A' & A & & \\ & \ldots& \ldots& \ldots& \\ & & \ldots& \ldots& \ldots\\ & & A & A' & A \\ & & & 0 & 2\tau^{\alpha}\kappa p^{3}hs(c-1) \ \end{array}\displaystyle \right ), \\\textbf{B}=\left ( \textstyle\begin{array}{c@{\quad}c@{\quad}c@{\quad}c@{\quad}c} 0 & 0 & & & \\ s-ph & 2(phc-s) & s-ph & & \\ & \ldots& \ldots& \ldots& \\ & & \ldots& \ldots& \ldots\\ & & s-ph & 2(phc-s) & s-ph \\ & & & 0 & 0 \end{array}\displaystyle \right ), \\\boldsymbol{\alpha}^{m}=\left ( \textstyle\begin{array}{c} \alpha^{m}_{0} \\ \alpha^{m}_{1} \\ \vdots\\ \alpha^{m}_{M-1} \\ \alpha^{m}_{M} \end{array}\displaystyle \right ), \qquad\textbf{F}^{n}=(phc-s)\left ( \textstyle\begin{array}{c} 2\tau^{\alpha}(s-ph)f^{n}_{0}+d^{n}_{0} \\ 2\tau^{\alpha}f^{n}_{1} \\ \vdots\\ 2\tau^{\alpha}f^{n}_{M-1} \\ 2\tau^{\alpha}(s-ph)f^{n}_{M}+d^{n}_{M} \end{array}\displaystyle \right ), \end{gathered}$$

in which \(m=0,1,\ldots,n\) and \(d^{n}_{0}\), \(d^{n}_{M}\) are as follows:

$$\begin{gathered} d^{n}_{0}=-2(s-ph)\sum_{k=0}^{n-1} \omega^{q,\alpha}_{k}g_{1}^{n-k}+2(s-ph)\sum _{k=0}^{n-1}\omega^{q,\alpha}_{k} \varphi_{0}+2\tau^{\alpha}\kappa p^{2}sg^{n}_{1}, \\ d^{n}_{M}=-2(s-ph)\sum_{k=0}^{n-1} \omega^{q,\alpha}_{k}g_{2}^{n-k}+2(s-ph)\sum _{k=0}^{n-1}\omega^{q,\alpha}_{k} \varphi_{M}+2\tau^{\alpha}\kappa p^{2}sg^{n}_{2}. \end{gathered}$$

The unknown weights \(\boldsymbol{\alpha}^{n}\) depend on \(\boldsymbol {\alpha}^{n-k}\), \(k=0,1,\ldots,n\), at their previous time levels and are found via a recursive style; once \(\boldsymbol{\alpha}^{n}\) is obtained, \(\alpha ^{n}_{-1}\), \(\alpha^{n}_{M+1}\) can further be determined with the help of Eqs. (3.9)-(3.10). On the other hand, A is an \((M+1)\times(M+1)\) tri-diagonal matrix, therefore the system can be performed by the well-known Thomas algorithm, which simply needs the arithmetic operation cost \(O(M+1)\).

4 Initial state

In order to start Eq. (3.11), an appropriate initial vector \(\boldsymbol{\alpha}^{0}\) to the system is required. To this end, we employ the initial conditions

$$ u_{N}(x_{j},0)=\varphi(x_{j}), \quad j=0,1, \ldots,M, $$

together with the collocation constraints

$$ u'_{N}(x_{0},0)=\varphi'(x_{0}), \qquad u'_{N}(x_{M},0)=\varphi'(x_{M}), $$

got via Eq. (1.2) explicitly to determine a unique initial vector \(\boldsymbol{\alpha}^{0}\) by

$$ \textbf{K}\boldsymbol{\alpha}^{0}=\textbf{U} $$
(4.1)

with the notations

$$\begin{gathered} \textbf{K}=\left ( \textstyle\begin{array}{c@{\quad}c@{\quad}c@{\quad}c@{\quad}c} phc-s & s-ph & & & \\ s-ph & 2(phc-s) & s-ph & & \\ & \ldots& \ldots& \ldots& \\ & & \ldots& \ldots& \ldots\\ & & s-ph & 2(phc-s) & s-ph \\ & & & s-ph & phc-s \end{array}\displaystyle \right ), \\\boldsymbol{\alpha}^{0}=\left ( \textstyle\begin{array}{c} \alpha^{0}_{0} \\ \alpha^{0}_{1} \\ \vdots\\ \alpha^{0}_{M-1} \\ \alpha^{0}_{M} \end{array}\displaystyle \right ), \qquad \textbf{U}=(phc-s)\left ( \textstyle\begin{array}{c} \varphi_{0}-\frac{(s-ph)\varphi'(x_{0})}{p(1-c)} \\ 2\varphi_{1} \\ \vdots\\ 2\varphi_{M-1} \\ \varphi_{M}+\frac{(s-ph)\varphi'(x_{M})}{p(1-c)} \end{array}\displaystyle \right ). \end{gathered}$$

In the same fashion, K is an \((M+1)\times(M+1)\) tri-diagonal matrix, so the solution of Eq. (4.1) can also be computed by the Thomas algorithm.

5 Stability and solvability

In this section, we prove that Eqs. (3.11)-(4.1) with the discrete coefficients \(\omega_{k}^{\alpha}\) are uniquely solvable and unconditionally stable. If \(\tilde{\alpha }^{n}_{j}\), \(n\geq1\), is a perturbed solution of Eq. (3.8), we shall study how the perturbation \(\rho^{n}_{j}=\alpha^{n}_{j}-\tilde{\alpha }^{n}_{j}\), which solves

$$ A\rho^{n}_{j-1}+A' \rho^{n}_{j}+A\rho^{n}_{j+1} =-\sum _{k=1}^{n-1}\omega^{\alpha}_{k}Z^{n-k}_{j}+ \sum_{k=0}^{n-1}\omega ^{\alpha}_{k}Z_{j}^{0}, $$
(5.1)

evolves over time, where \(Z^{0}_{j}\), \(Z^{n-k}_{j}\) are the quantities like \(P^{0}_{j}\), \(P^{n-k}_{j}\) with regard to the perturbation. Since the classic Fourier method does not work for Eq. (5.1), a fractional von Neumann procedure is employed to analyze its stability.

Lemma 5.1

System (3.11)-(4.1) is uniquely solvable since its coefficient matrices A, K are strictly diagonally dominant.

Proof

Using \(p>0\) and the following Taylor’s expansions

$$\begin{aligned}& s-ph=\frac{(ph)^{3}}{3!}+\frac{(ph)^{5}}{5!}+\cdots+\frac {(ph)^{2k+1}}{(2k+1)!}+ \cdots, \end{aligned}$$
(5.2)
$$\begin{aligned}& phc-ph=\frac{(ph)^{3}}{2!}+\frac{(ph)^{5}}{4!}+\cdots+\frac {(ph)^{2k+1}}{(2k)!}+ \cdots, \end{aligned}$$
(5.3)

it is easy to check \(s-ph>0\) and another similar inequality \(phc-s>0\) by subtracting (5.2) from (5.3). In virtue of A, \(A'\), one gets

$$\begin{aligned} \big|A' \big|-2 |A |&=2\tau^{\alpha}\kappa p^{2}s+2 \omega^{\alpha}_{0}(phc-s)-2 \bigl|-\tau^{\alpha}\kappa p^{2}s+\omega^{\alpha}_{0}(s-ph) \bigr| \\ &\geq2\omega^{\alpha}_{0}(phc-s)-2\omega^{\alpha}_{0}(s-ph) \\ &=2\omega^{\alpha}_{0} \bigl((phc-s)-(s-ph) \bigr) \end{aligned}$$

since \(2 |{-}\tau^{\alpha}\kappa p^{2}s+\omega^{\alpha}_{0}(s-ph) |\leq2\tau ^{\alpha}\kappa p^{2}s+2\omega^{\alpha}_{0}(s-ph)\). Then the lemma is ascribed to \(s-ph< phc-s\). Using (5.2)-(5.3) again results in

$$\begin{aligned} (phc-ph)-2(s-ph)={}&(ph)^{3} \biggl(\frac{1}{2!}- \frac{2}{3!} \biggr)+(ph)^{5} \biggl(\frac{1}{4!}- \frac{2}{5!} \biggr) \\ & +\cdots+(ph)^{2k+1} \biggl(\frac{1}{(2k)!}-\frac{2}{(2k+1)!} \biggr)+\cdots. \end{aligned}$$

Due to \((2k)!\times2<(2k)!\times(2k+1)\), \(k\geq1\), there exist

$$ (phc-s)-(s-ph)=(phc-ph)-2(s-ph)>0, $$

and \(|A' |-2 |A |>0\), which implies A is strictly diagonally dominant, so is K. Hence, Eqs. (3.11)-(4.1) are uniquely solvable. The proof is completed. □

The stability analysis is proceeded as follows.

Theorem 5.1

System (3.11)-(4.1) is unconditionally stable.

Proof

As the usual way, we investigate a single generic mode \(\rho^{k}_{j}=\zeta ^{k}_{\upsilon}\exp(\textrm{i}\upsilon jh)\) with \(\textrm{i}=\sqrt{-1}\) and the wave number υ. Inserting it into Eq. (5.1) yields

$$ 2A\zeta^{n}_{\upsilon}\cos(\upsilon h)+A' \zeta^{n}_{\upsilon}=-\sum_{k=1}^{n-1} \omega^{\alpha}_{k}S^{n-k}_{\upsilon}+ \sum _{k=0}^{n-1}\omega^{\alpha}_{k}S^{0}_{\upsilon}, $$

where

$$\begin{gathered} S^{0}_{\upsilon}=2(s-ph)\cos(\upsilon h)\zeta^{0}_{\upsilon}+2(phc-s) \zeta ^{0}_{\upsilon}, \\ S^{n-k}_{\upsilon}=2(s-ph)\cos(\upsilon h)\zeta^{n-k}_{\upsilon}+2(phc-s)\zeta^{n-k}_{\upsilon}, \end{gathered}$$

by the aid of Euler’s formula \(\exp(\pm\textrm{i}\upsilon h)=\cos (\upsilon h)\pm\textrm{i}\sin(\upsilon h)\). Noticing that

$$ 2A\cos(\upsilon h)+A'=2\tau^{\alpha}\kappa p^{2}s \bigl(1-\cos(\upsilon h) \bigr) +2\omega^{\alpha}_{0}(s-ph)\cos( \upsilon h)+2\omega^{\alpha}_{0}(phc-s), $$

and the inequalities

$$ s-ph>0, \quad phc-s>0, \quad s-ph< phc-s, $$

we obtain

$$ \zeta^{n}_{\upsilon}=-\sum _{k=1}^{n-1}\omega^{\alpha}_{k}G \zeta^{n-k}_{\upsilon}+\sum_{k=0}^{n-1} \omega^{\alpha}_{k}G\zeta^{0}_{\upsilon}$$
(5.4)

with a non-negative fixed quantity

$$ G=\frac{\omega^{\alpha}_{0}(s-ph)\cos(\upsilon h)+\omega^{\alpha}_{0}(phc-s)}{\tau^{\alpha}\kappa p^{2}s(1-\cos(\upsilon h)) +\omega^{\alpha}_{0}(s-ph)\cos(\upsilon h)+\omega^{\alpha}_{0}(phc-s)} $$

not more than 1. To show \(|\zeta^{n}_{\upsilon}|\leq|\zeta^{0}_{\upsilon}|\), we use mathematical induction. As \(n=1\), by Eq. (5.4), we trivially have \(|\zeta^{1}_{\upsilon}|\leq|\zeta^{0}_{\upsilon}|\) since \(\omega^{\alpha}_{0}G\leq 1\). Assuming that

$$ \big|\zeta^{m}_{\upsilon}\big|\leq\big|\zeta^{0}_{\upsilon}\big|, \quad m=1,2,\ldots,n-1, $$
(5.5)

it follows from Lemma 3.1 that

$$\begin{aligned} \big|\zeta^{n}_{\upsilon}\big|&\leq\Bigg|-\sum_{k=1}^{n-1} \omega^{\alpha}_{k}G\zeta ^{n-k}_{\upsilon}+\sum _{k=0}^{n-1}\omega^{\alpha}_{k}G \zeta^{0}_{\upsilon}\Bigg| \leq \Biggl(1-\sum_{k=0}^{n-1} \omega^{\alpha}_{k}+\sum_{k=0}^{n-1} \omega ^{\alpha}_{k} \Biggr) G\max_{0\leq m\leq n-1}\big| \zeta^{m}_{\upsilon}\big| \\ &=G\max_{0\leq m\leq n-1}\big|\zeta^{m}_{\upsilon}\big|, \end{aligned}$$

which implies \(|\zeta^{n}_{\upsilon}|\leq|\zeta^{0}_{\upsilon}|\) due to \(G\leq 1\) and the assumptions (5.5). Hence, we realize that the perturbation remains bounded by its initial perturbation unconditionally at any time level. This proves what we require. □

6 Numerical experiments

In this part, we present a couple of numerical examples so as to gauge the practical performance of our proposed exponential B-spline collocation method. In the tests, we choose \(q=1\) except the fifth example. The computing errors are measured by

$$\begin{gathered} e_{2}(\tau,h)=\big\| u(x,t_{n})-u_{N}(x,t_{n})\big\| _{L^{2}}= \sqrt{h\sum^{M-1}_{j=1} \big|u(x_{j},t_{n})-u_{N}(x_{j},t_{n}) \big|^{2}}, \\ e_{\infty}(\tau,h)=\big\| u(x,t_{n})-u_{N}(x,t_{n})\big\| _{L^{\infty}}= \max_{1\leq j\leq M-1} \big|u(x_{j},t_{n})-u_{N}(x_{j},t_{n}) \big|, \end{gathered}$$

and letting \(\nu=2,\infty\), the convergent rates (Cov. rate) are computed by

$$ {\textrm{{Cov. rate}}=\left \{ \textstyle\begin{array}{l@{\quad}l} \frac{\log_{10}(e_{\nu}(\tau_{1},h)/e_{\nu}(\tau_{2},h))}{\log_{10}(\tau_{1}/\tau _{2})} & {\textrm{in time}},\\ \frac{\log_{10}(e_{\nu}(\tau,h_{1})/e_{\nu}(\tau,h_{2}))}{\log _{10}(h_{1}/h_{2})}&{\textrm{in space}}. \end{array}\displaystyle \right .} $$

For each problem, the free parameter p should be properly assigned because it has influence on the accuracy of exponential spline interpolation; due to the difficulty in theoretically evaluating its optimal value, numerically determining p is preferred in practice. The resulting algebraic equations are handled by the Thomas algorithm, and the numerical results may be compared with those obtained by other algorithms.

Example 6.1

Let \(a=0\), \(b=1\), and the initial boundary conditions \(\varphi(x)=0\), \(g_{1}(t)=0\), and \(g_{2}(t)=0\). The forcing term is given as

$$ f(x,t)=\frac{\Gamma(1+\mu)}{\Gamma(\mu+1-\alpha)}t^{\mu-\alpha }x^{3}(1-x)-6\kappa t^{\mu}x(1-2x) $$

to enforce the exact solution \(u(x,t)=t^{\mu}x^{3}(1-x)\). Taking \(\kappa =1\), \(\alpha=0.9\), \(\mu=2+\alpha\), Figure 1 describes the behavior of the global errors at \(t=1\) versus the variation of p with \(M=20\) and \(N=5\mbox{,}000\). As the figure shows, the optimal p for this problem is roughly located on \([5.1,5.9]\). Retaking \(p=5.16\), Table 1 reports the numerical results at \(t=1\) versus the variation of M with \(N=5\mbox{,}000\). It is obvious that our method is considerably robust and convergentwith second-order in space as the grid is refined.

Figure 1
figure 1

The global errors at \(\pmb{t=1}\) for various p when \(\pmb{\alpha=0.9}\) , \(\pmb{M=20}\) , and \(\pmb{N=5\mbox{,}000}\) .

Table 1 The numerical results at \(\pmb{t=1}\) with \(\pmb{\alpha=0.9}\) , \(\pmb{p=5.16}\) , and \(\pmb{N=5\mbox{,}000}\) for Example 6.1

Example 6.2

Recalling the Mittag-Leffler function

$$ E_{\alpha}(z)=\sum_{k=0}^{\infty} \frac{z^{k}}{\Gamma(\alpha k+1)}, \quad 0< \alpha< 1, $$

endowed with \({^{C}_{0}}D^{\alpha}_{t}E_{\alpha}(-\lambda t^{\alpha})=-\lambda E_{\alpha}(-\lambda t^{\alpha})\) [16], we consider Eqs. (1.1)-(1.3) on the domain \([0,1]\) with

$$ u(x,0)=\sin(\pi x/2), \qquad g_{1}(t)=0, \qquad g_{2}(t)=E_{\alpha}\bigl(- t^{\alpha}\bigr) $$

and the homogeneous forcing term. It is easy to verify that its exact solution takes the form \(u(x,t)=E_{\alpha}(- t^{\alpha})\sin(\pi x/2)\) when \(\kappa=4/\pi^{2}\). Letting \(\alpha=0.3\) and \(p=1.52\), the numerical results at \(t=1\) in time with \(M=300\) are displayed in Table 2, while the corresponding results in space with \(N=5\mbox{,}000\) are tabulated in Table 3, where our method yields the convergent approximationswith the desirable accuracy.

Table 2 The numerical results at \(\pmb{t=1}\) in time with \(\pmb{p=1.52}\) and \(\pmb{M=300}\) for Example 6.2
Table 3 The numerical results at \(\pmb{t=1}\) in space with \(\pmb{p=1.52}\) and \(\pmb{N=5\mbox{,}000}\) for Example 6.2

Example 6.3

In this test, we consider a special case of \(\alpha=0.5\). Let \(a=0\), \(b=1\), \(\kappa=1\), \(\varphi(x)=\cos(6\pi x)\), \(g_{1}(t)=\textrm{erfcx}(36\pi^{2}\sqrt{t})\), \(g_{2}(t)=g_{1}(t)\), \(f(x,t)=0\), and the true solution (see [40])

$$ u(x,t)=\cos(6\pi x)\textrm{erfcx} \bigl(36\pi^{2}\sqrt{t} \bigr), $$

where \(\operatorname{erfcx}(\cdot)\) is the scaled complementary error function given by

$$ \operatorname{erfcx}(z)=\frac{2}{\sqrt{\pi}}\exp \bigl(z^{2} \bigr) \int_{z}^{\infty}\exp { \bigl(-\eta^{2} \bigr)}\,d \eta. $$

The computation is run with \(p=0.01\). Figure 2 describes the numerical solutions at different time compared to the exact solutions when \(M=100\), \(N=500\). As the graph shows, the exact and numerical solutions are in good agreement. Table 4 reports the global errors at \(t=1\), \(t=2\), and \(t=3\) with various M, N. It is visible that the collocation scheme (3.11)-(4.1) well solve the test problem as we expected.

Figure 2
figure 2

The exact and numerical solutions at \(\pmb{t=1}\) , 3, and 6 when \(\pmb{M=100}\) and \(\pmb{N=500}\) .

Table 4 The global errors at different time with \(\pmb{p=0.01}\) and various M , N for Example 6.3

Example 6.4

Let \(\kappa=2\), \(\varphi(x)=0\), \(g_{1}(t)=0\), \(g_{2}(t)=g_{1}(t)\), and

$$ f(x,t)=\frac{2t^{2-\alpha}x(1-x)\exp(x)}{\Gamma(3-\alpha )}+2t^{2}x(x+3)\exp(x); $$

we consider Eqs. (1.1)-(1.3) on the domain \([0,1]\) solved by Eqs. (3.11)-(4.1) and the cubic B-spline collocation method (CBSCM) [31]. The exact solution of the model is \(u(x,t)=t^{2}x(1-x)\exp(x)\). In Figure 3, we display their absolute error distributions at \(t=1\) when \(\alpha=0.6\), \(M=50\), \(N=2\mbox{,}500\) by taking \(p=1.45\), 2.35, 2.53, and 3.35, respectively. In line with the graphs, we then choose \(p=2.53\) and show a comparison of their absolute errors at some nodal points detailedly in Table 5, where the accuracy of our method is found to be overall better than CBSCM. In Figure 4, we plot the global errors versus the variation of mesh size \(1/M\) in log-log scale, with \(\alpha=0.6\), \(p=2.53\), and \(N=11\mbox{,}000\), which demonstrates that the convergent rates of the presented method and CBSCM are all basically of order 2.

Figure 3
figure 3

The absolute error distributions for \(\pmb{{p=1.45}}\) , 2.35, 2.53, and 3.35 when \(\pmb{M=50}\) and \(\pmb{{N=2\mbox{,}500}}\) .

Figure 4
figure 4

The convergent rates of the methods with \(\pmb{\alpha =0.6}\) , \(\pmb{p=2.53}\) , and \(\pmb{N=11\mbox{,}000}\) .

Table 5 The comparison of absolute errors between CBSCM and our method when \(\pmb{p=2.53}\)

Example 6.5

In this test, we consider Eqs. (1.1)-(1.3) with \(\kappa =1\) and the initial-boundary conditions \(\varphi(x)=x^{3}\), \(g_{1}(t)=0\), and \(g_{2}(t)=1+t^{5}\) on the domain \([0,1]\). The forcing function is manufactured as

$$ f(x,t)=\frac{120}{\Gamma(6-\alpha)}t^{5-\alpha}x^{3}-6\kappa \bigl(1+t^{5} \bigr)x $$

to enforce the exact solution \(u(x,t)=(1+t^{5})x^{3}\). The algorithm is first performed with \(\alpha=0.6\), \(p=2\), \(q=2,3,4\), and \(M=2\mbox{,}000\). The numerical results at \(t=1\) in time are tabulated in Table 6. Then, fixing \(q=3\) and \(N=1\mbox{,}000\), the corresponding results in space are detailedly reported in Table 7. As seen from these tables, our method can achieve the predicted convergent rates both intime and space.

Table 6 The numerical results at \(\pmb{t=1}\) in time with \(\pmb{p=2}\) and \(\pmb{M=2\mbox{,}000}\) for Example 6.5
Table 7 The numerical results at \(\pmb{t=1}\) in space with \(\pmb{p=2}\) , \(\pmb{q=3}\) , and \(\pmb{N=1\mbox{,}000}\) for Example 6.5

Example 6.6

In the last test, we consider the fractional heat transfer problem on the domain \([0,1]\) with \(\kappa=1\), \(\varphi(x)=0\), \(g_{1}(t)=0\), and \(g_{2}(t)=H(t-0.2)-H(t-0.6)\), where \(H(\cdot)\) denotes the Heaviside step function. As in [41], the heat flux at the boundary point \(x=0\) approximated by the forward difference is of particular interest, and the computed results are compared with the ones obtained by the implicit finite difference method in the literature. Taking \(p=1\), \(M=500\), \(N=125\), Figure 5 exhibits the heat flux at \(x=0\) changing over the time for \(\alpha=0.1\), 0.5, and 0.9. It is obvious that the results of these two methods are highly consistent, which reveals that our method precisely captures the heat flux.

Figure 5
figure 5

The heat flux at \(\pmb{x=0}\) for various α with \(\pmb{M=500}\) and \(\pmb{N=125}\) .

7 Conclusion

In this research, an effective exponential B-spline collocation method is proposed to simulate the diffusion equation with a time-fractional derivative in the Caputo sense. The resultant algebraic system is tri-diagonal and it can rapidly be solved by the Thomas algorithm with low computing cost and storage. The unique solvability and unconditional stability of the fully discrete scheme with the temporal first-order accuracy are rigorously discussed. The codes are studied on several numerical examples, and the reported results validate that this method is capable of dealing with these equations. The comparisons with CBSCM and the implicit difference scheme manifest its practicability and advantages. In addition, the method is easy and economical to implement, so it can serve as a good alternative to model other complex fractional problems.