1 Introduction

The concept of fractional derivative can be traced back to the letter of Leibniz to L’Hospital in 1695. Mathematician Euler discovered the Γ function in 1729, which established the foundation of fractional derivative. Compared with the classical integer-order models, fractional derivatives provide a more profound and comprehensive explanation about memory, heredity, non-locality of complex phenomena and processes. At present, the most commonly used definitions of fractional derivatives are the Grünwald–Letnikov derivative, the Riemann–Liouville derivative, the Riesz derivative, and the Caputo derivative [1]. Some new fractional derivatives, such as the Caputo–Fabrizio derivative and the Atangana–Baleanu fractional derivative, have tremendously promoted the capability of modeling complex physical phenomena and processes. The connatural behavior has been analyzed for evolution equations generated by three fractional derivatives namely the Riemann–Liouville, Caputo–Fabrizio, and Atangana–Baleanu fractional derivatives [24]. The Caputo–Fabrizio derivative is defined via an integral operator without singular kernel [5, 6], and it has supplementary motivating properties compared to the others. For example, it can describe substance heterogeneities and configurations with different scales, which noticeably cannot be characterized by the local theories. The properties of numerical approximation are discussed for the initial value problems with Caputo–Fabrizio fractional derivative operator [7, 8]. Several valuable applications to the real world data, such as blood ethanol concentration system, chickenpox disease model, and dengue fever outbreak model, have been discussed; the discussions were based on the fractional derivatives in the Caputo sense, Caputo–Fabrizio sense, and Atangana–Baleanu–Caputo sense, respectively [915].

In the past decades, anomalous transport has been discussed in a wide range of applications, for example, turbulence [1619], geoscience [20], bioscience [21, 22], porous media [2327], viscoelastic material [2830], and so on. The underlying anomalous features, manifesting in memory-effects, sharp peak, power-law distribution, self-similar structure, and nonlocal interactions, can be well described by fractional partial differential equations [3133]. However, in some applications, a single power law cannot characterize more complex physical processes, such as decelerating sub-diffusion [34, 35], accelerating super-diffusion, and random processes subordinated to Wiener processes [31, 36]. These processes can be described by the distributed-order derivatives first introduced by Caputo, see [35] and the references therein. Recently, it is believed that distributed-order differential equations are more suitable for describing complex dynamic systems than fractional-order models.

Usually, it is difficult to obtain analytical solutions of these models, so different numerical schemes for fractional partial differential equations(FPDE), which can exhibit history dependence and nonlocal features, have been developed. The common numerical methods for fractional partial differential equations include finite-difference [3741], finite-element methods [42, 43], finite volume schemes [4446], mixed finite element schemes [47], spectral/spectral-element schemes [48, 49], the decomposition method [50, 51], and others [52]. In [5356], numerical analysis for distributed-order FPDEs was extensively investigated. More recently, Tomovski and Sandev [57] expressed the solutions of generalized distributed-order diffusion equations equipped with fractional time derivatives by use of the Fourier–Laplace transform. The authors [58] obtained the existence about Cauchy problems for the diffusion equations with time distributed-order derivative, they also computed it by Laplace transform and Fourier transform. Luchko [56] discussed the dependence of the uniqueness and continuity of the generalized time fractional diffusion equations on initial conditions. However, there are few numerical studies about the distributed-order equations, especially the study about high-order schemes is almost blank. It has motivated us to find efficient numerical schemes for distributed-order FPDEs.

Consider the following distributed-order fractional diffusion equation equipped with the fractional derivative developed by Caputo and Fabrizio [5]:

$$\begin{aligned}& \textstyle\begin{cases} \mathscr{D}^{w}_{t} u(x,t)=\frac{\partial ^{2} u(x,t)}{\partial x^{2}}+f(x,t), \quad (x,t)\in \varOmega \times (0,T], \\ u(x,0)=0, \quad x\in \varOmega , \\ u(x,t)=0, \quad x\in \partial \varOmega , 0\leq t\leq T, \end{cases}\displaystyle \end{aligned}$$
(1)

where the distributed-order derivative in the Caputo–Fabrizio sense is defined as follows:

and \(0< v_{1} < v_{2} < 1 \), \(\varOmega =(a,b)\), and \(f(x,t)\) represents the source term.

This paper has the following organization. Section 2 provides some preliminary work, including the space partition, the inner products, and norms. Section 3 is devoted to the finite difference scheme, which is proved to be second-order with respect to distributed-order, space, and time respectively, and the stability and convergence rates are also studied. In Sect. 4, a compact finite difference method is proposed, the stability and convergence are rigorously proved. Section 5 provides numerical tests that illustrate the reliability of theoretical analysis. In Sect. 6 we summarize this paper and indicate the possible work in the future.

2 Preliminary

In order to establish finite difference methods, the space interval \([a,b]\) is partitioned by \(x_{i}=a+ih\) (\(0\leq i \leq M\)), and the time interval \([0,T]\) is partitioned by \(t_{k}=k\tau \) (\(0 \leq k \leq N\)), with M, N positive integers and \(h={(b-a)/M}\) the spatial grid size and \(\tau =T/N\) the temporal step size. Divide the integral interval \([v_{1},v_{2}]\) to 2J subintervals, \(\Delta \alpha = \frac{v _{2}-v_{1}}{2J}\). Denote \(\alpha _{l}=v_{1}+l\Delta \alpha \), \(l=0,1,2,\ldots,2J\). Let \(\varOmega _{h}=\{x_{i}:0\leq i \leq M\}\), \(\varOmega _{ \tau }=\{t_{k}:0\leq k\leq N\} \), thus the computational range \([a, b]\times [0, T]\) has a discretization \(\varOmega _{h}\times \varOmega _{\tau }\). A grid function u is represented as \(u^{k}_{j}=u(x _{j},t_{k})\). \(U^{k}_{j}\) denotes the finite difference solution at the grid point \((x_{j},t_{k})\).

Denote \(V_{h}=\{v\vert v=(v_{0},v_{1},\ldots,v_{M})\}\). For any grid function \(v\in V_{h}\), we define the difference quotient operators

$$\begin{aligned} &{\delta _{x} v_{j}=\frac{v_{j}-v_{j-1}}{h}, \quad 1\leq j\leq M; \quad\quad \delta _{x}^{2} v_{j}= \frac{v_{j+1}-2v_{j}+v_{j-1}}{h^{2}}, \quad 1\leq j\leq M-1,} \end{aligned}$$

and the average operator

$$\begin{aligned}& \mathscr{A}v_{j}= \textstyle\begin{cases} \frac{1}{12}(v_{j+1}+10v_{j}+v_{j-1}), &1\leq j\leq M-1, \\ v_{j}, &j=0,M. \end{cases}\displaystyle \end{aligned}$$

It is easy to see

$$ \mathscr{A}v_{j}= \biggl(I+\frac{h^{2}}{12}\delta ^{2}_{x} \biggr)v_{j}, $$

where I denotes the identical operator. We also denote \(\mathscr{A}v=( \mathscr{A} v_{1},\mathscr{A} v_{2},\ldots,\mathscr{A}v_{M})\) for \(v=(v_{1},v_{2},\ldots,v_{M})\), and \(\mathscr{A}(u,v)=(\mathscr{A}u,v)\) with \((\cdot ,\cdot )\) the discrete \(L^{2}\) inner product defined below.

For two grid functions \(u,v\in V^{0}_{h}=\{v\vert v\in V_{h},v_{0}=v_{M}=0 \}\), the discrete inner products and norms are defined as follows:

$$\begin{aligned} (u,v)=h\sum_{j=1}^{M-1}u_{j}v_{j}, \quad\quad {\langle u,v\rangle =h\sum_{j=1}^{M} \delta _{x} u_{j}\delta _{x} v_{j},} \end{aligned}$$

and

$$\begin{aligned} \Vert u \Vert ^{2}_{2}=(u,u),\quad\quad \vert u \vert _{1}^{2}=\langle u,u\rangle , \quad\quad \Vert u \Vert _{\infty }= \max_{1\leq j\leq M-1} \vert u_{j} \vert . \end{aligned}$$

By summation by parts and the boundary conditions, it is easy to get that

$$\begin{aligned} \bigl(\delta _{x}^{2}u,v \bigr)=-\langle u,v\rangle = \bigl(u,\delta _{x}^{2}v \bigr). \end{aligned}$$

For the average operator \(\mathscr{A}\), we also define

$$\begin{aligned} \Vert v \Vert _{A}^{2}\triangleq \mathscr{A}(v,v)=( \mathscr{A}v,v). \end{aligned}$$

Additionally, denote by \(V_{\tau }= \{ v\vert v=(v^{0},v^{1},\ldots,v^{N}) \} \) the space of all grid functions with respect to \(\varOmega _{\tau }\). Given a grid function \(v\in V_{\tau }\), we denote the difference quotient in time direction as

$$\begin{aligned} \delta _{t}v^{k}=\frac{v^{k}-v^{k-1}}{\tau }. \end{aligned}$$

Lemma 1

([59])

The following inequalities hold for any grid function \(v\in V^{0}_{h}\):

$$\begin{aligned} { \Vert v \Vert _{2}\leq \frac{b-a}{\sqrt{6}}{ \vert v \vert _{1}},}\quad\quad \frac{1}{3} { \Vert v \Vert _{2}^{2}}\leq \Vert v \Vert _{A}^{2} \leq \Vert v \Vert _{2}^{2}. \end{aligned}$$

Throughout this paper, the symbol C will indicate a genetic constant that depends on the function u and may assume different values at different occurrences, and the symbol \(O(S)\) indicates a quantity bounded above by S with a constant.

3 A second-order scheme for space and distributed order

Lemma 2

([60])

If \(s(\alpha )\in C^{2}[v_{1},v _{2}]\), then we have

$$\begin{aligned} \int _{v_{1}}^{v_{2}}s(\alpha )\,d\alpha =\Delta \alpha \sum_{l=0} ^{2J}c_{l}s( \alpha _{l})-\frac{\Delta \alpha ^{2}}{12}s^{(2)}(\xi ), \quad \xi \in (v_{1},v_{2}), \end{aligned}$$

where

$$ c_{l}= \textstyle\begin{cases} \frac{1}{2},&l=0,2J, \\ 1,&l=1,2,\ldots,2J-1. \end{cases} $$

Differential equation (1) has the form at the node \((x_{i},t_{n})\)

$$ \mathscr{D}^{w}_{t} u(x_{i},t_{n})= \frac{\partial ^{2} u(x_{i},t_{n})}{ \partial x^{2}}+f(x_{i},t_{n}),\quad 1\leq i\leq M-1, 1 \leq n \leq N-1. $$
(2)

Let , and we set \(w(\alpha )\in C^{2}[v_{1},v_{2}]\), . By Lemma 2 we obtain

where \(\xi _{i}^{n}\in (v_{1},v_{2})\).

We have [61]

(3)

where

$$ \begin{aligned} G_{k}^{\alpha _{l}}=\exp \biggl[- \alpha _{l}\tau \frac{k}{1-\alpha _{l}} \biggr]- \exp \biggl[-\alpha _{l}\tau \frac{k+1}{1-\alpha _{l}} \biggr]. \end{aligned} $$

Noting that \(u(x,0)=0\), we have

$$ \begin{aligned}[b] \mathscr{D}^{w}_{t} u(x_{i},t_{n})&=\Delta \alpha \sum _{l=0} ^{2J}c_{l}w(\alpha _{l}) \frac{1}{\alpha _{l}\tau } \Biggl[G_{0}^{\alpha _{l}}u(x_{i},t_{n})- \sum_{k=1}^{n-1} \bigl(G_{n-k-1}^{\alpha _{l}}-G _{n-k}^{\alpha _{l}} \bigr)u(x_{i},t_{k}) \Biggr] \\ &\quad{} +O \bigl(\tau ^{2}+\Delta \alpha ^{2} \bigr) \end{aligned} $$
(4)

and

$$ \begin{aligned} \frac{\partial ^{2} u}{\partial x^{2}}(x_{i},t_{n})= \delta ^{2}_{x} u _{i}^{n}+O \bigl(h^{2} \bigr). \end{aligned} $$
(5)

Substituting (4) and (5) into (2), we get

$$ \begin{aligned}[b] &\Delta \alpha \sum _{l=0}^{2J}c_{l}w(\alpha _{l}) \frac{1}{\alpha _{l}\tau } \Biggl[G_{0}^{\alpha _{l}}u_{i}^{n}- \sum_{k=1}^{n-1} \bigl(G _{n-k-1}^{\alpha _{l}}-G_{n-k}^{\alpha _{l}} \bigr)u_{i}^{k} \Biggr] \\ &\quad = \delta _{x}^{2}u_{i}^{n}+f_{i}^{n}+(r_{1})_{i}^{n}, \quad 1\leq i\leq M-1, 1\leq n\leq N, \end{aligned} $$
(6)

and there exists a constant C satisfying

$$ \begin{aligned} (r_{1})_{i}^{n} \leq C \bigl(\tau ^{2}+h^{2}+\Delta \alpha ^{2} \bigr). \end{aligned} $$

The boundary and initial conditions show that

$$ \begin{aligned} &u_{i}^{0}=0, \quad 1\leq i\leq M-1, \\ &u_{0}^{k}=u_{M}^{k}=0,\quad 0 \leq k\leq N. \end{aligned} $$
(7)

Canceling the infinitesimal part and replacing the true solution \(u_{i}^{k}\) with approximate solution \(U_{i}^{k}\), we get the finite difference method as follows:

$$ \begin{aligned} &\Delta \alpha \sum _{l=0}^{2J}c_{l}w(\alpha _{l}) \frac{1}{\alpha _{l}\tau } \Biggl[G_{0}^{\alpha _{l}}U_{i}^{n}- \sum_{k=1}^{n-1} \bigl(G _{n-k-1}^{\alpha _{l}}-G_{n-k}^{\alpha _{l}} \bigr)U_{i}^{k} \Biggr] \\ &\quad = \delta _{x}^{2}U_{i}^{n}+f_{i}^{n}, \quad 1\leq i\leq M-1, 1\leq n \leq N, \\ &U_{i}^{0}=0,\quad 1\leq i\leq M-1, \\ &U_{0}^{n}=U_{M}^{n}=0, \quad 0\leq n\leq N. \end{aligned} $$
(8)

3.1 Stability analysis

We give a lemma about \(G_{k}^{\alpha _{l}}\) which is useful in the stability analysis.

Lemma 3

([61])

From the definition of \(G_{k}^{\alpha _{l}}\), we have \(G_{k}^{\alpha _{l}}>0\)and \(G_{k+1}^{\alpha _{l}}< G_{k}^{\alpha _{l}}\), \(\forall k\leq N\).

Rearranging equation(8), we get

$$ \begin{aligned}[b] &\Delta \alpha \sum _{l=0}^{2J}c_{l} w(\alpha _{l}) \frac{1}{ \alpha _{l}\tau }\sum_{k=1}^{n}G_{n-k}^{\alpha _{l}}U_{i}^{k}- \delta _{x}^{2}U_{i}^{n} \\ &\quad =\Delta \alpha \sum_{l=0}^{2J}c_{l}w( \alpha _{l})\frac{1}{\alpha _{l}\tau }\sum_{k=1}^{n-1}G_{n-k-1} ^{\alpha _{l}}U_{i}^{k}+f_{i}^{n}, \quad 1\leq i\leq M-1, 1\leq n \leq N. \end{aligned} $$
(9)

Denote \(\eta _{1}=\Delta \alpha \sum_{l=0}^{2J}c_{l}w(\alpha _{l})\frac{1}{\alpha _{l}\tau }\). Multiplying both sides of equation (9) by \(hU_{i}^{n}\) and making summation with respect to i from 1 to \(M-1\), we obtain

$$ \begin{aligned} &\eta _{1}\sum _{k=1}^{n}G_{n-k}^{\alpha _{l}} \bigl(U^{k},U^{n} \bigr){+ \bigl\vert U ^{n} \bigr\vert _{1}^{2}}=\eta _{1}\sum_{k=1}^{n-1}G_{n-k-1}^{\alpha _{l}} \bigl(U ^{k},U^{n} \bigr)+ \bigl(f^{n},U^{n} \bigr). \end{aligned} $$

Noting Lemma 1 and Young’s inequality, we have

$$\begin{aligned} \begin{aligned} &\frac{6}{L^{2}} \bigl\Vert U^{n} \bigr\Vert _{2}^{2}+\eta _{1} G_{0}^{\alpha _{l}} \bigl\Vert U^{n} \bigr\Vert _{2} ^{2}\leq \eta _{1} \sum_{k=1}^{n-1} \bigl(G_{n-k-1}^{\alpha _{l}}-G _{n-k}^{\alpha _{l}} \bigr) \bigl(U^{k},U^{n} \bigr)+\frac{L^{2}}{24} \bigl\Vert f^{n} \bigr\Vert _{2}^{2}+ \frac{6}{L ^{2}} \bigl\Vert U^{n} \bigr\Vert _{2}^{2}. \end{aligned} \end{aligned}$$

Using the triangle inequality, we obtain

$$ \begin{aligned} &\eta _{1} G_{0}^{\alpha _{l}} \bigl\Vert U^{n} \bigr\Vert _{2}^{2}\leq \frac{\eta _{1} }{2} \sum_{k=1}^{n-1} \bigl(G_{n-k-1}^{\alpha _{l}}-G_{n-k}^{\alpha _{l}} \bigr) \bigl( \bigl\Vert U ^{k} \bigr\Vert _{2}^{2}+ \bigl\Vert U^{n} \bigr\Vert _{2}^{2} \bigr)+ \frac{L^{2}}{24} \bigl\Vert f^{n} \bigr\Vert _{2}^{2}. \end{aligned} $$

Consequently, we get

$$ \begin{aligned} &\eta _{1} G_{0}^{\alpha _{l}} \bigl\Vert U^{n} \bigr\Vert _{2}^{2}+ \frac{\eta _{1}}{2} \sum_{k=1}^{n-1} \bigl(G_{n-k}^{\alpha _{l}}-G_{n-k-1}^{\alpha _{l}} \bigr) \bigl\Vert U ^{n} \bigr\Vert _{2}^{2} \\ &\quad \leq \frac{\eta _{1}}{2}\sum_{k=1}^{n-1} \bigl(G _{n-k-1}^{\alpha _{l}}-G_{n-k}^{\alpha _{l}} \bigr) \bigl\Vert U^{k} \bigr\Vert _{2}^{2}+ \frac{L ^{2}}{24} \bigl\Vert f^{n} \bigr\Vert _{2}^{2}. \end{aligned} $$

Namely,

$$ \begin{aligned} &\frac{\eta _{1}}{2} \bigl(G_{0}^{\alpha _{l}}+G_{n-1}^{\alpha _{l}} \bigr) \bigl\Vert U^{n} \bigr\Vert _{2} ^{2} \leq \frac{\eta _{1}}{2}\sum_{k=1}^{n-1} \bigl(G_{n-k-1}^{\alpha _{l}}-G_{n-k}^{\alpha _{l}} \bigr) \bigl\Vert U^{k} \bigr\Vert _{2}^{2}+ \frac{L^{2}}{24} \bigl\Vert f^{n} \bigr\Vert _{2} ^{2}. \end{aligned} $$

Then it follows that

$$ \begin{aligned} &\frac{\eta _{1}}{2}\sum _{k=1}^{n}G_{n-k}^{\alpha _{l}} \bigl\Vert U^{k} \bigr\Vert _{2} ^{2}\leq \frac{\eta _{1}}{2}\sum_{k=1}^{n-1}G_{n-k-1}^{\alpha _{l}} \bigl\Vert U^{k} \bigr\Vert _{2}^{2}+ \frac{L^{2}}{24} \bigl\Vert f^{n} \bigr\Vert _{2}^{2}. \end{aligned} $$

Denote

$$ Q \bigl(U^{n} \bigr)=\frac{\eta _{1}}{2}\sum _{k=1}^{n}G_{n-k}^{\alpha _{l}} \bigl\Vert U ^{k} \bigr\Vert _{2}^{2}. $$

Making summation with respect to i from 1 to N shows that

$$ \begin{aligned} &Q \bigl(U^{N} \bigr)\leq Q \bigl(U^{0} \bigr)+\frac{L^{2}}{24}\sum _{n=1}^{N} \bigl\Vert f^{n} \bigr\Vert _{2} ^{2}. \end{aligned} $$

Observing that \(U^{0}=0\) implies \(Q(U^{0})=0\), we have

$$ \begin{aligned} &Q \bigl(U^{N} \bigr)\leq \frac{L^{2}}{24} \sum_{n=1}^{N} \bigl\Vert f^{n} \bigr\Vert _{2}^{2}. \end{aligned} $$

Theorem 1

For scheme (8), stability inequality is as follows:

$$ Q \bigl(U^{m} \bigr)\leq \frac{L^{2}}{24}\sum _{n=1}^{m} \bigl\Vert f^{n} \bigr\Vert _{2}^{2}, \quad \forall 0\leq m\leq N. $$

3.2 Optimal error estimates

Combining equations (6), (7) with (8), we have the following error equation:

$$ \begin{aligned} &\eta _{1} \sum _{k=1}^{n}G_{n-k}^{\alpha _{l}}e_{i}^{k}- \delta _{x}^{2}e_{i}^{n}=\eta _{1} \sum_{k=1}^{n-1}G_{n-k-1}^{\alpha _{l}}e_{i}^{k}+(r_{1})_{i}^{n}. \end{aligned} $$
(10)

Here \((r_{1})_{i}^{n}=O(\tau ^{2}+h^{2}+\Delta \alpha ^{2})\), \(e_{i}^{k}=u_{i}^{k}-U_{i}^{k}\), \(\forall 0\leq k\leq N\).

Multiply two sides of equation (10) with \(he_{i}^{n}\) and make summation with respect to i from 1 to \(M-1\) to get

$$ \begin{aligned} &\eta _{1}\sum _{k=1}^{n}G_{n-k}^{\alpha _{l}} \bigl(e^{k},e^{n} \bigr){+ \bigl\vert e ^{n} \bigr\vert _{1}^{2}}=\eta _{1}\sum_{k=1}^{n-1}G_{n-k-1}^{\alpha _{l}} \bigl(e ^{k},e^{n} \bigr)+ \bigl((r_{1})^{n},e^{n} \bigr). \end{aligned} $$

Noting Lemma 1 and Young’s inequality, we have

$$\begin{aligned} \begin{aligned} &\frac{6}{L^{2}} \bigl\Vert e^{n} \bigr\Vert _{2}^{2}+\eta _{1} G_{0}^{\alpha _{l}} \bigl\Vert e^{n} \bigr\Vert _{2} ^{2}\leq \eta _{1} \sum_{k=1}^{n-1} \bigl(G_{n-k-1}^{\alpha _{l}}-G _{n-k}^{\alpha _{l}} \bigr) \bigl(e^{k},e^{n} \bigr)+\frac{L^{2}}{24} \bigl\Vert (r_{1})^{n} \bigr\Vert _{2} ^{2}+\frac{6}{L^{2}} \bigl\Vert e^{n} \bigr\Vert _{2}^{2}. \end{aligned} \end{aligned}$$

By the triangle inequality, we obtain

$$\begin{aligned} \begin{aligned} &\eta _{1} G_{0}^{\alpha _{l}} \bigl\Vert e^{n} \bigr\Vert _{2}^{2}\leq \frac{\eta _{1}}{2} \sum_{k=1}^{n-1} \bigl(G_{n-k-1}^{\alpha _{l}}-G_{n-k}^{\alpha _{l}} \bigr) \bigl( \bigl\Vert e ^{k} \bigr\Vert _{2}^{2}+ \bigl\Vert e^{n} \bigr\Vert _{2}^{2} \bigr)+ \frac{L^{2}}{24} \bigl\Vert (r_{1})^{n} \bigr\Vert _{2} ^{2}. \end{aligned} \end{aligned}$$

Transposition gives rise to

$$ \begin{aligned} &\eta _{1} G_{0}^{\alpha _{l}} \bigl\Vert e^{n} \bigr\Vert _{2}^{2}+ \frac{\eta _{1}}{2} \sum_{k=1}^{n-1} \bigl(G_{n-k}^{\alpha _{l}}-G_{n-k-1}^{\alpha _{l}} \bigr) \bigl\Vert e ^{n} \bigr\Vert _{2}^{2} \\ &\quad \leq \frac{\eta _{1}}{2}\sum_{k=1}^{n-1} \bigl(G _{n-k-1}^{\alpha _{l}}-G_{n-k}^{\alpha _{l}} \bigr) \bigl\Vert e^{k} \bigr\Vert _{2}^{2}+ \frac{L ^{2}}{24} \bigl\Vert (r_{1})^{n} \bigr\Vert _{2}^{2}, \end{aligned} $$

namely,

$$ \begin{aligned} &\frac{\eta _{1}}{2} \bigl(G_{0}^{\alpha _{l}}+G_{n-1}^{\alpha _{l}} \bigr) \bigl\Vert e^{n} \bigr\Vert _{2} ^{2} \leq \frac{\eta _{1}}{2}\sum_{k=1}^{n-1} \bigl(G_{n-k-1}^{\alpha _{l}}-G_{n-k}^{\alpha _{l}} \bigr) \bigl\Vert e^{k} \bigr\Vert _{2}^{2}+ \frac{L^{2}}{24} \bigl\Vert (r_{1})^{n} \bigr\Vert _{2} ^{2}. \end{aligned} $$

Then we have

$$ \begin{aligned} &\frac{\eta _{1}}{2}\sum _{k=1}^{n}G_{n-k}^{\alpha _{l}} \bigl\Vert e^{k} \bigr\Vert _{2} ^{2}\leq \frac{\eta _{1}}{2}\sum_{k=1}^{n-1}G_{n-k-1}^{\alpha _{l}} \bigl\Vert e^{k} \bigr\Vert _{2}^{2}+ \frac{L^{2}}{24} \bigl\Vert (r_{1})^{n} \bigr\Vert _{2}^{2}. \end{aligned} $$

Denote

$$ Q \bigl(e^{n} \bigr)=\frac{\eta _{1}}{2}\sum _{k=1}^{n}G_{n-k}^{\alpha _{l}} \bigl\Vert e ^{k} \bigr\Vert _{2}^{2}. $$

Making summation with respect to n from 1 to N shows that

$$ \begin{aligned} &Q \bigl(e^{N} \bigr)\leq Q \bigl(e^{0} \bigr)+\frac{L^{2}}{24}\sum _{n=1}^{N} \bigl\Vert (r_{1})^{n} \bigr\Vert _{2} ^{2}. \end{aligned} $$

Observing that \(e^{0}=0\) implies \(Q(e^{0})=\frac{\eta _{1}}{2}G_{0} ^{\alpha _{l}} \Vert e^{0} \Vert _{2}^{2}=0\), we have

$$ \begin{aligned} &Q \bigl(e^{N} \bigr)\leq \frac{L^{2}}{24} \sum_{n=1}^{N} \bigl\Vert (r_{1})^{n} \bigr\Vert _{2} ^{2}. \end{aligned} $$

Theorem 2

For scheme (8), the following stability inequality holds:

$$ \bigl\Vert e^{m} \bigr\Vert _{2}\leq C \bigl(\tau ^{2}+h^{2}+\Delta \alpha ^{2} \bigr),\quad \forall 0 \leq m\leq N. $$

4 A fourth-order method for space and distributed order

The following lemma is necessary for establishing a scheme with fourth-order accuracy in spatial variable,

Lemma 4

([62])

Let \(\theta (s)=(1-s)^{3}[5-3(1-s)^{2}]\). Suppose that \(f(x)\in C^{6}[a,b]\), \(h=(b-a)/M\), \(x_{i}=a+ih\) (\(0\leq i \leq M\)), then we have

$$ \begin{aligned} &\frac{1}{12} \bigl[f^{\prime \prime }(x_{i-1})+10f^{\prime \prime }(x_{i})+f^{\prime \prime }(x_{i+1}) \bigr] \\ &\quad =\frac{1}{h ^{2}} \bigl[f(x_{i-1})-2f(x_{i})+f(x_{i+1}) \bigr] \\ &\quad\quad {} +\frac{h^{4}}{360} \int ^{1} _{0} \bigl[f^{(6)}(x_{i}-sh)+f^{(6)}(x_{i}+sh) \bigr]\theta (s)\,ds,\quad 1\leq i \leq M-1. \end{aligned} $$

Lemma 5

([60]; The composite Simpson formula)

Let \(s(\alpha )\in C^{4}[v_{1},v_{2}]\), then we have

$$\begin{aligned} \int _{v_{1}}^{v_{2}}s(\alpha )\,d\alpha =\Delta \alpha \sum_{l=0} ^{2J}d_{l}s( \alpha _{l})-\frac{\Delta \alpha ^{4}}{180}s^{(4)}(\xi ), \quad \xi \in (v_{1},v_{2}), \end{aligned}$$

where

$$ d_{l}= \textstyle\begin{cases} \frac{1}{3},&l=0,2J, \\ \frac{2}{3},&l=2,4,\ldots,2J-4,2J-2, \\ \frac{4}{3},&l=1,3,\ldots,2J-3,2J-1. \end{cases} $$

The differential equation at the node \((x_{i},t_{n})\) has the form

$$\begin{aligned}& \mathscr{D}^{w}_{t} u(x_{i},t_{n})= \frac{\partial ^{2} u(x_{i},t_{n})}{ \partial x^{2}}+f(x_{i},t_{n}), \quad 1\leq i\leq M-1, 1 \leq n \leq N-1. \end{aligned}$$
(11)

Denote and suppose that \(w(\alpha )\in C^{4}[v _{1},v_{2}]\), . By Lemma 5, we get

where \(\xi _{i}^{n}\in (v_{1},v_{2})\).

Noting \(u(x,0)=0\) and taking use of equation (3), we have

$$ \begin{aligned}[b] \mathscr{D}^{w}_{t} u(x_{i},t_{n})&=\Delta \alpha \sum _{l=0} ^{2J}d_{l}w(\alpha _{l}) \frac{1}{\alpha _{l}\tau } \Biggl[G_{0}^{\alpha _{l}}u(x_{i},t_{n})- \sum_{k=1}^{n-1} \bigl(G_{n-k-1}^{\alpha _{l}}-G _{n-k}^{\alpha _{l}} \bigr)u(x_{i},t_{k}) \Biggr] \\ &\quad{} +O \bigl(\tau ^{2}+\Delta \alpha ^{4} \bigr). \end{aligned} $$
(12)

By Lemma 4, we obtain

$$ \begin{aligned} &\mathscr{A}\frac{\partial ^{2} u}{\partial x^{2}}(x_{i},t_{n})= \delta ^{2}_{x} u_{i}^{n}+O \bigl(h^{4} \bigr). \end{aligned} $$
(13)

Substituting (12)–(13) into (11), we get

$$ \begin{aligned}[b] &\mathscr{A}\Delta \alpha \sum _{l=0}^{2J}d_{l}w(\alpha _{l})\frac{1}{ \alpha _{l}\tau } \Biggl[G_{0}^{\alpha _{l}}u_{i}^{n}- \sum_{k=1} ^{n-1} \bigl(G_{n-k-1}^{\alpha _{l}} -G_{n-k}^{\alpha _{l}} \bigr)u_{i}^{k} \Biggr] \\ &\quad =\delta _{x}^{2}u_{i}^{n}+ \mathscr{A}f_{i}^{n}+(r_{2})_{i}^{n}, \quad 1\leq i\leq M-1, 1\leq n\leq N, \end{aligned} $$
(14)

and there exists a constant C satisfying

$$ \begin{aligned} (r_{2})_{i}^{n} \leq C \bigl(\tau ^{2}+h^{4}+\Delta \alpha ^{4} \bigr). \end{aligned} $$

Noting the boundary and initial conditions, we have

$$ \begin{aligned} &u_{i}^{0}=0, \quad 1\leq i\leq M-1, \\ &u_{0}^{n}=u_{M}^{n}=0,\quad 0 \leq n\leq N. \end{aligned} $$
(15)

Canceling the infinitesimal part \((r_{2})_{i}^{n}\) and replacing the exact solution \(u_{i}^{k}\) with the approximate solution \(U_{i}^{k}\), a compact difference method is obtained as follows:

$$ \begin{aligned} &\mathscr{A}\Delta \alpha \sum _{l=0}^{2J}d_{l}w(\alpha _{l})\frac{1}{ \alpha _{l}\tau } \Biggl[G_{0}^{\alpha _{l}}U_{i}^{n}- \sum_{k=1} ^{n-1} \bigl(G_{n-k-1}^{\alpha _{l}}- G_{n-k}^{\alpha _{l}} \bigr)U_{i}^{k} \Biggr] \\ &\quad =\delta _{x}^{2}U_{i}^{n}+ \mathscr{A}f_{i}^{n},\quad 1\leq i\leq M-1, 1\leq n\leq N, \\ &U_{i}^{0}=0,\quad 1\leq i\leq M-1, \\ &U_{0} ^{n}=U_{M}^{n}=0, \quad 0\leq n\leq N. \end{aligned} $$
(16)

4.1 Stability analysis

Sorting equation (16), we get the following equation:

$$ \begin{aligned}[b] &\mathscr{A}\Delta \alpha \sum _{l=0}^{2J}d_{l}w(\alpha _{l})\frac{1}{ \alpha _{l}\tau }\sum_{k=1}^{n}G_{n-k}^{\alpha _{l}}U_{i}^{k}- \delta _{x}^{2}U_{i}^{n} \\ &\quad =\mathscr{A}\Delta \alpha \sum_{l=0} ^{2J}d_{l}w(\alpha _{l}) \frac{1}{\alpha _{l}\tau }\sum_{k=1}^{n-1}G _{n-k-1}^{\alpha _{l}}U_{i}^{k}+ \mathscr{A}f_{i}^{n},\quad 1\leq i \leq M-1, 1\leq n\leq N. \end{aligned} $$
(17)

We set \(\eta _{2}=\Delta \alpha \sum_{l=0}^{2J}d_{l}w(\alpha _{l})\frac{1}{\alpha _{l}\tau }\). Multiplying both sides of equation (17) by \(hU_{i}^{n}\) and making summation with respect to i from 1 to \(M-1\) leads to

$$ \begin{aligned} &\eta _{2}\sum _{k=1}^{n}G_{n-k}^{\alpha _{l}} \bigl(U^{k},U^{n} \bigr)_{A} {+ \bigl\vert U^{n} \bigr\vert _{1}^{2}}=\eta _{2} \sum_{k=1}^{n-1}G_{n-k-1}^{\alpha _{l}} \bigl(U^{k},U^{n} \bigr)_{A}+ \bigl(f^{n},U^{n} \bigr)_{A}. \end{aligned} $$

Noting Lemma 1 and Young’s inequality, we have

$$\begin{aligned} \begin{aligned} &\frac{6}{L^{2}} \bigl\Vert U^{n} \bigr\Vert _{2}^{2}+\eta _{2} G_{0}^{\alpha _{l}} \bigl\Vert U^{n} \bigr\Vert _{A} ^{2}\leq \eta _{2} \sum_{k=0}^{n-1} \bigl(G_{n-k-1}^{\alpha _{l}}-G _{n-k}^{\alpha _{l}} \bigr) \bigl(U^{k},U^{n} \bigr)_{A}+ \frac{L^{2}}{24} \bigl\Vert f^{n} \bigr\Vert _{A} ^{2}+ \frac{6}{L^{2}} \bigl\Vert U^{n} \bigr\Vert _{2}^{2}. \end{aligned} \end{aligned}$$

Using the triangle inequality, we obtain

$$ \begin{aligned} &\eta _{2} G_{0}^{\alpha _{l}} \bigl\Vert U^{n} \bigr\Vert _{A}^{2} \leq \frac{\eta _{2}}{2} \sum_{k=1}^{n-1} \bigl(G_{n-k-1}^{\alpha _{l}}-G_{n-k}^{\alpha _{l}} \bigr) \bigl( \bigl\Vert U ^{k} \bigr\Vert _{A}^{2}+ \bigl\Vert U^{n} \bigr\Vert _{A}^{2} \bigr)+ \frac{L^{2}}{24} \bigl\Vert f^{n} \bigr\Vert _{A}^{2}. \end{aligned} $$

It follows that

$$ \begin{aligned} &\eta _{2} G_{0}^{\alpha _{l}} \bigl\Vert U^{n} \bigr\Vert _{A}^{2}+ \frac{\eta _{2}}{2} \sum_{k=1}^{n-1} \bigl(G_{n-k}^{\alpha _{l}}-G_{n-k-1}^{\alpha _{l}} \bigr) \bigl\Vert U ^{n} \bigr\Vert _{A}^{2} \\ &\quad \leq \frac{\eta _{2}}{2}\sum_{k=1}^{n-1} \bigl(G _{n-k-1}^{\alpha _{l}}-G_{n-k}^{\alpha _{l}} \bigr) \bigl\Vert U^{k} \bigr\Vert _{A}^{2}+ \frac{L ^{2}}{24} \bigl\Vert f^{n} \bigr\Vert _{A}^{2}, \end{aligned} $$

namely,

$$ \begin{aligned} &\frac{\eta _{2}}{2} \bigl(G_{0}^{\alpha _{l}}+G_{n-1}^{\alpha _{l}} \bigr) \bigl\Vert U^{n} \bigr\Vert _{A} ^{2} \leq \frac{\eta _{2}}{2}\sum_{k=1}^{n-1} \bigl(G_{n-k-1}^{\alpha _{l}}- G_{n-k}^{\alpha _{l}} \bigr) \bigl\Vert U^{k} \bigr\Vert _{A}^{2}+ \frac{L^{2}}{24} \bigl\Vert f^{n} \bigr\Vert _{A} ^{2}. \end{aligned} $$

Transposition leads to

$$ \begin{aligned} &\frac{\eta _{2}}{2}\sum _{k=1}^{n}G_{n-k}^{\alpha _{l}} \bigl\Vert U^{k} \bigr\Vert _{A} ^{2} \leq \frac{\eta _{2}}{2}\sum_{k=1}^{n-1}G_{n-k-1}^{\alpha _{l}} \bigl\Vert U^{k} \bigr\Vert _{A}^{2}+ \frac{L^{2}}{24} \bigl\Vert f^{n} \bigr\Vert _{A}^{2}. \end{aligned} $$

Denote

$$ Q \bigl(U^{n} \bigr)=\frac{\eta _{2}}{2}\sum _{k=1}^{n}G_{n-k}^{\alpha _{l}} \bigl\Vert U ^{k} \bigr\Vert _{A}^{2}. $$

Making summation from \(n=1\) to \(n=N\) shows that

$$ \begin{aligned} &Q \bigl(U^{N} \bigr)\leq Q \bigl(U^{0} \bigr)+\frac{L^{2}}{24}\sum _{n=1}^{N} \bigl\Vert f^{n} \bigr\Vert _{A} ^{2}. \end{aligned} $$

Observing that \(u^{0}=0\) implies \(Q(u^{0})=0\), then we have

$$ \begin{aligned} &Q \bigl(U^{N} \bigr)\leq \frac{L^{2}}{24} \sum_{n=1}^{N} \bigl\Vert f^{n} \bigr\Vert _{A}^{2}. \end{aligned} $$

Theorem 3

For scheme (16), the following stability inequality holds:

$$ Q \bigl(U^{m} \bigr)\leq \frac{L^{2}}{24}\sum _{n=1}^{m} \bigl\Vert f^{n} \bigr\Vert _{A}^{2}, \quad \forall 0\leq m\leq N. $$

4.2 Convergence analysis

Combining equations (14), (15) with (16), an error equation can be obtained as follows:

$$ \begin{aligned} &\mathscr{A}\eta _{2} \sum_{k=1}^{n}G_{n-k}^{\alpha _{l}}e_{i} ^{k}-\delta _{x}^{2}e_{i}^{n}= \mathscr{A}\eta _{2} \sum_{k=1} ^{n-1}G_{n-k-1}^{\alpha _{l}}e_{i}^{k}+(r_{2})_{i}^{n}{,} \end{aligned} $$
(18)

where \((r_{2})_{i}^{n}=O(\tau ^{2}+h^{4}+\Delta \alpha ^{4})\), \(e_{i}^{k}=u_{i}^{k}-U_{i}^{k}\), \(\forall 0\leq k\leq N\).

Multiplying two sides of equation (18) by \(he_{i}^{n}\) and making summation with respect to i from 1 to \(M-1\), we get

$$ \begin{aligned} &\mathscr{A}\eta _{2}\sum _{k=1}^{n}G_{n-k}^{\alpha _{l}} \bigl(e^{k},e ^{n} \bigr)_{A}{+ \bigl\vert e^{n} \bigr\vert _{1}^{2}}= \mathscr{A}\eta _{2}\sum_{k=1}^{n-1}G _{n-k-1}^{\alpha _{l}} \bigl(e^{k},e^{n} \bigr)_{A}+ \bigl((r_{2})^{n},e^{n} \bigr)_{A}. \end{aligned} $$

Noting Lemma 1 and Young’s inequality, we have

$$\begin{aligned} \begin{aligned} &\frac{6}{L^{2}} \bigl\Vert e^{n} \bigr\Vert _{2}^{2}+\eta _{2} G_{0}^{\alpha _{l}} \bigl\Vert e^{n} \bigr\Vert _{A} ^{2}\leq \eta _{2} \sum_{k=1}^{n-1} \bigl(G_{n-k-1}^{\alpha _{l}}-G _{n-k}^{\alpha _{l}} \bigr) \bigl(e^{k},e^{n} \bigr)_{A}+ \frac{L^{2}}{24} \bigl\Vert (r_{2})^{n} \bigr\Vert _{A} ^{2}+\frac{6}{L^{2}} \bigl\Vert e^{n} \bigr\Vert _{2}^{2}. \end{aligned} \end{aligned}$$

Using the triangle inequality, we obtain

$$ \begin{aligned} &\eta _{2} G_{0}^{\alpha _{l}} \bigl\Vert e^{n} \bigr\Vert _{A}^{2} \leq \frac{\eta _{2}}{2} \sum_{k=1}^{n-1} \bigl(G_{n-k-1}^{\alpha _{l}}-G_{n-k}^{\alpha _{l}} \bigr) \bigl( \bigl\Vert e ^{k} \bigr\Vert _{A}^{2}+ \bigl\Vert e^{n} \bigr\Vert _{A}^{2} \bigr)+ \frac{L^{2}}{24} \bigl\Vert (r_{2})^{n} \bigr\Vert _{A} ^{2}. \end{aligned} $$

Rearranging the above equation leads to

$$ \begin{aligned} &\eta _{2} G_{0}^{\alpha _{l}} \bigl\Vert e^{n} \bigr\Vert _{A}^{2}+ \frac{\eta _{2}}{2} \sum_{k=1}^{n-1} \bigl(G_{n-k}^{\alpha _{l}}-G_{n-k-1}^{\alpha _{l}} \bigr) \bigl\Vert e ^{n} \bigr\Vert _{A}^{2} \\ &\quad \leq \frac{\eta _{2}}{2}\sum_{k=1}^{n-1} \bigl(G _{n-k-1}^{\alpha _{l}}-G_{n-k}^{\alpha _{l}} \bigr) \bigl\Vert e^{k} \bigr\Vert _{A}^{2}+ \frac{L ^{2}}{24} \bigl\Vert (r_{2})^{n} \bigr\Vert _{A}^{2}, \end{aligned} $$

namely

$$ \begin{aligned} &\frac{\eta _{2}}{2} \bigl(G_{0}^{\alpha _{l}}+G_{n-1}^{\alpha _{l}} \bigr) \bigl\Vert e^{n} \bigr\Vert _{A} ^{2} \leq \frac{\eta _{2}}{2}\sum_{k=1}^{n-1} \bigl(G_{n-k-1}^{\alpha _{l}}-G_{n-k}^{\alpha _{l}} \bigr) \bigl\Vert e^{k} \bigr\Vert _{A}^{2}+ \frac{L^{2}}{24} \bigl\Vert (r_{2})^{n} \bigr\Vert _{A} ^{2}. \end{aligned} $$

Finally we get

$$ \begin{aligned} &\frac{\eta _{2}}{2}\sum _{k=1}^{n}G_{n-k}^{\alpha _{l}} \bigl\Vert e^{k} \bigr\Vert _{A} ^{2} \leq \frac{\eta _{2}}{2}\sum_{k=1}^{n-1}G_{n-k-1}^{\alpha _{l}} \bigl\Vert e^{k} \bigr\Vert _{A}^{2}+ \frac{L^{2}}{24} \bigl\Vert (r_{2})^{n} \bigr\Vert _{A}^{2}. \end{aligned} $$

Denote

$$ Q \bigl(e^{n} \bigr)=\frac{\eta _{2}}{2}\sum _{k=1}^{n}G_{n-k}^{\alpha _{l}} \bigl\Vert e ^{k} \bigr\Vert _{A}^{2}. $$

Make summation with respect to n from 1 to N to get

$$ \begin{aligned} &Q \bigl(e^{N} \bigr)\leq Q \bigl(e^{0} \bigr)+\frac{L^{2}}{24}\sum _{n=1}^{N} \bigl\Vert (r_{2})^{n} \bigr\Vert _{A} ^{2}. \end{aligned} $$

Observing that \(e^{0}=0\) implies \(Q(e^{0})=0\), it follows that

$$ \begin{aligned} &Q \bigl(e^{N} \bigr)\leq \frac{L^{2}}{24} \sum_{n=1}^{N} \bigl\Vert (r_{2})^{n} \bigr\Vert _{A} ^{2}. \end{aligned} $$

Theorem 4

For scheme (16), the following stability inequality holds:

$$ \bigl\Vert e^{m} \bigr\Vert _{2}\leq C \bigl(\tau ^{2}+h^{4}+\Delta \alpha ^{4} \bigr),\quad \forall 0 \leq m\leq N. $$

5 Numerical tests

We perform numerical experiments to verify the proposed numerical format. Here, we consider the convergence speed of the numerical solution format. For the problem to be solved, we take the domain \(\varOmega =[0,\pi ]\), \(T=0.5\). The numerical simulations are performed with MATLAB2015 on a 8GB memory computer.

Consider time distributed-order model as follows.

Example 1

For equation (1), if we give the true solution \(u(x,t)=4t^{2}\sin (x)\) with \(w(\alpha )=\alpha ^{2}\), accordingly, \(f(x,t)\) can be derived as follows:

$$ \begin{aligned} f(x,t)=8\sin (x) \biggl[ \int _{v_{1}}^{v_{2}}(\alpha t+\alpha -1)\,d\alpha -e^{t} \int _{v_{1}}^{v_{2}}(\alpha -1)e^{\frac{t}{\alpha -1}}{d \alpha } \biggr]+4t^{2}\sin (x). \end{aligned} $$

The error norms for difference schemes (8) and (16) are denoted as \(\Vert \cdot \Vert ^{\#}_{l}\) and \(\Vert \cdot \Vert ^{*}_{l}\), where \(l=2\) or ∞, respectively.

Firstly, the numerical convergence orders of the two difference formats are tested by Example 1. Let the spatial step size h and the distributed-order subinterval size Δα be fixed small enough. We take \(h=\pi /900\), \(\Delta \alpha =1/300\), and \(\tau = 1 / 4 , 1 / 8, 1 / 16, 1 / 32 \) to observe the convergence rates about time step τ for both of the two difference formats. Table 1 shows the simulation results for three different distribution intervals \([v_{1}, v_{2}] =[0.1,0.4],[0.5,0.9]\), and \([0.2,0.8]\), including the errors and convergence orders in discrete \(L ^{2} \) norm. From these results we can see that the time convergence rates for both formats are second-order.

Table 1 The discrete \(L^{2}\) error and convergence rates in time for schemes (8) and (16) for Example 1 with \(h=\pi /900\) and \(\Delta \alpha =1/300\)

Next, we fix \(v_{1}=0.1\), \(v_{2}=0.9\), and take several different step sizes satisfying \(N = J \) and \(M = \operatorname{floor}(\pi J)\), i.e., \(\tau = \frac{1}{2J } \), \(h \approx \frac{1}{J} \), and \(\Delta \alpha = \frac{(v_{2}-v_{1})}{2J} \). The simulation results of the numerical format (8) for Example 1 are shown in Table 2. From the table we can see that, when the spatial step size h, the discrete step of the distributed order Δα, and the time step τ are halved simultaneously, the errors between the numerical solution and the true solution will be reduced to quarter in both of maximum norm and the discrete \(L ^{2} \) norm. These results show that the numerical convergence orders for difference format (8) are approximately 2 about time variable, space variable, and the distributed order.

Table 2 The discrete \(L^{2}\) errors, maximum errors, and convergence rates for scheme (8) for Example 1 with \(v_{1}=0.1\) and \(v_{2}=0.9\)

In addition, we choose a group of mesh steps satisfying \(8N = J^{2} \) and \(M = \operatorname{floor}(\pi J)\), which means that τ varies synchronously with \(\Delta \alpha ^{2}\) and \(h^{2}\). The simulation results of numerical format (16) for Example 1 are given in Table 3. We observe that when the spatial step h and the distributed-order step size Δα are halved, the corresponding numerical errors in discrete norm are reduced to 1/16 times. This means both of the convergence rates for spatial variable and distributed order are of fourth order and thus the time convergence rate is of second order.

Table 3 The discrete \(L^{2}\) errors, maximum errors, and convergence rates for scheme (16) for Example 1 with \(v_{1}=0.1\) and \(v_{2}=0.9\)

Example 2

For equation (1), if we give the true solution \(u(x,t)=2t\sin (x)\) with \(w(\alpha )=\alpha ^{2}\), accordingly, \(f(x,t)\) can be derived as follows:

$$ \begin{aligned} f(x,t)=2\sin (x) \biggl[ \int _{v_{1}}^{v_{2}} \alpha \,d\alpha -e^{t} \int _{v_{1}}^{v_{2}}\alpha e^{\frac{t}{\alpha -1}}\,d\alpha \biggr]+2t\sin (x). \end{aligned} $$

For Example 2, we set the distributed-order interval \([v_{1},v _{2}]=[0.1,0.9]\) and the numbers of discrete points are required to satisfy \(M=N=J\) for scheme (8). The simulation results in Table 4 show that scheme (8) has convergence rates of second order for all of the spatial step h, the temporal step τ, and the distributed-order step Δα.

Table 4 The discrete \(L^{2}\) errors, maximum errors, and their convergence rates for scheme (8) for Example 2 when \(v_{1}=0.1\) and \(v_{2}=0.9\)

In addition, we choose a group of mesh steps satisfying \(8N = J^{2} \) and \(M = J\), which means that τ varies synchronously with \(\Delta \alpha ^{2}\) and \(h^{2}\). The simulation results of numerical format (16) for Example 2 are given in Table 5. We observe that when the spatial step h and the distributed-order step size Δα are halved, the corresponding numerical errors in discrete norm are reduced to 1/16 times. This means both of the convergence rates for spatial variable and distributed order are fourth order, and accordingly the convergence rate for time variable is second order.

Table 5 The discrete \(L^{2}\) errors, maximum errors, and convergence rates for scheme (16) for Example 2 with \(v_{1}=0.1\) and \(v_{2}=0.9\)

6 Conclusion

In this paper, two effective finite difference schemes are developed for solving time distributed-order partial differential equations equipped with the new Caputo–Fabrizio fractional derivative in a one-dimensional space. The first scheme (8) is based on second-order central difference quotient in space direction and the other one (16) is based on compact difference. We have proved that both of the two finite difference schemes are unconditionally stable. Theoretical analysis shows that the first scheme has convergence rates of second order for all of the spatial step h, the temporal step τ, and the distributed-order step Δα; and the second scheme (compact difference) has convergence rates of fourth order for both of the spatial step h and the distributed-order step Δα, while second order for the temporal step τ. Finally, some numerical experiments, which demonstrate the performance of the schemes and verify the correctness of the theoretical results, are carried out.

The basic model is in a one-dimensional space, an extension to multi-dimensional models is possible and feasible. With the development of the theory about fractional calculus, fractional partial differential equations with variable order become the potentially powerful tool for describing complex phenomena [63]. We hope to extend the idea of this paper to this kind of fractional equations in the future. Moreover, because of the nonlocal property of fractional derivatives, the requirement for memory and computational complexity will increase rapidly along with the size of discrete systems. So we plan to develop some techniques of fast solution in the future work.