Abstract
We propose an efficient algorithm for the approximation of fractional integrals by using Runge–Kutta based convolution quadrature. The algorithm is based on a novel integral representation of the convolution weights and a special quadrature for it. The resulting method is easy to implement, allows for high order, relies on rigorous error estimates and its performance in terms of memory and computational cost is among the best to date. Several numerical results illustrate the method and we describe how to apply the new algorithm to solve fractional diffusion equations. For a class of fractional diffusion equations we give the error analysis of the full space-time discretization obtained by coupling the FEM method in space with Runge–Kutta based convolution quadrature in time.
Similar content being viewed by others
1 Introduction
Fractional Differential Equations (FDEs) have nowadays become very popular for modeling different physical processes, such as anomalous diffusion [26] or viscoelasticity [1, 25]. In the present paper we develop a fast and memory efficient method to compute the fractional integral
for a given \(\alpha \in (0,1)\). A standard discretization of (1) is obtained by convolution quadrature (CQ) based on a Runge–Kutta scheme [5, 18]
where the convolution weights \(\varvec{\omega }_n\) can be expressed as, see Lemma 9,
with \(\mathbf{e}_n(\cdot )\) a function that depends on the Runge–Kutta scheme. For discretizations based on linear multistep methods, see [14].
To compute up to time \(T = Nh\) using formula (2) requires O(N) memory and \(O(N^2)\) arithmetic operations. Algorithms based on FFT can reduce the computational complexity to \(O(N \log N)\) [16] or \(O(N \log ^2 N)\) [9], but not the memory requirements; for an overview of FFT algorithms see [7]. Here we develop algorithms that reduce the memory requirement to \(O(|\log \varepsilon |\log N)\) and the computational cost to \(O(|\log \varepsilon | N \log N)\), with \(\varepsilon \) the accuracy in the computation of the convolution weights. Hence, our algorithm has the same complexity as the fast and oblivious quadratures of [19] and [23], but as we will see, a simpler construction.
The algorithms will depend on an efficient quadrature of (3) for \(n \ge n_0\), with a very moderate threshold value for \(n_0\), say \(n_0=5\). As \(\mathbf{e}_n(z) = r(z)^n\mathbf{q}(z)\) and \(r(z) = e^{z}+O(z^{p+1})\), where p is the order of the underlying RK method, this is intimately related to the construction of an efficient quadrature for the integral representation of the convolution kernel
with \(t \in [n_0h, T]\). Note that as \(\Gamma (1-\alpha )\Gamma (\alpha ) = \pi /\sin (\pi \alpha )\), \(h^{-1}\varvec{\omega }_n\) is an approximation of \(\tfrac{1}{\Gamma (\alpha )} t^{\alpha -1}\), i.e., the kernel of (1).
Even though we eventually only require the quadrature for (3), we begin with developing a quadrature formula for (4) for a number of reasons: the calculation for (4) is cleaner and easier to follow, such a quadrature allows for efficient algorithms that are not based on CQ, and finally once this is available the analysis for (3) is much shorter. The quadrature we develop for (4) is closely related to the one developed in [13], the main difference being our treatment of the singularity at \(x=0\) by Gauss–Jacobi quadrature and the restriction of t to the finite interval rather than semi-infinite as used in [13]. Both these decisions allow us to substantially reduce constants in the above asymptotic estimates of memory and computational costs. Recent references [2, 12, 27] also consider fast computation of (1), but do not address the approximation of the convolution quadrature approximation exploiting (3). Our main contribution here is the development of an efficient quadrature to approximate (3) and its use in a fast and memory efficient scheme for computing the discrete convolution (2).
The stability and convergence properties of RK convolution quadrature are well understood, see [6, 18]. This allows us to apply convolution quadrature not only to the evaluation of fractional integrals, but also to the solution of fractional subdiffusion or diffusion-wave equations of the form
with \(\beta \in (0,2)\). Here, \(\partial _t^{\beta } = \mathcal {I}^{m-\beta }\partial _t^m\), with \(m = \lceil \beta \rceil \), denotes the Caputo fractional derivative. Solutions of such equations typically have low regularity at \(t = 0\), but a discussion of adaptive or modified quadratures for this case is beyond the scope of the current paper. For a careful analysis of BDF2 based convolution quadrature of fractional differential equations see [8].
To our knowledge, underlying high order solvers for ODEs have been considered for the approximation of (1) only at experimental level in [2, 3] and in [23], where a fast and oblivious implementation of RK based CQ is considered for more general applications than (1). The fast and oblivious quadratures of [19] and [23] have the same asymptotic complexity as our algorithm, but have a more complicated memory management structure and require the optimization of the shape of the integration contour. Our new algorithm has the advantage of being much easier to implement, as it does not require sophisticated memory management and the optimization of quadrature parameters is much simpler, and furthermore only real arithmetic is required. The new method is also much better suited for the extension to variable steps — this will be investigated in a follow up work. On the other hand, the present algorithm is specially tailored to the application to (1) and related FDEs, whereas the algorithms in [19, 23] allow for a wider range of applications.
The paper is organized as follows. In Sect. 2 we develop and fully analyze a special quadrature for (1), which uses the same nodes and weights for every \(t\in [n_0h,T]\). In Sect. 3, we recall Convolution Quadrature based on Runge–Kutta methods and derive the special representation of the associated weights already stated in (3). In Sect. 4 we derive a special quadrature for (3), which uses the same nodes and weights for every \(n\in [n_0,N]\), with \(T=hN\). In Sect. 5 we explain how to turn our quadrature for the CQ weights into a fast and memory saving algorithm. In Sect. 6 we test our algorithm with a scalar problem and in Sect. 7 we consider the application to a fractional diffusion equation. We provide a complete error analysis of the discretization in space and time of a class of fractional diffusion equations.
2 Efficient quadrature for \(t^{\alpha -1}\)
In the following we fix an integer \(n_0 > 0\), time step \(h> 0\), and the final computational time \(T > 0\). Throughout, the parameter \(\alpha \) is restricted to the interval (0, 1). We develop an efficient quadrature for (4) accurate for \(t \in [n_0 h, T]\).
2.1 Truncation
First of all we truncate the integral
where \(\tau (L)\) denotes the truncation error.
Lemma 1
For \(t \ge n_0 h\) and \(L = A/h\) we have that
Proof
\(\square \)
Remark 2
Given a tolerance \(\mathrm {tol}> 0\), \(|\tau (L)| \le \mathrm {tol}\) if
Assuming \(A\ge 1\) we can choose
However, in practice it is advantageous to use the bound (5) to numerically find the optimal A.
2.2 Gauss–Jacobi quadrature for the initial interval
We choose an initial integration interval
along which we will perform Gauss–Jacobi integration.
Recall the Bernstein ellipse \(\mathcal {E}_{\varrho }\), which is given as the image of the circle of radius \(\varrho > 1\) under the map \(z \mapsto (z+z^{-1})/2\). The largest imaginary part on \(\mathcal {E}_{\rho }\) is \((\varrho -\varrho ^{-1})/2\) and the largest real part is \((\varrho +\varrho ^{-1})/2\).
Theorem 3
Let f be analytic inside the Bernstein ellipse \(\mathcal {E}_{\varrho }\) with \(\varrho > 1\) and bounded there by M. Then the error of Gauss quadrature with weight w(x) is bounded by
where \(If = \int _{-1}^1 w(x) f(x) dx\) and \(I_Q f = \sum _{j = 1}^Q w_j f(x_j)\) is the corresponding Gauss formula, with weights \(w_j > 0\).
Proof
A proof of this result for \(w(x) \equiv 1\) can be found in [24, Chapter 19]. The same proof works for the weighted Gauss quadrature as well. We give the details next.
First of all note that we can expand f in Chebyshev series
with \(|a_k| \le 2M\varrho ^{-k}\) [24, Theorem 8.1]. If we denote by \(f_K(x) = \sum _{k = 0}^K a_k T_k(x)\) the truncated series then
As \(I_Q\) is exact for polynomials of degree \(2Q-1\), we have that
where we have used the fact the weights are positive and integrate constants exactly. \(\square \)
Changing variables to the reference interval \([-1,1]\) we obtain
We apply Theorem 3 to the case
and denote
Theorem 4
For \(t \in [0,T]\) and any \(Q \ge 1\) we have the bound
Proof
Since \(f_0\) in (7) is an entire function, by Theorem 3 we can estimate
Let \(\varrho = e^{\delta }\) with \(\delta > 0\). Then the error bound can be written as
We now choose \(\delta \) so that it maximises the function
As
we have a maximum at
Using the identities
we derive an error estimate with the above choice of \(\delta \):
where in the last step above we have used that \(-1+\sqrt{1+x^2} \le x\) for \(x > 0\). This gives the stated result. \(\square \)
2.3 Gauss quadrature on increasing intervals
We next split the remaining integral as
where
where \(\Delta L_j = L_j-L_{j-1}\), \(j=1,\dots ,J\), with \(L_J = L\). The intervals are chosen so that for some \(B \ge 1\), \(\Delta L_j = BL_{j-1}\), i.e., \(L_j = (B+1)L_{j-1}\) and \(J= \lceil \log _{B+1} L/L_0\rceil \). To each integral we apply standard, i.e., \(w(x) \equiv 1\) in Theorem 3, Gauss quadrature with Q nodes and denote the corresponding error by
with
Theorem 5
For any \(Q \ge 1\) and \(t \ge 0\)
with
Proof
Note that the integrand \(f_j\) in (8) is now not entire and there will be a restriction \(\varrho < \varrho _{\max }\) on the choice of the Bernstein ellipse \(\mathcal {E}_{\varrho }\) in order to avoid the singularity of the fractional power. In particular we require
which is satisfied for \(1<\varrho <\varrho _{\max }\) and
Setting
we see that \(\varepsilon \in (0,1)\) for \(\varrho \in (1, \varrho _{\max })\) and that
Hence
The result is now obtained by using
to show that \(\varrho = g(\varepsilon ,B)\). \(\square \)
Remark 6
Choosing for instance \(\varepsilon =0.1\) and \(B=1\) in the above estimate, we obtain
and
As we will require a uniform bound for \(t \in [t_{n_0},T]\), we can substitute \(t = t_{n_0}\) in this estimate.
3 Runge–Kutta convolution quadrature
Let us consider an s-stage Runge–Kutta method described by the coefficient matrix \(\mathcal{O}\!\iota = (a_{ij})_{i,j=1}^s \in \mathbb {R}^{s\times s}\), the vectors of weights \({\mathbf {b}}= (b_1,\ldots ,b_s)^T \in \mathbb {R}^s\) and the vector of abcissae \({\mathbf {c}}= (c_1,\ldots ,c_s)^T \in [0,1]^s\). We assume that the method is A-stable, has classical order \(p\ge 1\), stage order q and satisfies \(a_{s,j}=b_j\), \(j=1,\dots ,s\), [10]. The corresponding stability function is given by
where
Our assumptions imply the following properties:
-
1.
\(c_s=1\).
-
2.
\(r(\infty ) = {\mathbf {b}}^T \mathcal{O}\!\iota ^{-1}\mathbb {1}-1 = 0\).
-
3.
\(r(z) = e^z+O(z^{p+1})\)
-
4.
\(|r(z)| \le 1\) for \(\mathrm{Re}\,z \le 0\).
Important examples of RK methods satisfying our assumptions are Radau IIA and Lobatto IIIC methods.
Let us consider the convolution
where K(z) denotes the Laplace transform of the convolution kernel k(t). K is assumed to be analytic for \(\mathrm{Re}\,z > 0\) and bounded there as \(|K(z)| \le |z|^{-\mu }\) for some \(\mu > 0\). The operational notation \(K(\partial _t) f\) introduced in [15], is useful in emphasising certain properties of convolutions. Of particular importance is the composition rule, namely, if \(K(s) = K_1(s)K_s(s)\) then \(K(\partial _t)f = K_1(\partial _t) K_2(\partial _t) f\). This will be used when solving fractional differential equations in Sect. 7.2.
If \(\mu < 0\), the convolution is defined by
where \(K_m(z) = z^{-m} K(z)\) and m smallest integer such that \(m > -\mu \).
For \(K(z) = z^{-\alpha }\) the convolution coincides with the fractional integral of order \(\alpha \), i.e., according to the operational notation, we can write
For \(\beta > 0\), \(\partial _t^\beta \) is equivalent to the Riemann–Liouville fractional derivative, see definition (28).
Runge–Kutta convolution quadrature has been derived in [18] and applied to (10) provides approximations at time-vectors \(\mathbf{t}_{n}=(t_{n,j})_{j=1}^s\), with \(t_{n,j}=t_{n} + c_j h\) and \(t_n=nh\), defined by
where \((K(\partial _t)f({\mathbf {t}}_{n}))_{\ell } = K(\partial _t)f(t_{n,\ell })\), \(({\mathbf {f}}_j)_\ell = f(t_{j,\ell })\) and the weight matrices \({\mathbf {W}}_j\) are the coefficients of the power series
with
The notation in (11) again emphasises that the composition rule holds also after discretization: if \(K(s) = K_1(s)K_s(s)\) then \(K(\varvec{\partial }_t^{h})f = K_1(\varvec{\partial }_t^{h}) K_2(\varvec{\partial }_t^{h}) f\).
The last row in (11) defines the approximation at the time grid \(t_{n+1}\), since \(c_s=1\). Denoting \(\varvec{\omega }_j(K)\) the last row of \({\mathbf {W}}_j(K)\), the approximation reads
For the rest of the paper we will denote by \({\mathbf {W}}_j = {\mathbf {W}}_j(K)\) and \(\varvec{\omega }_j = \varvec{\omega }_j(K)\) the weights for the fractional integral case, i.e., for \(K(z) = z^{-\alpha }\).
Remark 7
(Notation). We have defined the discrete convolution \(K(\partial _t^h) f\) for functions f. For a sequence \(\mathbf {f}_0, \dots , \mathbf {f}_N \in \mathbb {R}^s\), we use the same notation \(K(\partial _t^h)\mathbf {f}\) to denote
and similarly for \(K(\varvec{\partial }_t^h)\mathbf {f}(\mathbf {t}_n)\) with the meaning
and
Note also that
FFT techniques based on (12) can be applied to compute at once all the required \({\mathbf {W}}_j\), \(j=0,\dots ,N\), with \(N=\lceil T/h\rceil \), [16]. The computational cost associated to this method is \(O(N\log (N))\). It implies precomputing and keeping in memory all weight matrices for the approximation of every \(\mathcal {I}^{\alpha }[f](t_n)\), \(n=1,\dots ,N\), see [4] for details and many experiments.
The following error estimate for the approximation of (1) by (14) is given by [18, Theorem 2.2]. Notice that we allow K(z) to be a map between two Banach spaces with appropriate norms denoted by \(\Vert \cdot \Vert \) in the following. This will be needed in Sect. 7.
Theorem 8
Assume that there exist \(c\in \mathbb {R}\), \(0<\delta <\frac{\pi }{2}\) and \(M>0\) such that K(z) is analytic in a sector \(|\arg (z-c)|<\pi -\delta \) and satisfies there the bound \(\Vert K(z)\Vert \le M|z|^{-\alpha }\). Then if \(f\in C^{p}[0,T]\), there exists \(h_0>0\) and \(C>0\) such that for \(h\le h_0\) it holds
3.1 Real integral representation of the CQ weights
The convolution quadrature weights \(\varvec{\omega }_j\) can also be expressed as [23]
for \({\mathbf {e}}_n(\lambda )\) a function which depends on the ODE method underlying the CQ formula and an integration contour \(\Gamma \) which can be chosen as a Hankel contour beginning and ending in the left half of the complex plane.
Lemma 9
The weights are given by
and
where
and \(\mathbf{e}_n(z)\) is the last row of \({\mathbf {E}}_n(z)\).
Explicit formulas for \({\mathbf {E}}_n\) and \(\mathbf{e}_n\) are given by
and
where r is the stability function of the method and \(\mathbf{q}(z)=\mathbf{b}^T(I-z\mathcal{O}\!\iota )^{-1}\).
Proof
Since \(z^{-\alpha }\) is analytic in the whole complex plane but for the branch cut on the negative real axis, the Hankel contour \(\Gamma \) can be degenerated into negative real axis as in the derivation of the real inversion formula for the Laplace transform [11, Sect. 10.7] to obtain
The expression for \({\mathbf {W}}_n\) is obtained in the same way and the explicit formulas for \({\mathbf {E}}_n\) and \(\mathbf{e}_n\) can be found in [23]. \(\square \)
The next properties will be used later in Sect. 4
Lemma 10
There exist constants \(\gamma > 1\), \(b > 0\) and \(C_{{\mathbf {q}}} > 0\) such that
and
where \(C_{{\mathbf {q}}}\) depends on the choice of the norm \(\Vert \cdot \Vert \).
Proof
Fix a \(b > 0\) such that all the poles of r(z) (and hence \(\mathbf{q}(z)\)) belong to \(\mathrm{Re}\,z > b\). Define now
where we have used the properties of r(z) to see that \(\sup _{\mathrm{Re}\,z = 0} \frac{1}{\mathrm{Re}\,z}\log |r(z)| = 1\).
Recall that \({\mathbf {q}}(z) = {\mathbf {b}}^T(I-z\mathcal{O}\!\iota )^{-1}\). As all the singularities of \({\mathbf {q}}\) are in the half-plane \(\mathrm{Re}\,z > b\) and \(\Vert {\mathbf {q}}(z)\Vert \rightarrow 0\) as \(|z| \rightarrow \infty \), we have that \(\Vert {\mathbf {q}}(z)\Vert \) is bounded in the region \(\mathrm{Re}\,z \le b\). \(\square \)
Remark 11
-
(a)
Note that for BDF1 we can choose \(b \in (0,1)\). Hence, \(\gamma = b^{-1}\log \frac{1}{1-b}\) and since \({\mathbf {q}}(z) = r(z)\) for BDF1, we can set \(C_{{\mathbf {q}}} = e^{\gamma b}\).
-
(b)
For the 2-stage Radau IIA method we have
$$\begin{aligned} r(z) = \frac{2z+6}{z^2-4z+6}, \quad {\mathbf {q}}(z) = \frac{1}{2(z^2-4z+6)} \begin{bmatrix} 9&3-2z \end{bmatrix}. \end{aligned}$$As the poles of r and \({\mathbf {q}}\) are at \(z = 2\pm \sqrt{2}\mathrm {i}\), we can choose any \( b\in (0,2)\) and obtain the optimal \(\gamma \) numerically using (21). For example for \(b = 1\), we can choose \(\gamma \approx 1.0735\). Similarly we can compute \(C_{{\mathbf {q}}}\) by computing
$$\begin{aligned} C_{{\mathbf {q}}} = \sup _{\mathrm{Re}\,z = 0 \text { or } \mathrm{Re}\,z = b} \Vert {\mathbf {q}}(z)\Vert . \end{aligned}$$For \(b = 1\) and the Euclidian norm we have \(C_{{\mathbf {q}}} \approx 1.6429\). Using the same procedure, for \(b = 3/2\), we have \(\gamma \approx 1.2617\) and \(C_{{\mathbf {q}}} \approx 3.3183\).
-
(c)
For the 3-stage Radau IIA method the poles of r(z) and \({\mathbf {q}}(z)\) belong to \(\mathrm{Re}\,z \ge \frac{9^{2/3}}{6}-\frac{9^{1/3}}{2}+3 \approx 2.681\). Choosing \(b = 1\) gives \(\gamma \approx 1.0117\) and \(C_{{\mathbf {q}}} \approx 1.1803\), whereas for \(b = 1.5\) we obtain \(\gamma \approx 1.0521\) and \(C_{\mathbf {q}}\approx 1.7954\).
Lemma 12
There exist constants \(c > 0\) and \(x_0 > 0\) such that
Proof
Using that \(r(\infty ) = {\mathbf {b}}^T \mathcal{O}\!\iota ^{-1}\mathbb {1}-1 = 0\) it can be shown that \(r(z) = {\mathbf {b}}^T \mathcal{O}\!\iota ^{-1}(I-z \mathcal{O}\!\iota )^{-1}\mathbb {1}\). Let all eigenvalues of \(\mathcal{O}\!\iota ^{-1}\) and hence all poles of r(z), \({\mathbf {q}}(z)\), and \((I-z\mathcal{O}\!\iota )^{-1}\) lie in \(\mathrm{Re}\,z \ge \tilde{x}_0 > 0\). There exists a constant C such that for all \(\mathrm{Re}\,z < 0\)
where we can set \(x_0 = \frac{1}{C}\tilde{x}_0\) and \(c = \frac{1}{C}\). \(\square \)
Remark 13
-
1.
For BDF1, \(c = 1\) and \(x_0 = 1\).
-
2.
For 2-stage Radau IIA the constant can be obtained following the proof. Namely we choose \(\tilde{x}_0 = 2\) and find numerically that
$$\begin{aligned} \max \{|r(z)|, \Vert {\mathbf {q}}(z)\Vert , \Vert (I-z\mathcal{O}\!\iota )^{-1}\Vert \} |\mathrm{Re}\,z-\tilde{x}_0| \le 2, \qquad \mathrm{Re}\,z \le 0. \end{aligned}$$Hence we can choose \(C = 2\) and \(c = 1/2\) and \(x_0 = 2/C = 1\).
-
3.
Similarly, for 3-stage Radau IIA we choose \(\tilde{x}_0 = 2.6811\) and find that
$$\begin{aligned} \max \{|r(z)|, \Vert {\mathbf {q}}(z)\Vert , \Vert (I-z\mathcal{O}\!\iota )^{-1}\Vert \} |\mathrm{Re}\,z-\tilde{x}_0| \le 3.0821, \qquad \mathrm{Re}\,z \le 0. \end{aligned}$$Hence we can choose \(C = 3.0821\) and \(c = 1/C = 0.3245\) and \(x_0 = \tilde{x}_0/C = 0.8699\).
In the rest of the section our goal is to derive a good quadrature for the approximation of \(\varvec{\omega }_n\) and \({\mathbf {W}}_n\). We will perform the same steps as in Sect. 2 for the \(\varvec{\omega }_n\). The same quadrature rules will give essentially the same error estimates for the \({\mathbf {W}}_n\); see Remark 21.
4 Efficient quadrature for the CQ weights
Analogously to the the continuous case (1), we fix \(n_0\), \(h\), and T and develop an efficient quadrature for the CQ weights representation (17), for \(nh\in [(n_0+1)h, T]\) and \(\alpha \in (0,1)\).
4.1 Truncation of the CQ weights integral representation
Again we truncate the integral
and give a bound on the truncation error \(\varvec{\tau }(L)\).
Lemma 14
With the choice \(L = Ah^{-1}\), the truncation error is bounded as
or more explicitly
Proof
From Lemma 12 we have that
\(\square \)
Corollary 15
Let \(L = A/h\). Given \(\mathrm {tol}> 0\), choosing
ensures \(\Vert \varvec{\tau }(L)\Vert \le \mathrm {tol}\). The estimate becomes uniform in \(n>n_0\) by setting \(n=n_0+1\) in the above error bound.
Proof
We have from above
from which the result follows. \(\square \)
Remark 16
In practice we find that instead of using Corollary 15, better results are obtained if a simple numerical search is done to find the optimal A such that the right-hand side in (22) with \(n = n_0+1\) is less than \(\mathrm {tol}\). To do this, we start from \(A=0\) and iteratively approximate the integral in (22) for increased values of A (\(A \leftarrow A+0.125\) in our code) until the resulting quantity is below our error tolerance. The approximation of the integrals is done by the MATLAB built-in routine integral. Notice that this has to be done only once for each RK-CQ formula and value of \(\alpha \in (0,1)\).
4.2 Gauss–Jacobi quadrature for the CQ weights
In a similar way as in Sect. 2.2, we consider the approximation of the integral
and investigate in the first place the approximation of
for some suitable \(L_0>0\) by using Gauss–Jacobi quadrature. Changing variables as in Sect. 2.2 we obtain
and apply Theorem 3 to estimate the error
with the weight \(w(x) = (x+1)^{-\alpha }\) and integrand
Theorem 17
Let
with b and \(\gamma \) from Lemma 10, and
If \(\varrho _\text {opt}\in (1,\varrho _{\max })\), we have the bound
Otherwise we have the bound
Proof
We again consider the Bernstein ellipse \(\mathcal {E}_{\varrho }\) around \([-1,1]\), but now in order to be able to use Lemma 10 and avoid the singularities of \({\mathbf {e}}_n(z)\) in the right-half plane we have a restriction on \(\varrho \). Namely, the maximal value of \(\varrho \) is given by
which implies, writing \(\varrho _{\max }=e^{\delta _{\max }}\),
and thus
giving the expression for \(\varrho _{\max }\) from the statement of the theorem. The error estimate for Gauss–Jacobi quadrature then reads, by using Lemma 10,
Proceeding as in Sect. 2.2 with \(\gamma T\) in place of T we obtain the bound
provided that the optimal value for \(\varrho \) is within the accepted interval
otherwise we make the choice \(\varrho = \varrho _{\max }\). \(\square \)
Remark 18
In all our numerical experiments, we have found that \(\varrho _{\text {opt}} < \varrho _{\max }\).
4.3 Gauss quadrature on increasing intervals for the CQ weights
We next split the remaining integral into the sum
where
The intervals are again chosen so that for some \(B \ge 1\), \(L_j = (B+1)L_{j-1}\). To each integral we apply standard Gauss quadrature, i.e., \(w(x) \equiv 1\) in Theorem 3, with Q nodes and denote the corresponding error by \(\varvec{\tau }_{n,j}(Q)\).
Theorem 19
with constants \(C_{{\mathbf {q}}},c,x_0\) from Lemmas 10 and 12 and
Proof
The proof is the same as the proof of Theorem 5, we only need to combine the facts that \(|r(z)| \le 1\) for \(\mathrm{Re}\,z \le 0\), the bound \(\Vert q(z)\Vert \le C_{{\mathbf {q}}}\) from Lemma 10, and the bound from Lemma 12. \(\square \)
Remark 20
To obtain a uniform bound for \(t_n \in [t_{n_0+1}, T]\), we replace n by \(n_0+1\) in the above bound.
Remark 21
We have developed the quadrature for the weights \(\varvec{\omega }_n\). However, up to a small difference in constants, the same error estimates hold for the matrix weights \({\mathbf {W}}_n\). Certainly, due to Lemma 12, the truncation estimate is the same. The main estimate used in the proof of Theorem 17 is the bound on the stability function r(z) and on q(z). The additional terms in \({\mathbf {E}}_n(z)\) would only contribute to the constant. Similar comment holds for Theorem 17.
5 Fast summation and computational cost
Now the efficient quadrature is available we explain how to use it to develop a fast algorithm for computing the corresponding discrete convolution. In order to do this, we split the convolution as
where as before \(({\mathbf {f}}_n)_{\ell }=f(t_{n,\ell })\); see (11). The first term is computed exactly, whereas for the second we can use the quadrature. Let \(N_Q\) be the total number of quadrature nodes and let \((w_k,x_k)\) denote the quadrature weights and nodes with the weights including the values of \(x_k^{-\alpha }\) in the region \(L_0\) to L where Gauss quadrature is used. Then our approximation of \(I^2_n\) has the form
Defining
we see that
Hence the convolution can be approximated as
with the \(Q_{n,k}\) satisfying the above recursion. Notice that for each \(k=1, \dots , N_Q\), \(Q_{n,k}\) is the RK approximation at time \(t_{n-n_0-1}\) of the ODE:
Thus, from one step to the next one we only need updating \(Q_{n,k}\), for \(k=1,\dots ,N_Q\), \(N_Q\) being the total number of quadrature nodes. Set \(\varepsilon \) the target accuracy of the quadrature. Then, from the results in Sect. 4 it follows that the total computational cost is \(O(N N_Q)\) with
For \(n\ge 5\), Corollary 15 implies \(L\sim h^{-1}\) and from Theorem 17 a reasonable choice for \(L_0\) is \(L_0=4/(eT)\), which leads to
Therefore, the computational complexity is \(O(|\log \varepsilon |N \log N )\), whereas the storage requirement scales as \(O(N_Q) = O(|\log \varepsilon |\log N )\).
6 Numerical experiments
Given a tolerance \(\mathrm {tol}> 0\), time step \(h> 0\), minimal index \(n_0\), final time \(T > 0\), and the fractional power \(\alpha \in (0,1)\) we use the above estimates to choose the parameters in the quadrature.
In particular we choose \(L_0 = 4/T\) and \(L = A h^{-1}\) with A such that the upper bound for the trunction error in (22) is less than \(\mathrm {tol}/3\). We set \(\tilde{B} = 3\) and
Note that in general this choice results in fewer integration intervals than when fixing B and setting J to the smallest integer such that \(L \le L_0(1+B)^J\). Next, we set \(L_j = L_0(1+B)^j\), for \(j = 0,\dots ,J\) and let \(Q_0\) denote the number of quadrature points in the Gauss–Jacobi quadrature on \([0, L_0]\) and \(Q_j\), \(j = 0,\dots , J-1\), the number of Gauss quadrature points in the interval \([L_{j},L_{j+1}]\). We choose the smallest \(Q_0\) so that the bound on \(\Vert \varvec{\tau }_{\mathrm {GJ},n}(Q_0)\Vert \) in Theorem 17 is less than \(\mathrm {tol}/3\); note that in all of the experiments below we had \(\varrho _{\text {opt}} < \varrho _{\text {max}}\). By doing a simple numerical minimization on the bound in Theorem 19, we find the optimal \(Q_j\) such that the error \(\Vert \varvec{\tau }_{n,j}(Q_j)\Vert < \mathrm {tol}\, J^{-1}/3\). With this choice of parameters each weight \(\varvec{\omega }_j\), \(j > n_0\), is computed to accuracy less than \(\mathrm {tol}\).
In Fig. 1 we show the error \(\Vert {\widetilde{\varvec{\omega }}}_n -\varvec{\omega }_n\Vert \), where \({\widetilde{\varvec{\omega }}}_n\) is the nth weight computed using the new quadrature scheme and \(\varvec{\omega }_n\) is an accurate approximation of the weight computed by standard means. We see that the error is bounded by the tolerance and that for the initial weights the error is close to this bound. The error for larger n is considerably smaller than the required tolerance. This is expected, as in Corollary 15 we need to use the worst case \(n = n_0+1\) to determine the trunction parameter A.
We also investigate the number of quadrature points in dependence on \(h\), T in Table 1 and on \(\alpha \) and \(\mathrm {tol}\) in Table 2. We observe only a moderate increase with decreasing \(h\), \(\mathrm {tol}\) and increasing T. The dependence on \(\alpha \) is mild.
6.1 Fractional integral
Let us now consider the evaluation of a fractional integral
where
First we investigate the behaviour of the standard implementation of CQ, based on FFT. In the particular case of the two-stage Radau IIA, \(p = 3\) and \(q = 2\), from Theorem 8 we would expect full order convergence. We set \(T = 128\), and \(h= 2^{3-j}\), \(j = 0, \dots , 7\), \(\alpha = 1/4\). We do not have access to the exact solution u(t), so its role is taken by an accurate numerical approximation. In Fig. 2 we show the convergence of the error \(\max _n |u(t_n)-u_n|\) using the standard implementation of CQ. We compare it with the theoretical reference curve \( 10^{-2.5}(h^3+ \left| \log (h)\right| h^{3+\alpha })\), which fits the results better in this pre-asymptotic regime than the dominant term \(h^3\) on its own.
Next, we apply our new quadrature implementation of CQ. We set \(\mathrm {tol}= 10^{-6}\), and the rest of the parameters as in the above section. We denote by \(\tilde{u}_n\) the new approximation of \(u_n\) and plot the error \(|u_n - \tilde{u}_n|\) in Fig. 3. We see that the error is bounded by \(10^{-6}\) for all n, showing that the final perturbation error introduced by our approximation of the CQ weights remains bounded with respect to the target accuracy in our quadrature, cf. [23]. We also compare computational times in Fig. 3. For the implementation of the standard CQ we have used the \(O(N\log N)\) FFT based algorithm from [16]. We see that for larger time-steps the FFT method is faster due to a certain overhead in constructing the quadrature points for the new method. For smaller time steps however the new method is even marginally faster. The main advantage of the new method is the \(O(\log N)\) amount of memory required compared to O(N) amount of memory by the standard method. For example, in this computation with the smallest time step, there are \(N = 2048\) time steps and the total number of quadrature points is 37. As each quadrature point carries approximately the same amount of memory as one directly computed time-step, we see that the memory requirement is around 50 times smaller with the new method for this example. Such a difference in memory requirements becomes of crucial importance when faced with non-scalar examples coming from discretizations of PDE. The next section considers this case.
7 Application to a fractional diffusion equation
We now consider the problem of finding \(u(t) \in H_0^1(\Omega )\) such that
with \(\beta \in (0,2) \setminus \{1\}\) and \(m = \lceil \beta \rceil \). Here, \(\Omega \) is a bounded, convex Lipschitz domain in \(\mathbb {R}^d\), \(d = 1,2,3\), \(H^1_0(\Omega )\) the Sobolev space of functions with zero trace, and \(\partial _t^\beta \) the fractional derivative
This is the fractional derivative in the Caputo sense, which in the case \(u^{(k)}(0) = 0\), \(k = 0,\dots , m-1\), is equivalent to the Riemann–Liouville derivative.
Remark 22
For simplicity we avoid the integer case \(\beta = 1\) as it is just the standard heat equation and in some places this case would have to be treated slighlty differently.
The application of CQ based on BDF2 to integrate (28) in time has been analyzed in [8, Sect. 8]. A related problem with a fractional power of the Laplacian has been studied in [20], but not with a CQ time discretization. Here we apply Runge–Kutta based CQ. The analysis of the application of RK based CQ to (27) is not available in the literature, hence we give the analysis here for sufficiently smooth and compatible right-hand side f. We first analyze the error of the spatial discretization.
7.1 Space-time discretization of the FPDE: error estimates
Let \(X_{\Delta x} \subset H^1_0(\Omega )\) be a finite element space of piecewise linear functions and let \(\Delta x\) be the meshwidth. Applying the Galerkin method in space we obtain a system of fractional differential equations: Find \({\mathbf {u}}(t) \in X_{\Delta x}\) such that
Theorem 23
Let \(f \in C^m([0,T]; L^2(\Omega ))\) with \(f^{(k)}(0) = 0\), \(k = 0,\dots ,m-1\) and let \({\mathbf {u}}(t)\) be the solution of (29) and u(t) the solution of (27). Then if \(m > \beta \) we have
If further \(m > 2\beta \) we have
Proof
Consider the Laplace transform of (27)
for some fixed \(\delta > 0\), and the bilinear form
Hence, \(a(u,v) = \int _\Omega \hat{f} \overline{v} dx\) is the weak form of (30). The bilinear form is continuous
and
and
Hence
As \(|\arg (z^\beta )| < \pi -\delta \), we have that \(|a(u,u)| \ge C\Vert \nabla u\Vert _{L^2(\Omega )}^2\) and using the Poincaré inequality we obtain coercivity in \(H^1_0(\Omega )\). Lax-Milgram gives us that there exists a unique \(\hat{u} \in H^1_0(\Omega )\) solution of (30) and that
If furthermore \(\hat{f} \in L^2(\Omega )\), we have that
and
Dividing by \(|z|^\beta \Vert \hat{u}\Vert _{L^2(\Omega )}\) and using the fact that \(|\arg (z^\beta )| < \pi -\delta \) gives
For the finite element solution, Céa’s lemma gives that
where \(\hat{\mathbf {u}}\) denotes the Laplace transform of \({\mathbf {u}}\). Using the Aubin-Nitche trick, we obtain the estimate in the weaker norm
where \(\varphi _g\) is the solution of the dual problem
Recalling that \(\Omega \) is assumed to be convex, we can use standard elliptic regularity results together with \(-\Delta \hat{u} = \hat{f}-z^{\beta }\hat{u}\) to show that
where the final inequality follows from (31). Similarly
and using standard approximation results we have that
and
The proof is completed by applying Parseval’s theorem. \(\square \)
The fully discrete system is now obtained by simply discretizing the fractional derivative at stage level using RK-CQ:
for \(n = 1,\dots , N-1, {\mathbf {v}}\in X_h\).
Theorem 24
Let an A-stable, s-stage Runge–Kutta method of order p and stage order q be given which satisifes the assumptions of Sect. 3 and let u(t) be the solution of (27) and \({\mathbf {U}}\) solution of (32). If \({\mathbf {u}}^h\) denotes the solution at full time steps, i.e., \({\mathbf {u}}^h_{n+1} = {\mathbf {U}}_{n,s}\) and if \(f \in C^p([0,T]; L^2(\Omega ))\) with \(f^{(k)}(0) = 0\), for \(k = 0,\dots , \lceil \beta \rceil -1\) then
Proof
Denote by \(K(z): f \mapsto u\) the solution operator of the Laplace transformed problem (30) and note the resolvent estimate
for any \(\delta > 0\), following from (31); see also [8] and [21]. The same estimate holds for the solution operator \(K_{\Delta x}: f \mapsto {\mathbf {u}}\) of the Galerkin discretization in the space \(X_{\Delta x}\). Note also that
The second to last equality above follows from standard properties of convolution quadrature, see for example [17, Sect. 4] and [22, Chap. 9], whereas the last one is simply the use of operational notation explained in Remark 7. The result now follows from Theorems 8, 23, and the triangle inequality. \(\square \)
7.2 Implementation and numerical experiments
Though all the information needed for the implementation is given in the preceding pages, for the benefit of the reader we give some more detail here. Let M denote the number of degrees of freedom in space, i.e., \(M = \dim X_{\Delta x}\), let \({\mathbf {B}}\) and \({\mathbf {A}}\) be the mass and stiffness matrices.
For simplicity of presentation we assume \(\beta \in (0,1)\) and let \({\mathbf {U}}_n \in \mathbb {R}^{sM}\) now denote the vector \({\mathbf {U}}_n = [{\mathbf {U}}_{n,1},\dots , {\mathbf {U}}_{n,s}]^T\) with \({\mathbf {U}}_{n,\ell } \approx {\mathbf {u}}(t_{n,\ell })\), \(\ell = 1,\dots , s\). Hence the fully discrete system can be written as a system of linear equations
where \({\mathbf {I}}_D\) denotes the identity matrix of size \(D \times D\) and \({\mathbf {F}}_j\in \mathbb {R}^{sM}\).
Note that the composition rule allows us to write the CQ approximation to \(\partial _t^{\beta } y\), as
with \(({\mathbf {Y}}_j)_{\ell } \approx y(t_{j,\ell })\) and \(m = \lceil \beta \rceil \). As \(\beta -m < 0\), the discrete version \((\varvec{\partial }_t^h)^{\beta -1}\) of the fractional integral \(\partial _t^{\beta -1} = \mathcal {I}^{1-\beta }\) can be evaluated by our fast algorithm, whereas \((\varvec{\partial }_t^h)^m\) is the standard one-step Runge–Kutta approximation of the derivative repeated m times.
For simplicity of presentation introduce new variables \({\mathbf {V}}_j \in \mathbb {R}^{M s}\) with
Note that
where from (13) we have that
Then the fully discrete system (33) becomes
where \({\mathbf {W}}_j\) are the weight matrices for the fractional integral \(\mathcal {I}^\alpha \) with \(\alpha = 1-\beta \). Rearranging terms so that the known vectors are on the right-hand side and denoting
we obtain
or using the definition of \({\mathbf {V}}_n\)
At each time step this system needs to be solved, where the expensive part is the computation of the discrete convolution in the right-hand side and the storage of all the vectors \({\mathbf {V}}_j\). This problem is resolved by our fast method of evaluation of discrete convolutions with the following variation with respect to Sect. 5 in order to deal with the stages:
with
satisfying the recursion
As a final point let us note that due to (12)
and hence
As the spectrum of \(\mathcal{O}\!\iota ^{-\beta }\) is in the right-half complex plane the problem to be solved at each time-step has a unique solution.
For the numerical experiments we let \(\Omega \) be the square with corners \((-1,-1)\) and (1, 1) and choose f so that the exact solution is
We let the final time be \(T = 7\), fix the finite element space on a triangular mesh with meshwidth \(\Delta x = 5 \times 10^{-3}\) and compute the error in the \(L^2(\Omega )\) norm at \(t = T\). The error and memory requirements as the number of time-steps is increased are given in Table 3 for our new method and for the standard implementation of the CQ. We have used as tolerance \(\mathrm {tol}= 10^{-4}\) and the 2-stage RadauIIA based CQ, for which the theory predicts convergence of order \(O(h^3)\). We see that the error is the same for the two implementations of the CQ, achieving in both cases the predicted order 3, but that the memory requirements for the new method stay almost constant whereas for the standard implementation they grow linearly.
References
Adolfsson, K., Enelund, M., Larsson, S.: Space-time discretization of an integro-differential equation modeling quasi-static fractional-order viscoelasticity. J. Vib. Control 14(9–10), 1631–1649 (2008)
Baffet, D.: A Gauss–Jacobi kernel compression scheme for fractional differential equations. (2018). arXiv:1801.06095
Baffet, D., Hesthaven, J.S.: A kernel compression scheme for fractional differential equations. SIAM J. Numer. Anal. 55(2), 496–520 (2017)
Banjai, L.: Multistep and multistage convolution quadrature for the wave equation: algorithms and experiments. SIAM J. Sci. Comput. 32(5), 2964–2994 (2010)
Banjai, L., Lubich, C.: An error analysis of Runge–Kutta convolution quadrature. BIT 51(3), 483–496 (2011)
Banjai, L., Lubich, C., Melenk, J.M.: Runge–Kutta convolution quadrature for operators arising in wave propagation. Numer. Math. 119(1), 1–20 (2011)
Banjai, L., Schanz, M.: Wave propagation problems treated with convolution quadrature and BEM. In: Langer, U., Schanz, M., Steinbach, O., Wendland, W.L. (eds.) Fast Boundary Element Methods in Engineering and Industrial Applications, Lecture Notes in Applied and Computational Mechanics, vol. 63, pp. 145–184. Springer, Berlin (2012)
Cuesta, E., Lubich, C., Palencia, C.: Convolution quadrature time discretization of fractional diffusion-wave equations. Math. Comput. 75(254), 673–696 (2006)
Hairer, E., Lubich, C., Schlichte, M.: Fast numerical solution of nonlinear Volterra convolution equations. SIAM J. Sci. Stat. Comput. 6(3), 532–541 (1985)
Hairer, E., Wanner, G.: Solving ordinary differential equations. II, vol. 14 of Springer Series in Computational Mathematics, 2nd edition. Springer, Berlin (1996)
Henrici, P.: Applied and Computational Complex Analysis, vol. 2. Wiley, New York (1977)
Jiang, S., Zhang, J., Zhang, Q., Zhang, Z.: Fast evaluation of the Caputo fractional derivative and its applications to fractional diffusion equations. (2015). arXiv:1511.03453
Li, J.-R.: A fast time stepping method for evaluating fractional integrals. SIAM J. Sci. Comput. 31(6), 4696–4714 (2009/10)
Lubich, C.: Discretized fractional calculus. SIAM J. Math. Anal. 17(3), 704–719 (1986)
Lubich, C.: Convolution quadrature and discretized operational calculus I. Numer. Math. 52, 129–145 (1988)
Lubich, C.: Convolution quadrature and discretized operational calculus II. Numer. Math. 52, 413–425 (1988)
Lubich, C.: On the multistep time discretization of linear initial-boundary value problems and their boundary integral equations. Numer. Math. 67, 365–389 (1994)
Lubich, C., Ostermann, A.: Runge–Kutta methods for parabolic equations and convolution quadrature. Math. Comput. 60(201), 105–131 (1993)
Lubich, C., Schädle, A.: Fast convolution for nonreflecting boundary conditions. SIAM J. Sci. Comput. 24(1), 161–182 (2002)
Nochetto, R.H., Otárola, E., Salgado, A.J.: A PDE approach to space-time fractional parabolic problems. SIAM J. Numer. Anal. 54(2), 848–873 (2016)
Pazy, A.: Semigroups of Linear Operators and Applications to Partial Differential Equations, vol. 44. Springer, New York (1983)
Sayas, F.-J.: Retarded Potentials and Time Domain Boundary Integral Equations, vol. 50. Springer, Heidelberg (2016)
Schädle, A., López-Fernández, M., Lubich, C.: Fast and oblivious convolution quadrature. SIAM J. Sci. Comput. 28(2), 421–438 (2006)
Trefethen, L.N.: Approximation Theory and Approximation Practice. Society for Industrial and Applied Mathematics (SIAM), Philadelphia (2013)
Yu, Y., Perdikaris, P., Karniadakis, G.E.: Fractional modeling of viscoelasticity in 3D cerebral arteries and aneurysms. J. Comput. Phys. 323, 219–242 (2016)
Yuste, S.B., Acedo, L., Lindenberg, K.: Reaction front in an \(A+B \rightarrow C\) reaction-subdiffusion process. Phys. Rev. E 69, 036126 (2004)
Zeng, F., Turner, I., Burrage, K.: A stable fast time-stepping method for fractional integral and derivative operators. (2017). arXiv:1703.05480
Author information
Authors and Affiliations
Corresponding author
Additional information
The work of the second author was partially supported by INdAM-GNCS, the Spanish Grant MTM2016-75465, and by the Ramón y Cajal program of the Ministerio de Economia y Competitividad, Spain.
Rights and permissions
Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.
About this article
Cite this article
Banjai, L., López-Fernández, M. Efficient high order algorithms for fractional integrals and fractional differential equations. Numer. Math. 141, 289–317 (2019). https://doi.org/10.1007/s00211-018-1004-0
Received:
Revised:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00211-018-1004-0