1 Introduction

Consider an abstract, linear initial-value problem 

$$u^{\prime}(t)+Au(t)=f(t)\quad\text{for}\;0<t\le\;T,\quad\text{with}\;u(0)=u_{0}.$$
(1)

We assume a continuous solution \(u:[0,T]\to \mathbb {L}\), with \(u(t)\in \mathbb {H}\) if t > 0, for two Hilbert spaces \(\mathbb {L}\) and \(\mathbb {H}\) with a compact and dense imbedding \(\mathbb {H}\subseteq \mathbb {L}\). By using the inner product 〈⋅,⋅〉 in \(\mathbb {L}\) to identify this space with its dual \(\mathbb {L}^{*}\), we obtain in the usual way an imbedding \(\mathbb {L}\subseteq \mathbb {H}^{*}\). The linear operator \(A:\mathbb {H}\to \mathbb {H}^{*}\) is assumed to be bounded and self-adjoint, as well as strictly positive-definite. For instance, if A = −∇2 so that (1) is the classical heat equation on a bounded Lipschitz domain \({\Omega }\subset \mathbb {R}^{d}\) where d ≥ 1, and if we impose homogeneous Dirichlet boundary conditions, then in the usual way we can choose \(\mathbb {L}=L_{2}({\Omega })\) and \(\mathbb {H}={H^{1}_{0}}({\Omega })\), in which case \(\mathbb {H}^{*}=H^{-1}({\Omega })\).

For an integer r ≥ 1, let U denote the discontinuous Galerkin (DG) time stepping solution to (1) using piecewise polynomials of degree at most r − 1 with coefficients in \(\mathbb {H}\). Thus, we consider only the time discretization with no additional error arising from a spatial discretization. Section 2 summarizes known results on the convergence properties of the DG solution U, and Section 3 introduces a local Legendre polynomial basis that is convenient for the practical implementation of DG time stepping as well as for our theoretical study. These sections serve as preparation for Section 4 where we show that

$$U(t)-u(t)=-a_{nr}(u)\left[p_{nr}(t)-p_{n,r-1}(t)\right]+O\left(k_{n}^{r+1}\right) \quad\text{for}\;t\in I_{n}.$$
(2)

Here, kn denotes the length of the n th time interval In = (tn− 1,tn), the function pnr denotes the Legendre polynomial of degree r, shifted to In, and anr(u) denotes the coefficient of pnr in the local Legendre expansion of u on In. Since \(a_{nr}(u)=O({k_{n}^{r}})\), the result (2) shows that the dominant term in the DG error is proportional to the Gauss–Radau polynomial pnr(t) − pn,r− 1(t) for tIn. However, the coefficient anr(u) and the \(O\left (k_{n}^{r+1}\right )\) term in (2) typically grow as t → 0 at rates depending on the regularity of the solution u, which in turn depends on the regularity and compatibility of the data.  A possible extension permitting a time-dependent operator A(t) is discussed briefly in Remark 4.8.

In 1985, Eriksson, Johnson and Thomée [1. ] presented an error analysis for DG time stepping of (1), showing optimal O(kr+ 1) convergence in \(L_{\infty }\left ((0,T);L_{2}({\Omega })\right )\) and O(k2r− 1) superconvergence for the nodal values \(\lim _{t\to t_{n}^{-}}U(t)\), where \(k=\underset{}{\max\nolimits_{1\leq n\leq N\;}}k_n\). Subsequently, numerous authors [2,3,4,5,6,7,8. ] have refined these results, including a recent \(L_{\infty }\) stability result of Schmutz and Wihler [9. ] that we use in the proof of Theorem 4.4. Shortly before completing the present work we learned that the expansion (2) was proved by Adjerid et al. [10. , 11. ] for a linear, scalar hyperbolic problem, and also for nonlinear systems of ODEs [12. ]; see Remark 4.7 for more details. 

Section 5 discusses some practical consequences of (2), in particular the superconvergence of the DG solution at the right Radau points in each interval. This phenomenon was exploited by Springer and Vexler [13. ] in the piecewise-linear (r=2) case to achieve higher-order accuracy for a parabolic optimal control problem. We will see in Lemma 5.1 how the norm of the jump in U at the break point tn− 1 provides an accurate estimate of the maximum DG error over the interval In. Moreover, a simple, low-cost post-processing step yields a continuous piecewise polynomial U of degree at most r, called the reconstruction of U, that satisfies \(U_{*}(t)-u(t)=O\left (k_{n}^{r+1}\right )\) for tIn; see Corollary 5.3. Finally, Section 6 reports the results of some numerical experiments for a scalar ODE and for heat equations in one and two spatial dimensions, confirming the convergence behavior from the theory based on (2).

Our motivation for the present study originated in a previous work [14. ] dealing with the implementation of DG time stepping for a subdiffusion equation \(u^{\prime }(t)+\partial _{t}^{1-\nu }Au(t)=f(t)\) with 0 < ν < 1, where \(\partial _{t}^{1-\nu }\) denotes the Riemann–Liouville fractional time derivative of order 1 − ν. We observed in numerical experiments that (2) holds except with \(O\left (k_{n}^{r+\nu }\right )\) in place of \(O\left (k_{n}^{r+1}\right )\).

Treatment of the spatial discretization of (1) is beyond the scope of this paper, apart from its use in our numerical experiments. To make practical use of our result (2) it is necessary to ensure that the spatial error is dominated by the \(O\left (k_{n}^{r+1}\right )\) term. Also, although we allow nonuniform time steps in our analysis, we will not consider questions such as local mesh refinement or adaptive step size control, which are generally required to resolve the solution accurately for t near 0.

2 Discontinuous Galerkin time stepping

As background and preparation for our results, we formulate in this section the DG time stepping procedure and summarize key convergence results from the literature. Our standard reference is the monograph of Thomée [15. , Chapter 12].

Choosing time levels 0 = t0 < t1 < t2 < ⋯ < tN = T, we put

$$k=\underset{1\le n\le N}{\max} k_{n}\quad\text{where}\quad k_{n}=t_{n}-t_{n-1}.$$

Let \(\mathbb {P}_{j}(\mathbb {V})\) denote the space of polynomials of degree at most j with coefficients from a vector space \(\mathbb {V}\). We fix an integer r ≥ 1, put \(\boldsymbol {t}=(t_{n})_{n=0}^{N}\) and form the piecewise-polynomial space \(\mathcal {X}_{r}=\mathcal {X}_{r}(\boldsymbol {t},\mathbb {H})\) defined by

$$X\in\mathcal{X}_{r}\qquad\text{iff}\qquad X\vert_{I_{n}}\in\mathbb{P}_{r-1}(\mathbb{H})\;\text{for}\;1\le n \le N.$$

Denoting the one-sided limits of X at tn by

$$X^{n}_{+}=\underset{t\to t_{n}^{+}}{\lim} X(t)\quad\text{and}\quad X^{n}_{-}=\underset{t\to t_{n}^{-}}{\lim} X(t),$$

we discretize (1) in time by seeking \(U\in \mathcal {X}_{r}\) satisfying [15. , p. 204]

$$\langle U^{n-1}_{+},X^{n-1}_{+}\rangle+{\int}_{I_{n}}\langle U^{\prime}+AU,X\rangle \ \; \mathrm{d} t =\langle U^{n-1}_{-},X^{n-1}_{+}\rangle+{\int}_{I_{n}}\langle f,X\rangle\;\mathrm{d} t$$
(3)

for \(X\in \mathcal {X}_{r}\) and 1 ≤ nN, with \(U^{0}_{-}=u_{0}\). Section 3 describes how, given \(U^{n-1}_{-}\) and f, we can solve a linear system to obtain \(U\vert _{I_{n}}\) and so advance the solution by one time step.

Remark 2.1

If the integral on the right-hand side of (3) is evaluated using the right-hand, r-point, Gauss–Radau quadrature rule on In, then the sequence of nodal values \(U^{n}_{-}\) coincides with the finite difference solution produced by the r-stage Radau IIA (fully) implicit Runge–Kutta method; see Vlasák and Roskovec [16. , Section 3].

Let ∥⋅∥ denote the norm in \(\mathbb {L}\) and let u() denote the th derivative of u with respect to t. It will be convenient to write and to define the fractional powers of A in the usual way via its spectral decomposition [15. , Chapter 3]. The DG time stepping scheme has the nodal error bound [15. , Theorem 12.1]

$$\|U^{n}_{-}-u(t_{n})\|^{2}\le C\sum\limits_{j=1}^{n}k_{j}^{2\ell}{\int}_{I_{j}}\|A^{1/2}u^{(\ell)}(t)\|^{2}\;\mathrm{d} t\;\quad\text{for}\;1\le\ell\le r,$$
(4)

and the uniform bound [15. , Theorem 12.2]

$$\|U-u\|_{I_{n}}\le\|U^{n}_{-}-u(t_{n})\|+C\|U^{n-1}_{-}-u(t_{n-1})\| +Ck_{n}^{\ell}\|u^{(\ell)}\|_{I_{n}}\quad\text{for}\;1\le\ell\le r,$$

where in both cases 1 ≤ nN. We therefore have optimal convergence

$$\|U(t)-u(t)\|=O(k^{r})\quad\text{for}\;0\le t\le T,$$
(5)

provided \(u^{(r)}\in L_{\infty }((0,T);\mathbb {L})\) and \(A^{1/2}u^{(r)}\in L_{2}((0,T);\mathbb {L})\). In fact, U is superconvergent at the nodes [15. , Theorem 12.3] when r ≥ 2, with

$$\|U^{n}_{-}-u(t_{n})\|^{2}\le Ck^{2(\ell-1)}\sum\limits_{j=1}^{n}k_{j}^{2\ell}{\int}_{I_{j}} \|A^{\ell-1/2}u^{(\ell)}(t)\|^{2} \mathrm{d} t\quad\text{for}\;1\le\ell\le r.$$

Thus,

$$\|U^{n}_{-}-u(t_{n})\|=O(k^{2r-1}),$$
(6)

provided \(A^{r-1/2}u^{(r)}\in L_{2}((0,T);\mathbb {L})\).

Suppose for the remainder of this section that f ≡ 0, and consider error bounds involving the (known) initial data u0 instead of the (unknown) solution u. By separating variables, one finds that [15. , Lemma 3.2]

$$\|A^{q}u^{(\ell)}(t)\|\le Ct^{s-(q+\ell)}\|A^{s}u_{0}\| \quad\text{for}\;0\le s\le q+\ell\;\text{and}\;0<t\le T,$$
(7)

assuming that u0 belongs to the domain of As. It follows that, for sufficiently regular initial data, we have the basic error bound [1. , Theorem 1],

$$\|U(t)-u(t)\|\le Ck^{\ell}\|A^{\ell} u_{0}\| \quad\text{for}\;0\le t\le T\;\text{and}\;0\le\ell\le r.$$
(8)

For non-smooth initial data u0L2(Ω), the full rate of convergence still holds but with a constant that blows up as t tends to zero [1. , Theorem 3]: provided knCkn− 1 for all n ≥ 2,

$$\|U(t)-u(t)\|\le Ct^{-r}k^{r}\|u_{0}\|\quad\text{for}\;0<t\le T,$$

and hence, by interpolation,

$$\|U(t)-u(t)\|\le Ct^{s-r}k^{r}\|A^{s}u_{0}\|\quad\;\text{for}\;0<t\le\;T\;\text{and}\;0\le s\le r.$$
(9)

At the nodes [1. , Theorem 2],

$$\|U^{n}_{-}-u(t_{n})\|\le Ck^{s}\|A^{s} u_{0}\| \quad\text{for}\;1\le n\le\;N\;\text{and}\;1\le s\le2r-1,$$
(10)

and [1. , Theorem 3], provided knCkn− 1 for all n ≥ 2,

$$\|U^{n}_{-}-u(t_{n})\|\le Ct_{n}^{-s}k^{s}\|u_{0}\| \quad\text{for}\;1\le n\le N\;\text{and}\;0\le s\le2r-1.$$
(11)

Taking s = q in (10) and (11), we see by interpolation that

$$\|U^{n}_{-}-u(t_{n})\|\le Ct_{n}^{s-q}k^{q}\|A^{s}u_{0}\| \quad\text{for}\;1\le n\le\;N\;\text{and}\;0\le s\le q\le2r-1.$$
(12)

3 Local Legendre polynomial basis

We now return to considering the general inhomogeneous problem and describe a practical formulation of the DG scheme using local Legendre polynomial expansions that will also play an essential role in our subsequent analysis.

Let Pj denote the Legendre polynomial of degree j with the usual normalization Pj(1) = 1, and recall that

$${\int}_{-1}^{1}P_{i}(\tau)P_{j}(\tau) \mathrm{d}\;\tau=\frac{2\delta_{ij}}{2j+1}.$$

Using the affine map βn : [− 1,1] → [tn− 1,tn] given by

$$\beta_{n}(\tau)=\frac{1}{2}\left[(1-\tau)t_{n-1}+(1+\tau)t_{n}\right] \quad\text{for} -1\le\tau\le 1,$$
(13)

we define local Legendre polynomials on the n th subinterval,

$$p_{nj}(t)=P_{j}(\tau)\quad\text{for}\;t=\beta_{n}(\tau)\;\text{and} -1\le\tau\le 1,$$

and note that

$$p_{nj}(t_{n})=1\quad\text{and}\quad {\int}_{I_{n}}p_{ni}(t)\;p_{nj}(t)\;\mathrm{d}t=\frac{k_{n}\delta_{ij}}{2j+1}.$$
(14)

The local Fourier–Legendre expansion of a function v is then, for tIn,

$$v(t)=\sum\limits_{j=0}^{\infty} a_{nj}(v)p_{nj}(t)\;\quad\text{where}\quad a_{nj}(v)=\frac{2j+1}{k_{n}}{\int}_{I_{n}}v(t)p_{nj}\,(t)\,\mathrm{d}t.$$

In particular, for the DG solution U we put \(U^{nj}=a_{nj}(U)\in \mathbb {H}\) so that

$$U(t)=\sum\limits_{j=0}^{r-1}U^{nj}p_{nj}(t)\quad\text{for}\;t\in I_{n}.$$

Define [14. , Lemma 5.1]

$$G_{ij}=P_{j}(-1)P_{i}(-1)+{\int}_{-1}^{1}P_{j}^{\prime}(\tau)P_{i}(\tau) \mathrm{d}\;\tau =\begin{cases}\;(-1)^{i+j},\;&\;\text{if}\;i\ge j,\\\;1,&\text{if}\;i<j,\;\end{cases}$$

and \(H_{ij}={\int \limits }_{-1}^{1}P_{j}(\tau )P_{i}(\tau ) d\tau =\delta _{ij}/(2j+1)\); e.g., if r = 4 then

$$\boldsymbol{G}=\left[\begin{array}{rrrr} 1& 1& 1&\phantom{-}1\\ -1& 1& 1& 1\\ 1&-1& 1& 1\\ -1& 1&-1& 1 \end{array}\right] \quad\text{and}\quad \boldsymbol{H}=\left[\begin{array}{cccc} 1& & & \\ &\frac{1}{3}& & \\ & &\frac{1}{5}& \\ & & &\frac{1}{7} \end{array}\right].$$

By choosing a test function of the form X(t) = pni(t)χ, for tIn and \(\chi \in \mathbb {H}\), we find that the DG equation (3) implies

$$\sum\limits_{j=0}^{r-1}\left(G_{ij}+k_{n}H_{ij}A\right)U^{nj} =\check{U}^{n-1,i}+{\int}_{I_{n}}f(t)p_{ni}(t)\,\mathrm{d}t$$
(15)

for 0 ≤ ir − 1 and 1 ≤ nN, where

$$\check{U}^{0i}=(-1)^{i}u_{0}\quad\text{and}\quad \check{U}^{ni}=(-1)^{i}\sum\limits_{j=0}^{r-1}U^{nj}\quad\text{for}\;n\ge1.$$

Thus, given Un− 1,j for 0 ≤ jr − 1, by solving the (block) r × r system (15) we obtain Unj for 0 ≤ jr − 1, and hence U(t) for tIn. The existence and uniqueness of this solution follows from the stability of the scheme [15. , p. 205]. Notice that

$$U^{n-1}_{+}=\sum\limits_{j=0}^{r-1}(-1)^{j}U^{nj}\quad\text{and}\quad U^{n-1}_{-}=\begin{cases} u_{0}&\text{if}\;n=1,\\ {\sum}_{j=0}^{r-1}U^{n-1,j}&\text{if}\;2\le n\le N. \end{cases}$$

4 Behavior of the DG error

To prove our main results, we will make use of two projection operators. The first is just the orthogonal projector \({\Pi }_{r}:L^{2}((0,T);\mathbb {L})\to \mathcal {X}_{r}\) defined by

$${{\int}_{0}^{T}}\langle{\Pi}_{r}v,X\rangle \mathrm{d}\,t={{\int}_{0}^{T}}\langle v,X\rangle \mathrm{d}\,t \quad\text{for all}\;X\in\mathcal{X}_{r},$$

which has the explicit representation

$$({\Pi}_{r}v)(t)=\sum\limits_{j=0}^{r-1}a_{nj}(v)p_{nj}(t) \quad\text{for}\;t\in I_{n}\;\text{and}\;1\le n\le N.$$

The second projector \(\widetilde {\Pi }_{r}:C([0,T];\mathbb {L})\to \mathcal {X}_{r}\) is defined by the conditions [15. , Equation (12.9)]

$$(\widetilde{\Pi}_{r} v)^{n}_{-}=v(t_{n})\qquad\text{and}\qquad {\int}_{I_{n}}\langle\widetilde{\Pi}_{r}v,X^{\prime}\rangle\;\mathrm{d}\;t={\int}_{I_{n}}\langle v,X^{\prime}\rangle \mathrm{d}\;t$$
(16)

for all \(X\in \mathcal {X}_{r}\) and for 1 ≤ nN. The next lemma shows that \(\widetilde {\Pi }_{r}u\) is in fact the DG solution of the trivial equation with A = 0; cf. Chrysafinos and Walkington [3. , Section 2.2].

Lemma 4.1

If \(u^{\prime }:(0,T]\to \mathbb {L}\) is integrable, then

$$\langle(\widetilde{\Pi}_{r}u)^{n-1}_{+},X^{n-1}_{+}\rangle +{\int}_{I_{n}}\langle(\widetilde{\Pi}_{r} u)',X\rangle \mathrm{d}\;t =\langle u(t_{n-1}),X^{n-1}_{+}\rangle+{\int}_{I_{n}}\langle u^{\prime},X\rangle \mathrm{d}\;t.$$

Proof

Integrating by parts and using the properties (16) of \(\widetilde {\Pi }_{r}\), we have

$$\begin{array}{@{}rcl@{}} {\int}_{I_{n}}\langle(\widetilde{\Pi}_{r} u)^{\prime},X\rangle\;\mathrm{d} t &=&\langle(\widetilde{\Pi}_{r} u)^{n}_{-},X^{n}_{-}\rangle -\langle(\widetilde{\Pi}_{r} u)^{n-1}_{+},X^{n-1}_{+}\rangle -{\int}_{I_{n}}\langle\widetilde{\Pi}_{r} u,X^{\prime}\rangle \mathrm{d}\;t\\ &=&\langle u(t_{n}),X^{n}_{-}\rangle -\langle(\widetilde{\Pi}_{r} u)^{n-1}_{+},X^{n-1}_{+}\rangle -{\int}_{I_{n}}\langle u,X^{\prime}\rangle \mathrm{d}\;t, \end{array}$$

and a second integration by parts then yields the desired identity.

The Legendre expansion of \(\widetilde {\Pi }_{r}v\) coincides with that of \(\Pi_r v\), except for the coefficient of pn,r− 1. Below, we denote the closure of the nth time interval by \(\bar {I}_{n}=[t_{n-1},t_{n}]\).

Lemma 4.2

If \(v:\bar {I}_{n}\to \mathbb {L}\) is continuous, then

$$(\widetilde{\Pi}_{r}v)(t)=\sum\limits_{j=0}^{r-2}a_{nj}(v)p_{nj}(t) +\tilde{a}_{n,r-1}(v)p_{n,r-1}(t)\quad\text{for}\;t\in I_{n},$$

where

$$\tilde{a}_{n,r-1}(v)=v(t_{n})-({\Pi}_{r-1}v)^{n}_{-} =v(t_{n})-\sum\limits_{j=0}^{r-2}a_{nj}(v).$$

Proof

By choosing \(X^{\prime }\vert _{I_{n}}=p_{nj}\) in the second property of (16), we see that

$$a_{nj}(\widetilde{\Pi}_{r}v)=a_{nj}(v)\quad\text{for}\;0\le j\le r-2,$$

implying that \(\widetilde {\Pi }_{r}v={\Pi }_{r-1}v+\lambda p_{n,r-1}\) for some \(\lambda \in \mathbb {H}\). Since pnj(tn) = Pj(1) = 1, the first property in (16) gives

$$v(t_{n})=(\widetilde{\Pi}_{r}v)^{n}_{-}=({\Pi}_{r-1}v)^{n}_{-}+\lambda\quad\text{with}\quad ({\Pi}_{r-1}v)^{n}_{-}=\sum\limits_{j=0}^{r-2}a_{nj}(v),$$

showing that \(\lambda =\tilde {a}_{n,r-1}(v)\).

By mapping to the reference element (− 1,1), applying the Peano kernel theorem, and then mapping back to In, we find [14. , p. 137]

$$\|a_{nj}(v)\|\le Ck_{n}^{j-1}{\int}_{I_{n}}\|v^{(j)}(t)\|\;\mathrm{d} t \le C{k_{n}^{j}}\|v^{(j)}\|_{I_{n}}\quad\text{for}\;j\ge0,$$
(17)

and

$$\|v-{\Pi}_{r}v\|_{I_{n}}\le Ck_{n}^{\ell-1}{\int}_{I_{n}}\|v^{(\ell)}(t)\|\;\mathrm{d} t \le Ck_{n}^{\ell}\|v^{(\ell)}\|_{I_{n}}\quad\text{for}\;1\le\ell\le r.$$
(18)

Theorem 4.3

For 1 ≤ nN, if \(v:\bar {I}_{n}\to \mathbb {L}\) is Cr+ 1 then

$$\left\|\widetilde{\Pi}_{r}v-v+a_{nr}(v)(p_{nr}-p_{n,r-1})\right\|_{I_{n}} \le Ck_{n}^{r+1}\|v^{(r+1)}\|_{I_{n}}.$$

Proof

By Lemma 4.2, if tIn then

$$(\widetilde{\Pi}_{r}v)(t)=({\Pi}_{r-1}v)(t)+\tilde{a}_{n,r-1}(v)p_{n,r-1}(t)$$

and

$$({\Pi}_{r+1}v)(t)=({\Pi}_{r-1}v)(t)+a_{n,r-1}(v)p_{n,r-1}(t)+a_{nr}(v)p_{nr}(t),$$

so

$$(\widetilde{\Pi}_{r}v)(t)-({\Pi}_{r+1}v)(t) =[\tilde{a}_{n,r-1}(v)-a_{n,r-1}(v)]p_{n,r-1}(t)-a_{nr}(v)p_{nr}(t).$$
(19)

Taking the limit as \(t\to t_{n}^{-}\), and recalling that pnj(tn) = 1, we see that

$$v(t_{n})-({\Pi}_{r+1}v)^{n}_{-}=\tilde{a}_{n,r-1}(v)-a_{n,r-1}(v)-a_{nr}(v).$$
(20)

Using (20) to eliminate \(\tilde {a}_{n,r-1}(v)\) in (19), we find that

$$\widetilde{\Pi}_{r}v-v+a_{nr}(v)\left[p_{nr}-p_{n,r-1}\right]= ({\Pi}_{r+1}v-v)+\left[v(t_{n})-({\Pi}_{r+1}v)^{n}_{-}\right]p_{n,r-1}$$

on In, and the desired estimate follows at once from (18).

The following theorem and its corollary, together with the superconvergence result (6), show that

$$\|U-\widetilde{\Pi}_{r}u\|_{I_{n}}=O\left(k_{n}^{r+1}\right)\quad\text{for}\;r\ge2,$$
(21)

provided u is sufficiently regular.

Theorem 4.4

For 1 ≤ nN, if \(Au:\bar {I}_{n}\to \mathbb {L}\) is Cr, then

$$\|U-\widetilde{\Pi}_{r}u\|_{I_{n}}\le C\|U^{n-1}_{-}-u(t_{n-1})\| +Ck_{n}^{r+1}\|Au^{(r)}\|_{I_{n}}.$$

Proof

It follows from Lemma 4.1 that \(\widetilde {\Pi }_{r}u\) satisfies

$$\begin{array}{@{}rcl@{}} &&\langle(\widetilde{\Pi}_{r}u)^{n-1}_{+},X^{n-1}_{+}\rangle +{\int}_{I_{n}}\langle(\widetilde{\Pi}_{r} u)^{\prime}+A\widetilde{\Pi}_{r} u,X\rangle\;\mathrm{d}t\\&&\qquad\qquad\qquad\qquad\qquad\qquad\qquad=\langle u(t_{n-1}),X^{n-1}_{+}\rangle +{\int}_{I_{n}}\langle u^{\prime}+A\widetilde{\Pi}_{r} u,X\rangle\;\mathrm{d} t, \end{array}$$

whereas U satisfies

$$\langle U^{n-1}_{+},X^{n-1}_{+}\rangle+{\int}_{I_{n}}\langle U^{\prime}+AU,X\rangle\;\mathrm{d} t =\langle U^{n-1}_{-},X^{n-1}_{+}\rangle+{\int}_{I_{n}}\langle u^{\prime}+Au,X\rangle\;\mathrm{d} t,$$

for all \(X\in \mathcal {X}_{r}\). Letting \(\rho =A(u-\widetilde {\Pi }_{r} u)\) and noting \((\widetilde {\Pi }_{r} u)^{n-1}_{-}=u(t_{n-1})\), we see that the piecewise polynomial \(\varepsilon =U-\widetilde {\Pi }_{r} u\in \mathcal {X}_{r}\) satisfies

$$\langle\varepsilon^{n-1}_{+},X^{n-1}_{+}\rangle +{\int}_{I_{n}}\langle\varepsilon^{\prime}+A\varepsilon,X\rangle\;\mathrm{d} t =\langle\varepsilon^{n-1}_{-},X^{n-1}_{+}\rangle+{\int}_{I_{n}}\langle\rho,X\rangle\;\mathrm{d} t$$
(22)

for all \(X\in \mathcal {X}_{r}\), with \(\varepsilon ^{n-1}_{-}=U^{n-1}_{-}-u(t_{n-1})\). A stability result of Schmutz and Wihler [9. , Proposition 3.18] yields the estimate

$$\|\varepsilon\|_{I_{n}}^{2}\le C\left(\|\varepsilon^{n-1}_{-}\|^{2} +k_{n}{\int}_{I_{n}}\|\rho\|^{2} \mathrm{d}\,t\right),$$
(23)

that is,

$$\|U-\widetilde{\Pi}_{r} u\|_{I_{n}}^{2}\le C\left(\|U^{n-1}_{-}-u(t_{n-1})\|^{2} +k_{n}{\int}_{I_{n}}\|\rho\|^{2} \mathrm{d}\,t\right).$$

By putting v = Au in (18) we find \(k_{n}{\int \limits }_{I_{n}}\|\rho \|^{2}\;\mathrm {d} t\le {k_{n}^{2}}\|\rho \|_{I_{n}}^{2}\le C(k_{n}^{r+1}\|Au^{(r)}\|_{I_{n}})^{2}\), and the desired estimate follows at once.

We are now able to establish the claim (2) from the Introduction.

Theorem 4.5

For 1 ≤ nN, if Au(r) and u(r+ 1) are continuous on \(\bar {I}_{n}\), then

$$\begin{array}{@{}rcl@{}} \|U-u+a_{nr}(u)(p_{nr}-p_{n,r-1})\|_{I_{n}}&\le& C\|U^{n-1}_{-}-u(t_{n-1})\|\\ &&{}+Ck_n^{r+1}\left(\|Au^{(r)}\|_{I_{n}}+\|u^{(r+1)}\|_{I_{n}}\right). \end{array}$$

Proof

Write

$$U-u+a_{nr}(u)(p_{nr}-p_{n,r-1})=(U-\widetilde{\Pi}_{r}u)+\left(\widetilde{\Pi}_{r}u-u +a_{nr}(u)(p_{nr}-p_{n,r-1})\right),$$

and apply Theorem 4.3 and 4.4.

We therefore have the following estimate for the homogeneous problem expressed in terms of the initial data.

Corollary 4.6

Assume knCkn− 1 for 2 ≤ nN so that (12) holds. If f ≡ 0, then for 0 ≤ sr + 1 and 2 ≤ nN,

$$\|U-u+a_{nr}(u)(p_{nr}-p_{n,r-1})\|_{I_{n}}\le C t_{n}^{s-(r+1)}k^{r+1}\|A^{s}u_{0}\|.$$

Proof

Taking q = r + 1 in (12) yields

$$\|U^{n-1}_{-}-u(t_{n-1})\|\le C t_{n-1}^{s-(r+1)}k^{r+1}\|A^{s}u_{0}\|,$$

and using (7) we have ∥Au(r)(t)∥ = ∥u(r+ 1)(t)∥≤ Cts−(r+ 1)Asu0∥. The result follows for n ≥ 2 after noting that tn = tn− 1 + kntn− 1 + Ckn− 1Ctn− 1.

Remark 4.7

In their proof of (2) for the scalar linear problem

$$u^{\prime}-au=0\quad\text{for}\;t>0, \text{with}\;u(0)=u_{0},$$

Adjerid et al. [10. , Theorem 3] use an inductive argument to show an expansion of the form

$$U(t)-u(t)=\sum\limits_{j=r}^{2r-2}Q_{nj}(t) {k_{n}^{j}}+O\left(k_{n}^{2r-1}\right)\quad \text{for}\;t\in I_{n},$$

where \(Q_{nj}\in \mathbb {P}_{j-1}\) and Qnr(t) = cnp[pnr(t) − pn,r− 1(t)] for a constant cnp. They extend this result to a homogeneous linear system of ODEs \(\boldsymbol {u}^{\prime }-\boldsymbol {A}\boldsymbol {u}=\boldsymbol {0}\), then a nonlinear scalar problem \(u^{\prime }-f(u)=0\), and finally a nonlinear system \(\boldsymbol {u}^{\prime }-\boldsymbol {f}(\boldsymbol {u})=\boldsymbol {0}\).

Remark 4.8

The proof of Theorem 4.4 is largely unaffected if the elliptic term is permitted to have time-dependent coefficients, resulting in a time-dependent operator A(t). The main issue is to verify the stability property (23) for this more general setting. The only other complication is the estimation of ρ(t). Consider, for example, \(A(t)u(x,t)=-\nabla \cdot \left (a(x,t)\nabla u(x,t)\right )\). Since A(t)u(x,t) is of the form \({\sum }_{m=1}^{M} c_{m}(x,t)B_{m}u(x,t)\), where each Bm is a second-order linear differential operator involving only the spatial variables x, it follows that

$$\rho(t)=A(t)\left(u(t)-\widetilde{\Pi}_{r}u(t)\right) =\sum\limits_{m=1}^{M}c_{m}(x,t)\left(B_{m}u(t)-\widetilde{\Pi}_{r}B_{m}u(t)\right),$$

and the final step of the proof becomes

$$k_{n}{\int}_{I_{n}}\|\rho\|^{2} \mathrm{d} t\le Ck_{n}^{2(r+1)}\sum\limits_{m=1}^{M}\|B_{m}u^{(r)}\|_{I_{n}}^{2}.$$

Of course, to exploit this generalization of Theorem 4.4, it would also be necessary to verify the superconvergent error bounds for \(U^{n}_{-}\) in this case.

5 Practical consequences

Throughout this section, we will assume that

$$\|U^{n-1}_{-}-u(t_{n-1})\|+ \|U-u+a_{nr}(u)(p_{nr}-p_{n,r-1})\|_{I_{n}}\le C\phi(t_{n},u)k_{n}^{r+1},$$
(24)

for 2 ≤ nN, where the factor ϕ(t,u) will depend on the regularity of u, which in turn depends on the regularity and compatibility of the initial data u0 and the source term f. Figure 1 plots the right-hand Gauss–Radau polynomials

$$p_{nr}(t)-p_{n,r-1}(t)=P_{r}(\tau)-P_{r-1}(\tau)$$

as functions of τ ∈ [− 1,1] for r ∈{1,2,3,4}. In general, there are r + 1 points

$$-1=\tau_{0}<\tau_{1}<\cdots<\tau_{r}=1,$$

such that τ1, τ2, …, τr are the r zeros of PrPr− 1, and hence are also the abscissas of the right-hand, r-point Gauss–Radau quadrature rule for the interval [− 1,1]. Recalling our previous notation (13), let tn = βn(τ) so that tn− 1 = tn0 < tn1 < ⋯ < tnr = tn with

$$p_{nr}(t_{n\ell})-p_{n,r-1}(t_{n\ell})=0\quad\text{for}\;1\le\ell\le r.$$
Fig. 1
figure 1

The polynomials Pr(τ) − Pr− 1(τ)

Thus, whereas \(U(t)-u(t)=O({k_{n}^{r}})\) for general tIn, the DG time stepping scheme is superconvergent at the r special points tn1, tn2, …, tnr in the half-open interval (tn− 1,tn]. More precisely,

$$\|U(t_{n\ell})-u(t_{n\ell})\|\le C\phi(t_{n},u)k_{n}^{r+1} \quad\text{for}\;1\le\ell\le r.$$

Since pnj(tn− 1) = Pj(− 1) = (− 1)j, another consequence of (24) is that

$$\|U^{n-1}_{+}-u(t_{n-1})+2(-1)^{r}a_{nr}(u)\|\le C\phi(t_{n},u)k_{n}^{r+1},$$

which, in combination with the estimate \(\|U^{n-1}_{-}-u(t_{n-1})\|\le C\phi (t_{n},u)k_{n}^{r+1}\), shows that the jump \(\llbracket U\rrbracket ^{n-1}=U^{n-1}_{+}-U^{n-1}_{-}\) in the DG solution at tn− 1 satisfies

$$\left\|\llbracket U\rrbracket^{n-1}+2(-1)^{r} a_{nr}(u)\right\|\le C\phi(t_{n},u)k_{n}^{r+1}.$$
(25)

We are therefore able to show, in the following lemma, that ∥Un− 1∥ is a low-cost and accurate error indicator for the DG solution on In.

Lemma 5.1

For ϕ as in (24) and 2 ≤ nN,

$$\left\vert\|U-u\|_{I_{n}}-\|\llbracket U\rrbracket^{n-1}\|\right\vert \le C\phi(t_{n},u)k_{n}^{r+1}.$$

Thus,

$$\|U-u\|_{I_{n}}=2\|a_{nr}(u)\|+O\left(k_{n}^{r+1}\right) =\left\|\llbracket U\rrbracket^{n-1}\right\|+O\left(k_{n}^{r+1}\right).$$

Proof

First note that since

$$\underset{-1\le\tau\le1}{\max} \vert P_{r}(\tau)-P_{r-1}(\tau)\vert =\vert P_{r}(-1)-P_{r-1}(-1)\vert=2,$$

we have

$$\|a_{nr}(u)(p_{nr}-p_{n,r-1})\|_{I_{n}} =\vert p_{nr}(t_{n-1})-p_{n,r-1}(t_{n-1})\vert\|a_{nr}(u)\|=2\|a_{nr}(u)\|.$$
(26)

Hence, for tIn,

$$\begin{array}{@{}rcl@{}} \|U(t)-u(t)\|&\le&\|U(t)-u(t)+a_{nr}(u)\left[p_{nr}(t)-p_{n,r-1}(t)\right]\|\\ &&+\|a_{nr}(u)\left[p_{nr}(t)-p_{n,r-1}(t)\right]\| \le C\phi(t_{n},u)k_{n}^{r+1}+2\|a_{nr}(u)\|, \end{array}$$

and so \(\|U-u\|_{I_{n}}\le 2\|a_{nr}(u)\|+C\phi (t_{n},u)k_{n}^{r+1}\). Conversely,

$$\begin{array}{@{}rcl@{}} 2\|a_{nr}(u)\|&=&\|a_{nr}(u)\left[p_{nr}(t_{n-1})-p_{n,r-1}(t_{n-1})\right]\|\\ &\le&\|U^{n-1}_{+}-u(t_{n-1})+a_{nr}(u)\left[p_{nr}(t_{n-1})-p_{n,r-1}(t_{n-1})\right]\|\\ &&+\|U^{n-1}_{+}-u(t_{n-1})\|\\ &\le& C\phi(t_{n},u)k_{n}^{r+1}+\|U-u\|_{I_{n}}, \end{array}$$

and therefore

$$\left\vert\|U-u\|_{I_{n}}-2\|a_{nr}(u)\|\right\vert\le C\phi(t_{n},u)k_{n}^{r+1}.$$

Since, by (25),

$$\begin{aligned} \left\vert\|[\![ U]\!]^{n-1}\|-2\|a_{nr}(u)\|\right\vert &=\left\vert\|[\![ U]\!]^{n-1}\|-\|2(-1)^{r+1}a_{nr}(u)\|\right\vert\\ &\le\left\|[\![ U ]\!]^{n-1}+2(-1)^{r}a_{nr}(u)\right\|\le C\phi(t_{n},u)k_{n}^{r+1}, \end{aligned}$$

the result follows.

A unique continuous function \(U_{*}\in \mathcal {X}_{r+1}\) satisfies the r + 1 interpolation conditions

$$U_{*}(t_{n\ell})=\begin{cases} U^{n-1}_{-}&\text{if}\;\ell=0, \\ U(t_{n\ell})&\text{if}\;1\le\ell\le r-1, \\ U^{n}_{-}&\text{if}\;\ell=r, \end{cases}$$

for 1 ≤ nN, and we see that

$$(U_{*}-u)(t_{n\ell})=O\left(k_{n}^{r+1}\right)\quad\text{for}\;0\le\ell\le r.$$
(27)

Makridakis and Nochetto [4. ] introduced this interpolant in connection with a posteriori error analysis of diffusion problems, and called U the reconstruction of U. The next theorem provides a more explicit description of U that we then use to prove U achieves the optimal convergence rate of order \(k_{n}^{r+1}\) over the whole subinterval In.

Theorem 5.2

For tIn and 1 ≤ nN, the reconstruction U of the DG solution U has the representation

$$U_{*}(t)=U(t)-\frac{(-1)^{r}}{2}\llbracket U\rrbracket^{n-1}(p_{nr}-p_{n,r-1})(t) =\sum\limits_{j=0}^{r} U_{*}^{nj}p_{nj}(t),$$

where

$$U_{*}^{nj}=\begin{cases} U^{nj}&\text{if}\;0\le j\le r-2, \\ U^{n,r-1}+\frac{1}{2}(-1)^{r}\llbracket U\rrbracket^{n-1}&\text{if}\;j=r-1, \\ -\frac{1}{2}(-1)^{r}\llbracket U\rrbracket^{n-1}&\text{if}\;j=r. \end{cases}$$

Proof

Since the polynomial \((U-U_{*})\vert _{I_{n}}\in \mathbb {P}_{r}(\mathbb {H})\) vanishes at tn for 1 ≤ r, there must be a constant γ such that U(t) − U(t) = γ(pnrpn,r− 1)(t) for tIn. Taking the limit as \(t\to t_{n-1}^{+}\), we have \(U^{n-1}_{+}-U^{n-1}_{-}=\gamma [(-1)^{r}-(-1)^{r-1}] =2(-1)^{r}\gamma\) and so γ = (− 1)rUn− 1/2. It follows from (14) that

$$a_{nj}(U-U_{*})=\frac{2j+1}{k_{n}}{\int}_{I_{n}}(U-U_{*})(t)p_{nj}(t)\;\mathrm{d} t =\frac{(-1)^{r}}{2}\llbracket U\rrbracket^{n-1}(\delta_{jr}-\delta_{j,r-1}),$$

implying the formulae for \(U^{nj}_{*}=a_{nj}(U_{*})\).

Corollary 5.3

\(\|U_{*}-u\|_{I_{n}}\le C\phi (t_{n},u)k_{n}^{r+1}\) for 2 ≤ nN.

Proof

We see from the Theorem 5.2 and (26) that

$$\begin{array}{@{}rcl@{}} \|U_{*}-u\|_{I_{n}}&=&\|U-u-\frac{1}{2}(-1)^{r}\llbracket U\rrbracket^{n-1}(p_{nr}-p_{n,r-1})\|_{I_{n}}\\ &\le&\|U-u+a_{nr}(u)(p_{nr}-p_{n,r-1})\|_{I_{n}} +\frac{1}{2}\|\llbracket U\rrbracket^{n-1}+2(-1)^{r}a_{nr}(u)\|, \end{array}$$

so it suffices to apply (24) and (25).

Example 5.4

Let f ≡ 0 and let u0 belong to the domain of As. By (9),

$$t^{r-s}\|U(t)-u(t)\|\le Ck^{r}\|A^{s}u_{0}\| \quad\text{if}\;0<t\le T\;\text{and}\;0\le s\le r,$$

and by (12),

$$t_{n}^{2r-1-s}\|U^{n}_{-}-u(t_{n})\|\le C k^{2r-1}\|A^{s}u_{0}\|\quad\text{if}\;1\le n\le\;N\;\text{and}\;0\le s\le 2r-1.$$

Furthermore, Corollary 4.6 shows that our assumption (24) is satisfied with

$$\phi(t,u)=t^{s-(r+1)}\|A^{s}u_{0}\|$$

so

$$t_{n}^{r+1-s}\|U_{*}-u\|_{I_{n}}\le Ck^{r+1}\|A^{s}u_{0}\| \quad\text{if}\;2\le n\le\;N\;\text{and}\;0\le s\le r+1.$$

6 Numerical experiments

The computational experiments described in this section were performed in standard 64-bit floating point arithmetic using Julia v1.7.2 on a desktop computer having a Ryzen 7 3700X processor and 32GiB of RAM. The source code is available online [17. ]. In all cases, we use uniform time steps kn = k = T/N.

6.1 A simple ODE

We begin with the ODE initial-value problem

$$u^{\prime}+\lambda u=f(t)\quad\text{for}\;0\le t\le 2, \text{with}\;u(0)=1,$$

where in place of a linear operator A we have just the scalar λ = 1/2, and where \(f(t)=\cos \limits (\pi t)\). For the piecewise-cubic case with N = 5 subintervals, Fig. 2 shows that UU provides an excellent approximation to the error Uu, and that the error profile is approximately proportional to pnrpn,r− 1 with r = 4; cf. (21) and Fig. 1. In particular, superconvergence at the Radau points is apparent. By sampling at 50 points in each subinterval, we estimated the maximum errors

$$\underset{1\le n\le N}{\max} \underset{t\in I_{n}}{\sup} \vert U(t)-u(t)\vert \quad\text{and}\quad \underset{1\le n\le N}{\max} \underset{t\in I_{n}}{\sup} \vert U_{*}(t)-u(t)\vert,$$

and, as expected from (5) and Corollary 5.3, the values shown in Table 1 exhibit convergence rates r = 4 and r + 1 = 5, respectively. The table also shows a convergence rate 2r − 1 = 7 for the nodal error \(\max \limits _{1\le n\le N}\vert U^{n}_{-}-u(t_{n})\vert\) up to the row where this error approaches the unit roundoff. By using Julia’s BigFloat datatype, we were able to observe O(k7) convergence of \(U^{n}_{-}\) up to N = 128, for which value the nodal error was 1.56e-19.

Fig. 2
figure 2

The DG error Uu, the difference UU between the DG solution and its reconstruction, along with the superconvergence points tnj (1 ≤ jr), for the ODE of Section 6.1 using piecewise-cubics (r = 4)

Table 1 Errors and convergence rates for the ODE of Section 6.1 using piecewise-cubics (r = 4)

6.2 A parabolic PDE in 1D

Now consider the 1D heat equation with constant thermal conductivity κ > 0,

$$u_{t}-\kappa u_{xx}=f(x,t)\quad\text{for}\;0<t\le\;T\;\text{and}\;0\le x\le L,$$
(28)

subject to the boundary conditions u(0,t) = 0 = u(L,t) for 0 ≤ tT, and to the initial condition u(x,0) = u0(x) for 0 ≤ xL. To obtain a reference solution, we introduce the Laplace transform \(\hat {u}(x,z)={\int \limits }_{0}^{\infty } e^{-zt}u(x,t) \mathrm {d}\;t\), which satisfies the two-point boundary-value problem (with complex parameter z),

$$-\hat{u}_{xx}+\omega^{2}\hat{u}=g(x,z)\quad\text{for}\;0\le x\le L, \quad\text{with}\;\hat{u}(0,z)=0=\hat{u}(L,z),$$

where ω = (z/κ)1/2 and \(g(x,z)=\kappa ^{-1}[u_{0}(x)+\hat {f}(x,z)]\). Consequently, the variation-of-constants formula yields the representation [14. , Section 7.3]

$$\begin{array}{@{}rcl@{}} \hat{u}(x,z)&=&\frac{\sinh\omega(L-x)}{\omega\sinh\omega L}{{\int}_{0}^{x}} g(\xi,z)\sinh\omega\xi \mathrm{d}\xi\\ &&+\frac{\sinh\omega x}{\omega\sinh\omega L}{{\int}_{x}^{L}} g(\xi,z)\sinh\omega(L-\xi) \mathrm{d}\xi, \end{array}$$

and we then invert the Laplace transform by numerical evaluation of the Bromwich integral [18. ],

$$u(x,t)=\frac{1}{2\pi i}{\int}_{\mathcal{C}}e^{zt}\hat{u}(x,z) dz,$$

for a hyperbolic contour \(\mathcal {C}\) homotopic to the imaginary axis and passing to the right of all singularities of \(\hat {u}(x,z)\).

To discretize in space, we introduce a finite difference grid

$$x_{p}=p h\quad\text{for}\;0\le p\le P,\quad\text{where}\;h=L/P,$$

and define up(t) ≈ u(xp,t) via the method of lines, replacing uxx with a second-order central difference approximation to arrive at the system of ODEs

$$u_{p}^{\prime}(t)-\kappa\frac{u_{p+1}(t)-2u_{p}(t)+u_{p-1}(t)}{h^{2}}=f_{p}(t) \quad\text{for}\;1\le p\le P-1,$$
(29)

where fp(t) = f(xp,t) with the boundary conditions u0(t) = 0 = uP(t) and the initial condition up(0) = u0(xp). For our test problem, we choose

$$L=2,\quad T=2,\quad\kappa=(L/\pi)^{2},\quad u_{0}(x)=x(L-x),\quad f(x,t)=(1+t)e^{-t},$$
(30)

where the value of the thermal conductivity κ normalizes the time scale by making the smallest eigenvalue of A = −κ(d/dx)2 equal 1. We will see below that u0D(As) iff s < 5/4, so the regularity of the solution u is limited.

We apply DG to discretize up(t) in time and denote the resulting fully discrete solution by U(t) = [Up(t)] ≈u(t) = [up(t)]. Figure 3 plots the error in U and in its reconstruction U using piecewise-quadratics (r = 3) and N = 8 equal subintervals in time, with P = 500 for the spatial grid. The errors are measured in the discrete L2-norm, that is,

$$\|\boldsymbol{U}(t)-\boldsymbol{u}(t)\|_{h}^{2}=\sum\limits_{p=0}^{P}\vert U_{p}(t)-u(x_{p},t)\vert^{2} h,$$

and we observe a clear deterioration in accuracy as t approaches zero.

Fig. 3
figure 3

Time dependence of the errors in the DG solution U(t) and its reconstruction U(t) for the 1D heat equation (28), using piecewise-quadratics (r = 3) over N = 8 time intervals

To speed up the convergence as h → 0, we compute also a second DG solution \(U^{\text {fine}}_{p}(t)\) using a finer spatial grid with Pfine = 2P subintervals, and then perform one step of Richardson extrapolation (on the coarser grid), defining

$$U^{\mathrm{R}}_{p}(t)=U^{\text{fine}}_{2p}(t)+\frac{1}{3}\left[U^{\text{fine}}_{2p}(t)-U_{p}(t)\right] \quad\text{for}\;0\le p\le P.$$

Table 2 shows errors in this spatially extrapolated DG solution over the time interval [T/4,T], that is,

$$\underset{T/4\le t\le T}{\max} \|\boldsymbol{U}^{\mathrm{R}}(t)-\boldsymbol{u}(t)\|_{h},$$
(31)

as well as the corresponding errors in the reconstruction \(\boldsymbol {U}^{\mathrm {R}}_{*}(t)\) and the nodal values \((\boldsymbol {U}^{\mathrm {R}})^{n}_{-}\). Again, the observed convergence rates are as expected.

Table 2 Maximum errors over the time interval [T/4,T] for the 1D heat equation of Section 6.2 using piecewise-quadratics (r = 3)

To investigate the time dependence of the error for t near zero, we consider the weighted error in the DG solution

$$\underset{1\le n\le N}{\max} \underset{t\in I_{n}}{\sup}\;w_{\alpha}(t)\|\boldsymbol{U}^{\mathrm{R}}(t)-\boldsymbol{u}(t)\|_{h} \quad\text{where}\quad w_{\alpha}(t)=\min(t^{\alpha},1),$$

and likewise incorporate the weight wα(t) when measuring the reconstruction error and the nodal error. The top part of Table 3 shows results for the homogeneous problem, that is, with the same data as in (30) except f(x,t) ≡ 0. The mth Fourier sine coefficient of u0 is proportional to m− 3, so ∥Asu0∥≤ C𝜖− 1/2 for \(s=\frac {5}{4}-\epsilon\) and 𝜖 > 0. Based on the estimates in Example 5.4, we choose the weight exponents \(\alpha =r-\frac {5}{4}\) for the DG error, \(r+1-\frac {5}{4}\) for the reconstruction error, and \(2r-1-\frac {5}{4}\) for the nodal error, and observe excellent agreement in the top set of results in Table 3 with the expected convergence rates of order r, r + 1 and 2r − 1, respectively.

Table 3 Weighted errors for the 1D heat equation of Section 6.2 using piecewise-quadratics (r = 3) and the indicated exponent α in the weight function wα(t). The top set of results is for the homogeneous equation (f ≡ 0). The bottom set is for the general case (both u0 and f non-zero)

Similar results are found if u0(x) ≡ 0 with nonzero f. Curiously, in the bottom part of Table 3, choosing both u0 and f as in (30) (so both nonzero) disturbs the observed convergence rates for \((\boldsymbol {U}^{\mathrm {R}})^{n}_{-}\), although not for UR or \(\boldsymbol {U}^{\mathrm {R}}_{*}\).

6.3 A parabolic PDE in 2D

Now consider the 2D heat equation,

$$u_{t}-\kappa\nabla^{2} u=f(x,y,t)\quad \text{for}\;0<t\le\;T\;\text{and}\;(x,y)\in{\Omega}=(0,L_{x})\times(0,L_{y}),$$
(32)

subject to the boundary conditions u(x,y,t) = 0 for (x,y) ∈ Ω, and to the initial condition u(x,y,0) = u0(x,y) for (x,y) ∈ Ω. We introduce a spatial finite difference grid

$$(x_{p},y_{q})=(p h_{x},q h_{y})\quad \text{for}\;0\le p\le\;P_{x}\;\text{and}\;0\le q\le P_{y},$$

with hx = Lx/Px and hy = Ly/Py. The semidiscrete finite difference solution upq(t) ≈ u(xp,yq,t) is then constructed using the standard 5-point approximation to the Laplacian, so that

$$u_{pq}^{\prime}-\kappa\left(\frac{u_{p+1,q}-2u_{pq}+u_{p-1,q}}{{h_{x}^{2}}} +\frac{u_{p,q+1}-2u_{pq}+u_{p,q-1}}{{h_{y}^{2}}}\right)=f_{pq}$$
(33)

for 0 ≤ tT and (xp,yq) ∈ Ω, where fpq(t) = f(xp,yq,t), together with the boundary condition upq(t) = 0 for (xp,yq) ∈ Ω, and the initial condition upq(0) = u0(xp,yq) for (xp,yq) ∈ Ω. For (xp,yq) ∈ Ω, we use column-major ordering to arrange the unknowns upq(t), the source terms fpq(t) and initial data u0pq into vectors uh(t), f(t) and \(\boldsymbol {u}_{0}\in \mathbb {R}^{M}\) for M = (Px − 1)(Py − 1). There is then a sparse matrix A such that the system of ODEs (33) leads to the initial-value problem

$$\boldsymbol{u}_{h}^{\prime}(t)+\boldsymbol{A}\boldsymbol{u}_{h}=\boldsymbol{f}(t)\quad\text{for}\;0\le t\le T, \text{with}\;\boldsymbol{u}_{h}(0)=\boldsymbol{u}_{0}.$$
(34)

For our test problem, we take Lx = Ly = 2 and Px = Py = 50 with

$$T=2,\quad\kappa=2/\pi^{2},\quad u_{0}(x,y)=x(2-x)y(2-y),\quad f(x,y,t)=(1+t)e^{-t},$$
(35)

where the choice of κ ensures that the smallest Dirichlet eigenvalue of − κ2 on Ω equals 1. Table 4 compares the piecewise-quadratic (r = 3) DG solution Uh(t) of the semidiscrete problem (34) with uh(t), evaluating the latter using numerical inversion of the Laplace transform as before except that now, instead of \(\hat {u}(z)\), we work with the spatially discrete approximation \(\hat {\boldsymbol {u}}_{h}(z)\) obtained by solving the (complex) linear system \((z\boldsymbol {I}+\boldsymbol {A})\hat {\boldsymbol {u}}_{h}(z)=u_{0}+\hat {\boldsymbol {f}}(z)\). As with the 1D results in Table 2, we compute the maximum error over the time interval [T/4,T], and observe the expected rates of convergence, keeping in mind that by treating uh(t) as our reference solution we are ignoring the error from the spatial discretization.

Table 4 Maximum errors over the time interval [T/4,T] for the spatially discrete, 2D heat equation of Section 6.3 using piecewise-quadratics (r = 3)