1 Introduction

Fractional differential equations have proved to be valuable tools in modeling physical phenomena in various fields of science [15, 31, 32]. Subdiffusion motion is particularly important in modeling complex systems such as glassy and distorted materials. A class of anomalous subdiffusion equation takes the form

$$\begin{aligned} \frac{\partial u}{\partial t}&= K_{\gamma }\,{}{_0}{D}_t^{1-\gamma }\frac{\partial ^2u}{\partial x^2}+f(x,t),\quad 0<x<L, 0< t\le T,\end{aligned}$$
(1.1)
$$\begin{aligned} u(0,t)&= \alpha (t),\;u(L,t)=\beta (t),\quad 0< t\le T,\end{aligned}$$
(1.2)
$$\begin{aligned} u(x,0)&= \varphi (x),\quad 0\le x\le L, \end{aligned}$$
(1.3)

where \(K_{\gamma }\) is a positive constant and \({}{_0}{D}_{t}^{1-\gamma }\) is the modified Riemann–Liouville derivative of order \(1-\gamma \), suggested by Jumarie [1620],

$$\begin{aligned} {}{_0}{D}_{t}^{1-\gamma }u(x,t)=\frac{1}{\Gamma (\gamma )}\frac{\partial }{\partial t}\int \limits _{0}^{t}\frac{u(x,\tau )-u(x,0)}{(t-\tau )^{1-\gamma }}\,\mathrm {d}\tau \,,\quad 0<\gamma <1. \end{aligned}$$
(1.4)

The sub-diffusion equation describes the probability density of the diffusing particles that have a mean square displacement proportional to \(t^{\gamma }\). When \(\gamma = 1\), the equation is reduced to a classical heat equation describing the density of the diffusion particles that undergo Brownian motion with a mean-square displacement proportional to \(t\).

It has been pointed out [32] that time-fractional differential equations with the standard Riemann–Liouville derivative,

$$\begin{aligned} {}{_0^{RL}}{D}_{t}^{1-\gamma }u(x,t)=\frac{1}{\Gamma (\gamma )}\frac{\partial }{\partial t}\int \limits _{0}^{t}\frac{u(x,\tau )}{(t-\tau )^{1-\gamma }}\,\mathrm {d}\tau , \end{aligned}$$

require nonlocal initial conditions expressed in terms of initial values of fractional derivatives of the unknown function. Hilfer [15] showed that the solution of fractional diffusion based on a Riemann–Liouville fractional derivative does not always admit a probabilistic interpretation. It is frequently stated that the physical meaning of initial conditions expressed in terms of time-fractional derivatives is unclear or even non existent, see e.g. [11]. Actually, the Riemann–Liouville fractional derivative of a function which is nonzero at \(t=0\) is unbounded and many authors use the Riemann–Liouville derivatives but avoid the problem of initial values of fractional derivatives by treating only the case of zero initial conditions. Heymans and Podlubny [14] considered a series of examples from the field of viscoelasticity and shown that it is possible to attribute physical meaning to initial conditions expressed in terms of Riemann–Liouville fractional derivatives, while they also demonstrated that in many instances of practical significance zero initial conditions, which are used so frequently in practice, appear in a natural way. On the other hand, the modified Riemann–Liouville derivative (1.4) is equivalent to the standard Riemann–Liouville definition if the initial condition is zero. Note that, the Jumarie’s definition has the advantages of both the standard Riemann–Liouville and Caputo derivatives: it is defined for arbitrary continuous (non-differentiable) functions and the fractional derivative of a constant equals zero, as desired. Furthermore, it has been shown [1620] that the Jumarie’s derivative provides a framework for a fractional calculus which is quite parallel to the classical calculus, and would be more advantageous for a theory of calculus of variations.

In recent years, intensive effort has been made to develop accurate and stable numerical methods for solving time-fractional diffusion equations. Compared with ordinary diffusion equations that contain only local time-derivatives, time-fractional differential equations that involve nonlocal derivatives give rise to many new difficulties in developing efficient numerical approaches. One of the main difficulties is the global dependence of historical solutions, which implies that all discrete solutions at previous time levels have to be saved in machines to update the current solution, and thus the overload of limited memory in computer degrades the computational efficiency evidently. To reduce the massive storage requirements in nonlocal time-integrations, implicit approaches [2, 6, 7, 21, 23, 2729, 34, 37, 4043] would be preferable since they are always stable and admit large time-steps.

However, there are few works in developing explicit difference schemes for fractional diffusion equations. Yuste and Acedo [39] employed the Grünwald–Letnikov discretization of the Riemann–Liouville derivative to construct the fractional FTCS scheme, which is consistent of order \(O(\Delta \!\,{t}+\Delta \!\,{x}^2)\), and showed that the numerical solution is unstable unless

$$\begin{aligned} \frac{K_{\gamma }\Delta \!\,{t}^{\gamma }}{\Delta \!\,{x}^2}\le \frac{1}{2^{2-\gamma }}\,. \end{aligned}$$
(1.5)

For time-fractional diffusions with the fractional derivative in Caputo’s sense, two explicit schemes were proposed in [8, 13]. Numerical comparisons in [25] have been shown that the three schemes in [8, 13, 39] have the same stability condition (1.5), while the CL scheme [8], although closely related to the GMMP method [13], is the least accurate, especially for short times. Murillo and Yuste [26] also applied the so-called L1 formula to construct an explicit difference method for solving fractional diffusion equations in the Caputo form. Note that, the existing explicit methods are conditionally stable and require extremely small time-steps, even for not too small values of \(\Delta \!\,{x}\), so that the number of time levels needed to reach even moderate times becomes prohibitively large. To the best of our knowledge, no unconditionally stable explicit schemes for time-fractional diffusion equations have been published. For simplicity, we assume that the solution is smooth near the initial time \(t=0\). The lack of smoothness of the solution near the time \(t=0\) is another main difficulty in solving the time-fractional differential equations. Note that, a type of nonuniform time-grid is employed in [28] to compensate for the singular behavior near \(t=0\), see [27, 29] and references therein.

Since high-dimensional extensions of explicit difference schemes are straightforward, only one-dimensional problems will be considered in this report. For solving the subdiffusion Eq. (1.1) with the Jumarie’s modified Riemann–Liouville derivative (1.4), we combine the idea of Du Fort–Frankel scheme with the \(L1\) approximation of the fractional derivative to formulate the following modified Du Fort–Frankel-type (MDFF, for short) scheme

$$\begin{aligned} \frac{u_i^{n+1}-u_i^{n-1}}{2\Delta \!\,{t}}&= \frac{K_{\gamma }\Delta \!\,{t}^{\gamma -1}a_0}{\Gamma (1+\gamma )\Delta \!\,{x}^2} \big (u_{i-1}^{n}-u_{i}^{n+1}-u_{i}^{n-1}+u_{i+1}^{n}\big )\nonumber \\&-\sum _{k=1}^{n-1}\frac{K_{\gamma }\Delta \!\,{t}^{\gamma -1}\left( a_{k-1}-a_k\right) }{\Gamma (1+\gamma )\Delta \!\,{x}^2} \big (u_{i-1}^{n-k}-u_{i}^{n-k+1}-u_{i}^{n-k-1}+u_{i+1}^{n-k}\big )+f_i^n,\nonumber \\ \end{aligned}$$
(1.6)

where \(u_i^n\) be the numerical approximation of the solution \(U_i^n=u(x_i,t_n)\) at the discrete grid point \((x_i,t_n), a_{k}=(k+1)^{\gamma }-k^{\gamma }\) for \(k\ge 0, \Delta \!\,{t}\) is the time-step and \(\Delta \!\,{x}\) is the spatial grid size. By the discrete energy method, it is shown that the MDFF scheme (1.6) is unconditionally stable in a discrete energy norm and convergent with an order of \(O\left( \Delta \!\,{t}^{1+\gamma }+\Delta \!\,{x}^2+{\Delta \!\,{t}^2}/{\Delta \!\,{x}^2}\right) \) under the consistency condition \(\Delta \!\,{t}/\Delta \!\,{x}\rightarrow 0\), which is rather weak than the stability condition (1.5) of the fractional FTCS method.

Throughout this report, \(C\) denotes a generic positive constant, not necessarily the same at different occurrences, which is always dependent on the solution and the given data but independent of the time-step size \(\Delta \!\,{t}\) and the grid spacing \(\Delta \!\,{x}\). The rest of this paper is arranged as follows. The novel MDFF scheme for the subdiffusion Eq. (1.1) is presented in the next section, where the stability and convergence are investigated by the discrete energy method. Extensions of the MDFF scheme and its theoretical results to the variable-order and distributed-order time-fractional subdiffusion equations are considered in Sects. 3 and 4, respectively. Three numerical examples are included in Sect. 5 to confirm our theoretical results. Some remarks conclude this article.

2 Stable Explicit Scheme and Discrete Energy Analysis

2.1 Construction of the MDFF Scheme

For positive integers \(M\) and \(N\), let the spacing \(\Delta \!\,{x}=L/M\) and the time-step \(\Delta \!\,{t}=T/N\). We use the notation \(x_i=i\Delta \!\,{x}\) for \(1\le {i}\le M\) and \(t_n=n\Delta \!\,{t}\) for \(1\le {n}\le N\). For any temporal function \(\{w^n|\,0\le {n}\le {N}\}\), denote \(w^{n-\frac{1}{2}}=\left( w^n+w^{n-1}\right) /2\),

$$\begin{aligned} \delta _tw^{n-\frac{1}{2}}=\frac{w^n-w^{n-1}}{\Delta \!\,{t}},\quad D_tw^n=\frac{w^{n+1}-w^{n-1}}{2\Delta \!\,{t}},\quad \delta _t^2w^n=\frac{w^{n+1}-2w^n+w^{n-1}}{\Delta \!\,{t}^2}\,. \end{aligned}$$

Let \(a_{k}=(k+1)^{\gamma }-k^{\gamma }\) for \(k\ge 0\). The so-called \(L1\) approximation of the standard Riemann–Liouville derivative \({}{^{RL}_0}{D}_t^{1-\gamma }y(t_{n})\) of order \(1-\gamma \),

$$\begin{aligned} D_{L1}^{1-\gamma }y(t_{n})&= \frac{\Delta \!\,{t}^{\gamma -1}}{\Gamma (1+\gamma )}\left\{ \sum _{k=1}^{n}a_{n-k}\big [y(t_{k})-y(t_{k-1})\big ]+\gamma \,n^{\gamma -1}y(t_0)\right\} \nonumber \\&= \frac{\Delta \!\,{t}^{\gamma -1}}{\Gamma (1+\gamma )}\left[ a_0y(t_n)-\sum _{k=1}^{n-1}\left( a_{k-1}-a_{k}\right) y(t_{n-k})-\left( a_{n-1}-\gamma \,n^{\gamma -1}\right) y(t_{0})\right] ,\nonumber \\ \end{aligned}$$
(2.1)

has been derived by Oldham and Spanier [31] in 1974. Recently, the \(L1\) formula is shown, by Langlands and Henry [21], to be consistent of order \(O(\Delta \!\,{t}^{1+\gamma })\) for \(y(t)\in \mathcal {C}^2[0,t_{n}]\). We define the following modified \(L1\) approximate formula

$$\begin{aligned} D_{\Delta \!\,{t}}^{1-\gamma }w^n \equiv&\frac{\Delta \!\,{t}^{\gamma -1}}{\Gamma (1+\gamma )}\left[ a_{0}w^n-\sum _{k=1}^{n-1}\left( a_{n-k-1}-a_{n-k}\right) w^k\right] \,,\quad n\ge 1. \end{aligned}$$
(2.2)

Obviously, this formula is an \(O(\Delta \!\,{t}^{1+\gamma })\) accurate approximation of the Jumarie’s modified Riemann–Liouville derivative (1.4), as stated below.

Lemma 2.1

[21] Let \(y(t)\in \mathcal {C}^2[0,t_{n}]\) and \(a_{k}=(k+1)^{\gamma }-k^{\gamma }\) for \(k\ge 0\). It holds that

$$\begin{aligned} \left| {}{_0}{D}_t^{1-\gamma }y(t_{n})-D_{\Delta \!\,{t}}^{1-\gamma }y(t_{n})\right| \le \frac{3-2\gamma }{6\,\Gamma (2+\gamma )}\,\Delta \!\,{t}^{1+\gamma }\max _{0\le t\le t_n}\left| y''(t)\right| \,,\quad \Delta \!\,{t}\rightarrow 0\,. \end{aligned}$$

For any spatial function \(v_h=\{v_i|\,0\le {i}\le {M}\}\), denote

$$\begin{aligned} \delta _xv_{i-\frac{1}{2}}=\frac{v_i-v_{i-1}}{\Delta \!\,{x}},\quad \Delta _hv^n=\frac{v_{i+1}-2v_i+v_{i-1}}{\Delta \!\,{x}^2}\,. \end{aligned}$$

For simplicity, we use the following notations for time-space function \(v_h^n\) (\(1\le {n}\le {N}\)),

$$\begin{aligned} \Delta _h^{df\!\!f}v_i^n&= \frac{v_{i+1}^n-v_i^{n+1}-v_i^{n-1}+v_{i-1}^n}{\Delta \!\,{x}^2}\,,\\ D_{\Delta \!\,{t}}^{1-\gamma }\Delta _h^{df\!\!f}v_i^n&= \frac{\Delta \!\,{t}^{\gamma -1}}{\Gamma (1+\gamma )}\left[ a_{0}\big (\Delta _h^{df\!\!f}v_i^n\big ) -\sum _{k=1}^{n-1}\left( a_{n-k-1}-a_{n-k}\right) \big (\Delta _h^{df\!\!f}v_i^k\big )\right] \,. \end{aligned}$$

For the smooth solution \(u(x,t)\in C_{x,t}^{(4,2)}\), let \(U_i^n=u(x_i,t_n)\). We apply Lemma 2.1 to approximate the Eq. (1.1) by

$$\begin{aligned} D_tU_i^{n}=K_{\gamma }\, D_{\Delta \!\,{t}}^{1-\gamma }\Delta _h^{df\!\!f}U_i^n +f_i^n+R_i^n\,,\quad 1\le {i}\le {M-1},1\le {n}\le {N-1}, \end{aligned}$$
(2.3)

where the truncation error

$$\begin{aligned} \left| R_i^n\right| \le C\left( \Delta \!\,{t}^{1+\gamma }+\Delta \!\,{x}^2+{\Delta \!\,{t}^2}/{\Delta \!\,{x}^2}\right) ,\quad 1\le {i}\le {M-1},1\le n\le N-1. \end{aligned}$$
(2.4)

Neglecting the truncation error \(R_i\) and replacing \(U_i^n\) with the numerical approximation \(u_i^n\) in the Eq. (2.3), we get the MDFF scheme (1.6) or

$$\begin{aligned} D_tu_i^{n}=K_{\gamma }\, D_{\Delta \!\,{t}}^{1-\gamma }\Delta _h^{df\!\!f}u_i^n+f_i^n,\quad 1\le {i}\le {M-1},1\le n\le N-1. \end{aligned}$$
(2.5)

Note that, one has \(a_k=1\) (\(k\ge 0\)) if \(\gamma =1\), and thus the well-known Du Fort–Frankel scheme will be recovered by the MDFF method (1.6). To start the MDFF scheme, one can apply the FTCS scheme [39], which is accurate of order \(O\left( \Delta \!\,{t}+\Delta \!\,{x}^2\right) \), to compute the solution \(u_i^1\),

$$\begin{aligned} \delta _tu_i^{\frac{1}{2}}=K_{\gamma }\Delta \!\,{t}^{\gamma -1}\Delta _h\left[ u_i^0-\varphi (x_i)\right] +f_i^0=f_i^0\,,\quad 1\le {i}\le {M-1}. \end{aligned}$$
(2.6)

The truncation error, denoted by \(R_i^0\), satisfies

$$\begin{aligned} \left| R_i^0\right| \le C\left( \Delta \!\,{t}+\Delta \!\,{x}^2\right) ,\quad 1\le {i}\le {M-1}. \end{aligned}$$
(2.7)

As usual, the initial and Dirichlet-boundary conditions are approximated by

$$\begin{aligned} u_i^{0}=\varphi (x_i),\quad 0\le {i}\le {M};\quad u_0^{n}=\alpha (t_n),\;u_M^{n}=\beta (t_n)\,,\quad 1\le {n}\le {N}. \end{aligned}$$
(2.8)

The proposed MDFF procedure, including (2.5), (2.6) and (2.8), computes the numerical solution explicitly. As proved below, the new explicit method is unconditionally stable with respect to a discrete energy norm. Although the starting scheme (2.6) is only first-order \(O(\Delta \!\,{t})\) in time, the global solution error will be not polluted since it applies only at the first time level. On the other hand, the error term \(O\left( {\Delta \!\,{t}^2}/{\Delta \!\,{x}^2}\right) \) of \(R_i^n\) in (2.3) gives rise to the following consistency condition

$$\begin{aligned} \frac{\Delta \!\,{t}}{\Delta \!\,{x}}\rightarrow 0, \quad \hbox {as}\;\; \Delta \!\,{x}\rightarrow 0, \end{aligned}$$
(2.9)

such that the MDFF scheme is conditionally consistent. It is to note that, the consistency condition (2.9) is rather weaker than the stability condition (1.5). For instance, we take a small value of \(\gamma =0.1\). The time-step restriction (1.5) indicates that, to compute a meaningful solution, the FTCS method in [39] needs extremely small time-steps \(\Delta \!\,{t}=O(\Delta \!\,{x}^{20})\), which would be prohibitively small even for not too small values of \(\Delta \!\,{x}\). While our new method can use large time-steps such as \(\Delta \!\,{t}=O(\Delta \!\,{x}^{2})\) to compute an accurate solution with an order of \(O(\Delta \!\,{x}^2)\), also see numerical results in Sect. 5.

2.2 Stability and Convergence of MDFF Scheme

Consider a space of grid functions \(\mathcal {P}_{h}=\big \{v_h\,|\,v_h=\{v_{i}|\,0\le {i}\le {M}\} \;\;\hbox {and}\;\; v_{0}=0,v_{M}=0\big \}\,.\) For grid functions \(u_h,v_h\in \mathcal {P}_{h}\), introduce the inner product \(\big \langle u,v\big \rangle =\Delta \!\,{x}\sum _{i=1}^{M-1} u_{i}v_{i}\,\) and the corresponding norm \(\left\| v\right\| =\sqrt{\left\langle v,v\right\rangle }\,\). Also, denote \(\left\| \delta _xv\right\| =\sqrt{\Delta \!\,{x}\sum _{i=1}^{M}\big (\delta _xv_{i-\frac{1}{2}}\big )^2}\,.\) We have the discrete Green’s first formula \(\Delta \!\,{x}\sum _{i=1}^{M} v_i\left( \Delta _hv_{i}\right) =-\left\| \delta _xv\right\| ^2\,\) for \(v_h\in \mathcal {P}_{h}\).

Consider a function \(a(x)=(x+1)^{\gamma }-x^{\gamma }\) such that \(a_{k}=a(k)\) is strictly decreasing. Furthermore, \(a(x)\) is concave owing to that

$$\begin{aligned} a''(x)=\gamma (\gamma -1)(\gamma -2)\int \limits _{x}^{x+1}s^{\gamma -3}\,\mathrm {d}{s}>0,\quad x>0. \end{aligned}$$

One has \(a(k-1)+a(k+1)>2a(k)\) for \(k\ge 1\), which yields the following lemma.

Lemma 2.2

The positive coefficient \(a_{k}=(k+1)^{\gamma }-k^{\gamma }\) is strictly decreasing and

$$\begin{aligned} a_{k-1}-a_{k}>a_{k}-a_{k+1},\quad k\ge 1\,. \end{aligned}$$

Lemma 2.3

For any time sequence \(\{Q_1,Q_2,Q_3,\ldots \}\), it holds that

$$\begin{aligned} \Delta \!\,{t}\sum _{n=1}^{N-1}Q_{n}\left( D_{\Delta \!\,{t}}^{1-\gamma }Q_n\right) \ge \frac{t_{\left[ \frac{N}{2}\right] }^{\gamma -1}}{\Gamma (\gamma )}\Delta \!\,{t}\sum _{n=1}^{N-1}Q_{n}^2\,, \end{aligned}$$

where \(\left[ \frac{N}{2}\right] \) denotes the integer part of \(N/2\).

Proof

Lemma 2.2 shows that \(a_k\) and \(\left( a_{k-1}-a_k\right) \) are strictly decreasing such that

$$\begin{aligned}&a_{n-1}+a_{N-n-1}\ge a_{n}+a_{N-n-2},\quad \forall \, n\le \frac{N-1}{2}\,,\\&a_{n-1}+a_{N-n-1}\le a_{n}+a_{N-n-2},\quad \forall \, n\ge \frac{N-1}{2}\,. \end{aligned}$$

Recalling that \(a_{k}=\int _k^{k+1}s^{\gamma -1}\,\mathrm {d}{s}\), it is easy to check that

$$\begin{aligned}&\min _{1\le {n}\le {N-1}}\left( a_{n-1}+a_{N-n-1}\right) = a_{m-1}+a_{m}>2a_m>2\gamma \left[ \frac{N}{2}\right] ^{\gamma -1},\quad \hbox {if}\; N=2m+1\,;\\&\min _{1\le {n}\le {N-1}}\left( a_{n-1}+a_{N-n-1}\right) = 2a_{m-1}>2\gamma \left[ \frac{N}{2}\right] ^{\gamma -1},\quad \hbox {if}\; N=2m\,. \end{aligned}$$

Then it follows that

$$\begin{aligned}&2{\Delta t}^{1-\gamma }\Gamma (1+\gamma )\sum _{n=1}^{N-1}Q_{n}\left( D_{\Delta \!\,{t}}^{1-\gamma }Q_n\right) =2\sum _{n=1}^{N-1}\left[ a_0Q_n-\sum _{k=1}^{n-1}\left( a_{n-k-1}-a_{n-k}\right) Q_{k}\right] Q_n\\&\quad \ge 2\sum _{n=1}^{N-1}a_0Q_n^2 -\sum _{n=2}^{N-1}\sum _{k=1}^{n-1}\left( a_{n-k-1}-a_{n-k}\right) Q_n^2 -\sum _{n=2}^{N-1}\sum _{k=1}^{n-1}\left( a_{n-k-1}-a_{n-k}\right) Q_{k}^2\\&\quad =\sum _{n=1}^{N-1}\left( a_0+a_{n-1}\right) Q_n^2 -\sum _{k=1}^{N-1}\left( a_{0}-a_{N-k-1}\right) Q_{k}^2\\&\quad =\sum _{n=1}^{N-1}\left( a_{n-1}+a_{N-n-1}\right) Q_{n}^2\ge 2\gamma \left[ \frac{N}{2}\right] ^{\gamma -1}\sum _{n=1}^{N-1}Q_{n}^2\,, \end{aligned}$$

where the second equality is obtained by exchanging the summation order of the third term. Then the claimed inequality follows immediately and the proof is completed.

Lemma 2.4

Let the grid function \(v_h^n\in \mathcal {P}_h\) satisfies

$$\begin{aligned} D_tv_i^n&= K_{\gamma }\, D_{\Delta \!\,{t}}^{1-\gamma }\Delta _h^{df\!\!f}v_i^n +g_i^n,\quad 1\le {i}\le {M-1},1\le n\le N-1,\end{aligned}$$
(2.10)
$$\begin{aligned} \delta _tv_i^{\frac{1}{2}}&= g_i^0,\;1\le {i}\le {M-1};\quad v_i^{0}=\phi _i, \;0\le {i}\le {M}. \end{aligned}$$
(2.11)

Then it hold that

$$\begin{aligned} E^{N-\frac{1}{2}}(v_h)\le E^{\frac{1}{2}}(v_h)+\frac{\Gamma (\gamma )t_{\left[ \frac{N}{2}\right] }^{1-\gamma }}{2K_{\gamma }}\,\Delta \!\,{t}\sum _{n=1}^{N-1}\big \Vert g^n\big \Vert ^2\,,\quad N\ge 2, \end{aligned}$$
(2.12)

where the discrete energy \(E^{n-\frac{1}{2}}\) is defined by

$$\begin{aligned} E^{n-\frac{1}{2}}(v_h) =&\frac{1}{2}\left( \big \Vert \delta _xv^{n}\big \Vert ^2+\big \Vert \delta _xv^{n-1}\big \Vert ^2\right) -\frac{\Delta \!\,{t}^2}{2}\big \Vert \delta _t\delta _xv^{n-\frac{1}{2}}\big \Vert ^2 +\frac{\Delta \!\,{t}^2}{\Delta \!\,{x}^2}\big \Vert \delta _tv^{n-\frac{1}{2}}\big \Vert ^2\,. \end{aligned}$$
(2.13)

Proof

For any grid function \(v_h^n\in \mathcal {P}_h\), we have following inverse estimates

$$\begin{aligned}&\frac{\Delta \!\,{t}^2}{4}\big \Vert \delta _t\delta _xv^{n-\frac{1}{2}}\big \Vert ^2\le \frac{\Delta \!\,{t}^2}{\Delta \!\,{x}^2}\big \Vert \delta _tv^{n-\frac{1}{2}}\big \Vert ^2\,,\\&\frac{\Delta \!\,{t}^2}{4}\big \Vert \delta _t\delta _xv^{n-\frac{1}{2}}\big \Vert ^2\le \frac{1}{2}\left( \big \Vert \delta _xv^{n}\big \Vert ^2+\big \Vert \delta _xv^{n-1}\big \Vert ^2\right) \,. \end{aligned}$$

They imply that \(E^{n-\frac{1}{2}} \ge 0\), where the equality is valid only for the trial (zero-valued) function. That is to say, the discrete energy \(E^{n-\frac{1}{2}}\) is positive definite. Applying the discrete Green’s first formula and the following equalities

$$\begin{aligned} 2w^n\delta _tw^{n+\frac{1}{2}}=\delta _t(w^{n+\frac{1}{2}})^2-\Delta \!\,{t}(\delta _tw^{n+\frac{1}{2}})^2\,,\quad 2w^n\delta _tw^{n-\frac{1}{2}}=\delta _t(w^{n-\frac{1}{2}})^2+\Delta \!\,{t}(\delta _tw^{n-\frac{1}{2}})^2\,, \end{aligned}$$

we can obtain

$$\begin{aligned} B_{11}^n&\equiv -2\Delta \!\,{x}\sum _{i=1}^{M-1}\left( D_tv_i^n\right) \Delta _{h}v_i^n =\Delta \!\,{x}\sum _{i=1}^{M-1}\left( \delta _t\delta _xv_{i-\frac{1}{2}}^{n+\frac{1}{2}}+\delta _t\delta _xv_{i-\frac{1}{2}}^{n-\frac{1}{2}}\right) \left( \delta _xv_{i-\frac{1}{2}}^n\right) \\&= \frac{1}{2}\left( \delta _t\big \Vert \delta _xv^{n+\frac{1}{2}}\big \Vert ^2-\Delta \!\,{t}\big \Vert \delta _t\delta _xv^{n+\frac{1}{2}}\big \Vert ^2\right) +\frac{1}{2}\left( \delta _t\big \Vert \delta _xv^{n-\frac{1}{2}}\big \Vert ^2+\Delta \!\,{t}\big \Vert \delta _t\delta _xv^{n-\frac{1}{2}}\big \Vert ^2\right) \\&= \frac{1}{2}\left( \delta _t\big \Vert \delta _xv^{n+\frac{1}{2}}\big \Vert ^2+\delta _t\big \Vert \delta _xv^{n-\frac{1}{2}}\big \Vert ^2\right) -\frac{\Delta \!\,{t}}{2}\left( \big \Vert \delta _t\delta _xv^{n+\frac{1}{2}}\big \Vert ^2-\big \Vert \delta _t\delta _xv^{n-\frac{1}{2}}\big \Vert ^2\right) \,. \end{aligned}$$

Thus it follows that

$$\begin{aligned} \Delta \!\,{t}\sum _{n=1}^{N-1}B_{11}^n&= \frac{1}{2}\left( \big \Vert \delta _xv^{N}\big \Vert ^2+\big \Vert \delta _xv^{N-1}\big \Vert ^2\right) -\frac{\Delta \!\,{t}^2}{2}\big \Vert \delta _t\delta _xv^{N-\frac{1}{2}}\big \Vert ^2\nonumber \\&-\frac{1}{2}\left( \big \Vert \delta _xv^{1}\big \Vert ^2+\big \Vert \delta _xv^{0}\big \Vert ^2\right) +\frac{\Delta \!\,{t}^2}{2}\big \Vert \delta _t\delta _xv^{\frac{1}{2}}\big \Vert ^2\,. \end{aligned}$$
(2.14)

Furthermore, one has

$$\begin{aligned} B_{12}^n&\equiv \frac{2\Delta \!\,{t}^2}{\Delta \!\,{x}}\sum _{i=1}^{M-1}\left( D_tv_i^n\right) \left( \delta _t^2v_i^n\right) =\frac{\Delta \!\,{t}}{\Delta \!\,{x}}\sum _{i=1}^{M-1}\big (\delta _tv_i^{n+\frac{1}{2}}+\delta _tv_i^{n-\frac{1}{2}}\big ) \big (\delta _tv_i^{n+\frac{1}{2}}-\delta _tv_i^{n-\frac{1}{2}}\big )\\&= \frac{\Delta \!\,{t}}{\Delta \!\,{x}^2}\left( \big \Vert \delta _tv^{n+\frac{1}{2}}\big \Vert ^2-\big \Vert \delta _tv^{n-\frac{1}{2}}\big \Vert ^2\right) \end{aligned}$$

such that

$$\begin{aligned} \Delta \!\,{t}\sum _{n=1}^{N-1}B_{12}^n=&\frac{\Delta \!\,{t}^2}{\Delta \!\,{x}^2}\big \Vert \delta _tv^{N-\frac{1}{2}}\big \Vert ^2-\frac{\Delta \!\,{t}^2}{\Delta \!\,{x}^2}\big \Vert \delta _tv^{\frac{1}{2}}\big \Vert ^2\,. \end{aligned}$$
(2.15)

Recalling the definitions of \(B_{11}^n\) and \(B_{12}^n\), it follows from (2.14) and (2.15) that

$$\begin{aligned} B_1&\equiv -2\Delta \!\,{t}\Delta \!\,{x}\sum _{n=1}^{N-1}\sum _{i=1}^{M-1}\left( D_tv_i^n\right) \Delta _h^{df\!\!f}v_i^n\nonumber \\&=-2\Delta \!\,{t}\Delta \!\,{x}\sum _{n=1}^{N-1}\sum _{i=1}^{M-1}\left( D_tv_i^n\right) \left( \Delta _{h}v_i^n-\frac{\Delta \!\,{t}^2}{\Delta \!\,{x}^2}\delta _t^2v_i^n\right) \nonumber \\&=\Delta \!\,{t}\sum _{n=1}^{N-1}\left( B_{11}^n+B_{12}^n\right) =E^{N-\frac{1}{2}}-E^{\frac{1}{2}}\,. \end{aligned}$$
(2.16)

Moreover, applying Lemma 2.3, one gets

$$\begin{aligned} B_2\equiv&-2K_{\gamma }\Delta \!\,{t}\sum _{n=1}^{N-1}\Delta \!\,{x}\sum _{i=1}^{M-1}\left( D_{\Delta \!\,{t}}^{1-\gamma }\Delta _h^{df\!\!f}v_i^n\right) \left( \Delta _h^{df\!\!f}v_i^n\right) \nonumber \\ \le&-\frac{2K_{\gamma }t_{\left[ \frac{N}{2}\right] }^{\gamma -1}}{\Gamma (\gamma )}\Delta \!\,{t}\Delta \!\,{x}\sum _{n=1}^{N-1}\sum _{i=1}^{M-1}\left( \Delta _h^{df\!\!f}v_i^n\right) ^2\,. \end{aligned}$$
(2.17)

And it is easy to obtain that

$$\begin{aligned} B_3\equiv&-2\Delta \!\,{t}\Delta \!\,{x}\sum _{n=1}^{N-1}\sum _{i=1}^{M-1}g_i^n\left( \Delta _h^{df\!\!f}v_i^n\right) \nonumber \\ \le&\frac{2K_{\gamma }t_{\left[ \frac{N}{2}\right] }^{\gamma -1}}{\Gamma (\gamma )}\Delta \!\,{t}\Delta \!\,{x}\sum _{n=1}^{N-1}\sum _{i=1}^{M-1}\left( \Delta _h^{df\!\!f}v_i^n\right) ^2 +\frac{\Gamma (\gamma )t_{\left[ \frac{N}{2}\right] }^{1-\gamma }}{2K_{\gamma }}\Delta \!\,{t}\sum _{n=1}^{N-1}\big \Vert g^n\big \Vert ^2\,. \end{aligned}$$
(2.18)

Multiplying the difference Eq. (2.10) by \(-2\Delta \!\,{t}\Delta \!\,{x}\Delta _h^{df\!\!f}v_i^n\), summing the indexes \(i,n\) for \(1\le {i}\le {M-1}\) and \(1\le {n}\le {N-1}\), one has

$$\begin{aligned} B_1=B_2+B_3\,, \end{aligned}$$

where \(B_i\) (\(i=1,2,3\)) has been defined above. Then applying the inequalities (2.16)–(2.18), we get the claimed estimation (2.12) and complete the proof.

Theorem 2.5

The MDFF scheme (2.5) is unconditionally stable in the sense of (2.12).

Now we turn to the error analysis for smooth solutions by setting \(\tilde{u}_{i}^n=U_{i}^n-u_{i}^n\). It is easy to see that the error function \(\tilde{u}_h^n\in \mathcal {P}_h, 0\le {n}\le N\), satisfies

$$\begin{aligned} D_t\tilde{u}_i^n&= K_{\gamma }\, D_{\Delta \!\,{t}}^{1-\gamma }\Delta _h^{df\!\!f}\tilde{u}_i^n +R_i^n,\quad 1\le {i}\le {M-1},1\le n\le N-1,\end{aligned}$$
(2.19)
$$\begin{aligned} \delta _t\tilde{u}_i^{\frac{1}{2}}&= R_i^0,\;1\le {i}\le {M-1};\quad \tilde{u}_i^{0}=0, \;0\le {i}\le {M}. \end{aligned}$$
(2.20)

Applying Lemma 2.4, we get

$$\begin{aligned} E^{N-\frac{1}{2}}(\tilde{u}_h)\le E^{\frac{1}{2}}(\tilde{u}_h)+\frac{\Gamma (\gamma )t_{\left[ \frac{N}{2}\right] }^{1-\gamma }}{2K_{\gamma }}\,\Delta \!\,{t}\sum _{n=1}^{N-1}\big \Vert R^n\big \Vert ^2\,,\quad N\ge 2. \end{aligned}$$
(2.21)

From the Eq. in (2.20), one gets

$$\begin{aligned} E^{\frac{1}{2}}(\tilde{u}_h) =&\frac{1}{2}\left( \big \Vert \delta _x\tilde{u}^{1}\big \Vert ^2+\big \Vert \delta _x\tilde{u}^{0}\big \Vert ^2\right) -\frac{\Delta \!\,{t}^2}{2}\big \Vert \delta _t\delta _x\tilde{u}^{\frac{1}{2}}\big \Vert ^2 +\frac{\Delta \!\,{t}^2}{\Delta \!\,{x}^2}\big \Vert \delta _t\tilde{u}^{\frac{1}{2}}\big \Vert ^2 =\frac{\Delta \!\,{t}^2}{\Delta \!\,{x}^2}\big \Vert R^0\big \Vert ^2\,. \end{aligned}$$

Thus it follows from (2.4), (2.7) and (2.21) that

$$\begin{aligned} E^{N-\frac{1}{2}}(\tilde{u}_h)&\le \frac{\Delta \!\,{t}^2}{\Delta \!\,{x}^2}\big \Vert R^0\big \Vert ^2 +\frac{\Gamma (\gamma )t_{\left[ \frac{N}{2}\right] }^{1-\gamma }}{2K_{\gamma }}\,\Delta \!\,{t}\sum _{n=1}^{N-1}\big \Vert R^n\big \Vert ^2\nonumber \\&\le \frac{\Delta \!\,{t}^2}{\Delta \!\,{x}^2}C^2\left( \Delta \!\,{t}+\Delta \!\,{x}^2\right) ^2 +\frac{\Gamma (\gamma )t_{N-1}t_{\left[ \frac{N}{2}\right] }^{1-\gamma }}{2K_{\gamma }}C^2\left( \Delta \!\,{t}^{1+\gamma }+\Delta \!\,{x}^2+\Delta \!\,{t}^2/{\Delta \!\,{x}^2}\right) ^2\nonumber \\&\le C^2\left( \Delta \!\,{t}^{1+\gamma }+\Delta \!\,{x}^2+\Delta \!\,{t}^2/{\Delta \!\,{x}^2}\right) ^2\,. \end{aligned}$$
(2.22)

Theorem 2.6

Let \(u(x,t)\in C_{x,t}^{(4,2)}\) be the smooth solution of the time-fractional subdiffusion Eq. (1.1), the numerical solution of the MDFF scheme (1.6) is convergent, in the sense of (2.22), with the order of \(O\left( \Delta \!\,{t}^{1+\gamma }+\Delta \!\,{x}^2+\Delta \!\,{t}^2/{\Delta \!\,{x}^2}\right) \).

3 Generalization to Variable-Order Subdiffusion Equations

As a natural candidate to provide an effective mathematical framework for the description of complex dynamical problems, variable-order fractional operators and variable-order fractional differential equations have been developed recently, see e.g. [9, 24, 33, 36]. Lorenzo and Hartley [24] suggested that the concept of a variable order operator is allowed to vary either as a function of the independent variable of integration or differentiation, or as a function of some other (spatial) variable. Sun et al. [36] introduced a classification of the variable-order diffusion models based on the possible physical origins that motivated the variable-order. However, as remarked in [6], numerical methods of variable-order fractional differential equations are still at an early stage of development. An implicit scheme was considered in [34] for the variable-order fractional diffusion equation with the Caputo-type operator. Sun et al. [37] investigated the explicit Euler, implicit Euler and Crank-Nicholson schemes for a fractional diffusion equation with the Coimbra fractional operator. Zhuang et al. [43] presented explicit and implicit Euler methods for the variable-order advection-diffusion equation with a nonlinear source term. Chen et al. [6, 7] developed two compact schemes with fourth-order spatial accuracy for the subdiffusion equations with variable-order Riemann–Liouville derivative. Nonetheless, no unconditionally stable explicit schemes for variable-order subdiffusion equation have been reported. Consider the following variable-order subdiffusion equation

$$\begin{aligned}&\frac{\partial u}{\partial t}=K_{\gamma }\,{}{_0}{D}_t^{1-\gamma (x,t)}\frac{\partial ^2u}{\partial x^2}+f(x,t),\quad t\ge 0, \end{aligned}$$
(3.1)

subject to \(u(x,0)=\varphi (x)\), where \(0<\gamma (x,t)<1\) and \({}{_0}{D}_{t}^{1-\gamma (x,t)}\) is the variable-order modified Riemann–Liouville derivative defined by, see [6, 7, 24, 43],

$$\begin{aligned} {}{_0}{D}_{t}^{1-\gamma (x,t)}u(x,t)=\frac{1}{\Gamma (\gamma (x,t))} \left[ \frac{\partial }{\partial \xi }\int \limits _{0}^{\xi }\frac{u(x,\tau )-u(x,0)}{(\xi -\tau )^{1-\gamma (x,t)}}\,\mathrm {d}\tau \right] _{\xi =t}\,. \end{aligned}$$
(3.2)

In this section, the MDFF scheme (1.6) is shown to be applicable for solving the variable-order subdiffusion Eq. (3.1). Let the grid function \(\gamma _j^m=\gamma (x_j,t_m)\) at the point \((x_j,t_m)\) and \(\big (a_j^m\big )_{k}=(k+1)^{\gamma _j^m}-k^{\gamma _j^m}\) for \(k\ge 0\). For any temporal function \(\{w^n|\,0\le {n}\le {N}\}\), the modified \(L1\) approximate operator \(D_{\Delta \!\,{t}}^{1-\gamma _j^m}\) is defined by

$$\begin{aligned} D_{\Delta \!\,{t}}^{1-\gamma _j^m}w^n =&\frac{\Delta \!\,{t}^{\gamma _j^m-1}}{\Gamma (1+\gamma _j^m)} \left\{ \big (a_j^m\big )_{0}w^n-\sum _{k=1}^{n-1}\left[ \big (a_j^m\big )_{n-k-1}-\big (a_j^m\big )_{n-k}\right] w^k\right\} \,. \end{aligned}$$
(3.3)

It is easy to generalize the results of Lemmas 2.1 and 2.2 as follows.

Lemma 3.1

For some fixed \(0<\gamma _j^m\le 1\), and \(y(t)\in \mathcal {C}^2[0,t_{n}]\), it holds that

$$\begin{aligned} \left| {}{_0}{D}_t^{1-\gamma _j^m}y(t_{n})-D_{\Delta \!\,{t}}^{1-\gamma _j^m}y(t_{n})\right| \le \frac{3-2\gamma _j^m}{6\,\Gamma (2+\gamma _j^m)}\,\Delta \!\,{t}^{1+\gamma _j^m}\max _{0\le t\le t_n}\left| y''(t)\right| \,. \end{aligned}$$

Lemma 3.2

For some fixed \(\gamma _j^m\), the positive coefficient \(\big (a_j^m\big )_{k}=(k+1)^{\gamma _j^m}-k^{\gamma _j^m}\) satisfies

$$\begin{aligned} \big (a_j^m\big )_{k-1}>\big (a_j^m\big )_k\;\;\hbox {and}\;\; \big (a_j^m\big )_{k-1}-\big (a_j^m\big )_{k}>\big (a_j^m\big )_{k}-\big (a_j^m\big )_{k+1},\quad k\ge 1\,. \end{aligned}$$

For the smooth solution \(u(x,t)\in C_{x,t}^{(4,2)}\), we apply Lemma 3.1 to approximate the variable-order Eq. (1.1) by

$$\begin{aligned} D_tU_i^{n}=K_{\gamma }\, D_{\Delta \!\,{t}}^{1-\gamma _i^n}\Delta _h^{df\!\!f}U_i^n +f_i^n+S_i^n\,,\quad 1\le {i}\le {M-1},1\le {n}\le {N-1}, \end{aligned}$$
(3.4)

where the truncation error

$$\begin{aligned} \left| S_i^n\right| \le C\left( \Delta \!\,{t}^{1+\gamma _i^n}+\Delta \!\,{x}^2+{\Delta \!\,{t}^2}/{\Delta \!\,{x}^2}\right) ,\quad 1\le {i}\le {M-1},1\le n\le N-1. \end{aligned}$$
(3.5)

Neglecting the small term \(S_i\) and replacing \(U_i^n\) by the approximation \(u_i^n\) in (3.4), we get the following modified Du Fort–Frankel scheme with variable-order (denoted by MDFF-VO)

$$\begin{aligned} D_tu_i^{n}=K_{\gamma }\, D_{\Delta \!\,{t}}^{1-\gamma _i^n}\Delta _h^{df\!\!f}u_i^n+f_i^n,\quad 1\le {i}\le {M-1},1\le n\le N-1. \end{aligned}$$
(3.6)

To start the MDFF-VO scheme, one can apply (2.6) to compute the first level solution \(u_i^1\). The initial-boundary conditions can be approximated by (2.8).

We see that the approximation (3.4) is consistent only if the time-space grid satisfies the consistency condition (2.9) such that the MDFF-VO scheme is also conditionally consistent. Numerical experiments suggest that the proposed MDFF-VO procedure, including (2.6), (2.8) and (3.6), is stable although, at this moment, we are not able to prove the unconditional stability for a general fractional order \(\gamma =\gamma (x,t)\). Assuming that \(\gamma _t(x,t)=0\), or \(\gamma =\gamma (x)\), and applying Lemma 3.2, we have a straightforward generalization of Lemma 2.3.

Lemma 3.3

For any time sequence \(\{Q_1,Q_2,Q_3,\ldots \}\), it holds that

$$\begin{aligned} \Delta \!\,{t}\sum _{n=1}^{N-1}Q_{n}\left( D_{\Delta \!\,{t}}^{1-\gamma _i}Q_n\right) \ge \frac{t_{\left[ \frac{N}{2}\right] }^{\gamma _i-1}}{\Gamma (\gamma _i)}\Delta \!\,{t}\sum _{n=1}^{N-1}Q_{n}^2\,,\quad 1\le {i}\le {M-1}. \end{aligned}$$

Lemma 3.4

Let the fractional order \(\gamma =\gamma (x)\) and the grid function \(v_h^n\in \mathcal {P}_h\) satisfies

$$\begin{aligned} D_tv_i^n&= K_{\gamma }\,D_{\Delta \!\,{t}}^{1-\gamma _{i}}\Delta _h^{df\!\!f}v_i^n +g_i^n,\quad 1\le {i}\le {M-1},1\le n\le N-1,\end{aligned}$$
(3.7)
$$\begin{aligned} \delta _tv_i^{\frac{1}{2}}&= g_i^0,\;1\le {i}\le {M-1}; v_i^{0}=\phi _i, \;0\le {i}\le {M}. \end{aligned}$$
(3.8)

Then it hold that

$$\begin{aligned} E^{N-\frac{1}{2}}(v_h)\le E^{\frac{1}{2}}(v_h)+\frac{\Delta \!\,{t}\Delta \!\,{x}}{2K_{\gamma }}\sum _{n=1}^{N-1}\sum _{i=1}^{M-1}\left[ \Gamma (\gamma _{i})t_{\left[ \frac{N}{2}\right] }^{1-\gamma _{i}} \left( g_i^n\right) ^2\right] \,,\quad N\ge 2, \end{aligned}$$
(3.9)

where the positive definite energy \(E^{n-\frac{1}{2}}\) is defined by (2.13).

Proof

This proof is the same to that of Lemma 2.4 except slight differences in the technical treatments of \(B_2\) and \(B_3\). Applying Lemma 3.3, one has

$$\begin{aligned} G_2\equiv&-2K_{\gamma }\Delta \!\,{t}\sum _{n=1}^{N-1}\Delta \!\,{x}\sum _{i=1}^{M-1} \left( D_{\Delta \!\,{t}}^{1-\gamma _{i}}\Delta _h^{df\!\!f}v_i^n\right) \Delta _h^{df\!\!f}v_i^n\nonumber \\ \le&-2K_{\gamma }\Delta \!\,{t}\Delta \!\,{x}\sum _{i=1}^{M-1}\left[ \frac{t_{\left[ \frac{N}{2}\right] }^{\gamma _{i}-1}}{\Gamma (\gamma _{i})} \sum _{n=1}^{N-1}\left( \Delta _h^{df\!\!f}v_i^n\right) ^2\right] \,. \end{aligned}$$
(3.10)

Furthermore, it is easy to obtain that

$$\begin{aligned} G_3\equiv&-2\Delta \!\,{t}\Delta \!\,{x}\sum _{n=1}^{N-1}\sum _{i=1}^{M-1}g_i^n\left( \Delta _h^{df\!\!f}v_i^n\right) \le \Delta \!\,{t}\sum _{n=1}^{N-1}\Delta \!\,{x}\sum _{i=1}^{M-1}\left[ \frac{2K_{\gamma }t_{\left[ \frac{N}{2}\right] }^{\gamma _{i}-1}}{\Gamma (\gamma _{i})} \left( \Delta _h^{df\!\!f}v_i^n\right) ^2\right] \nonumber \\&+\frac{\Delta \!\,{t}\Delta \!\,{x}}{2K_{\gamma }}\sum _{n=1}^{N-1}\sum _{i=1}^{M-1}\left[ \Gamma (\gamma _{i})t_{\left[ \frac{N}{2}\right] }^{1-\gamma _{i}} \left( g_i^n\right) ^2\right] \,. \end{aligned}$$
(3.11)

Multiplying the difference Eq. (3.7) by \(-2\Delta \!\,{t}\Delta \!\,{x}\Delta _h^{df\!\!f}v_i^n\), summing the indexes \(i,n\) for \(1\le {i}\le {M-1}\) and \(1\le {n}\le {N-1}\), one has

$$\begin{aligned} B_1=G_2+G_3\,, \end{aligned}$$

where \(B_1\) was defined in the proof of Lemma 2.4. Applying the inequalities (2.16) and (3.10)–(3.11), we get the claimed inequality (3.9) and complete the proof. \(\square \)

Theorem 3.5

If the variable fractional order \(\gamma =\gamma (x)\), the MDFF-VO scheme (3.6) is unconditionally stable in the sense of (3.9).

Now consider the error analysis. It is easy to see that \(\tilde{u}_h^n\in \mathcal {P}_h\) satisfies

$$\begin{aligned} D_t\tilde{u}_i^n&= K_{\gamma }\,D_{\Delta \!\,{t}}^{1-\gamma _{i}}\Delta _h^{df\!\!f}\tilde{u}_i^n +S_i^n, 1\le {i}\le {M-1},1\le n\le N-1,\end{aligned}$$
(3.12)
$$\begin{aligned} \delta _t\tilde{u}_i^{\frac{1}{2}}&= R_i^0,\;1\le {i}\le {M-1};\quad \tilde{u}_i^{0}=0, \;0\le {i}\le {M}. \end{aligned}$$
(3.13)

Applying Lemma 3.4, we get

$$\begin{aligned} E^{N-\frac{1}{2}}(\tilde{u}_h)\le E^{\frac{1}{2}}(\tilde{u}_h)+\frac{\Delta \!\,{t}\Delta \!\,{x}}{2K_{\gamma }}\sum _{n=1}^{N-1}\sum _{i=1}^{M-1}\left[ \Gamma (\gamma _{i})t_{\left[ \frac{N}{2}\right] }^{1-\gamma _{i}} \big (S_i^n\big )^2\right] \,,\quad N\ge 2. \end{aligned}$$
(3.14)

Furthermore, one applies (3.13) and (2.7) to find that

$$\begin{aligned} E^{\frac{1}{2}}(\tilde{u}_h) =\frac{\Delta \!\,{t}^2}{\Delta \!\,{x}^2}\big \Vert \delta _t\tilde{u}^{\frac{1}{2}}\big \Vert ^2=\frac{\Delta \!\,{t}^2}{\Delta \!\,{x}^2}\big \Vert R^0\big \Vert ^2\le \frac{\Delta \!\,{t}^2}{\Delta \!\,{x}^2}C^2\left( \Delta \!\,{t}+\Delta \!\,{x}^2\right) ^2\,. \end{aligned}$$

Reminding that \(0<\gamma _i<1\), it follows from (3.14) and (3.5) that

$$\begin{aligned} E^{N-\frac{1}{2}}(\tilde{u}_h)\!&\le \! \frac{\Delta \!\,{t}^2}{\Delta \!\,{x}^2}C^2\left( \Delta \!\,{t}+\Delta \!\,{x}^2\right) ^2 +\Delta \!\,{x}\sum _{i=1}^{M-1}\frac{t_{N-1}\Gamma (\gamma _{i})t_{\left[ \frac{N}{2}\right] }^{1-\gamma _{i}}}{2K_{\gamma }} \left( \Delta \!\,{t}^{1+\gamma _i}\!+\!\Delta \!\,{x}^2\!+\!\frac{\Delta \!\,{t}^2}{\Delta \!\,{x}^2}\right) ^2\nonumber \\&\le C^2\left( \Delta \!\,{t}+\Delta \!\,{x}^2+{\Delta \!\,{t}^2}/{\Delta \!\,{x}^2}\right) ^2\,. \end{aligned}$$
(3.15)

It yields the following theorem.

Theorem 3.6

Let the fractional order \(\gamma =\gamma (x)\) and \(u(x,t)\in C_{x,t}^{(4,2)}\) be the smooth solution of the variable-order subdiffusion Eq. (3.1), the numerical solution of the MDFF-VO scheme (3.6) is convergent, in the sense of (3.15), with an order of \(O\left( \Delta \!\,{t}+\Delta \!\,{x}^2+\Delta \!\,{t}^2/{\Delta \!\,{x}^2}\right) \).

4 Extension to Distributed-Order Subdiffusion Equations

We consider a nonnegative function \(\rho (\gamma )\) that acts as weight for the order of differentiation \(\gamma \in (0,1)\) such that \(\int _0^1\rho (\gamma )\,\mathrm {d}\gamma =\rho _0>0,\) where \(\rho _0\) is a positive constant. For the sake of simplicity, it is to assume \(\rho (\gamma )\) is continuous and consider the following distributed-order fractional diffusion equation, see [22, 24, 35, 38],

$$\begin{aligned} \frac{\partial u}{\partial t}=K_{\gamma }\,\int \limits _0^1\rho (\gamma )\,{}{_0}{D}_t^{1-\gamma }\frac{\partial ^2u}{\partial x^2}\,\mathrm {d}\gamma + f(x,t),\quad t\ge 0, \end{aligned}$$
(4.1)

subject to \(u(x,0)=\varphi (x)\), where \({}{_0}{D}_{t}^{1-\gamma }\) is the modified Riemann–Liouville derivative (1.4).

Fractional differential equations where the order of differentiation is integrated over a given range, and therefore there is no single order of differentiation, have been considered by Caputo [3, 4]. Bagley and Torvik [1] studied extensively these distributed-order differential equations and gave series expansion solutions. Lorenzo and Hartley [24] studied the rheological properties of composite materials, while the distributed order fractional kinetics was discussed by Sokolov et al. [35]. Actually, the distributed order operator becomes a more precise tool to explain and describe some real physical phenomena [5, 24, 30, 38] such as the complexity of nonlinear systems and multi-scale, multi-spectral phenomena. However, there are seldom works on numerical approximations of differential equations with distributed-order. Diethelm and Ford [10] introduced a general framework for distributed-order ordinary differential equations by using the quadrature formula, such as the trapezoidal formula, with some suitable numerical solver for the resulting multi-term fractional equations, while a convergence analysis of the method was discussed in [12] recently. To the best of our knowledge, numerical schemes for partial integro-differential equations with distributed fractional order, including the subdiffusion Eq. (4.1), have not appeared in the literature.

In this section, the MDFF scheme (1.6) is extended to approximate the distributed-order subdiffusion Eq. (4.1). For a positive integer \(N_{\gamma }\), let \(\Delta \!\,{\gamma }=1/N_{\gamma }, \gamma _{\ell }^{*}=(\ell -\frac{1}{2})\Delta \!\,{\gamma }\,\) and \(a_k^{*}=(k+1)^{\gamma _{\ell }^{*}}-k^{\gamma _{\ell }^{*}}\) for \(k\ge 0\). For any temporal function \(\{w^n|\,0\le {n}\le {N}\}\), the modified \(L1\) approximate operator \(D_{\Delta \!\,{t}}^{1-\gamma _{\ell }^{*}}\) is defined by

$$\begin{aligned}&D_{\Delta \!\,{t}}^{1-\gamma _{\ell }^{*}}w^n =\frac{\Delta \!\,{t}^{\gamma _{\ell }^{*}-1}}{\Gamma (1+\gamma _{\ell }^{*})} \left[ a_0^{*}\,w^n-\sum _{k=1}^{n-1}\left( a_{n-k-1}^{*}-a_{n-k}^{*}\right) w^{k}\right] \,,\quad n\ge 1. \end{aligned}$$

We combine the modified \(L1\) formula above with the second-order midpoint formula for the weighted integral to get an accurate approximation of the distributed-order Riemann–Liouville derivative, as stated in the following lemma.

Lemma 4.1

Assume that \(y(t)\in \mathcal {C}_t^2[0,t_{n+1}]\) and \(\rho (\gamma )\,{}{_0}{D}_t^{1-\gamma }y(t)\in \mathcal {C}_{\gamma }^2[0,1]\). Then

$$\begin{aligned} \Delta \!\,{\gamma }\sum _{\ell =1}^{N_{\gamma }} \rho (\gamma _{\ell }^{*})D_{\Delta \!\,{t}}^{1-\gamma _{\ell }^{*}}y(t_{n}) =\int \limits _0^1\rho (\gamma )\,{}{_0}{D}_t^{1-\gamma }y(t_{n})\,\mathrm {d}\gamma +O(\Delta \!\,{t}+\Delta \!\,{\gamma }^2)\,. \end{aligned}$$

We apply Lemma 4.1 to approximate the distributed-order Eq. (1.1) by

$$\begin{aligned} D_tU_i^{n}=K_{\gamma }\sum _{\ell =1}^{N_{\gamma }} \Delta \!\,{\gamma }\rho (\gamma _{\ell }^{*})D_{\Delta \!\,{t}}^{1-\gamma _{\ell }^{*}}\Delta _h^{df\!\!f}U_i^n +f_i^n+\widetilde{R}_i^n,\quad 1\le {i}\le {M-1},1\le {n}\le {N-1}, \end{aligned}$$

where the truncation error

$$\begin{aligned} \big |\widetilde{R}_i^n\big |\le C\left( \Delta \!\,{t}+\Delta \!\,{x}^2+{\Delta \!\,{t}^2}/{\Delta \!\,{x}^2}+\Delta \!\,{\gamma }^2\right) ,\quad 1\le {i}\le {M-1},1\le n\le N-1. \end{aligned}$$
(4.2)

Neglecting the truncation error \(\widetilde{R}_i\) and replacing \(U_i^n\) with its approximation \(u_i^n\), we get the following modified Du Fort–Frankel scheme with distributed-order (denoted by MDFF-DO)

$$\begin{aligned} D_tu_i^{n}=K_{\gamma }\sum _{\ell =1}^{N_{\gamma }} \Delta \!\,{\gamma }\rho (\gamma _{\ell }^{*})D_{\Delta \!\,{t}}^{1-\gamma _{\ell }^{*}}\Delta _h^{df\!\!f}u_i^n+f_i^n,\quad 1\le {i}\le {M-1},1\le n\le N-1. \end{aligned}$$
(4.3)

To start the MDFF-DO scheme, one can apply (2.6) to compute the first level solution \(u_i^1\). Also, the initial-boundary conditions can be approximated by (2.8).

Obviously, the MDFF-DO scheme is also conditionally consistent. By the discrete energy method, we will show that the proposed MDFF-VO procedure, including (2.6), (2.8) and (4.3), is unconditionally stable. For simplicity of presentation, denote

$$\begin{aligned} A_k\equiv \Delta \!\,{\gamma }\sum _{\ell =1}^{N_{\gamma }}\frac{\rho (\gamma _{\ell }^{*})\Delta \!\,{t}^{\gamma _{\ell }^{*}-1}}{\Gamma (1+\gamma _{\ell }^{*})}\,a_{k}^{*}= \Delta \!\,{\gamma }\sum _{\ell =1}^{N_{\gamma }}\frac{\rho (\gamma _{\ell }^{*})}{\Gamma (\gamma _{\ell }^{*})\Delta \!\,{t}}\int \limits _{t_k}^{t_{k+1}}s^{\gamma _{\ell }^{*}-1}\,\mathrm {d}{s}\,,\quad k\ge 0. \end{aligned}$$
(4.4)

It is not difficult to obtain the following lemmas.

Lemma 4.2

The positive coefficient \(A_{k}\) satisfies

$$\begin{aligned} A_{k-1}>A_k\;\;\hbox {and}\;\; A_{k-1}-A_{k}>A_{k}-A_{k+1},\quad k\ge 1\,. \end{aligned}$$

Lemma 4.3

For any time sequence \(\{Q_1,Q_2,Q_3,\ldots \}\), it holds that

$$\begin{aligned} \Delta \!\,{t}\sum _{n=1}^{N-1}\left( \sum _{\ell =1}^{N_{\gamma }}\Delta \!\,{\gamma }\rho (\gamma _{\ell }^{*})D_{\Delta \!\,{t}}^{1-\gamma _{\ell }^{*}}Q_n\right) Q_n\ge \left( \sum _{\ell =1}^{N_{\gamma }}\frac{\Delta \!\,{\gamma }\rho (\gamma _{\ell }^{*})t_{\left[ \frac{N}{2}\right] }^{\gamma _{\ell }^{*}-1}}{\Gamma (\gamma _{\ell }^{*})}\right) \Delta \!\,{t}\sum _{n=1}^{N-1}Q_{n}^2\,. \end{aligned}$$

Proof

Note that

$$\begin{aligned}&\Delta \!\,{t}\sum _{n=1}^{N-1}\left( \sum _{\ell =1}^{N_{\gamma }}\Delta \!\,{\gamma }\rho (\gamma _{\ell }^{*})D_{\Delta \!\,{t}}^{1-\gamma _{\ell }^{*}}Q_n\right) Q_n\\&\quad =\Delta \!\,{t}\sum _{n=1}^{N-1}\Delta \!\,{\gamma }\sum _{\ell =1}^{N_{\gamma }}\frac{\rho (\gamma _{\ell }^{*})\Delta \!\,{t}^{\gamma _{\ell }^{*}-1}}{\Gamma (1+\gamma _{\ell }^{*})} \left[ a_0^{*}Q_n-\sum _{k=1}^{n-1}\left( a_{n-k-1}^{*}-a_{n-k}^{*}\right) Q_{k}\right] Q_n\\&\quad =\Delta \!\,{t}\sum _{n=1}^{N-1}\left[ A_0Q_n-\sum _{k=1}^{n-1}\left( A_{n-k-1}-A_{n-k}\right) Q_{k}\right] Q_n\,. \end{aligned}$$

Thus, following the proof of Lemma 2.3, the claimed inequality can be verified by using Lemma 4.2. The proof is completed. \(\square \)

Lemma 4.4

Let the grid function \(v_h^n\in \mathcal {P}_h\) satisfies

$$\begin{aligned} D_tv_i^n&= K_{\gamma }\,\sum _{\ell =1}^{N_{\gamma }} \Delta \!\,{\gamma }\rho (\gamma _{\ell }^{*})D_{\Delta \!\,{t}}^{1-\gamma _{\ell }^{*}}\Delta _h^{df\!\!f}v_i^n +g_i^n,\quad 1\le {i}\le {M-1},1\le n\le N-1,\quad \quad \quad \end{aligned}$$
(4.5)
$$\begin{aligned} \delta _tv_i^{\frac{1}{2}}&= g_i^0,\;1\le {i}\le {M-1};\quad v_i^{0}=\phi _i, \;0\le {i}\le {M}. \end{aligned}$$
(4.6)

Then it hold that

$$\begin{aligned} E^{N-\frac{1}{2}}(v_h)\le E^{\frac{1}{2}}(v_h)+\frac{\Delta \!\,{t}\sum _{n=1}^{N-1}\big \Vert g^n\big \Vert ^2}{2K_{\gamma }\sum _{\ell =1}^{N_{\gamma }}\Delta \!\,{\gamma }\rho (\gamma _{\ell }^{*}) \left( \Gamma (\gamma _{\ell }^{*})\right) ^{-1}t_{\left[ \frac{N}{2}\right] }^{\gamma _{\ell }^{*}-1}} \,,\quad N\ge 2, \end{aligned}$$
(4.7)

where the positive definite energy \(E^{n-\frac{1}{2}}\) is defined by (2.13).

Proof

This proof is the same to that of Lemma 2.4 except slight differences in the technical treatments of \(B_2\) and \(B_3\). Applying Lemma 4.3, one has

$$\begin{aligned} \widetilde{B}_2\equiv&-2K_{\gamma }\Delta \!\,{t}\sum _{n=1}^{N-1}\Delta \!\,{x}\sum _{i=1}^{M-1} \left( \Delta \!\,{\gamma }\sum _{\ell =1}^{N_{\gamma }} \rho (\gamma _{\ell }^{*})D_{\Delta \!\,{t}}^{1-\gamma _{\ell }^{*}}\Delta _h^{df\!\!f}v_i^n\right) \left( \Delta _h^{df\!\!f}v_i^n\right) \nonumber \\ \le&-2K_{\gamma }\left( \Delta \!\,{\gamma }\sum _{\ell =1}^{N_{\gamma }}\rho (\gamma _{\ell }^{*})\left( \Gamma (\gamma _{\ell }^{*})\right) ^{-1}t_{\left[ \frac{N}{2}\right] }^{\gamma _{\ell }^{*}-1}\right) \Delta \!\,{t}\sum _{n=1}^{N-1}\left[ \Delta \!\,{x}\sum _{i=1}^{M-1}\left( \Delta _h^{df\!\!f}v_i^n\right) ^2\right] \,. \end{aligned}$$
(4.8)

Furthermore, it is easy to obtain that

$$\begin{aligned} \widetilde{B}_3&\equiv -2\Delta \!\,{t}\Delta \!\,{x}\sum _{n=1}^{N-1}\sum _{i=1}^{M-1}g_i^n\left( \Delta _h^{df\!\!f}v_i^n\right) \nonumber \\&\le 2K_{\gamma }\left( \Delta \!\,{\gamma }\sum _{\ell =1}^{N_{\gamma }}\rho (\gamma _{\ell }^{*})\left( \Gamma (\gamma _{\ell }^{*})\right) ^{-1}t_{\left[ \frac{N}{2}\right] }^{\gamma _{\ell }^{*}-1}\right) \Delta \!\,{t}\sum _{n=1}^{N-1}\left[ \Delta \!\,{x}\sum _{i=1}^{M-1}\left( \Delta _h^{df\!\!f}v_i^n\right) ^2\right] \nonumber \\&\quad +\frac{\Delta \!\,{t}\sum _{n=1}^{N-1}\big \Vert g^n\big \Vert ^2}{2K_{\gamma }\sum _{\ell =1}^{N_{\gamma }}\Delta \!\,{\gamma }\rho (\gamma _{\ell }^{*}) \left( \Gamma (\gamma _{\ell }^{*})\right) ^{-1}t_{\left[ \frac{N}{2}\right] }^{\gamma _{\ell }^{*}-1}}\,. \end{aligned}$$
(4.9)

Multiplying the difference Eq. (4.5) by \(-2\Delta \!\,{t}\Delta \!\,{x}\Delta _h^{df\!\!f}v_i^n\), summing the indexes \(i,n\) for \(1\le {i}\le {M-1}\) and \(1\le {n}\le {N-1}\), one has

$$\begin{aligned} B_1=\widetilde{B}_2+\widetilde{B}_3\,, \end{aligned}$$

where \(B_1\) was defined in the proof of Lemma 2.4. With the help of the inequalities (2.16) and (4.8)–(4.9), the above equation gives the claimed inequality (4.7). \(\square \)

Theorem 4.5

The MDFF-DO scheme (4.3) is unconditionally stable in the sense of (4.7).

Now consider the error analysis. It is easy to see that \(\tilde{u}_h^n\in \mathcal {P}_h\) satisfies

$$\begin{aligned} D_t\tilde{u}_i^n&= K_{\gamma }\,\sum _{\ell =1}^{N_{\gamma }} \Delta \!\,{\gamma }\rho (\gamma _{\ell }^{*})D_{\Delta \!\,{t}}^{1\!-\!\gamma _{\ell }^{*}}\Delta _h^{df\!\!f}\tilde{u}_i^n +\widetilde{R}_i^n,\quad 1\le {i}\le {M\!-\!1},1\le n\le N\!-\!1,\quad \quad \quad \end{aligned}$$
(4.10)
$$\begin{aligned} \delta _t\tilde{u}_i^{\frac{1}{2}}&= R_i^0,\;1\le {i}\le {M-1};\quad \tilde{u}_i^{0}=0, \;0\le {i}\le {M}. \end{aligned}$$
(4.11)

Applying Lemma 4.4, we get

$$\begin{aligned} E^{N-\frac{1}{2}}(\tilde{u}_h)\le E^{\frac{1}{2}}(\tilde{u}_h)+\frac{\Delta \!\,{t}\sum _{n=1}^{N-1}\big \Vert \widetilde{R}^n\big \Vert ^2}{2K_{\gamma }\sum _{\ell =1}^{N_{\gamma }}\Delta \!\,{\gamma }\rho (\gamma _{\ell }^{*}) \left( \Gamma (\gamma _{\ell }^{*})\right) ^{-1}t_{\left[ \frac{N}{2}\right] }^{\gamma _{\ell }^{*}-1}}\,,\quad N\ge 2. \end{aligned}$$
(4.12)

Furthermore, one applies (4.11) and (2.7) to find that

$$\begin{aligned} E^{\frac{1}{2}}(\tilde{u}_h) =\frac{\Delta \!\,{t}^2}{\Delta \!\,{x}^2}\big \Vert \delta _t\tilde{u}^{\frac{1}{2}}\big \Vert ^2=\frac{\Delta \!\,{t}^2}{\Delta \!\,{x}^2}\big \Vert R^0\big \Vert ^2\le \frac{\Delta \!\,{t}^2}{\Delta \!\,{x}^2}C^2\left( \Delta \!\,{t}+\Delta \!\,{x}^2\right) ^2\,. \end{aligned}$$

Thus it follows from (4.2) and (4.12) that

$$\begin{aligned} E^{N-\frac{1}{2}}(\tilde{u}_h)&\le \frac{\Delta \!\,{t}^2}{\Delta \!\,{x}^2}C^2\left( \Delta \!\,{t}+\Delta \!\,{x}^2\right) ^2 +\frac{t_{N-1}C^2\left( \Delta \!\,{t}+\Delta \!\,{x}^2+\Delta \!\,{t}^2/{\Delta \!\,{x}^2}+\Delta \!\,{\gamma }^2\right) ^2}{2K_{\gamma }\sum _{\ell =1}^{N_{\gamma }}\Delta \!\,{\gamma }\rho (\gamma _{\ell }^{*}) \left( \Gamma (\gamma _{\ell }^{*})\right) ^{-1}t_{\left[ \frac{N}{2}\right] }^{\gamma _{\ell }^{*}-1}}\nonumber \\&\le C^2\left( \Delta \!\,{t}+\Delta \!\,{x}^2+\Delta \!\,{t}^2/{\Delta \!\,{x}^2}+\Delta \!\,{\gamma }^2\right) ^2\,. \end{aligned}$$
(4.13)

Theorem 4.6

Let \(\rho (\gamma )\in \mathcal {C}_{\gamma }[0,1], u(x,t)\in C_{x,t}^{(4,2)}\) be the smooth solution of the distributed-order subdiffusion Eq. (4.1) and \(\rho (\gamma )\,{}{_0}{D}_t^{1-\gamma }u(x,t)\in \mathcal {C}_{\gamma }^2[0,1]\), the numerical solution of the MDFF-DO scheme (4.3) is convergent of order \(O\left( \Delta \!\,{t}+\Delta \!\,{x}^2+\Delta \!\,{t}^2/{\Delta \!\,{x}^2}+\Delta \!\,{\gamma }^2\right) \) in the sense of (4.13).

5 Numerical Experiments

Three numerical examples are included in this section to verify the stability and accuracy of the MDFF (2.5), MDFF-VO (3.6) and MDFF-DO (4.3) schemes. As usual, maximum norm solution errors \(e(\Delta \!\,{t},\Delta \!\,{x})=\max _{0\le {i}\le M}\left| U(x_i,t_N)-u_i^N\right| \) at the final time \(T\), are computed in our experiments, which are carried out on a PC with 1,024 RAM using MATLAB.

Example 1

Consider the following initial-boundary value problem of (1.1),

$$\begin{aligned} \frac{\partial u}{\partial t}&= {}{_0}{D}_t^{1-\gamma }\frac{\partial ^2u}{\partial x^{2}}+2te^x\left[ 1-\frac{t^{\gamma }}{\Gamma (2+\gamma )}\right] , \quad 0<x<1,\;0<t\le 1,\\ u(0,t)&= t^{2},\;\, u(1,t)=et^{2}, \quad 0<t\le 1,\\ u(x,0)&= =0,\quad 0\le x\le 1. \end{aligned}$$

This problem has an exact solution \(u(x,t)=e^xt^{2}\).

Numerical accuracy of the MDFF scheme (2.5) is examined for different time-step settings, that is \(\Delta \!\,{t}=O(\Delta \!\,{x}^2), \Delta \!\,{t}=O(\Delta \!\,{x}^{3/2})\) and \(\Delta \!\,{t}=O(\Delta \!\,{x})\). In each setting, three different fractional orders \(\gamma =0.1,~0.5,~0.9\) are tested. Tables 1, 2 and 3 list the solution errors on the gradually refined grids with the coarsest grid \(\Omega _h^{\tau }\) of \(\Delta \!\,{x}=1/10\) and \(\Delta \!\,{t}=1/100\). Taking \(\Delta \!\,{t}=\Delta \!\,{x}^2\) in Table 1, the mesh spacings of the refined grid \(\widetilde{\Omega }_h^{\tau }\) are determined by \(\widetilde{\Delta \!\,{x}}=\Delta \!\,{x}/2, \widetilde{\Delta \!\,{t}}=\Delta \!\,{t}/4\,.\) The experimental rate \(p\) (listed as Order in tables) of convergence, in \(\Delta \!\,{x}\), is estimated by computing

$$\begin{aligned} p\approx \log _{2}\left[ {e(\Delta \!\,{t},\Delta \!\,{x})}/{e(\widetilde{\Delta \!\,{t}},\widetilde{\Delta \!\,{x}})}\right] \,. \end{aligned}$$

It is seen that, the MDFF scheme is of about \(O(\Delta \!\,{x}^{2})\) for \(\Delta \!\,{t}=O(\Delta \!\,{x}^2)\).

Table 1 Numerical accuracy in \(\Delta \!\,{x}\) of MDFF with \(\Delta \!\,{t}=\Delta \!\,{x}^2\)
Table 2 Numerical accuracy in \(\Delta \!\,{x}\) of MDFF with \(\Delta \!\,{t}\approx 10^{-\frac{1}{2}}\Delta \!\,{x}^{\frac{3}{2}}\)
Table 3 Numerical accuracy in \(\Delta \!\,{x}\) of MDFF with \(\Delta \!\,{t}= 10^{-1}\Delta \!\,{x}\)

The mesh spacings of the refined grid \(\widetilde{\Omega }_h^{\tau }\) in Table 2 are determined by \(\widetilde{\Delta \!\,{x}}=\Delta \!\,{x}/2, \widetilde{\Delta \!\,{t}}\approx 2^{-\frac{3}{2}}\Delta \!\,{t}\,\) such that the time-step size \(\Delta \!\,{t}\approx 10^{-\frac{1}{2}}\Delta \!\,{x}^{\frac{3}{2}}\). We observe that the numerical solutions for the three fractional-orders are \(O(\Delta \!\,{x})\) accurate. Table 3 lists the solution errors for large time-steps \(\Delta \!\,{t}=10^{-1}\Delta \!\,{x}\). As predicted by Theorem 2.5, the numerical solutions are stable although the convergence rates approach zero. Experimentally, the numerical results in Tables 1, 2 and 3 suggest that the order of accuracy is not less than \(O(\Delta \!\,{t}+\Delta \!\,{x}^2+\Delta \!\,{t}^2/\Delta \!\,{x}^2)\). It supports Theorems 2.6 partly.

Example 2

[6, 7] Consider the following initial-boundary value problem of (3.1),

$$\begin{aligned} \frac{\partial u}{\partial t}&= {}{_0}{D}_t^{1-\gamma (x,t)}\frac{\partial ^2u}{\partial x^{2}}+2te^x\left[ 1-\frac{t^{\gamma (x,t)}}{\Gamma (2+\gamma (x,t))}\right] , \quad 0<x<1,\;0<t\le 1,\\ u(0,t)&= t^{2},\;\, u(1,t)=et^{2}, \quad 0<t\le 1,\\ u(x,0)&= 0,\quad 0\le x\le 1. \end{aligned}$$

This problem has an exact solution \(u(x,t)=e^xt^{2}\).

We set \(a(x,t)=(x-0.5)^2+(t-0.5)^2\) and consider three variable fractional orders \(\gamma _1(x,t)=(2+a(x,t))/20, \gamma _2(x,t)=(10+a(x,t))/20,\) and \(\gamma _3(x,t)=(18+a(x,t))/20.\) They take the minimum values \(\gamma _m=0.1\,, 0.5\) and \(0.9\), respectively, at the interior time-space point \((x,t)=(0.5,0.5)\). Numerical accuracy of the MDFF-VO scheme (3.6) are also tested for three time-step settings, \(\Delta \!\,{t}=O(\Delta \!\,{x}^2), \Delta \!\,{t}=O(\Delta \!\,{x}^{3/2})\) and \(\Delta \!\,{t}=O(\Delta \!\,{x})\). The approximate solutions in Tables 4, 5 and 6 are obtained in similar to those in Tables 1, 2 and 3. It is seen that, the numerical data support Theorems 3.5 and 3.6 experimentally.

Table 4 Numerical accuracy in \(\Delta \!\,{x}\) of MDFF-VO with \(\Delta \!\,{t}=\Delta \!\,{x}^2\)
Table 5 Numerical accuracy in \(\Delta \!\,{x}\) of MDFF-VO with \(\Delta \!\,{t}\approx 10^{-\frac{1}{2}}\Delta \!\,{x}^{\frac{3}{2}}\)
Table 6 Numerical accuracy in \(\Delta \!\,{x}\) of MDFF-VO with \(\Delta \!\,{t}=10^{-1}\Delta \!\,{x}\)

Example 3

Consider an initial-boundary value problem of (4.1) with \(\rho =\Gamma (2+\gamma )\),

$$\begin{aligned} \frac{\partial u}{\partial t}&= \int \limits _0^1\Gamma (2+\gamma )\,{}{_0}{D}_t^{1-\gamma }\frac{\partial ^2u}{\partial x^{2}}\,\mathrm {d}\gamma +2te^x\left[ 1-\frac{t-1}{\ln t}\right] , \quad 0<x<1,\;0<t\le 1,\\ u(0,t)&= t^{2},\;\, u(1,t)=et^{2}, \quad 0<t\le 1,\\ u(x,0)&= 0,\quad 0\le x\le 1. \end{aligned}$$

This problem has an exact solution \(u(x,t)=e^xt^{2}\).

Numerical stability and accuracy of the MDFF-DO scheme (4.3) are also examined for three time-step settings \(\Delta \!\,{t}=O(\Delta \!\,{x}^2), \Delta \!\,{t}=O(\Delta \!\,{x}^{3/2})\) and \(\Delta \!\,{t}=O(\Delta \!\,{x})\). Taking the length \(\Delta \!\,{\gamma }=\Delta \!\,{x}\), Table 7 lists the solution errors on the gradually refined grids with the coarsest grid of \(\Delta \!\,{x}=1/10\) and \(\Delta \!\,{t}=1/100\). It is seen that, the results of Theorems 4.5 and 4.6 are supported experimentally.

Table 7 Numerical accuracy in \(\Delta \!\,{x}\) of MDFF-DO for different time-steps

6 Concluding Remarks

By combing the \(L1\) approximation of the Jumarie’s modified Riemann–Liouville derivative with the idea of Du Fort–Frankel scheme, well-known for ordinary diffusion equations, we propose three modified Du Fort–Frankel-type schemes for fractional subdiffusion equations with constant, variable and distributed fractional order, respectively. Under the time-step (consistency) restriction \(\Delta \!\,{t}/\Delta \!\,{x}\rightarrow 0\), the proposed explicit schemes are stable and convergent such that they admit large time-steps to accelerate the nonlocal time-integration in numerical approximations of time-fractional diffusion equations especially in higher spatial dimensions. Furthermore, due to the flexibility and relative simplicity of implementation, the stable explicit approaches would be good candidates for parallel computations on distributed-memory machines and pave the way for reducing the massive storage requirements of all discrete solutions at previous time levels.