Skip to main content

Theory and Modern Applications

A collocation method based on cubic trigonometric B-splines for the numerical simulation of the time-fractional diffusion equation

Abstract

Fractional differential equations sufficiently depict the nature in view of the symmetry properties, which portray physical and biological models. In this paper, we present a proficient collocation method based on cubic trigonometric B-Splines (CuTBSs) for time-fractional diffusion equations (TFDEs). The methodology involves discretization of the Caputo time-fractional derivatives using the typical finite difference scheme with space derivatives approximated using CuTBSs. A stability analysis is performed to establish that the errors do not magnify. A convergence analysis is also performed The numerical solution is obtained as a piecewise sufficiently smooth continuous curve, so that the solution can be approximated at any point in the given domain. Numerical tests are efficiently performed to ensure the correctness and viability of the scheme, and the results contrast with those of some current numerical procedures. The comparison uncovers that the proposed scheme is very precise and successful.

1 Introduction

The time-fractional diffusion equation (TFDE) is given as

$$ {}^{C}_{a}{D}_{t}^{\gamma }u(s,t)- \frac{\partial ^{2}}{\partial s^{2}}u(s,t)=f(s,t), \quad 0< \gamma < 1, $$
(1)

subject to the following initial condition (IC) and boundary conditions (BCs):

$$\begin{aligned}& u(s,0)=\varphi (s),\quad a\leq s \leq b, \end{aligned}$$
(2)
$$\begin{aligned}& u(a,t)=\psi _{1}(t), \qquad u(b,t)=\psi _{2}(t),\quad t \geq 0, \end{aligned}$$
(3)

where the diffusion exponent is denoted by γ, and \({}^{C}_{a}{D}_{t}^{\gamma }u(s,t)\) is the Caputo fractional derivative (CFD) of order γ given by [1]

$$ {}^{C}_{a}{D}_{s}^{\gamma } f(s)=J^{n-\gamma } D^{n} f(s)= \textstyle\begin{cases} \frac{1}{\Gamma (n-\gamma )} \int _{a}^{s} \frac{f^{(n)}(\xi )}{(s-\xi )^{\gamma +1-n}}\,d\xi , & n-1< \gamma < n \in \mathbb{N}, \\ \frac{d^{n}}{ds^{n}}f(s), & \gamma =n \in \mathbb{N}. \end{cases} $$
(4)

Note that \(\gamma =0\) and \(\gamma =1\) correspond to the classical Helmholtz and standard diffusion equations, respectively.

The fractional calculus [13] has gained keenness in numerous fields such as chemistry, plasma physics, material science, biology, fluid mechanics, and so on. The fractional-order differential and integral equations are reliable tools to describe physical models of interest more exactly than their integer-order counterparts. A variety of applications of fractional calculus and TFDEs can be found in [310]. The numerical and approximate solutions play an important role in exploring applications of fractional partial differential equations. It is emphasized in many research papers that the fractional derivatives and integrals are more efficient tools for modeling the hereditary and memory effects of different processes and materials, in contrast with integer-order models, in which such effects are ignored.

Numerous analytical schemes are available for TFDEs [1, 1113]. Numerical techniques are developed continuously because exact solutions are available in very few cases. Numerous numerical procedures for solving TFDEs have been developed recently. Esmaeili and Garrappa [14] obtained numerical solutions of TFDEs by a pseudospectral scheme. Mustapha et al. [15] presented a discontinuous Petrov–Galerkin method for TFDEs. Zhuang and Liu [16] obtained implicit difference approximations for TFDEs. Karatay et al. [17] used the Crank–Nicholson approach to construct a scheme for TFDEs. A weighted average and explicit finite difference schemes were developed in [18, 19] for TFDEs. Murio [20] presented an unconditionally stable implicit scheme for TFDEs on a finite slab. Tasbozan et al. [21] introduced a numerical scheme using B-spline basis functions for space fractional subdiffusion equations. Huang et al. [22] presented a fully discrete discontinuous Galerkin method for TFDEs. Chen et al. [23] used the Fourier method to find approximate solutions of the fractional diffusion equation describing subdiffusion. Gao and Sun [24] presented a compact finite difference scheme for fractional subdiffusion equations using a compact finite difference scheme.

In this paper, we present a cubic trigonometric B-spline collocation method to obtain numerical solutions of TFDEs. The main motivation behind using B-splines is that the solutions are obtained in the form of piecewise continuous sufficiently smooth functions, enabling us to approximate the solution at any desired location in the domain. The stability and convergence analysis are also discussed to establish that the scheme does not propagate errors. Numerical tests are performed to affirm the feasibility and applicability of the method. The results are compared with those presented in [22, 23].

The rest of the paper is organized as follows. In Sect. 2, we derive a numerical procedure. The stability and convergence analysis of the scheme are presented in Sects. 3 and 4, respectively. In Sect. 5, we show a contrast of our numerical results with those of [22, 23]. Section 6 contains the outcomes of this study.

2 Materials and methods

2.1 Space discretization

Let the solution domain be \([a,b]\times [0,T]\). For given positive integers M and N, let \(\tau =\frac{T}{N}\) be the temporal and \(h=\frac{b-a}{M}\) the spatial step sizes, respectively. The space interval \([a,b]\) is uniformly partitioned as \(a=s_{0}< s_{1}<\cdots <s_{M}=b\), where \(s_{i}=a+i h\), \(i=0,\dots ,M\). In this partition, the CuTBS function \(TB^{4}_{i} (x)\) [25] is defined as

$$ TB^{4}_{i} (s)=\frac{1}{\beta } \textstyle\begin{cases} \sigma ^{3}(s_{i}), \\ \quad s\in [s_{i},s_{i+1}], \\ \sigma (s_{i})(\sigma (s_{i})\varphi (s_{i+2})+\varphi (s_{i+3}) \sigma (s_{i+1}))+\varphi (s_{i+4})\sigma ^{2}(s_{i+1}), \\ \quad s \in [s_{i+1},s_{i+2}], \\ \varphi (s_{i+4})(\sigma (s_{i+1})\varphi (s_{i+3})+\varphi (s_{i+4}) \sigma (s_{i+2}))+\sigma (s_{i})\varphi ^{2}(s_{i+3}), \\ \quad s \in [s_{i+2},s_{i+3}], \\ \varphi ^{3}(s_{i+4}), \\ \quad s \in [s_{i+3},s_{i+4}], \end{cases} $$
(5)

where

$$\sigma (s_{i} )=\sin \biggl( \frac{s-s_{i}}{2} \biggr), \qquad \varphi (s_{i} )=\sin \biggl( \frac{s_{i}-s}{2} \biggr),\qquad \beta =\sin \biggl(\frac{h}{2} \biggr) \sin (h ) \sin \biggl( \frac{3 h}{2} \biggr). $$

The support of the B-spline function \(TB^{4}_{i} (s)\) is assumed to be \([s_{i},s_{i+4}]\). Note that each \(TB^{4}_{i}\) is piecewise cubic and nonzero over four consecutive subintervals and vanishes otherwise. Consequently, each subinterval \([s_{i},s_{i+1}]\) contains three segments of \(TB^{4}_{i} (s)\). Suppose that \(u(s,t)\) and \(U(s,t)\) are the analytic and numerical solutions of the given differential equation. We seek the approximation \(U(s,t)\) to the solution \(u(s,t)\) in terms of \(TB^{4}_{i}\) as [26, 27]

$$ u(s,t)\simeq U(s,t)=\sum_{i=-1}^{M+1} c_{i}(t) TB^{4}_{i} (s), $$
(6)

where \(c_{i}(t)\) are unknowns, which are to be determined using the collocation method by utilizing the initial and boundary conditions. Using (5) and (6), the values of \(U(x,t)\) and its necessary derivatives at the nodal points are determined in terms of the parameters \(c_{i}\) as follows:

$$ \textstyle\begin{cases} { U(s_{i},t)=\varrho _{1} c_{i-1}(t)+\varrho _{2} c_{i}(t)+ \varrho _{1} c_{i+1}(t)}, \\ { U_{s}(s_{i},t)=-\varrho _{3} c_{i-1}(t)+\varrho _{3} c_{i+1}(t)}, \\ { U_{ss}(s_{i},t)=\varrho _{4} c_{i-1}(t)+ \varrho _{5} c_{i}(t) +\varrho _{4} c_{i+1}(t),} \end{cases} $$
(7)

where

$$\begin{aligned}& {\varrho _{1}=-\frac{1}{2\sin (h)\sin (\frac{3h}{2})}\bigl( \cos (h)-1 \bigr)},\\& {\varrho _{2}=-\frac{2}{4\sin ^{2}(\frac{h}{2})-3}},\\& {\varrho _{3}=\frac{3}{4\sin (\frac{3h}{2})}},\\& {\varrho _{4}=\frac{3}{4} \biggl( \frac{3\sin ^{2}(\frac{h}{2})-2}{\sin ^{2}(\frac{h}{4})-\sin ^{2}(\frac{5h}{4})} \biggr)},\\& {\varrho _{5}=- \frac{3}{(4 \cos (h)+2)(\tan ^{2}(\frac{h}{2}))}}. \end{aligned}$$

2.2 Temporal discretization

To discretize the problem in time scale, we take the uniform partition on \([0,T]\) as \(0=t_{0}< t_{1}< t_{2}<\cdots <t_{N}=T\) with \(\tau =t_{n+1}-t_{n}\) for \(n=0,1,\ldots , N-1\). Following [28], the CFD \({}^{C}_{a}{D}_{t}^{\gamma }u(s,t)\) is discretized as

$$\begin{aligned} {}^{C}_{a}{D}_{t}^{\gamma }u(s,t_{n+1})&= \sum_{l=0}^{n} \kappa _{l} \frac{u(s,t_{n+1-l})-u(s,t_{n-l})}{\Gamma (2-\gamma )\tau ^{\gamma }}+r_{\tau }^{n+1} \\ &=\frac{1}{\alpha _{0}} \Biggl(u(s,t_{n+1})-\sum _{l=0}^{n-1} ( \kappa _{l}-\kappa _{l+1})u(s,t_{n-l})-\kappa _{n} u(s,t_{0}) \Biggr) +r_{\tau }^{n+1} \\ &= \frac{1}{\alpha _{0}} \Biggl(u^{n+1}-\sum _{l=0}^{n-1} ( \kappa _{l}-\kappa _{l+1})u^{n-l}-\kappa _{n} u^{0} \Biggr)+r_{\tau }^{n+1}, \end{aligned}$$
(8)

where \(u^{n}=u(s,t_{n})\), \(\alpha _{0}=\tau ^{\gamma }\Gamma (2-\gamma )\), \(\kappa _{l}=(l+1)^{1-\gamma }-l^{1-\gamma } \), and \(r_{\tau }^{n+1}\) is the truncation error. Note that

$$ \textstyle\begin{cases} \kappa _{l} >0,\quad l=0,1,2, \ldots , N, \\ 1=\kappa _{0}>\kappa _{1}>\kappa _{2}>\cdots >\kappa _{l} \quad \text{and}\quad \kappa _{l}\rightarrow 0 \quad \text{as } l \rightarrow \infty , \\ \sum_{l=0}^{N-1} (\kappa _{l}-\kappa _{l+1})+\kappa _{N}=1. \end{cases} $$
(9)

It is shown in [29] that \(r_{\tau }^{n+1}\) satisfies

$$ r_{\tau }^{n+1}\leq C_{u} \tau ^{2-\gamma }, $$

where the constant \(C_{u}\) depends on u. Inserting (8) into (1) gives

$$ u^{n+1}-\sum_{l=0}^{n-1} (\kappa _{l}-\kappa _{l+1})u^{n-l}- \kappa _{n} u^{0}-\alpha _{0} \bigl(u^{n+1} \bigr)_{ss}=\alpha _{0}f^{n+1}. $$
(10)

To obtain a full discretization, let \(c_{i}^{n}=c_{i}(t_{n})\) and \(U_{i}^{n}=U(s_{i},t_{n})\) for \(i=0,1,\ldots , M\), \(n=0,1,\ldots , N\). Now substituting (6) and (7) into (10), we get

$$\begin{aligned} &(\varrho _{1}-\alpha _{0} \varrho _{4})c_{i-1}^{n+1} +( \varrho _{2}-\alpha _{0} \varrho _{5})c_{i}^{n+1}+( \varrho _{1}- \alpha _{0} \varrho _{4})c_{i+1}^{n+1} \\ &\quad =\sum_{l=0}^{n-1}(\kappa _{l}-\kappa _{l+1}) \bigl(\varrho _{1} c_{i-1}^{n-l}+ \varrho _{2} c_{i}^{n-l}+\varrho _{1} c_{i+1}^{n-l} \bigr) +\kappa _{n} \bigl( \varrho _{1} c_{i-1}^{0}+\varrho _{2} c_{i}^{0}+\varrho _{1} c_{i+1}^{0} \bigr) \\ &\qquad {}+\alpha _{0} f \bigl(s_{i},t^{n+1} \bigr). \end{aligned}$$
(11)

Framework (11) is a system of \((M+1)\) equations in \((M+3)\) unknowns. Then we use given boundary conditions to obtain two additional equations. Consequently, we obtain a consistent diagonal system, which can be solved using any suitable algorithm based on Gaussian elimination.

2.3 Initial vector

The initial vector \(\mathbf{d}^{0}=[d_{-1}^{0},d_{0}^{0}, \ldots , d_{M+1}^{0}]^{T}\) is required to commence the iterative process, which can be obtained using the IC and the derivatives of IC at the two boundaries as follows [3038]:

  1. 1.

    \((u_{i}^{0})_{s}=\frac{d}{ds}\varphi (s_{i})\), \(i=0\),

  2. 2.

    \(u_{i}^{0}=\varphi (s_{i})\), \(i=0,1,\dots ,M\),

  3. 3.

    \((u_{i}^{0})_{s}=\frac{d}{ds}\varphi (s_{i})\), \(i=M\),

which becomes the matrix equation

$$ Ad^{0}=b, $$
(12)

where

A= [ ϱ 3 0 ϱ 3 0 ϱ 1 ϱ 2 ϱ 1 0 ϱ 1 ϱ 2 ϱ 1 ϱ 1 ϱ 2 ϱ 1 0 ϱ 3 0 ϱ 3 ]
(13)

and \(b=[\varphi '(s_{0}), \varphi (s_{0}), \ldots , \varphi (s_{M}), \varphi '(s_{M})]^{T}\).

3 Stability analysis

Here we test scheme (11) for the stability analysis. The Duhamels principle [39] states that for an inhomogeneous case, the stability estimates are the same as those of the corresponding homogeneous case. So we present the stability analysis only for the case \(f=0\). Let \(\omega _{i}^{n}\) and \(\tilde{\omega }_{i}^{n}\) be the growth factor and its approximation, respectively, of a Fourier mode. Defining \(\Omega _{i}^{n}=\omega _{i}^{n}-\tilde{\omega }_{i}^{n}\), from (11) we get

$$\begin{aligned} &(\varrho _{1}-\alpha _{0} \varrho _{4})\Omega _{i-1}^{n+1}+( \varrho _{2}-\alpha _{0} \varrho _{5})\Omega _{i}^{n+1}+(\varrho _{1}- \alpha _{0} \varrho _{4})\Omega _{i+1}^{n+1} \\ & \quad =\sum_{l=0}^{n-1}(\kappa _{l}-\kappa _{l+1}) \bigl(\varrho _{1} \Omega _{i-1}^{n-l}+\varrho _{2} \Omega _{i}^{n-l}+\varrho _{1} \Omega _{i+1}^{n-l} \bigr) \\ &\qquad {}+\kappa _{n} \bigl(\varrho _{1} \Omega _{i-1}^{0} + \varrho _{2} \Omega _{i}^{0}+\varrho _{1} \Omega _{i+1}^{0} \bigr). \end{aligned}$$
(14)

The initial and boundary conditions are satisfied as

$$ \Omega _{i}^{0}=0, \quad i=1,2,\ldots , M-1, $$
(15)

and

$$ \Omega _{0}^{n}=\psi _{1}(t_{n}),\qquad \Omega _{M}^{n}= \psi _{2}(t_{n}), \quad n=0,1, \ldots , N. $$
(16)

The grid function is defined as

$$ \Omega ^{n}(s)= \textstyle\begin{cases} 0, & 0< s\leq \frac{h}{2} \text{ or } (b-a)-\frac{h}{2}< s\leq (b-a), \\ \Omega _{i}^{n}, & s_{i}-\frac{h}{2} < s \leq s_{i}+\frac{h}{2}, i=1, \ldots ,M-1. \end{cases} $$

The function \(\Omega ^{n}(s)\) has the Fourier expansion

$$ \Omega ^{n}(s)=\sum_{m=-\infty }^{\infty } \eta _{n}(m)e^{ \frac{i 2 \pi m s}{b-a}},\quad n=0,1,\ldots , N, $$

where \(\eta _{n}(m)=\frac{1}{b-a}\int _{a}^{b} \Omega ^{n}(s)e^{ \frac{-i 2 \pi m s}{b-a}}\,ds\). Let \(\Omega ^{n}=[\Omega _{1}^{n},\Omega _{2}^{n},\ldots ,\Omega _{M-1}^{n}]^{T}\) and

$$ \bigl\Vert \Omega ^{n} \bigr\Vert _{2}= \Biggl(\sum _{i=1}^{M-1} h \bigl\vert \Omega _{i}^{n} \bigr\vert ^{2} \Biggr)^{\frac{1}{2}}= \biggl[ \int _{a}^{b} \bigl\vert \Omega ^{n}(s) \bigr\vert ^{2}\,ds \biggr]^{\frac{1}{2}}. $$

Using the Parseval equality, we see that

$$ \int _{a}^{b} \bigl\vert \Omega ^{n}(s) \bigr\vert ^{2}\,ds=\sum _{m=- \infty }^{\infty } \bigl\vert \eta _{n}(m) \bigr\vert ^{2}, $$

so that

$$ \bigl\Vert \Omega ^{n} \bigr\Vert _{2}^{2}=\sum_{m=-\infty }^{\infty } \bigl\vert \eta _{n}(m) \bigr\vert ^{2}. $$
(17)

Suppose that \(\Omega _{i}^{n}=\eta _{n} e^{I \theta i s}\) is the solution to system (14)–(15), where \(I=\sqrt{-1}\) and \(\theta \in [-\pi ,\pi ]\), so that equation (14) reduces to

$$\begin{aligned} &(\varrho _{1}-\alpha _{0} \varrho _{4})\eta _{n+1} e^{I \theta (i-1) s}+(\varrho _{2}-\alpha _{0} \varrho _{5})\eta _{n+1} e^{I \theta (i) s}+ (\varrho _{1}-\alpha _{0} \varrho _{4})\eta _{n+1} e^{I \theta (i+1) s} \\ &\quad =\sum_{l=0}^{n-1}(\kappa _{l}-\kappa _{l+1}) \bigl(\varrho _{1} \eta _{n-l} e^{I \theta (i-1) s}+ \varrho _{2} \eta _{n-l} e^{I \theta (i) s}+\varrho _{1} \eta _{n-l}{} e^{I \theta (i+1) s} \bigr) \\ &\qquad {} + \kappa _{n} \bigl(\varrho _{1} \eta _{0} e^{I \theta (i-1) s}+ \varrho _{2} \eta _{0} e^{I \theta i s}+\varrho _{1} \eta _{0} e^{I \theta (i+1) s} \bigr). \end{aligned}$$
(18)

Dividing (18) by \(e^{I \theta i s}\), using \(e^{-I\theta s}+e^{I\theta s}=2\cos (\theta s)\), and gathering like terms, we get

$$ \biggl(1- \frac{\alpha _{0}(2\cos (\theta s)\varrho _{4}+\varrho _{5})}{2\varrho _{1}\cos (\theta s)+\varrho _{2}} \biggr)\eta _{n+1}= \sum_{l=0}^{n-1}(\kappa _{l}- \kappa _{l+1}) \eta _{n-l}+\kappa _{n} \eta _{0}. $$
(19)

Without loss of generality, let \(\theta =0\), so that the last equation reduces to

$$ \biggl(1- \frac{\alpha _{0}(2\varrho _{4}+\varrho _{5})}{2\varrho _{1}+\varrho _{2}} \biggr)\eta _{n+1}= \sum_{l=0}^{n-1}(\kappa _{l}- \kappa _{l+1}) \eta _{n-l}+\kappa _{n} \eta _{0}. $$
(20)

Then

$$ \eta _{n+1}=\frac{1}{\zeta }\sum _{l=0}^{n-1}(\kappa _{l}- \kappa _{l+1})\eta _{n-l}+\frac{1}{\zeta } \kappa _{n} \eta _{0}, $$
(21)

where \(\zeta =1- \frac{\alpha _{0}(2\varrho _{4}+\varrho _{5})}{2\varrho _{1}+\varrho _{2}}\). Note that \(\frac{\alpha _{0}(2\varrho _{4}+\varrho _{5})}{2\varrho _{1}+\varrho _{2}}=- \frac{ 3\alpha _{0}}{4}\tan (\frac{h}{4})^{2}\leq 0\), so that \(\zeta \geq 1\).

Proposition 1

If \(\eta _{k}\) (\(k=0,1,\ldots , N\)) is the solution of equation (21), then \(|\eta _{k}|\leq |\eta _{0}|\).

Proof

We use induction on k. For \(k=0\), equation (21) gives \(\eta _{1}=\frac{1}{\zeta } \eta _{0}\), so that \(|\eta _{1}|=\frac{1}{\zeta } |\eta _{0}|\leq |\eta _{0}|\) because \(\zeta \geq 1\). Supposing \(|\eta _{i}| \leq |\eta _{0}|\), \(i=1, 2,\dots , k \), from (21) we get

$$\begin{aligned} \vert \eta _{k+1} \vert & \leq \frac{1}{\zeta }\sum _{l=0}^{k-1}(\kappa _{l}- \kappa _{l+1}) \vert \eta _{n-l} \vert +\frac{1}{\zeta } \kappa _{k} \vert \eta _{0} \vert \\ &\leq \sum_{l=0}^{k-1}(\kappa _{l}-\kappa _{l+1}) \vert \eta _{0} \vert + \kappa _{k} \vert \eta _{0} \vert \\ &= \vert \eta _{0} \vert \Biggl(\sum _{l=0}^{k-1}(\kappa _{l}-\kappa _{l+1})+ \kappa _{k} \Biggr) \\ &= \vert \eta _{0} \vert . \end{aligned}$$
(22)

 □

Theorem 1

Scheme (11) is unconditionally stable.

Proof

By Proposition 1 and relation (17) we have

$$ \bigl\Vert \Omega ^{k} \bigr\Vert _{2}\leq \bigl\Vert \Omega ^{0} \bigr\Vert _{2}, \quad k=0,1,\ldots , N, $$

which establishes the unconditional stability. □

4 Convergence analysis

Here we give convergence estimates for the discrete-time problem (10). As in the case of stability analysis, we present the convergence analysis for the homogeneous problem only.

Theorem 2

Let \(\{u(s,t^{n})\}_{n=0}^{N-1}\) be the exact solution of (1), and let \(\{u^{n}\}_{n=0}^{N-1}\) be the discrete-time solution of (10). Then

$$ \bigl\Vert e^{n+1} \bigr\Vert \leq D+C_{u} \tau ^{2-\gamma }, $$

where \(e^{n+1}=u(s,t^{n+1})-u^{n+1}\), and D is a constant.

Proof

As before, we give a proof for \(f=0\) only. Note that the exact solution u also satisfies the semidiscrete scheme (10), so that we have

$$ u \bigl(s,t^{n+1} \bigr)=\sum _{l=0}^{n-1} (\kappa _{l}-\kappa _{l+1})u \bigl(s,t^{n-l} \bigr)+ \kappa _{n} u \bigl(s,t^{0} \bigr)+\alpha _{0} \bigl(u \bigl(s,t^{n+1} \bigr) \bigr)_{ss} $$
(23)

and

$$ u^{n+1}=\sum_{l=0}^{n-1} (\kappa _{l}-\kappa _{l+1})u^{n-l}+ \kappa _{n} u^{0}+\alpha _{0} \bigl(u^{n+1} \bigr)_{ss}. $$
(24)

Subtracting (24) from (23), we obtain

$$\begin{aligned} e^{n+1} &= \sum_{l=0}^{n-1} (\kappa _{l}-\kappa _{l+1})e^{n-l}+ \kappa _{n} e^{0}+\alpha _{0} \bigl(e^{n+1} \bigr)_{ss}+r_{\tau }^{n+1} \\ &= \sum_{l=0}^{n-1} (\kappa _{l}-\kappa _{l+1})e^{n-l}+ \alpha _{0} \bigl(e^{n+1} \bigr)_{ss}+r_{\tau }^{n+1}, \end{aligned}$$
(25)

where we have used the fact that \(e^{0}=0\). Now taking the inner product of both sides of (25) with \(e^{n+1}\) and using \(\langle x,x\rangle =\|x\|^{2}\geq 0\), we get

$$\begin{aligned} \bigl\langle e^{n+1},e^{n+1} \bigr\rangle &= \sum_{l=0}^{n-1} (\kappa _{l}-\kappa _{l+1}) \bigl\langle e^{n-l},e^{n+1} \bigr\rangle +\alpha _{0} \bigl\langle \bigl(e^{n+1} \bigr)_{ss},e^{n+1} \bigr\rangle + \bigl\langle r_{\tau }^{n+1},e^{n+1} \bigr\rangle \\ &= \sum_{l=0}^{n-1} (\kappa _{l}-\kappa _{l+1}) \bigl\langle e^{n-l},e^{n+1} \bigr\rangle -\alpha _{0} \bigl\langle \bigl(e^{n+1} \bigr)_{s}, \bigl(e^{n+1} \bigr)_{s} \bigr\rangle + \bigl\langle r_{\tau }^{n+1},e^{n+1} \bigr\rangle \\ &=\sum_{l=0}^{n-1} (\kappa _{l}-\kappa _{l+1}) \bigl\langle e^{n-l},e^{n+1} \bigr\rangle -\alpha _{0} \bigl\Vert \bigl(e^{n+1} \bigr)_{s} \bigr\Vert ^{2}+ \bigl\langle r_{\tau }^{n+1},e^{n+1} \bigr\rangle \\ &\leq \sum_{l=0}^{n-1} (\kappa _{l}-\kappa _{l+1}) \bigl\langle e^{n-l},e^{n+1} \bigr\rangle + \bigl\langle r_{\tau }^{n+1},e^{n+1} \bigr\rangle , \end{aligned}$$
(26)

where we have used the relations \(\langle u_{ss},u\rangle =-\langle u_{s},u_{s}\rangle \) and \(\langle x,x\rangle =\|x\|^{2}\). Applying the Cauchy–Schwarz inequality \(\langle x,y\rangle \leq \|x\|\|y\|\) in (26), we obtain

$$\begin{aligned} \bigl\Vert e^{n+1} \bigr\Vert ^{2} & \leq \sum_{l=0}^{n-1} (\kappa _{l}-\kappa _{l+1}) \bigl\Vert e^{n-l} \bigr\Vert \bigl\Vert e^{n+1} \bigr\Vert + \bigl\Vert r_{\tau }^{n+1} \bigr\Vert \bigl\Vert e^{n+1} \bigr\Vert . \end{aligned}$$
(27)

Dividing (27) throughout by \(\|e^{n+1}\|\), we obtain

$$\begin{aligned} \bigl\Vert e^{n+1} \bigr\Vert &\leq \sum _{l=0}^{n-1} (\kappa _{l}- \kappa _{l+1}) \bigl\Vert e^{n-l} \bigr\Vert + \bigl\Vert r_{\tau }^{n+1} \bigr\Vert \\ &\leq D_{n} \sum_{l=0}^{n-1} (\kappa _{l}-\kappa _{l+1})+ \bigl\Vert r_{\tau }^{n+1} \bigr\Vert \\ &\leq D_{n} (1-\kappa _{n})+ \bigl\Vert r_{\tau }^{n+1} \bigr\Vert \\ &\leq D+C_{u}\tau ^{2-\gamma }, \end{aligned}$$
(28)

where \(D_{n}=\max_{0\leq l\leq n-1}\|e^{n-l}\|\) and \(D=\max_{0\leq n\leq N} D_{n}\). We have also used the relation \((1-\kappa _{n})<1\). □

5 Numerical results and discussions

In this section, we present the results of the numerical tests for the TFDE (1) with initial (2) and boundary conditions (3). We use the following error norms to measure the accuracy of the method:

$$ L_{2}= \bigl\Vert U^{\text{exact}}-U^{N} \bigr\Vert _{2}\simeq \sqrt{h\sum_{j=-1}^{M+1} \bigl( \bigl\vert U_{j}^{ \text{exact}}-U_{j}^{N} \bigr\vert \bigr)^{2}} $$

and

$$ L_{\infty }= \bigl\Vert U^{\text{exact}}-U^{N} \bigr\Vert _{\infty }\simeq \max_{-1 \leq j\leq M+1} \bigl\vert U_{j}^{\text{exact}}-U_{j}^{N} \bigr\vert |, $$

where \(U^{\text{exact}}\) is the exact solutions, and \((U_{N})_{j}\) is the approximate one. The order of convergence is given by

$$ OC= \frac{\log (\operatorname{Error}(M)/\operatorname{Error}(2M) )}{\log (2M/M )}, $$

where \(\operatorname{Error}(M)\) and \(\operatorname{Error}(2M)\) are the \(L_{\infty }\) norms at M and 2M, respectively.

Example 1

Consider the TFDE (1) [22] with initial condition \(u(s,0)=\sin s\) and boundary conditions \(u(0,t) =u(\pi ,t)=0\). This problem has the exact solution \(u(s,t)=E_{\gamma }(-t^{\gamma })\sin (s)\), where \(E_{\gamma }(z)=\sum_{m=0}^{\infty } \frac{z^{m}}{\Gamma (\gamma m+1)}\) is the ML function. The corresponding source term is \(f=0\).

We apply the proposed algorithm (11) to the problem. The approximate solutions when \(\tau =0.01\), \(h=\frac{\pi }{20}\), and \(\gamma =0.5\) at \(t=0.5\) and \(t=1\) are given by

$$\begin{aligned} U(s,0.5)= \textstyle\begin{cases} 0.4361 \cos (\frac{s}{2})-0.1707 \cos ^{3}(\frac{s}{2})-0.0618\sin ^{3}( \frac{s}{2}) \\ \quad {}+\sin (\frac{s}{2})(0.0762 + 0.2560 \sin (s))\\ \quad {}+0.0464 \csc ( \frac{s}{2})\sin ^{2}(s),& s\in [0,\frac{\pi }{20}], \\ 0.0009 \cos (\frac{s}{2})-0.0009\cos ^{3}(\frac{s}{2})-0.1355\sin ^{3}( \frac{s}{2}) \\ \quad {}+\sin (\frac{s}{2})(0.6433 + 0.0014 \sin (s)) \\ \quad {}+0.1016 \csc ( \frac{s}{2})\sin ^{2}(s),& s\in [\frac{\pi }{20},\frac{\pi }{10}], \\ 0.0047 \cos (\frac{s}{2})-0.0046\cos ^{3}(\frac{s}{2})-0.1426\sin ^{3}( \frac{s}{2}) \\ \quad {}+\sin (\frac{s}{2})(0.6197 + 0.0068 \sin (s)) \\ \quad {}+0.1070\csc (\frac{s}{2}) \sin ^{2}(s),& s\in [\frac{\pi }{10},\frac{3\pi }{20}], \\ \vdots \\ 0.6197 \cos (\frac{s}{2})-0.1426\cos ^{3}(\frac{s}{2})-0.0046\sin ^{3}( \frac{s}{2}) \\ \quad {}+\sin (\frac{s}{2})(0.0047 +0.2140 \sin (s)) \\ \quad {}+0.0034\csc (\frac{s}{2}) \sin ^{2}(s),& s\in [\frac{17\pi }{20},\frac{9\pi }{10}], \\ 0.6433 \cos (\frac{s}{2})-0.1355\cos ^{3}(\frac{s}{2})-0.0009\sin ^{3}( \frac{s}{2}) \\ \quad {}+\sin (\frac{s}{2})(0.0009 +0.2033 \sin (s))+0.0007\csc (\frac{s}{2}) \sin ^{2}(s),& s\in [\frac{9\pi }{10},\frac{19\pi }{20}], \\ 0.6554 \cos (\frac{s}{2})-0.1316\cos ^{3}(\frac{s}{2})+1.9984\times 10^{-15} \sin ^{3}(\frac{s}{2}) \\ \quad {}+0.1974\sin (\frac{s}{2})\sin (s)-1.3323 \times 10^{-15}\csc ( \frac{s}{2})\sin ^{2}(s),& s\in [\frac{19\pi }{20},\pi ], \end{cases}\displaystyle \end{aligned}$$

and

$$\begin{aligned} U(s,1)= \textstyle\begin{cases} 4.4409 \times 10^{-16} \cos (\frac{s}{2})-1.6653 \times 10^{-16}\cos ^{3}( \frac{s}{2}) \\ \quad {}-0.1075\sin ^{3}(\frac{s}{2}) \\ \quad {}+\sin (\frac{s}{2})(0.5352 + 1.1102\times 10^{-16} \sin (s)) \\ \quad {}+0.0806 \csc (\frac{s}{2})\sin ^{2}(s),& s\in [0,\frac{\pi }{20}], \\ 0.0008 \cos (\frac{s}{2})-0.0008\cos ^{3}(\frac{s}{2})-0.1107\sin ^{3}( \frac{s}{2}) \\ \quad {}+\sin (\frac{s}{2})(0.5254 + 0.0012 \sin (s)) \\ \quad {}+0.0830 \csc ( \frac{s}{2})\sin ^{2}(s),& s\in [\frac{\pi }{20},\frac{\pi }{10}], \\ 0.0038 \cos (\frac{s}{2})-0.0037\cos ^{3}(\frac{s}{2})-0.1165\sin ^{3}( \frac{s}{2}) \\ \quad {}+\sin (\frac{s}{2})(0.5060 + 0.0056 \sin (s)) \\ \quad {}+0.0874\csc (\frac{s}{2}) \sin ^{2}(s),& s\in [\frac{\pi }{10},\frac{3\pi }{20}], \\ \vdots \\ 0.5061 \cos (\frac{s}{2})-0.1165\cos ^{3}(\frac{s}{2})-0.0037\sin ^{3}( \frac{s}{2}) \\ \quad {}+\sin (\frac{s}{2})(0.0038 +0.1747 \sin (s)) \\ \quad {}+0.0028\csc (\frac{s}{2}) \sin ^{2}(s),& s\in [\frac{17\pi }{20},\frac{9\pi }{10}], \\ 0.5254 \cos (\frac{s}{2})-0.1107\cos ^{3}(\frac{s}{2})-0.0008\sin ^{3}( \frac{s}{2}) \\ \quad {}+\sin (\frac{s}{2})(0.0008 +0.1660 \sin (s)) \\ \quad {}+0.0006\csc (\frac{s}{2}) \sin ^{2}(s),& s\in [\frac{9\pi }{10},\frac{19\pi }{20}], \\ 0.5352 \cos (\frac{s}{2})-0.1075\cos ^{3}(\frac{s}{2})+1.3322\times 10^{-15} \sin ^{3}(\frac{s}{2}) \\ \quad {}+0.1612\sin (\frac{s}{2})\sin (s)-8.8818 \times 10^{-16}\csc ( \frac{s}{2})\sin ^{2}(s),& s\in [\frac{19\pi }{20},\pi ], \end{cases}\displaystyle \end{aligned}$$

respectively. Figure 1 displays the behavior of the numerical and exact solutions at different times. The graphs are in excellent affirmation. In Fig. 2 the absolute errors are presented in 2D and 3D at \(t=0.5\). Figure 3 demonstrates an excellent 3D contrast between the exact and numerical solutions at time step \(t=1\). In Table 1, a comparison of the error norms with those obtained in [22] is tabulated. Our methodology gives better precision for bigger τ over that obtained in [22]. The order of convergence is tabulated for the \(L_{\infty }\) norm in Table 2.

Figure 1
figure 1

The exact (lines) and numerical (rectangles, stars, bullets) solutions for Example 1 when \(\tau =0.01\), \(h=\frac{\pi }{80}\) at various time levels

Figure 2
figure 2

2D and 3D absolute error profiles when \(\tau =0.001\), \(h=\frac{\pi }{60}\), \(t=0.5\) for Example 1

Figure 3
figure 3

The exact (right) and numerical (left) solutions when \(\tau =0.001\), \(h=\frac{\pi }{60}\), \(t=0.5\) for Example 1

Table 1 Comparison of error norms when \(\gamma =0.8\), \(h=\frac{\pi }{M}\) for Example 1
Table 2 Order of convergence for various values of M when \(\tau =0.001\), \(\gamma =0.8\) for Example 1

Example 2

Consider the nonhomogenous TFDE [22]

$$\begin{aligned} &{}^{C}_{a}{D}_{t}^{0.9}u(s,t)- \frac{\partial ^{2}}{\partial s^{2}} u(s,t) \\ &\quad = \frac{2}{\Gamma (2.1)}t^{1.1} \sin (2 \pi s) \\ &\qquad {}+ 4\pi ^{2} t^{2} \sin (2\pi s),\quad s\in [0,1], t\in [0,T], \end{aligned}$$
(29)

with zero initial and boundary conditions. This problem has the exact solution \({u(s,t)=t^{2} \sin (2\pi s)}\).

We solve (29) by using the proposed scheme (11). The approximate solutions when \(\tau =0.01\) and \(h=\frac{1}{20}\) at \(t=0.5\) and \(t=1\) are given by

$$\begin{aligned} U(s,0.5)= \textstyle\begin{cases} 3.5527\times 10^{-15}\cos (\frac{s}{2})-20.2482\sin ^{3}(\frac{s}{2}) \\ \quad {}+\sin (\frac{s}{2})(-57.6234 -7.1054\times 10^{-15} \sin (s)) \\ \quad {}+15.1861 \csc (\frac{s}{2})\sin ^{2}(s),& s\in [0,\frac{1}{20}], \\ -0.1401 \cos (\frac{s}{2})+0.1310\cos ^{3}(\frac{s}{2}) \\ \quad {}-18.3852 \sin ^{3}( \frac{s}{2}) \\ \quad {}+\sin (\frac{s}{2})(-52.0206 -0.20997 \sin (s)) \\ \quad {}+13.7889 \csc ( \frac{s}{2})\sin ^{2}(s),& s\in [\frac{1}{20},\frac{1}{10}], \\ -0.6729 \cos (\frac{s}{2})+0.67101\cos ^{3}(\frac{s}{2}) \\ \quad {}-14.8716\sin ^{3}( \frac{s}{2}) \\ \quad {}+\sin (\frac{s}{2})(-41.3734-1.0065 \sin (s)) \\ \quad {}+11.1537\csc ( \frac{s}{2})\sin ^{2}(s),& s\in [\frac{1}{10},\frac{3}{20}], \\ \vdots \\ 1.0159 \cos (\frac{s}{2})+0.6104\cos ^{3}(\frac{s}{2})+5.7332\sin ^{3}( \frac{s}{2}) \\ \quad {}+\sin (\frac{s}{2})(10.1455-0.9156 \sin (s)) \\ \quad {}-4.2910\csc (\frac{s}{2}) \sin ^{2}(s),& s\in [\frac{17}{20},\frac{9}{10}], \\ 25.0629 \cos (\frac{s}{2})-18.3491\cos ^{3}-1.1608\sin ^{3}( \frac{s}{2}) \\ \quad {}+\sin (\frac{s}{2})(-45.5852 +27.5236 \sin (s)) \\ \quad {}+0.8707\csc ( \frac{s}{2})\sin ^{2}(s),& s\in [\frac{9}{10},\frac{19}{20}], \\ 27.6261 \cos (\frac{s}{2})-20.1974\cos ^{3}(\frac{s}{2})-1.4323\sin ^{3}( \frac{s}{2}) \\ \quad {}+\sin (\frac{s}{2})(-50.5693 + 30.2961 \sin (s)) \\ \quad {}+1.0742\csc ( \frac{s}{2})\sin ^{2}(s),& s\in [\frac{19}{20},1], \end{cases}\displaystyle \end{aligned}$$

and

$$\begin{aligned} U(s,1)= \textstyle\begin{cases} -1.4211\times 10^{-14}\cos (\frac{s}{2})+3.5527\times 10^{-14}\cos ^{3}( \frac{s}{2}) \\ \quad {}-80.9352 \sin ^{3}(\frac{s}{2}) \\ \quad {}+\sin (\frac{s}{2})(-230.33 -2.8422\times 10^{-14} \sin (s)) \\ \quad {}+60.7014 \csc (\frac{s}{2})\sin ^{2}(s),& s\in [0,\frac{1}{20}], \\ -0.5600 \cos (\frac{s}{2})+0.5595\cos ^{3}(\frac{s}{2})-73.4887 \sin ^{3}( \frac{s}{2}) \\ \quad {}+\sin (\frac{s}{2})(-207.935 -0.8393 \sin (s)) \\ \quad {}+55.1165 \csc ( \frac{s}{2})\sin ^{2}(s),& s\in [\frac{1}{20},\frac{1}{10}], \\ -2.6897 \cos (\frac{s}{2})+2.6821\cos ^{3}(\frac{s}{2})-59.4443\sin ^{3}( \frac{s}{2}) \\ \quad {}+\sin (\frac{s}{2})(-165.376-4.0232 \sin (s)) \\ \quad {}+44.5832\csc ( \frac{s}{2})\sin ^{2}(s),& s\in [\frac{1}{10},\frac{3}{20}], \\ \vdots \\ 81.6459 \cos (\frac{s}{2})-59.4851\cos ^{3}(\frac{s}{2})-1.5295\sin ^{3}( \frac{s}{2}) \\ \quad {}+\sin (\frac{s}{2})(-143.842+89.2276 \sin (s)) \\ \quad {}+1.1471\csc ( \frac{s}{2})\sin ^{2}(s),& s\in [\frac{17}{20},\frac{9}{10}], \\ 100.181 \cos (\frac{s}{2})-73.3442\cos ^{3}-4.6402\sin ^{3}( \frac{s}{2}) \\ \quad {}+\sin (\frac{s}{2})(-182.211 +110.016 \sin (s)) \\ \quad {}+3.4802\csc ( \frac{s}{2})\sin ^{2}(s),& s\in [\frac{9}{10},\frac{19}{20}], \\ 110.426 \cos (\frac{s}{2})-80.7324\cos ^{3}(\frac{s}{2})-5.7251\sin ^{3}( \frac{s}{2}) \\ \quad {}+\sin (\frac{s}{2})(-202.134 + 121.099 \sin (s)) \\ \quad {}+4.2938\csc ( \frac{s}{2})\sin ^{2}(s),& s\in [\frac{19}{20},1], \end{cases}\displaystyle \end{aligned}$$

respectively. We get the numerical results by utilizing the proposed scheme. A close comparison between the exact and numerical solutions at different times is shown in Fig. 4. In Fig. 5 the 2D and 3D error profiles are displayed at \(t=0.5\). Figure 6 deals with 3D comparison between the exact and approximate solutions. Table 3 reports a comparison of the error norms with those obtained in [22]. Although we have chosen a larger time step than that of [22], we still obtained a better accuracy. Table 4 records the convergence orders for the \(L_{\infty }\) norm.

Figure 4
figure 4

The exact (lines) and numerical (rectangles, stars, bullets) solutions when \(\tau =0.01\), \(h=\frac{1}{80}\) at various time levels for Example 2

Figure 5
figure 5

2D and 3D absolute error profiles when \(\tau =0.001\), \(h=\frac{1}{60}\), \(t=0.5\) for Example 2

Figure 6
figure 6

The exact (right) and numerical (left) solutions when \(\tau =0.001\), \(h=\frac{1}{60}\), \(t=0.5\) for Example 2

Table 3 Comparison of error norms when \(\gamma =0.9\), \(h=\frac{1}{M}\) for Example 2
Table 4 Order of convergence for various values of M when \(\tau =0.01\), \(\gamma =0.9\) for Example 2

Example 3

Consider the TFDE describing subdiffusion [23]

$$\begin{aligned} \frac{\partial u(s,t)}{\partial t}={}&{}_{0}{D_{t}^{1-\gamma }} \biggl[ \frac{\partial ^{2} u(s,t)}{\partial s^{2}} \biggr] \\ &{}+ e^{s} \biggl[(1+\gamma )t^{ \gamma }- \frac{\Gamma (2+\gamma )}{\Gamma (1+2\gamma )}t^{2\gamma } \biggr],\quad 0< t\leq 1, 0< x< 1, \end{aligned}$$
(30)

with initial condition

$$ u(s,0)=0,\quad 0\leq s\leq 1, $$

and boundary conditions

$$ u(0,t)=t^{1+\gamma },\qquad u(1,t)=et^{1+\gamma },\quad 0\leq t\leq 1. $$

This problem has the exact solution \(u(s,t)=e^{s} t^{1+\gamma }\).

Following [24], equation (30) can be equivalently written as

$$\begin{aligned} {}^{C}_{0}{D_{t}^{\gamma }}u(s,t)= \frac{\partial ^{2} u(s,t)}{\partial s^{2}}+ e^{s} \bigl[\Gamma (2+ \gamma )t-t^{1+\gamma } \bigr], \quad 0< t\leq 1, 0< s< 1, \end{aligned}$$
(31)

with same initial and boundary conditions. We apply scheme (11) to (30). The approximate solutions when \(\tau =0.01\), \(h=\frac{1}{20}\), and \(\gamma =0.5\) when \(t=0.5\) and \(t=1\) are given by

$$\begin{aligned} U(s,0.5)= \textstyle\begin{cases} 0.5744 \cos (\frac{s}{2})-0.2208\cos ^{3}(\frac{s}{2})+0.1593\sin ^{3}( \frac{s}{2}) \\ \quad {}+\sin (\frac{s}{2})(1.1850 +0.3313 \sin (s)) \\ \quad {}-0.1195 \csc (\frac{s}{2}) \sin ^{2}(s),& s\in [0,\frac{1}{20}], \\ 0.5725 \cos (\frac{s}{2})-0.2190\cos ^{3}(\frac{s}{2})+0.1844\sin ^{3}( \frac{s}{2}) \\ \quad {}+\sin (\frac{s}{2})(1.2605 + 0.3284 \sin (s)) \\ \quad {}-0.1383 \csc ( \frac{s}{2})\sin ^{2}(s),& s\in [\frac{1}{20},\frac{1}{10}], \\ 0.5685 \cos (\frac{s}{2})-0.2150\cos ^{3}(\frac{s}{2})+0.2106\sin ^{3}( \frac{s}{2}) \\ \quad {}+\sin (\frac{s}{2})(1.3398 + 0.3225 \sin (s)) \\ \quad {}-0.1579\csc (\frac{s}{2}) \sin ^{2}(s),& s\in [\frac{1}{10},\frac{3}{20}], \\ \vdots \\ 0.0807 \cos (\frac{s}{2})+0.2062\cos ^{3}(\frac{s}{2})+0.6030\sin ^{3}( \frac{s}{2}) \\ \quad {}+\sin (\frac{s}{2})(3.0809 - 0.3093 \sin (s)) \\ \quad {}-0.4522\csc (\frac{s}{2}) \sin ^{2}(s),& s\in [\frac{17}{20},\frac{9}{10}], \\ 0.0039 \cos (\frac{s}{2})+0.2637\cos ^{3}(\frac{s}{2})+0.6159\sin ^{3}( \frac{s}{2}) \\ \quad {}+\sin (\frac{s}{2})(3.2400 - 0.3956 \sin (s)) \\ \quad {}-0.4619\csc (\frac{s}{2}) \sin ^{2}(s),& s\in [\frac{9}{10},\frac{19}{20}], \\ -0.0811 \cos (\frac{s}{2})+0.3250\cos ^{3}(\frac{s}{2})+0.6249\sin ^{3}( \frac{s}{2}) \\ \quad {}+\sin (\frac{s}{2})(3.4052 - 0.4874 \sin (s)) \\ \quad {}-0.4686\csc (\frac{s}{2}) \sin ^{2}(s),& s\in [\frac{19}{20},1], \end{cases}\displaystyle \end{aligned}$$

and

$$\begin{aligned} U(s,1)= \textstyle\begin{cases} 1.6249 \cos (\frac{s}{2})-0.6249\cos ^{3}(\frac{s}{2})+0.4508\sin ^{3}( \frac{s}{2}) \\ \quad {}+\sin (\frac{s}{2})(3.3515 + 0.9374 \sin (s)) \\ \quad {}-0.3381 \csc ( \frac{s}{2})\sin ^{2}(s),& s\in [0,\frac{1}{20}], \\ 1.6196 \cos (\frac{s}{2})-0.6196\cos ^{3}(\frac{s}{2})+0.5218\sin ^{3}( \frac{s}{2}) \\ \quad {}+\sin (\frac{s}{2})(3.5652 + 0.9294 \sin (s)) \\ \quad {}-0.3914 \csc ( \frac{s}{2})\sin ^{2}(s),& s\in [\frac{1}{20},\frac{1}{10}], \\ 1.6083 \cos (\frac{s}{2})-0.6084\cos ^{3}(\frac{s}{2})+0.5959\sin ^{3}( \frac{s}{2}) \\ \quad {}+\sin (\frac{s}{2})(3.7896 + 0.9126 \sin (s)) \\ \quad {}-0.4469\csc (\frac{s}{2}) \sin ^{2}(s),& s\in [\frac{1}{10},\frac{3}{20}], \\ \vdots \\ 0.2280 \cos (\frac{s}{2})+0.5835\cos ^{3}(\frac{s}{2})+1.7062\sin ^{3}( \frac{s}{2}) \\ \quad {}+\sin (\frac{s}{2})(8.7160 - 0.8753 \sin (s)) \\ \quad {}-1.2796\csc (\frac{s}{2}) \sin ^{2}(s),& s\in [\frac{17}{20},\frac{9}{10}], \\ 0.01057 \cos (\frac{s}{2})+0.7461\cos ^{3}(\frac{s}{2})+1.7427\sin ^{3}( \frac{s}{2}) \\ \quad {}+\sin (\frac{s}{2})(9.1663 - 1.1192 \sin (s)) \\ \quad {}-1.3070\csc (\frac{s}{2}) \sin ^{2}(s),& s\in [\frac{9}{10},\frac{19}{20}], \\ -0.2298 \cos (\frac{s}{2})+0.9195\cos ^{3}(\frac{s}{2})+1.7682\sin ^{3}( \frac{s}{2}) \\ \quad {}+\sin (\frac{s}{2})(9.6338 - 1.3793 \sin (s)) \\ \quad {}-1.3261\csc (\frac{s}{2}) \sin ^{2}(s),& s\in [\frac{19}{20},1], \end{cases}\displaystyle \end{aligned}$$

respectively. Figure 7 analyzes the graphs of the exact and approximate solutions when \(\tau =0.01\) \(h=\frac{1}{80}\), and \(\gamma =0.5\). Figure 8 depicts the 2D and 3D error profiles, which exhibit exactness of the method. Figure 9 shows exceptionally close comparison of 3D graphs of approximate and exact solutions using \(\tau =0.01\), \(h=\frac{1}{60}\), and \(\gamma =0.5\). In Tables 58 the maximum errors contrast with those presented in [23] for various values of τ and h to show that the present scheme is increasingly precise and gives better precision.

Figure 7
figure 7

The exact (solid) and approximate solutions (stars, bullets, triangles) for Example 3 when \(\tau =0.01\), \(h=\frac{1}{80}\), and \(\gamma =0.5\) at various time levels

Figure 8
figure 8

2D and 3D absolute error profiles when \(\tau =0.01\), \(h=\frac{1}{60}\), \(t=1\) for Example 3

Figure 9
figure 9

The exact (left) and numerical (right) solutions for Example 3 when \(\tau =0.01\), \(h=\frac{1}{60} \), and \(\gamma =0.5\)

Table 5 The maximum errors when \(\tau =\frac{1}{64}\), \(h=\frac{1}{8}\) for Example 3
Table 6 The maximum errors when \(\tau =\frac{1}{1024}\), \(h=\frac{1}{32}\) for Example 3
Table 7 The maximum errors when \(\tau =h=\frac{1}{8}\) for Example 3
Table 8 The maximum errors when \(\tau =h=\frac{1}{32}\) for Example 3

6 Conclusions

In this study, we developed a cubic trigonometric B-spline collocation method for numerical approximation of time-fractional diffusion equations. The time discretization is done using the typical finite difference method, whereas the derivatives in space are approximated by utilizing the trigonometric B-splines. The approximate solution is obtained as a piecewise continuous function, so that the solution can be approximated at any desired location in the domain of interest. We also presented a stability and convergence analysis of the scheme to affirm that the errors do not propagate. The obtained numerical results contrast with those of some current numerical procedures. We infer that the present scheme is more precise and provides better accuracy.

Availability of data and materials

Not applicable.

References

  1. Podlubny, I.: Fractional Differential Equations. Academic Press, San Diego (1999)

    MATH  Google Scholar 

  2. Mainardi, F.: Fractional calculus. In: Fractals and Fractional Calculus Continuum Mechanics, pp. 291–348. Springer, Berlin (1997)

    Chapter  Google Scholar 

  3. Hilfer, R.: Applications of Fractional Calculus in Physics. World Scientific, Singapore (2000)

    Book  Google Scholar 

  4. Sokolov, I.M., Klafter, J., Blumen, A.: Fractional kinetics. Phys. Today 55, 48–54 (2002)

    Article  Google Scholar 

  5. Diethelm, K., Freed, A.D.: On solution of nonlinear fractional order differential equations used in modelling of viscoplasticity. In: Scientific Computing in Chemical Engineering II: Computational Fluid Dynamics, Reaction Engineering and Molecular Properties, pp. 217–224. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

  6. Sokolov, I.M., Klafter, J., Blumen, A.: Ballistic versus diffusive pair-dispersion in the Richardson regime. Phys. Rev. E 61(3), 2717–2722 (2000)

    Article  Google Scholar 

  7. Chen, W.: A speculative study of \(\frac{2}{3}\)-order fractional Laplacian modeling of turbulence: some thoughts and conjectures. Chaos 16, 23–26 (2006)

    Google Scholar 

  8. Metzler, R., Klafter, J.: The random walk’s guide to anomalous diffusion: a fractional dynamics approach. Phys. Rep. 339, 1–77 (2000)

    Article  MathSciNet  Google Scholar 

  9. Metzler, R., Klafter, J.: The restaurant at the end of the random walk: recent developments in the description of anomalous transport by fractional dynamics. J. Phys. A 37(31), 161–208 (2004)

    Article  MathSciNet  Google Scholar 

  10. Iomin, A., Dorfman, S., Dorfman, L.: On tumor development: fractional transport approach. http://arxiv.org/abs/qbio/0406001

  11. Metzler, R., Klafter, J.: Boundary value problems for fractional diffusion equations. Physica A 278, 107–125 (2006)

    Article  MathSciNet  Google Scholar 

  12. Kilbas, A.A., Srivastava, H.M., Trujillo, J.J.: Theory and Applications of Fractional Differential Equations. Elsevier, Amsterdam (2006)

    MATH  Google Scholar 

  13. Langlands, T., Henry, B.: The accuracy and stability of an implicit solution method for the fractional diffusion equation. J. Comput. Phys. 205, 719–735 (2005)

    Article  MathSciNet  Google Scholar 

  14. Esmaeili, S., Garrappa, R.A.: Pseudo-spectral scheme for the approximate solution of a time-fractional diffusion equation. Int. J. Comput. Math. 92(5), 980–994 (2015)

    Article  MathSciNet  Google Scholar 

  15. Mustapha, K., Abdallah, B., Furati, K.M.: A discontinuous Petrov–Galerkin method for time fractional diffusion equations. SIAM J. Numer. Anal. 52(5), 2512–2529 (2014)

    Article  MathSciNet  Google Scholar 

  16. Zhuang, P., Liu, F.: Implicit difference approximations for the time fractional diffusion equaition. J. Appl. Math. Comput. 22(3), 87–99 (2006)

    Article  MathSciNet  Google Scholar 

  17. Karatay, I., Kale, N., Bayramoglu, S.R.: A new difference scheme for time fractional heat equations based on the Crank–Nicholson method. Fract. Calc. Appl. Anal. 16(14), 892–910 (2013)

    MathSciNet  MATH  Google Scholar 

  18. Yuste, S.B.: Weighted average finite difference methods for fractional diffusion equation. J. Comput. Phys. 216, 264–274 (2006)

    Article  MathSciNet  Google Scholar 

  19. Yuste, S.B., Acedo, L.: An explicit finite difference method and a new von Neumann-type stability analysis for fractional diffusion equations. SIAM J. Numer. Anal. 42(5), 1862–1874 (2005)

    Article  MathSciNet  Google Scholar 

  20. Murio, D.A.: Implicit finite difference approximation for time fractional diffusion equations. Comput. Math. Appl. 56(4), 1138–1145 (2008)

    Article  MathSciNet  Google Scholar 

  21. Tasbozan, O., Esen, A., Yagmurlu, N.M., Ucar, Y.: A numerical solution to fractional diffusion equation for force-free case. Abstr. Appl. Anal. 2013, Article ID 187383 (2013)

    Article  MathSciNet  Google Scholar 

  22. Huang, C., Yu, X., Wang, C., Li, Z.: A numerical method based on fully discrete direct discontinuous Galerkin method for the time fractional diffusion equation. Appl. Math. Comput. 264, 483–492 (2015)

    Article  MathSciNet  Google Scholar 

  23. Chen, C.M., Liu, F., Turner, I., Anh, V.: A Fourier method for the fractional diffusion equation describing sub-diffusion. J. Comput. Phys. 227, 886–897 (2007)

    Article  MathSciNet  Google Scholar 

  24. Gao, G., Sun, Z.: A compact finite difference scheme for the fractional subdiffusion equations. J. Comput. Phys. 230, 586–595 (2011)

    Article  MathSciNet  Google Scholar 

  25. Abbas, M., Majid, A.A., Ismail, A.I.M., Rashid, A.: The application of cubic trigonometric B-spline to the numerical solution of the hyperbolic problems. Appl. Math. Comput. 239, 74–88 (2014)

    Article  MathSciNet  Google Scholar 

  26. Prenter, P.M.: Splines and Variational Methods. Wiley, New York (1989)

    MATH  Google Scholar 

  27. De Boor, C.: A Practical Guide to Splines. Springer, Berlin (1978)

    Book  Google Scholar 

  28. Siddiqi, S.S., Arshad, S.: Numerical solution of time-fractional fourth-order partial differential equations. Int. J. Comput. Math. 92(7), 1496–1518 (2015)

    Article  MathSciNet  Google Scholar 

  29. Siddiqui, S.S., Arshad, S.: Numerical solutions of time-fractional fourth-order partial differential equations. Int. J. Comput. Math. 7(92), 1496–1518 (2015)

    Article  MathSciNet  Google Scholar 

  30. Yaseen, M., Abbas, M., Ismail, A.I., Nazir, T.: A cubic trigonometric B-spline collocation approach for the fractional sub-diffusion equations. Appl. Math. Comput. 293, 311–319 (2017)

    Article  MathSciNet  Google Scholar 

  31. Yaseen, M., Abbas, M., Nazir, N., Baleanu, D.: A finite difference scheme based on cubic trigonometric B-splines for time fractional diffusion-wave equation. Adv. Differ. Equ. 2017, 274 (2017)

    Article  MathSciNet  Google Scholar 

  32. Yaseen, M., Abbas, M.: An efficient computational technique based on cubic trigonometric B-splines for time fractional Burgers’ equation. Int. J. Comput. Math. 97(3), 725–738 (2020)

    Article  MathSciNet  Google Scholar 

  33. Mohyud-Din, S.T., Akram, T., Abbas, M., Ismail, A.I., Ali, N.M.: A fully implicit finite difference scheme based on extended cubic B-splines for time fractional advection–diffusion equation. Adv. Differ. Equ. 2018, 109 (2018)

    Article  MathSciNet  Google Scholar 

  34. Amin, M., Abbas, M., Iqbal, M.K., Baleanu, D.: Non-polynomial quintic spline for numerical solution of fourth-order time fractional partial differential equations. Adv. Differ. Equ. 2019, 183 (2019)

    Article  MathSciNet  Google Scholar 

  35. Khalid, N., Abbas, M., Iqbal, M.K., Baleanu, D.: A numerical algorithm based on modified extended B-spline functions for solving time-fractional diffusion wave equation involving reaction and damping terms. Adv. Differ. Equ. 2019, 378 (2019)

    Article  MathSciNet  Google Scholar 

  36. Akram, T., Abbas, M., Ismail, A.I., Ali, N.M., Baleanu, D.: Extended cubic B-splines in the numerical solution of time fractional telegraph equation. Adv. Differ. Equ. 2019, 365 (2019)

    Article  MathSciNet  Google Scholar 

  37. Khalid, N., Abbas, M., Iqbal, M.K.: Non-polynomial quintic spline for solving fourth-order fractional boundary value problems involving product terms. Appl. Math. Comput. 349, 393–407 (2019)

    Article  MathSciNet  Google Scholar 

  38. Amin, M., Abbas, M., Iqbal, M.K., Ismail, A.I., Baleanu, D.: A fourth order non-polynomial quintic spline collocation technique for solving time fractional super-diffusion equations. Adv. Differ. Equ. 2019, 514 (2019)

    Article  Google Scholar 

  39. Strikwerda, J.C.: Finite Difference Schemes and Partial Differential Equations, 2nd edn. SIAM, Philadelphia (2004)

    MATH  Google Scholar 

Download references

Acknowledgements

We thank Dr. Muhammad Amin for his assistance in proofreading of the manuscript. The authors are also grateful to anonymous referees for their valuable suggestions, which significantly improved this manuscript.

Authors’ information

Muhammad Yaseen is Assistant Professor; Muhammad Abbas and Muhammad Bilal Riaz are Associate Professors.

Funding

No funding is available for this research. We are grateful to Springer Open on providing full wavier for this manuscript.

Author information

Authors and Affiliations

Authors

Contributions

All authors equally contributed to this work. All authors read and approved the final manuscript.

Corresponding author

Correspondence to Muhammad Abbas.

Ethics declarations

Competing interests

The authors declare that they have no competing interests.

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Yaseen, M., Abbas, M. & Riaz, M.B. A collocation method based on cubic trigonometric B-splines for the numerical simulation of the time-fractional diffusion equation. Adv Differ Equ 2021, 210 (2021). https://doi.org/10.1186/s13662-021-03360-6

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1186/s13662-021-03360-6

Keywords