Keywords

Mathematics Subject Classification (2000):

1 Introduction

In the last decades, lots of attention has been devoted to the time fractional diffusion equation (TFDE), namely, the one in the Caputo sense:

$$\displaystyle{ \frac{\partial ^{\alpha }u(t,x)} {\partial t^{\alpha }} = D\frac{\partial ^{2}u(t,x)} {\partial x^{2}} + f(t,x),\quad 0 < t \leq a,\ 0 < x < b, }$$
(1)

where 0 < α < 1 and the fractional Caputo derivative is defined by [2]

$$\displaystyle{ \frac{\partial ^{\alpha }u(t,x)} {\partial t^{\alpha }} = \frac{1} {\varGamma (1-\alpha )}\int _{0}^{t}(t - s)^{-\alpha }\frac{\partial ^{n}u(s,x)} {\partial s^{n}} \ ds, }$$
(2)

where n is the smallest integer greater than or equal to α. The TFDE has been found in a broad variety of engineering, biological, finance, and physical processes where anomalous diffusion (AD) occurs (see, e.g., [6, 8, 10]). More recently, a general equation has attracted the scientific community, the distributed-order time fractional diffusion equation, given by

$$\displaystyle\begin{array}{rcl} \int _{0}^{1}c(\alpha )\frac{\partial ^{\alpha }u(t,x)} {\partial t^{\alpha }} \ d\alpha = \frac{\partial ^{2}u(t,x)} {\partial x^{2}} + f(t,x),\quad 0 < t \leq a,\ 0 < x < b,& &{}\end{array}$$
(3)

where the function c(α) acting as weight for the order of differentiation is such that [7, 9] \(c(\alpha ) \geq 0\ \ \ \mbox{ and}\ \ \ \int _{0}^{1}c(\alpha )\ d\alpha = C > 0.\) Obviously, if \(c(\beta ) = \frac{1} {D}\) if β = α and 0 otherwise, then (3) reduces to (1).

Here, we will be interested in the numerical approximation of this type of distributed-order equations with boundary conditions of Dirichlet type:

$$\displaystyle\begin{array}{rcl} u(t,0) =\phi _{0}(t),\ u(t,b) =\phi _{b}(t),\quad 0 < t < a,& &{}\end{array}$$
(4)

and we will distinguish the following two problems: a forward problem (FDODE) where (3) and (4) is subject to an initial condition

$$\displaystyle\begin{array}{rcl} u(0,x)& =& g_{0}(x),\quad 0 < x < b,{}\end{array}$$
(5)

and a backward problem (BDODE), the case where (5) is replaced with the terminal condition

$$\displaystyle\begin{array}{rcl} u(a,x) = g_{a}(x),\quad 0 < x < b.& &{}\end{array}$$
(6)

Numerical methods are crucial for this kind of fractional differential equations, since only in a very few special cases, the analytical solutions can be found. While the methods developed for TFDEs are already relatively wide, the same cannot be said for the distributed-order diffusion equation case, since, to the best of our knowledge, only a few works have been reported. In [4] an implicit finite-difference method has been derived for the one-dimensional distributed-order diffusion equation; in [11] the same idea has been followed for the numerical approximation of nonlinear reaction-diffusion equations with distributed order in time. In [12] a numerical scheme has been developed for the solution of a distributed-order diffusion equation containing also a fractional derivative in space. In [5], a finite-difference method was presented for the two-dimensional distributed-order diffusion equation, together with an extrapolation technique to improve the convergence orders in time. In all these papers, only finite-difference approximations have been considered for the fractional time derivative, which may become heavy from the computational point of view, due to the nonlocal property of fractional differential operators. Moreover, in all of these works, only forward problems have been investigated.

Here we will follow an alternative approach: we consider a Chebyshev polynomial approximation of the fractional derivatives. The paper is organized in the following way: we start with a section devoted to some preliminary results that will be used in the forthcoming sections. In Sect. 3 we describe the numerical method and we end with some numerical examples and some conclusions.

2 Preliminaries

In this section we present some auxiliary results that will be used in the derivation of the numerical scheme. For the approximation of the integral term, we will use Gaussian quadrature. N-point Gaussian quadrature rules are a special class of quadrature formulas that yield the exact value of a definite integral for integral functions that are polynomials of degree less than or equal to (2N − 1).This can be achieved by suitable choices of the points x i and weights ω i , i = 1, , N. These rules are conventionally given in the interval [−1, 1] and may be given by \(\int _{-1}^{1}f(x)\ dx\cong \sum _{ i=1}^{N}\omega _{ i}f(x_{i})\). Obviously other intervals can be considered by using proper variable substitutions. In our case, since we are dealing with the interval [0, 1], it is easy to see that

$$\displaystyle{\int _{0}^{1}f(x)\ dx = \frac{1} {2}\int _{-1}^{1}f\left (\frac{t + 1} {2} \right )\ dt\cong \frac{1} {2}\sum _{j=1}^{N}\omega _{ j}f\left (\frac{t_{j} + 1} {2} \right ).}$$

Lemma 1 ([1]).

If f ∈ C (2N) ([0,1]), then with \(\gamma _{N} = \frac{(N!)^{4}} {(2N + 1)[(2N)!]^{3}} \approx \frac{\varPi } {4^{N}}\) , we have:

$$\displaystyle{\int _{0}^{1}f(x)\ dx -\frac{1} {2}\sum _{j=1}^{N}\omega _{ j}f\left (\frac{t_{j} + 1} {2} \right ) =\gamma _{N}\frac{f^{(2N)}(c_{N})} {(2N)!},\ \ 0 \leq c_{N} \leq 1.}$$

As we have mentioned in the Sect. 1, we will use Chebyshev polynomials to approximate the fractional derivatives. Chebyshev polynomials of degree n, T n (z) are defined in the interval [−1, 1].

In order to use them in the interval [0, a], we introduce the change of variable \(z = 2t/a - 1\) and obtain the so-called shifted Chebyshev polynomials \(T_{a,n}(t) = T_{n}\left (\frac{2t} {a} - 1\right )\). These shifted Chebyshev polynomials can also be obtained from the following expression (see [3]):

$$\displaystyle{T_{a,n}(t) = n\sum _{k=0}^{n}(-1)^{n-k}\frac{2^{2k}(n + k - 1)!} {(2k)!(n - k)!a^{k}}t^{k},\quad n = 1,2,\ldots,}$$

where

$$\displaystyle{ T_{a,i}(0) = (-1)^{i}\ \ \mbox{ and}\ \ T_{ a,i}(a) = 1, }$$
(7)

and satisfy the following orthogonality relation:

$$\displaystyle{\int _{0}^{a}T_{ a,j}(t)T_{a,k}(t)\omega _{a}(t)dt =\delta _{kj}h_{k},}$$

where \(\omega _{a}(t) = \frac{1} {\sqrt{at - t^{2}}}\) and h 0 = π, \(h_{k} = \frac{\pi } {2}\), k = 1, 2, .

A function y(t) belonging to the space of square integrable functions on [0, a] may be expressed as

$$\displaystyle{ y(t) =\sum _{ i=0}^{\infty }c_{ i}T_{a,i}(t), }$$
(8)

where the coefficients c i are given by

$$\displaystyle{c_{i} = \frac{< y(t),T_{a,i}(t) >} {\|T_{a,i}\|^{2}} = \frac{1} {h_{i}}\int _{0}^{a}y(t)T_{ a,i}(t)\omega _{a}(t)\ dt,\quad i = 0,1,2,\ldots.}$$

For computational purposes, only the first (m + 1) terms in (8) are considered:

$$\displaystyle{ y_{m}(t) =\sum _{ i=0}^{m}c_{ i}T_{a,i}(t),\quad t \in [0,a], }$$
(9)

and the following result holds:

Theorem 1 ([3]).

Let y(t) be a square integrable function on [0,a]. Then, given m ∈ N , y(t) may be approximated by \(y_{m}(t)\) , defined by  (9) , and for α > 0, we have

$$\displaystyle\begin{array}{rcl} D^{\alpha }y_{m}(t)=\sum _{i=\lceil \alpha \rceil }^{m}\sum _{ k=\lceil \alpha \rceil }^{i}c_{ i}w_{i,k}^{(\alpha )}t^{k-\alpha },\ w_{ i,k}^{(\alpha )}=\frac{(-1)^{i-k}2^{2k}i(i+k-1)!\varGamma (k+1)} {(i-k)!(2k)!\varGamma (k+1-\alpha )a^{k}} & &{}\end{array}$$
(10)

and the error \(\left \vert E(m)\right \vert = \left \vert D^{\alpha }y(t) - D^{\alpha }y_{m}(t)\right \vert \leq \sum _{i=m+1}^{\infty }c_{ i}\left (\sum _{k=\lceil \alpha \rceil }^{i}\sum _{ j=0}^{k-\lceil \alpha \rceil }\theta _{ i,j,k}\right ),\)

where, for \(h_{0} = 2\), \(h_{j} = 1,\ j = 1,2,\ldots \,\)

$$\displaystyle{\theta _{i,j,k} = \frac{(-1)^{i-k}2i(i + k - 1)!\varGamma \left (k -\alpha +\frac{1} {2}\right )} {h_{j}\varGamma \left (k + \frac{1} {2}\right )(i - k)!\varGamma (k -\alpha -j + 1)\varGamma (k + j -\alpha +1)a^{\alpha }}.}$$

3 Numerical Method

In the derivation of the numerical method, we proceed as in the classical (integer order) case. Let

$$\displaystyle\begin{array}{rcl} u(t,x) \approx u_{m}(t,x) =\sum _{ i=0}^{m}v_{ i}(x)T_{a,i}(t),& &{}\end{array}$$
(11)

Using a Gaussian quadrature formula with n points, (9) and (10), we obtain

$$\displaystyle{ \frac{1} {2}\sum _{j=1}^{n}\omega _{ j}c\!\left (\frac{\beta _{j} + 1} {2} \right )\!\sum _{i=\lceil \frac{\beta _{j}+1} {2} \rceil }^{m}\!\sum _{ k=0}^{i-\lceil \frac{\beta _{j}+1} {2} \rceil }\!v_{i}(x)w_{i,k}^{\left (\frac{\beta _{j}+1} {2} \right )}\!t^{i-k-\frac{\beta _{j}+1} {2} }=\sum _{i=0}^{m}\ddot{v}_{i}(x)T_{a,i}(t)+f(x,t). }$$
(12)

Note that in this case \(\frac{\beta _{j}+1} {2} \in [0,1],\ j=1,\ldots,n\), and then \(\left \lceil \frac{\beta _{j}+1} {2} \right \rceil = 1,\ j=1,\ldots,n\).

Now, we collocate Eq. (12) at m points \(t_{p}\). For collocation points, we use the roots of the shifted Chebyshev polynomial of degree \(m\), \(T_{a,m}(t)\):

$$\displaystyle\begin{array}{rcl} & & \frac{1} {2}\sum _{j=1}^{n}\omega _{ j}c\left (\frac{\beta _{j} + 1} {2} \right )\sum _{i=1}^{m}\sum _{ k=0}^{i-1}v_{ i}(x)w_{i,k}^{\left (\frac{\beta _{j}+1} {2} \right )}t_{p}^{i-k-\frac{\beta _{j}+1} {2} } =\sum _{ i=0}^{m}\ddot{v}_{i}(x)T_{L,i}(t_{p}) + f(x,t_{p}), \\ & & p = 0,\ldots,m - 1. {}\end{array}$$
(13)

We obtain in this way m ordinary differential equations on the (m + 1) unknowns v i (x),  i = 0, , m.

Using the fact that T a, i (0) = (−1)i and taking the initial condition (5) into account, we obtain the extra equation:

$$\displaystyle\begin{array}{rcl} \sum _{i=0}^{m}(-1)^{i}v_{ i}(x) = g_{0}(x).& &{}\end{array}$$
(14)

Alternatively, since \(T_{a,i}(a) = 1\), from the terminal condition (6), we obtain

$$\displaystyle\begin{array}{rcl} \sum _{i=0}^{m}v_{ i}(x) = g_{a}(x)& &{}\end{array}$$
(15)

On the other hand, by substituting (11) on the boundary conditions (4), we obtain

$$\displaystyle\begin{array}{rcl} & & \sum _{i=0}^{m}v_{ i}(0)T_{a,i}(t) =\phi _{0}(t),{}\end{array}$$
(16)
$$\displaystyle\begin{array}{rcl} & & \sum _{i=0}^{m}v_{ i}(b)T_{a,i}(t) =\phi _{b}(t).{}\end{array}$$
(17)

At the collocation points \(t_{p},\ p = 0,\ldots,m - 1\), (16) and (17) are as follows:

$$\displaystyle\begin{array}{rcl} & & \sum _{i=0}^{m}v_{ i}(0)T_{a,i}(t_{p}) =\phi _{0}(t_{p}),\quad p = 0,\ldots,m - 1,{}\end{array}$$
(18)
$$\displaystyle\begin{array}{rcl} & & \sum _{i=0}^{m}v_{ i}(b)T_{a,i}(t_{p}) =\phi _{b}(t_{p}),\quad p = 0,\ldots,m - 1.{}\end{array}$$
(19)

Therefore, in order to obtain the functions \(\{v_{i}\}_{i=0}^{m}\) that define the approximate solution of the forward problem (3), (4), (5), we must solve the system of differential equations (13)–(14), with boundary conditions (18) and (19).

In order to obtain an approximate solution of the backward problem (3), (4), (6), we must solve the system of differential equations (13)–(15), with boundary conditions (18) and (19).

4 Numerical Results

In this section, we apply the proposed method to solve some examples for which the analytical solution is known. We define the absolute error at the point (t, x) by

$$\displaystyle{e_{m}(t,x) = \vert u(t,x) - u_{m}(t,x)\vert,\quad (t,x) \in [0,a] \times [0,b].}$$

Example 1.

Forward problem:

$$\displaystyle\begin{array}{rcl} & & c(\alpha ) =\varGamma \left (\frac{5} {2}-\alpha \right ) {}\\ & & f(t,x) = \frac{\sqrt{t}(x - 1)^{2}\left (3\sqrt{\pi }(t - 1)(x - 1)^{2}x^{2} - 8t(5x(3x - 2) + 1)\log (t)\right )} {4\log (t)}, {}\\ \end{array}$$

with analytical solution given by \(u(x,t) = t^{3/2}x^{2}(1 - x)^{4},\quad (t,x) \in [0,1] \times [0,1]\).

In order to approximate the integral that defines the distributed-order derivative, we will use a 3-point Gaussian quadrature formula.

In Fig. 1 the domain pointwise absolute errors are displayed. We see that the pointwise error goes up to the order of \(2 \times 10^{-4},\ 4 \times 10^{-5},\ 1 \times 10^{-5},and\ 4 \times 10^{-6}\) if we consider on the series expansion of u, (11), \(m = 3,\ m = 5,\ m = 7,\) and m = 9, respectively. This shows that the numerical solutions are in good agreement with the exact solutions, and we have more accuracy if we consider more terms on the series approximation (11) of u.

Fig. 1
figure 1

Example 1: pointwise absolute error at the points (t, x) ∈ [0, 1] × [0, 1] for several values of m. From left to right: m = 3, m = 5, m = 7, m = 9

As a second example we consider, a backward problem which is defined by

Example 2.

Backward problem

$$\displaystyle\begin{array}{rcl} c(\alpha )& =& \varGamma \left (\frac{7} {2}-\alpha \right ) {}\\ f(t,x)& =& \frac{t^{3/2}\left (15\sqrt{\pi }(t - 1)x(x - 1)^{2} + 16t(2 - 3x)\log (t)\right )} {8\log (t)}, {}\\ \end{array}$$

with analytical solution given by \(u(t,x) = t^{5/2}(1 - x)^{2}x,\quad (t,x) \in [0,1] \times [0,1]\).

In these backward problems, the unknown solution u(x, t) has to be determined from the boundary measurements ϕ 0(t) and ϕ b (t) and terminal time measurement g a (x), which normally contain noises in practical problems. Thus, in order to test the proposed method, first we apply the method, with several values of m, to the second example without noise on the data and then we apply the method with some noise on the boundary and terminal data.

The comparison results between u(0, x) and u m (0, x) are displayed in Table 1, for several values of x ∈ [0, 1] and m = 1, 3, 5, 7 and 9. From the results in Table 1, it can be observed that the error is smaller for the biggest value of m that we consider. Thus, the overall errors can be made smaller by adding new terms from the series (11) that approximate u(t, x).

Table 1 Example 2: the absolute errors related with the approximate solutions \(u_{m}(x,t),\quad m = 1,\ 3,\ 5,\ 7\) and m =  9, at the points (0, x), x ∈ { 0. 2, 0. 4, 0. 5, 0. 6, 0. 7, 0. 9}

Now, we consider Example 2 with several levels of noise, δ = 10i,  i = 2, , 5, on the boundary and terminal data: \(\bar{g_{a}}(x)=g_{a}(x)+\delta,\ \bar{\phi _{0}(t)}=\phi _{0}(t)+\delta,\ \bar{\phi _{b}(t)}\) = ϕ b (t)+δ. In Fig. 2 we show the absolute error at points (x, 0), x ∈ [0, 1] obtained for the approximation (11) with m = 5 and several levels of noise. It can be observed that the noise has influence on the numerical results.

Fig. 2
figure 2

Absolute error for Example 2 using m = 5 and different noise levels δ. From left to right: δ = 10−2, δ = 10−3, δ = 10−4, δ = 10−5

5 Conclusions

In this work we have presented an alternative method (than finite-difference methods) for the numerical approximation of time distributed-order diffusion equations that is able to deal with both initial (or forward) and terminal (or backward) problems. The numerical results presented for examples with known analytical solutions illustrate the accuracy of the proposed method. In the future we intend to provide a full comparison with the finite-difference methods and analyze the convergence of the scheme.