1 Introduction

The main objective of this article is to study a posteriori error analysis of the Crank–Nicolson finite element method for the linear parabolic integro-differential equations (PIDE) of the form

$$\begin{aligned} u_t(x,t)+\mathcal {A}u(x,t)= & {} \int _{0}^{t} {\mathcal {B}}(t,s) u(x,s)ds + f(x,t) ,\;\;(x, t)\in \Omega \times (0,T], \nonumber \\ u(x, t)= & {} 0,\;\; (x,t)\in \partial \Omega \times (0, T], \nonumber \\ u(x, 0)= & {} u_0(x),\;\; x \in \Omega . \end{aligned}$$
(1.1)

Here, \(\Omega \subset \mathbb {R}^d\, ( {d \ge 1})\) is a bounded convex polygonal or polyhedral domain with boundary \(\partial \Omega \), and \(u_t(x,t) = \frac{\partial u}{\partial t}(x,t)\) with \(T<\infty \). Further, \(\mathcal {A}\) is a self-adjoint, uniformly positive definite, second-order linear elliptic partial differential operator of the form

$$\begin{aligned} \mathcal {A} u= - \nabla \cdot (A \nabla u), \end{aligned}$$

and the operator \(\mathcal {B}(t,s)\) is of the form

$$\begin{aligned} \mathcal {B}(t,s) u = - \nabla \cdot (B(t,s) \nabla u), \end{aligned}$$

where \(``\nabla \)” denotes the spatial gradient. \(A = \{a_{ij}(x)\}\) and \(B(t,s) = \{b_{ij}(x;t,s)\}\) are two \(d \times d\) matrices assumed to be in \({L^{\infty }(\Omega )}^{d \times d}\) in space variable. Moreover, the elements of B(ts) are assumed to be at least twice differentiable with respect to s and once with respect to t. Furthermore, we assume the initial function \(u_0(x)\) is in \(H^2(\Omega )\cap H_0^1(\Omega )\) and the source function f(xt) is assumed to be in \(L^2(0;T;L^2(\Omega ))\). Under the regularity assumptions on f(xt), \(u_0(x)\) as prescribed above and

$$\begin{aligned} \max _{\bar{\Omega }\times \{0\le s\le t\le T\}} \left| \frac{\partial }{\partial x} b_{i,j}(x;t,s)\right| <\infty , \end{aligned}$$

the problem (1.1) admits a unique solution

$$\begin{aligned} u\in L^2(0,T;H^2(\Omega )\cap H_0^1(\Omega ))\cap H^1(0,T;L^2(\Omega )). \end{aligned}$$

We refer to Chapter 2 of [9] for further details on existence and uniqueness of the solution of (1.1). For regularity results for such problems, one may refer to [27, 31] and the references therein.

Such problems and variants of them arise in various applications, such as heat conduction in material with memory [13], the compression of poro-viscoelasticity media [14], nuclear reactor dynamics [21] and the epidemic phenomena in biology [7].

While a posteriori error analysis of finite element methods for elliptic and parabolic problems are quite rich in the literature [1,2,3,4,5, 8, 10,11,12, 15, 17,18,19, 28,29,30], relatively less progress has been made in the direction of a posteriori error analysis of PIDE [23,24,25]. In order to put the results of the paper into proper perspective, we give a brief account of the relevant literature and motivation for the present investigation. In the absence of the memory term, i.e., when \({\mathcal {B}}(t,s) = 0\), a posteriori error analysis for linear parabolic problems have been investigated by several authors in [2,3,4,5, 10, 12, 15, 17, 18, 22, 30]. In particular, for the fully discrete Crank–Nicolson method for the heat equation, a continuous, piecewise linear approximation in time is used to derive suboptimal (with respect to time steps) a posteriori error bounds in [30] using the standard energy techniques. Subsequently, a continuous, piecewise quadratic polynomial in time so-called the Crank–Nicolson reconstruction is then introduced in [2] to restore the second order of convergence for the semidiscrete in time discretization of a general parabolic problem. Later, the authors of [17] have introduced the reconstruction based on approximations on one time level (two-point reconstruction) as in [2], and the reconstructions based on approximations on two time levels (three-point reconstruction) to derive error bounds in the \(L^2(H^1)\)-norm. Recently in [3], an elliptic reconstruction technique in conjunction with the energy arguments are used to derive optimal order a posteriori error estimate for the Crank–Nicolson method in the \(L^\infty (L^2)\)-norm for parabolic problems.

Since PIDE (1.1) may be thought of as a perturbation of parabolic equation, an attempt has been made to extend a posteriori error analysis of parabolic problems [3] to PIDE (1.1). We wish to emphasize that such an extension is not straightforward due to the presence of the Volterra integral term in (1.1). In this paper we derive a posteriori bounds for PIDE in the \(L^\infty (L^2)\)-norm of the error for the fully discrete Crank–Nicolson approximations. The optimality in space hinges essentially on the Ritz–Volterra reconstruction operator [23], whereas a quadratic (in time) space-time reconstruction operator is introduced to establish an a posteriori error estimator with second-order convergence in time. It is important to note that choice of such a quadratic space-time reconstruction operator (see 3.4) is non-trivial and heavily problem dependent. Note that in [24], the a posteriori error estimates were derived for the fully discrete Crank–Nicolson approximations in the \(L^2(H^1)\)-norm. However, the analysis presented therein does not require Ritz–Volterra reconstruction as we require this reconstruction to get optimality in the \(L^2\)-norm in space. And consequently a quadratic reconstruction in time is enough to obtain optimality in the \(L^2(H^1)\)-norm as compared to a space-time quadratic reconstruction (as introduced in this article). We have used the nested refinement on finite element spaces to avoid further complications due to the presence of the Volterra integral term which memorizes the jumps over all element edges in all previous space meshes.

To the best of authors’ knowledge no article is available in the literature concerning a posteriori error analysis of the Crank–Nicolson method for PIDE in the \(L^\infty (L^2)\)-norm. Our main concern is on the theoretical aspect of a posteriori analysis of the method and to show numerically that the derived estimators are computable which exhibit optimal asymptotic behaviour. Qualitative behaviour of the obtained estimator is shown in Sect. 5, however, the development of different adaptive algorithms is out of the scope of this article.

The rest of the paper is organized as follows. We begin by introducing some standard notations and preliminary materials in Sect. 2. The development of a quadratic space-time reconstructions for PIDE appears in Sect. 3. In Sect. 4, we give a posteriori error analysis for the fully discrete Crank–Nicolson finite element method and derive error estimate in the \(L^\infty (L^2)\)-norm. Finally, numerical results are presented in Sect. 5.

2 Notations and Preliminaries

Given a Lebesgue measurable set \(\omega \subset \mathbb {R}^d\), we denote by \(L^p(\omega ),\ 1\le p \le \infty \), the Lebesgue spaces with corresponding norms \(\Vert \cdot \Vert _{L^p(\omega )}\). When \(p=2\), the space \(L^2(\omega )\) is equipped with inner product \(\langle \cdot ,\cdot \rangle _{\omega }\) and the induced norm \(\Vert \cdot \Vert _{L^2(\omega )}\). Whenever \(\omega = \Omega \), we omit the subscripts of \(\Vert .\Vert _{L^2(\omega )}\) and \(\langle \cdot ,\cdot \rangle _{}\omega \). For an integer \(m>0\), we use the standard notation for Sobolev spaces \(W^{m,p}(\omega )\) with \(1\le p \le \infty \). The norm on \(W^{m,p}(\omega )\) is defined by

$$\begin{aligned} \Vert u\Vert _{m,p,\omega } = \Bigg (\int _{\omega } \sum _{|\alpha | \le m} |D^\alpha u|^p dx\Bigg )^{1/p}, \quad 1\le p < \infty \end{aligned}$$

with the standard modification for \(p = \infty \). When \(p = 2\), we denote \(W^{m,2}(\Omega )\) by \(H^m(\Omega )\) and the norm by \(\Vert \cdot \Vert _m\). The function space \(H^1_0(\Omega )\) consists of elements from \(H^1(\Omega )\) that vanishes on the boundary of \(\Omega \), where the boundary values are to be interpreted in the sense of trace.

Let \(a(\cdot ,\cdot )\,:\,H^1_0(\Omega )\times H^1_0(\Omega )\rightarrow \mathbb {R}\) be the bilinear form corresponding to the elliptic operator \(\mathcal {A}\) defined by

$$\begin{aligned} a(\phi ,\psi ) := \langle A\nabla \phi ,\nabla \psi \rangle \;\;\;\;\;\forall \;\phi , \psi \in H^1_0(\Omega ). \end{aligned}$$

Similarly, let \(b(t,s;\cdot ,\cdot )\) be the bilinear form corresponding to the operator \(\mathcal {B}(t,s)\) defined on \(H^1_0(\Omega )\times H^1_0(\Omega )\) by

$$\begin{aligned} b(t,s;\phi (s),\psi ):= & {} \langle B(t,s)\nabla \phi (s),\nabla \psi \rangle \;\;\; \;\;\forall \;\phi (s),\psi \in H^1_0(\Omega ). \end{aligned}$$

Let \(B_s(t,s)\) and \(B_{ss}(t,s)\) be obtained by differentiating B(ts) partially with respect to s once and twice, respectively. Then we define \(b_s(t,s;\cdot ,\cdot )\) and \(b_{ss}(t,s;\cdot ,\cdot )\) to be the bilinear forms corresponding to the operators \(\mathcal {B}_s(t,s)\) and \(\mathcal {B}_{ss}(t,s)\) defined on \(H^1_0(\Omega )\times H^1_0(\Omega )\) by

$$\begin{aligned} b_s(t,s;\phi (s),\psi ):= & {} \langle B_s(t,s) \nabla \phi (s),\nabla \psi \rangle \;\;\;\;\;\forall \;\phi (s),\psi \in H^1_0(\Omega ) \end{aligned}$$

and

$$\begin{aligned} b_{ss}(t,s;\phi (s),\psi ):= & {} \langle B_{ss}(t,s) \nabla \phi (s),\nabla \psi \rangle \;\;\; \;\;\forall \;\phi (s),\psi \in H^1_0(\Omega ). \end{aligned}$$

We assume that the bilinear form \(a(\cdot ,\cdot )\) is coercive and continuous on \(H^1_0(\Omega )\), i.e.,

$$\begin{aligned} a(\phi ,\phi ) \ge \alpha \Vert \phi \Vert _1^2 \;\;\;\;\text{ and } \;\;\; |a(\phi ,\psi )| \le \beta \Vert \phi \Vert _1 \Vert \psi \Vert _1 \;\;\;\;\;\forall \; \phi ,\psi \in H^1_0(\Omega ) \end{aligned}$$
(2.1)

with \(\alpha ,\beta \in \mathbb {R}^+\).

Further, we assume that the bilinear forms \(b(t,s;\cdot ,\cdot )\), \(b_s(t,s;\cdot ,\cdot )\) and \(b_{ss}(t,s;\cdot ,\cdot )\) are continuous on \(H^1_0(\Omega )\), i.e.,

$$\begin{aligned} |b(t,s;\phi (s),\psi )|\le & {} \gamma \Vert \phi (s)\Vert _1 \Vert \psi \Vert _1 \;\; \;\;\;\forall \;\phi (s),\psi \in H^1_0(\Omega ), \end{aligned}$$
(2.2)
$$\begin{aligned} |b_s(t,s; \phi (s),\psi )|\le & {} \gamma ' \Vert \phi (s)\Vert _1 \Vert \psi \Vert _1 \;\;\;\;\;\forall \;\phi (s),\psi \in H^1_0(\Omega ), \end{aligned}$$
(2.3)

and

$$\begin{aligned} |b_{ss}(t,s; \phi (s),\psi )| \le \gamma '' \Vert \phi (s)\Vert _1 \Vert \psi \Vert _1 \;\;\;\;\;\forall \;\phi (s),\psi \in H^1_0(\Omega ) \end{aligned}$$
(2.4)

with \(\gamma ,\gamma ',\gamma '' \in \mathbb {R}^+\).

The weak formulation of the problem (1.1) may be stated as follows: Find \(u: [0,T] \rightarrow H^1_0(\Omega )\) such that

$$\begin{aligned} \int _{\Omega } u_t\phi \,dx + a(u , \phi )= & {} \int _{0}^{t}{b(t,s;u(s),\phi )\,ds} + \int _{\Omega } f\phi \, dx \;\;\forall \phi \in H^1_0(\Omega ), \;\; t \in (0,T], \nonumber \\ u(\cdot , 0)= & {} u_0. \end{aligned}$$
(2.5)

Remark

The stability properties for the continuous problem (1.1) can be found in [20] and [27].

Let \(0 = t_0< t_1< \cdots < t_N = T\) be a partition of [0, T] with \(\tau _n := t_n - t_{n-1}\) and \(I_n := (t_{n-1}, t_n]\). For \(t = t_n, \ n \in [0:N]\), we set \(f^n(\cdot ) = f(\cdot ,t_n)\). Let \((\mathcal {T}_n)_{n \in [0:N]}\) be a family of conforming triangulations of the domain \(\Omega \). Let \(h_n(x) = \text{ diam }(K),\;\text{ where }\; K \in \mathcal {T}_n \; \text{ and } \; x \in K\) denote the local mesh-size function corresponds to each given triangulation \(\mathcal {T}_n\). Let \(\mathcal {S}_n\) denote the set of internal sides of \(\mathcal {T}_n\) representing edges in \(d = 2\) or faces in \(d = 3\), and \(\mathcal {E}_n:= \cup _{E \in \mathcal {S}_n}E\) denotes the union of all internal sides.

Each triangulation \((\mathcal {T}_n)\), for \(n \in [1:N]\), is a refinement of a macro-triangulation \(\mathcal {T}_0\) of the domain \(\Omega \) that satisfies the same conformity and shape-regularity assumptions during refinements (cf. [6]). We assume the following admissible criteria on \(\mathcal {T}_n\) (cf. [15]):

  • The refined triangulation is conforming.

  • The shape-regularity of an arbitrary refinement depends only on the shape-regularity of the macro-triangulation \(\mathcal {T}_0\).

We shall allow only nested refinement of the space meshes at each time level \(t = t_n, \ n \in [0:N]\). Associated with these triangulations, we consider the finite element spaces:

$$\begin{aligned} \mathbb {V}^n := \{\phi \in H^1_0(\Omega ): \; \phi |_K \in \mathbb {P}_1 \;\forall K \in \mathcal {T}_n\}, \end{aligned}$$

where \(\mathbb {P}_1\) is the space of polynomials in d variables of degree atmost 1. Also, define the space \(\mathbb {V}^0 \oplus \mathbb {V}^1 \oplus \ldots \oplus \mathbb {V}^n\) by \(X^n\).

Let \(P^n_0 : L^2(\Omega ) \rightarrow \mathbb {V}^n\) be the \(L^2\) projection operator and is given by

$$\begin{aligned} \langle P^n_0 w, \chi _n \rangle = \langle w, \chi _n \rangle \;\; \forall \chi _n \in \mathbb {V}^n. \end{aligned}$$

Throughout this paper, the following notation will be used. For \(n = 1,2,\ldots ,N\),

$$\begin{aligned} {\partial } v^n:= & {} \frac{v^n - v^{n-1}}{\tau _n}, \quad \bar{\partial } v^n = P_0^n {\partial } v^n := \frac{v^n - P^n_0v^{n-1}}{\tau _n},\\t_{n-1/2}:= & {} \frac{t_n + t_{n-1}}{2}\quad \text {and}\quad v^{n-1/2} := \frac{v^n + v^{n-1}}{2}. \end{aligned}$$

Let \(\sigma ^n\) be the quadrature rule used to approximate the Volterra integral term. In order to be consistent with the Crank–Nicolson scheme, we use the trapezoidal rule given by

$$\begin{aligned} \sigma ^n(y):= & {} \sum _{j = 0}^{n-2} \frac{\tau _{j+1}}{2}\big (y(t_j) + y(t_{j+1})\big ) + \frac{\tau _{n}}{4}\big (y(t_{n-1}) + y(t_{n-1/2})\big ) \nonumber \\\approx & {} \int _{0}^{t_{n-1/2}} y(s)ds. \end{aligned}$$
(2.6)

Representation of the bilinear forms. For a function \(v \in \mathbb {V}^n\), we can represent the bilinear form \(a(\cdot ,\cdot )\) as

$$\begin{aligned} a(v,\phi ) = \langle \mathcal {A}_{el} v, \phi \rangle + \langle J_1[v],\phi \rangle _{\mathcal {E}_n} \;\;\; \forall \phi \in H^1_0(\Omega ), \end{aligned}$$
(2.7)

where

$$\begin{aligned} \langle \mathcal {A}_{el} v, \phi \rangle = \sum _{K \in \mathcal {T}_n} \langle -\text{ div }(A \nabla v), \phi \rangle _K \;\;\; \forall \phi \in H^1_0(\Omega ) \end{aligned}$$

is the regular part of the distribution \(-\text{ div }(A \nabla v)\) and

$$\begin{aligned} J_1[v]|_E(x) = [A \nabla v]_E(x) := \lim _{\varepsilon \rightarrow 0}(A \nabla v(x + \varepsilon \nu _E) - A \nabla v(x - \varepsilon \nu _E))\cdot \nu _E \end{aligned}$$
(2.8)

is the spatial jump of the field \(A\nabla v\) across an element side \(E \in \mathcal {S}_n\), where \(\nu _E\) is a unit normal vector to E at the point x.

Similarly, for all \(\phi \in H^1_0(\Omega )\), we represent the bilinear form \(b(t_n,s; \cdot ,\cdot )\) as

$$\begin{aligned} \int _{0}^{t_n} b(t_n,s;v(s),\phi ) ds = \left\langle \int _{0}^{t_n} \mathcal {B}_{el}(t_n,s) v(s)ds, \phi \right\rangle + \left\langle \int _{0}^{t_n} J_2[v(s)] ds,\phi \right\rangle _{\mathcal {E}_n}, \end{aligned}$$
(2.9)

where \(\mathcal {B}_{el}(t_n,s) v(s)\) is the regular part of the distribution \(-\text{ div }(B(t_n,s) \nabla v(s))\) and is defined as

$$\begin{aligned} \langle \mathcal {B}_{el}(t_n,s) v(s), \phi \rangle := \sum _{K \in \mathcal {T}_n} \langle -\text{ div }(B(t_n,s) \nabla v(s)), \phi \rangle _K \;\;\; \forall \phi \in H^1_0(\Omega ), \end{aligned}$$

and \(J_2[v(s)]\) is the spatial jump of the field \(-\text{ div }(B(t_n,s)\nabla v(s))\) across an element side \(E \in \mathcal {S}_n\) as defined in (2.8) with \(B(t_n,s)\) replacing A.

We define the fully discrete operators \(\mathcal {A}^n: H^1_0(\Omega ) \rightarrow \mathbb {V}^n\) and \(\mathcal {B}^{n-r}(s): H^1_0(\Omega ) \rightarrow \mathbb {V}^n\), \(0 \le r < 1\), by

$$\begin{aligned} \langle \mathcal {A}^n w, \chi _n \rangle = a(w, \chi _n) \;\; \forall \chi _n \in \mathbb {V}^n \end{aligned}$$

and

$$\begin{aligned} \langle \mathcal {B}^{n-r}(s) w(s), \chi _n \rangle = b(t_{n-r},s; w(s), \chi _n)\;\; \forall \chi _n \in \mathbb {V}^n,\;\;s \in I_n. \end{aligned}$$

The fully discrete Crank–Nicolson scheme may be stated as follows: Given \(U^0 = P^0_0 u(0)\), find \(U^n \in \mathbb {V}^n, \;n \in [1:N]\) such that

$$\begin{aligned}&\int _{\Omega } {\partial } U^n \phi _n dx + a(U^{n-1/2} , \phi _n) \nonumber \\&\quad = \sigma ^n (b(t_{n-1/2};U,\phi _n)) + \int _{\Omega } f^{n-1/2} \phi _n dx \;\; \forall \phi _n \in \mathbb {V}^n, \end{aligned}$$
(2.10)

where

$$\begin{aligned} \sigma ^n (b(t_{n-1/2};U,\phi _n))= & {} \sum _{j=0}^{n-2}\frac{\tau _{j+1}}{2}\left\{ b(t_{n-1/2},t_j;U^j,\phi _n) + b(t_{n-1/2},t_{j+1};U^{j+1},\phi _n)\right\} \\&+ \frac{\tau _n}{4}\left\{ b(t_{n-1/2},t_{n-1};U^{n-1},\phi _n) + b(t_{n-1/2},t_{n-1/2};U^{n-1/2},\phi _n)\right\} . \end{aligned}$$

Further, since

$$\begin{aligned} \langle \mathcal {B}^{n-1/2}(t_j) U^j, \phi _n \rangle = b(t_{n-1/2}; U^j, \phi _n)\;\; \forall \phi _n \in \mathbb {V}^n,\;\; 0 \le n \le N, \end{aligned}$$

we define \(\sigma ^n(\mathcal {B}^{n-1/2}U)\) through

$$\begin{aligned} \langle \sigma ^n(\mathcal {B}^{n-1/2} U), \phi _n \rangle = \sigma ^n(b(t_{n-1/2}; U, \phi _n)\;\; \forall \phi _n \in \mathbb {V}^n. \end{aligned}$$
(2.11)

Let U be a continuous, piecewise linear approximation in time defined for all \(t \in I_n\) by

$$\begin{aligned} U(t):= & {} l_{n}(t) U^n + l_{n-1}(t) U^{n-1}, \end{aligned}$$
(2.12)

where

$$\begin{aligned} l_{n}(t):= & {} \frac{(t-t_{n-1})}{\tau _n}\;\;\;\;\;\text{ and } \;\;\;\; l_{n-1}(t) := \frac{(t_n - t)}{\tau _n}. \;\;\;\;\;\;\; \end{aligned}$$
(2.13)

Following [23], we recall the definition of Ritz–Volterra reconstruction operator below.

Definition 2.1

(Ritz–Volterra reconstruction) We define the Ritz–Volterra reconstruction \(\mathcal {R}^n_w v(t) \in H^1_0(\Omega ), 0 \le n \le N, t \in [0,T]\) of \(v(t) \in H^1_0(\Omega )\) to be a solution of the following elliptic Volterra integral equation in the weak form

$$\begin{aligned} a(\mathcal {R}^n_w v(t),\chi ) = \langle g^n,\chi \rangle + \int _{0}^{t_n}{b(t_n,s;\mathcal {R}^n_w v(s),\chi )ds} \;\;\; \forall \chi \in H^1_0(\Omega ), \end{aligned}$$
(2.14)

where \(g^n\) is given by

$$\begin{aligned} g^n = \mathcal {A}^n v(t) - \int _{0}^{t_n} \mathcal {B}^n(s)v(s) ds, \;\;\;v \in H^1_0(\Omega ). \end{aligned}$$

Remark

The Ritz–Volterra reconstruction is well defined (please refer to the definition 3.2 of [23]) and it is motivated by the Ritz Volterra projection introduced by Lin et al. [16] in the context of a priori analysis for PIDE. The Ritz–Volterra reconstruction is the partial right inverse of the Ritz Volterra projection operator (cf. [23]). Note that the Galerkin orthogonality type property holds for the Ritz–Volterra reconstruction:

$$\begin{aligned} a(\mathcal {R}^n_w v(t) - v(t), \phi _n) - \int _{0}^{t_n} b(t_n,s;(\mathcal {R}^n_w v -v)(s), \phi _n) = 0 \;\; \forall \phi _n \in \mathbb {V}^n. \end{aligned}$$
(2.15)

Further, we use the following compatibility condition:

$$\begin{aligned} \mathcal {R}^n_w\Big |_{X^{n-1}} = \mathcal {R}^{n-1}_w. \end{aligned}$$
(2.16)

We use the following definitions in the subsequent error analysis. For \(t \in I_n\), we now define the Ritz–Volterra reconstructions of U(t) by

$$\begin{aligned} \mathcal {R}_w U(t) := l_{n-1}(t) \mathcal {R}^{n-1}_w U^{n-1} + l_n(t) \mathcal {R}^n_w U^n, \end{aligned}$$
(2.17)

where \(l_{n-1}(t)\) and \(l_n(t)\) are given by (2.13). Now, set

$$\begin{aligned} \hat{\omega }(t) := \int _{0}^{t} B(t,s)\nabla \mathcal {R}_w U(s)ds. \end{aligned}$$
(2.18)

For \(t \in I_n\), let \(\hat{\omega }_I(t)\) be the linear interpolant associated with the integral vectors \(\hat{\omega }(t_{n-1})\) and \(\hat{\omega }(t_n)\) and be given by

$$\begin{aligned} \hat{\omega }_I(t) := l_{n-1}(t)\hat{\omega }(t_{n-1}) + l_n(t)\hat{\omega }(t_n). \end{aligned}$$
(2.19)

Further, let

$$\begin{aligned} \hat{\mathcal {U}}(t) := \int _{0}^{t}\mathcal {B}(t,s) U(s)ds, \;\;t \in I_n. \end{aligned}$$
(2.20)

For \(t \in I_n\), let \(\hat{\mathcal {U}}_{I,1}(t)\) be the linear interpolant associate with the integrals \(\hat{\mathcal {U}}(t_{n})\) and \(\hat{\mathcal {U}}(t_{n-1})\):

$$\begin{aligned} \hat{\mathcal {U}}_{I,1}(t):= & {} l_{n-1}(\textit{t})\hat{\mathcal {U}}(t_{n-1}) + l_{n}(\textit{t})\hat{\mathcal {U}}(t_{n}), \end{aligned}$$
(2.21)

and let \(\hat{\mathcal {U}}_{I,2}(t)\) be the linear interpolant associate with that of the integral \(\hat{\mathcal {U}}(t_{n-1/2})\)

$$\begin{aligned} \hat{\mathcal {U}}_{I,2}(t):= & {} \hat{\mathcal {U}}(t_{n-1/2}) + (t - t_{n-1/2}) \frac{d}{dt} \hat{\mathcal {U}}(t)\big |_{t = t_n}\nonumber \\:= & {} \hat{\mathcal {U}}(t_{n-1/2}) + (t - t_{n-1/2}) \mathcal {Y}_n, \end{aligned}$$
(2.22)

where

$$\begin{aligned} \mathcal {Y}_n = \frac{d}{dt} \hat{\mathcal {U}}(t)\big |_{t = t_n}. \end{aligned}$$
(2.23)

For \(n \in [0:N]\), we define the inner residual

$$\begin{aligned} \mathfrak {R}^n(U) := \mathcal {A}^n U^n - \mathcal {A}_{el} U^n - \int _{0}^{t_n} \mathcal {B}^{n}(s)U(s)ds + \int _{0}^{t_n} \mathcal {B}_{el}(t_n,s) U(s)ds, \end{aligned}$$
(2.24)

and the jump residual

$$\begin{aligned} \mathfrak {J}^n[U] := J_1[U^n] - \int _{0}^{t_n} J_2[U(s)]ds \end{aligned}$$
(2.25)

with \(\mathfrak {R}^0(U) := \mathcal {A}^0 U^0 - \mathcal {A}_{el} U^0\) and \(\mathfrak {J}^0[U] := J_1[U^0]\).

Modified Crank–Nicolson scheme for PIDE It is known fact that during refinements the discrete Laplace operator \(\Delta ^n_h\) on the finer mesh \(\mathcal {T}_n\) when applied to coarse grid function \(U^{n-1}\) leads to the oscillatory behaviour of the solution for the parabolic problem (cf. [3]). This is due to the presence of term \(\Delta ^n_hU^{n-1}\) which exhibits oscillations in the classical Crank–Nicolson scheme for the parabolic problems. Since PIDE may be thought of as the perturbation to the parabolic problem (when \(\mathcal {B}(t,s) = 0\), PIDE is same as parabolic problem), it is therefore natural to expect the same oscillatory behaviour for the classical Crank–Nicolson approximation to the PIDE (1.1). Therefore, a modified Crank–Nicolson scheme is considered and analyzed.

To that end, the modified Crank–Nicolson scheme for PIDE (1.1) is defined as follows: For \( 1\le n \le N\), find \(U^n \in \mathbb {V}^n\) such that

$$\begin{aligned} \bar{\partial } U^n + \frac{1}{2} \mathcal {A}^n U^n + \frac{1}{2} P_0^n\mathcal {A}^{n-1} U^{n-1} - P_0^n(\sigma ^n(\mathcal {B}^{n-1/2}U)) - P_0^n f^{n-1/2} = 0, \end{aligned}$$
(2.26)

where \(\sigma ^n(\mathcal {B}^{n-1/2}U)\) is defined through (2.11).

3 Quadratic (in Time) Space-Time Reconstructions for PIDE

It is noteworthy that by spitting the error \(e = u - U = (u - \mathcal {R}_w U) + (\mathcal {R}_w U - U)\) yields optimal bounds for the PIDE (1.1) in \(L^\infty (L^2)\)-norm in case of the backward Euler scheme (cf. [23]). Here, u denotes the exact solution of the PIDE (1.1), U is defined by (2.12) and \(\mathcal {R}_w U\) is given by (2.17). The optimality in space hinges essentially on the Ritz–Volterra reconstruction \(\mathcal {R}_w U\) of U. But, in order to recover the second order convergence in time for the Crank–Nicolson scheme, we need to reconsider a reconstruction of \(\mathcal {R}_w U\) in time. The precise properties of such a space-time reconstruction \(\widehat{U}\) are:

  • \(\widehat{U}\) should be chosen such that the error (\(u - \widehat{U}\)) in the energy argument should lead to optimal estimates in both space and time, and

  • \(\widehat{U} - \mathcal {R}_w U = O(\tau ^2).\)

Thus, a natural choice for such a reconstruction \(\widehat{U}\) is that it should be quadratic in time as \(\mathcal {R}_w U\) is linear in nature (see definition (2.17)). Moreover, \(\widehat{U}\) should be continuous and \(\widehat{U}(t_n) = \mathcal {R}_w^n U^n \; \forall n = 1,\ldots , N\).

The rest of this section is devoted to introduce a space-time reconstruction \(\widehat{U}\). For this, we need some notations which will prove to be convenient for the error analysis in Sect. 4.

Let \(\Theta : [0,T] \rightarrow H^1_0(\Omega )\) be defined by

$$\begin{aligned} \Theta (t):= & {} l_{n-1}(t) P_0^n\mathcal {A}^{n-1} U^{n-1} + l_n(t) \mathcal {A}^n U^n - P_0^n(\sigma ^n(\mathcal {B}^{n-1/2}U)),\ t \in I_n . \end{aligned}$$
(3.1)

Define \(\hat{F}: [0,T] \rightarrow H^1_0(\Omega )\) by

$$\begin{aligned} \hat{F}(t):= & {} \Theta (t) - P^n_0 \varphi (t),\ t \in I_n, \end{aligned}$$
(3.2)

where \(\varphi (t) := \hat{I} f(t)\). Here, \(\hat{I}\) is a piecewise linear interpolant chosen such that

$$\begin{aligned} \hat{I}(f) \in \mathbb {P}_1(I_n), \;\;\hat{I}(f)(t_{n-1}) = f^{{n-1}} \;\; \text{ and }\;\;\hat{I}(f)(t_{n-1/2}) = f^{n-1/2}. \end{aligned}$$
(3.3)

We now define the quadratic space-time reconstruction \(\widehat{U} : [0,T] \rightarrow H^1_0(\Omega )\) as follows:

$$\begin{aligned} \widehat{U}(t):= & {} \mathcal {R}_w^{n-1}U^{n-1} - \mathcal {R}_w^{n}\int _{t_{n-1}}^{t} \hat{F}(s)ds \nonumber \\&+\,(t- t_{n-1})\frac{\mathcal {R}^n_w P^n_0 U^{n-1} - \mathcal {R}_w^{n-1} U^{n-1}}{\tau _n}, \;\;t \in I_n. \end{aligned}$$
(3.4)

We note that \(\widehat{U}\) is quadratic in time as \(\hat{F}\) is linear in time. This definition is motivated by the fact that \(\widehat{U}(t)\) satisfies the following relation:

$$\begin{aligned} \widehat{U}_t(t) + \mathcal {R}_w^n \hat{F}(t)= & {} \frac{\mathcal {R}^n_w P^n_0 U^{n-1} - \mathcal {R}_w^{n-1} U^{n-1}}{\tau _n}. \end{aligned}$$
(3.5)

It follows from (3.4) that

$$\begin{aligned} \widehat{U}(t_{n-1}) = \mathcal {R}_w^{n-1}U^{n-1} \end{aligned}$$

and

$$\begin{aligned} \widehat{U}(t_n)= & {} \mathcal {R}^n_w P^n_0 U^{n-1} - \mathcal {R}_w^{n} \tau _n \left[ \frac{P^n_0 \mathcal {A}^{n-1} U^{n-1} + \mathcal {A}^n U^n}{2} - P^n_0 f^{n-1/2} - P^n_0 \sigma ^n(\mathcal {B}^{n-1/2}U)) \right] \\= & {} \mathcal {R}_w^{n}U^{n}, \end{aligned}$$

where we have used (2.26) and the integral is evaluated using the mid-point rule. The terms \(\mathcal {R}_w^{n-1}U^{n-1}\) and \( (t- t_{n-1})({\mathcal {R}^n_w P^n_0 U^{n-1} - \mathcal {R}_w^{n-1} U^{n-1}})/\tau _n\) in the definition (3.4) act as corrector terms required to establish the continuity of \(\widehat{U}\) with \(\mathcal {R}_w U\) at the nodal points \(t_n\).

Using the above notations, the modified Crank–Nicolson scheme can be rewritten in the following compact form

$$\begin{aligned} \bar{\partial } U^n + \Theta ^{n-1/2} = P_0^n f^{n-1/2}. \end{aligned}$$
(3.6)

In view of (3.2)

$$\begin{aligned} \bar{\partial } U^n + F^{n-1/2} = 0, \end{aligned}$$
(3.7)

where \(F^{n-1/2} := \hat{F}(t_{n-1/2})\).

4 Error Analysis

In this section, we shall derive a posteriori error estimate for the error \(e := u - U\).

Main ideas and notations We decompose the error e as:

$$\begin{aligned} e := \hat{\rho } + \sigma + \epsilon , \end{aligned}$$
(4.1)

where \(\hat{\rho } := u - \widehat{U}\) denotes the parabolic error, \(\sigma := \widehat{U} - \mathcal {R}_w U\) denotes the time reconstruction error and \(\epsilon := \mathcal {R}_w U - U\) denotes the Ritz–Volterra reconstruction error.

The basic idea of obtaining the a posteriori error estimate can now be summarised as follows: (i) optimal order a posteriori error estimates for the Ritz–Volterra reconstruction error \(\epsilon \) in standard norms like \(L^2\) and \(H^1\) are contained in [23]; (ii) the parabolic error \(\hat{\rho }\) satisfies a variant of the original PIDE (1.1) with a right hand side that can be controlled a posteriori in an optimal way; (iii) the time reconstruction \(\widehat{U}\) is chosen in such a way that the difference \(\widehat{U} - \mathcal {R}_w U\) can be estimated a posteriori and will be of \( O(\tau ^2)\).

We now recall from [26] the following interpolation error estimates.

Proposition 4.1

Let \(\Pi ^n: H^1_0(\Omega )\rightarrow \mathbb {V}^n\) be the Scott-Zhang interpolation operator of Cl\(\acute{e}\)ment type. Then, for sufficiently smooth \(\psi \) and finite element polynomial space of degree 1, there exist constants \(C_{1,j}\) and \(C_{2,j}\) depending only upon the shape-regularity of the family of triangulations such that for \(j \le 2\)

$$\begin{aligned} \Vert h_n^{-j}(\psi - {\Pi ^n} \psi )\Vert \le C_{1,j} \Vert \psi \Vert _j, \end{aligned}$$

and

$$\begin{aligned} \Vert h_n^{1/2-j}(\psi - \Pi ^n \psi )\Vert _{\mathcal {E}_n} \le C_{2,j} \Vert \psi \Vert _j. \end{aligned}$$

Below we shall summarize the notations of the various a posteriori error estimates to be developed in the subsequent error analysis.

4.1 \(L^{\infty }(L^2(\Omega ))\) a Posteriori Error Estimates

For \(n = 1,\ldots ,N\), we define the following estimators.

The Ritz–Volterra reconstruction error estimators

$$\begin{aligned} \eta _n^{RVH1}(v):= & {} C_1 h_n \Vert \mathfrak {R}^n(v)\Vert + C_2 h^{1/2}_n \Vert \mathfrak {J}^n[v]\Vert _{\mathcal {E}_n} \end{aligned}$$
(4.2)

and

$$\begin{aligned} \eta _n^{RVL2}(v):= & {} C_3 h_n^2 \Vert \mathfrak {R}^n(v)\Vert + C_4 h^{3/2}_n \Vert \mathfrak {J}^n[v]\Vert _{\mathcal {E}_n}, \end{aligned}$$
(4.3)

where \(\mathfrak {R}^n(v)\) and \(\mathfrak {J}^n[v]\) are given by (2.24) and (2.25), respectively and \(v \in \mathbb {V}^n\). Moreover, the constants \(C_i, i = 1, \ldots , 4\) appeared in different estimators are positive constants depend upon the interpolation constants and the final time T.

\(\eta _n^{T,Rec1}\) and \(\eta _n^{T,Rec2}\) are the time reconstruction error estimators and are defined by

$$\begin{aligned} \eta _n^{T,Rec1} := \tau ^2_n\Big [\eta _n^{RVL2}(\mathcal {W}_n) + \Vert \mathcal {W}_n\Vert \Big ] \end{aligned}$$
(4.4)

and

$$\begin{aligned} \eta _n^{T,Rec2} := \frac{\beta \tau ^2_n}{\sqrt{30}\alpha } \Big [\eta _n^{RVH1}(\mathcal {W}_n) + \Vert \mathcal {W}_n\Vert _1\Big ], \end{aligned}$$
(4.5)

where \(\eta _n^{RVH1}(\mathcal {W}_n)\) and \(\eta _n^{RVL2}(\mathcal {W}_n)\) are given by (4.2) and (4.3), respectively and \(\mathcal {W}_n\) is an a posteriori quantity given by

$$\begin{aligned} \mathcal {W}_n := \left[ \frac{1}{2}\bar{\partial }\mathcal {A}^n U^n - \frac{P^n_0\left( f^{n-1/2} - f^{n-1}\right) }{\tau _n} \right] . \end{aligned}$$
(4.6)

\(\eta _n^{T,QL}\) is the time estimator, which captures quadrature error and linear approximation errors, is defined by

$$\begin{aligned} \eta _n^{T,QL}:= & {} C_5 \left[ \theta _n + \Vert \hat{\mathcal {U}}_{I,1}(t) - \hat{\mathcal {U}}(t)\Vert +\Vert \hat{\mathcal {U}}(t) - \hat{\mathcal {U}}_{I,2}(t)\Vert \right] , \end{aligned}$$
(4.7)

where \(\hat{\mathcal {U}}(t)\), \(\hat{\mathcal {U}}_{I,1}(t)\) and \(\hat{\mathcal {U}}_{I,2}(t)\) are given by (2.20), (2.21) and (2.22), respectively, \(C_5 = \max \Big \{\frac{\gamma ''}{4}, \frac{\gamma '}{2}, 1\Big \}\) and \(\theta _{n}\) is given by

$$\begin{aligned} \theta _{n} := \sum _{j = 1}^{n} \tau _j^2 \Bigg [\tau _j \Vert \Delta ^n{U}^j\Vert + \tau _j\Vert \Delta ^n\partial {U}^{j}\Vert \Bigg ]. \end{aligned}$$
(4.8)

The spatial mesh change estimator \(\eta _n^{SM}\) and the spatial estimator \(\eta _n^{S}\) are defined by

$$\begin{aligned} \eta _n^{SM}:= & {} C_{6} C_{\Omega } \Bigg (\frac{\hat{\tau }_n}{\tau _n}\Bigg ) \Big [{h}^2_n \Vert \partial \mathfrak {R}^n(U)\Vert + {h}^{3/2}_n \Vert \partial \mathfrak {J}^n[U]\Vert _{\mathcal {E}_n} + \sum _{j = 0}^{n} \eta _j^{RVL2}(U) \Big ] \end{aligned}$$
(4.9)

and

$$\begin{aligned} \eta _n^{S}:= & {} \frac{\tau _n}{2} \eta _n^{RVL2}(\mathcal {W}_n) , \end{aligned}$$
(4.10)

where \(\eta _n^{RVL2}(U)\), \(\eta _n^{RVL2}(\mathcal {W}_n)\) are given by (4.3) and \(\hat{\tau }_n = \displaystyle {\max _{1 \le j \le n}} \tau _j\). \(C_{\Omega }\) and \(C_{6}\) are regularity constants.

$$\begin{aligned} \eta _{n}^{TL}:= & {} \Bigg (\frac{1}{\tau _n} \int _{t_{n-1}}^{t_n} \Vert \hat{\omega }(t) - \hat{\omega }_I(t)\Vert ^2 dt\Bigg )^{1/2} \end{aligned}$$
(4.11)

is the linear interpolation error estimator for the Volterra integral term, where \(\hat{\omega }(t)\) and \(\hat{\omega }_I(t)\) are given by (2.18) and (2.19), respectively.

$$\begin{aligned} \eta _n^{M}:= & {} C_{1,1} h_n \left[ \frac{1}{\sqrt{3}}\Vert (P^n_0 - I)\mathcal {A}^{n-1} U^{n-1}\Vert + \Vert (P^n_0 - I)\sigma ^{n}(\mathcal {B}^{n-1/2} U)\Vert \right. \nonumber \\&\left. +\,\tau ^{-1}_n \Vert (P^n_0 - I)U^{n-1}\Vert \right] \end{aligned}$$
(4.12)

is the mesh change estimator.

$$\begin{aligned} \eta _{n}^{D,1} := \frac{1}{\tau _n} \int _{t_{n-1}}^{t_n} \Vert f(t) - \varphi (t)\Vert dt \end{aligned}$$
(4.13)

and

$$\begin{aligned} \eta _{n}^{D,2} := 2C_{1,1} h_n \max \Big \{\Vert (I-P^n_0)f^{n-1}\Vert , \Vert (I-P^n_0)f^{n-1/2}\Vert \Big \} \end{aligned}$$
(4.14)

are the data approximation error estimators, where \(\varphi (t) := \hat{I}f(t)\) and \(\hat{I}\) is given by (3.3).

To prove the main result of this section, we shall first prove estimates for the Ritz–Volterra reconstruction error \(\epsilon \) and the parabolic error \(\hat{\rho }\).

4.2 A Posteriori Error Estimates for \(\epsilon \)

Below, we state the following a posteriori error estimates for the Ritz–Volterra reconstruction error. For a proof, we refer to Lemma 4.2 of [23].

Lemma 4.2

(Ritz–Volterra reconstruction error estimates) For any \(v \in \mathbb {V}^n\), the following estimates hold:

$$\begin{aligned} \Vert \mathcal {R}^n_w v -v\Vert _1 \le \eta _n^{RVH1}(v) \end{aligned}$$

and

$$\begin{aligned} \Vert \mathcal {R}^n_w v - v\Vert \le \eta _n^{RVL2}(v), \end{aligned}$$

where \(\eta _n^{RVH1}(v)\) and \(\eta _n^{RVL2}(v)\) are given by (4.2) and (4.3), respectively.

Next we proceed to estimate \(\hat{\rho }(t)\) which is a cumbersome task.

4.3 A Posteriori Error Estimates for \(\hat{\rho }(t)\)

Lemma 4.3

(A posteriori error estimate for the parabolic error) For each \(m \in [1:N]\), the following estimate holds for \(\hat{\rho }(t)\):

$$\begin{aligned}&\Bigg (\max _{t \in [0,t_m]}\Vert \hat{\rho }(t)\Vert ^2 + \frac{\alpha }{4} \int _{0}^{t_m}\Vert \hat{\rho }(t)\Vert ^2_1 dt\Bigg )^{1/2}\\&\quad \le \left[ \Vert \hat{\rho }(t_0)\Vert ^2 + C_7 \sum _{n = 1}^{m}\tau _n \Big (\eta _n^{T,Rec2}\Big )^2 \right] ^{1/2} + \Bigg (\Xi ^2_{1,m} + \Xi ^2_{2,m}\Bigg )^{1/2}, \end{aligned}$$

where \(\Xi ^2_{1,m}\) and \(\Xi ^2_{2,m}\) are the total estimators corresponding to the parabolic error \(\hat{\rho }(t)\) and are defined by

$$\begin{aligned} \Xi ^2_{1,m} := \Bigg ( C_7 \sum _{n = 1}^{m} \tau _n \Big [ \eta _n^{T,QL} + \eta ^{S}_n + \eta _n^{SM} + \eta _{n}^{D,1}\Big ] \Bigg )^{2} \end{aligned}$$
(4.15)

and

$$\begin{aligned} \Xi ^2_{2,m} := \frac{4(C_7)^2}{\alpha } \sum _{n = 1}^{m} \tau _n\Big [\eta _n^{M} + \eta _{n}^{TL} + \eta _{n}^{D,2}\Big ]^2. \end{aligned}$$
(4.16)

The estimators \(\eta _n^{T,Rec2}\), \(\eta _n^{T,QL}\), \(\eta ^{S}_n\), \(\eta _n^{SM}\), \(\eta _{n}^{D,1}\), \(\eta _n^{M}\), \(\eta _{n}^{TL}\) and \(\eta _{n}^{D,2}\) are given by (4.5), (4.7), (4.10), (4.9), (4.13), (4.12), (4.11) and (4.14), respectively. Moreover, \(C_7\) is a positive constant independent of the discretization parameters but depends upon the final time T.

The proof of the above lemma in turn depends on several auxiliary results which we shall discuss in detail below. We shall use the notation \(\rho (t)\) for the error \(u(t)-\mathcal {R}_w U(t)\) in the subsequent error analysis. We begin with the following error equation for \(\hat{\rho }(t)\).

Lemma 4.4

For \(t \in I_n, n \in [1:N]\) and for each \(\phi \in H^1_0(\Omega )\), we have the following error equation for \(\hat{\rho }(t)\):

$$\begin{aligned} \langle \hat{\rho }_t, \phi \rangle + a(\rho , \phi ) - \int _0^t b(t,s; \rho (s), \phi )ds = \langle G, \phi \rangle , \end{aligned}$$
(4.17)

where G is defined by

$$\begin{aligned}&\langle G, \phi \rangle := \langle G_1, \phi \rangle + (t - t_{n-1/2}) \langle \mathcal {Y}_n, \phi \rangle \end{aligned}$$

with

$$\begin{aligned} \langle G_1, \phi \rangle:= & {} \left\langle (P^n_0 - I)\left\{ l_{n-1}(t)\mathcal {A}^{n-1} U^{n-1} - \sigma ^{n}(\mathcal {B}^{n-1/2} U) - \tau ^{-1}_n U^{n-1}\right\} , \phi \right\rangle \\&+\,\langle (\mathcal {R}^n_w - I)(\hat{F}(t) - F^{n-1/2}), \phi \rangle + \langle \hat{\mathcal {U}}_{I,1}(t) - \hat{\mathcal {U}}(t), \phi \rangle + \langle \hat{\omega }(t) - \hat{\omega }_I(t), \nabla \phi \rangle \\&+\,\langle \hat{\mathcal {U}}(t) - \hat{\mathcal {U}}_{I,2}(t), \phi \rangle + \left\langle \int _{0}^{t_{n-1/2}} \mathcal {B}^{n-1/2}U(s)ds - \sigma ^{n}(\mathcal {B}^{n-1/2} U),\phi \right\rangle \\&+\,\langle \hat{F}(t) - \Theta (t) + f(t), \phi \rangle - \left\langle \tau ^{-1}_n\left[ (\mathcal {R}^n_w -I)U^n - (\mathcal {R}^{n-1}_w - I)U^{n-1}\right] , \phi \right\rangle \end{aligned}$$

and \(\mathcal {Y}_n\) is given by (2.23).

Proof

For \(t \in I_n\) and \(\forall \phi \in H^1_0(\Omega )\), we first multiply (3.5) by \(\phi \) and integrate over \(\Omega \). Then, subtract the resulting equation from (2.5) to obtain

$$\begin{aligned}&\langle \hat{\rho }_t(t), \phi \rangle + a(u(t), \phi ) - \int _0^t b(t,s; u(s), \phi )ds \\&\quad = \langle f,\phi \rangle + \langle \mathcal {R}^n_w \hat{F}(t), \phi \rangle - \tau ^{-1}_n \langle \mathcal {R}^n_w P^n_0 U^{n-1} - \mathcal {R}_w^{n-1} U^{n-1}, \phi \rangle . \end{aligned}$$

Using (2.17)–(2.19) and (2.14), we obtain

$$\begin{aligned}&\langle \hat{\rho }_t(t), \phi \rangle + a(\rho (t), \phi ) - \int _0^t b(t,s; \rho (s), \phi )ds\\&\quad = -l_{n-1}(t)\left[ \langle \mathcal {A}^{n-1} U^{n-1}, \phi \rangle - \left\langle \int _{0}^{t_{n-1}}\mathcal {B}^{n-1}(s) U(s)ds, \phi \right\rangle \right] \\&\quad -\,l_{n}(t)\left[ \langle \mathcal {A}^{n} U^{n}, \phi \rangle - \left\langle \int _{0}^{t_n} \mathcal {B}^{n}(s) U(s)ds, \phi \right\rangle \right] +\langle f(t),\phi \rangle + \langle \mathcal {R}^n_w \hat{F}(t), \phi \rangle \\&\quad -\,\tau ^{-1}_n \langle \mathcal {R}^n_w P^n_0 U^{n-1} - \mathcal {R}_w^{n-1} U^{n-1}, \phi \rangle + \langle \hat{\omega }(t) - \hat{\omega }_I(t), \nabla \phi \rangle , \end{aligned}$$

which together with (3.1) and (2.20)–(2.22) yields

$$\begin{aligned}&\langle \hat{\rho }_t(t), \phi \rangle + a(\rho (t), \phi ) - \int _0^t b(t,s; \rho (s), \phi )ds \nonumber \\&\quad = \left\langle (P^n_0 - I)\left\{ l_{n-1}(t)\mathcal {A}^{n-1} U^{n-1} - \sigma ^{n}(\mathcal {B}^{n-1/2} U) \right\} , \phi \right\rangle + \langle \hat{\mathcal {U}}_{I,1}(t) - \hat{\mathcal {U}}(t), \phi \rangle \nonumber \\&\quad +\,\langle \hat{\mathcal {U}}(t) - \hat{\mathcal {U}}_{I,2}(t), \phi \rangle + \left\langle \int _{0}^{t_{n-1/2}} \mathcal {B}^{n-1/2}U(s)ds - \sigma ^{n}(\mathcal {B}^{n-1/2} U),\phi \right\rangle \nonumber \\&\quad +\,(t - t_{n-1/2}) \langle \mathcal {Y}_n, \phi \rangle + \langle f(t),\phi \rangle + \langle \hat{\omega }(t) - \hat{\omega }_I(t), \nabla \phi \rangle \nonumber \\&\quad +\,\langle \mathcal {R}^n_w \hat{F}(t)-\Theta (t), \phi \rangle - \tau ^{-1}_n \langle \mathcal {R}^n_w P^n_0 U^{n-1} - \mathcal {R}_w^{n-1} U^{n-1}, \phi \rangle . \end{aligned}$$
(4.18)

For the last two terms on the right hand side of (4.18), an application of (2.26) yields

$$\begin{aligned}&\langle \mathcal {R}^n_w \hat{F}(t) - \Theta (t), \phi \rangle - \tau ^{-1}_n \langle \mathcal {R}^n_w P^n_0 U^{n-1} - \mathcal {R}_w^{n-1} U^{n-1}, \phi \rangle \nonumber \\&\quad = \langle (\mathcal {R}^n_w - I)(\hat{F}(t) - F^{n-1/2}), \phi \rangle + \langle \hat{F}(t) - \Theta (t), \phi \rangle \nonumber \\&\quad -\,\tau ^{-1}_n\langle (\mathcal {R}^n_w -I)U^n - (\mathcal {R}^{n-1}_w - I)U^{n-1}, \phi \rangle - \tau ^{-1}_n \langle P^n_0 U^{n-1} - U^{n-1}, \phi \rangle .\qquad \end{aligned}$$
(4.19)

Thus, the error equation (4.17) for \(\hat{\rho }(t)\) now follows from (4.18) and (4.19). \(\square \)

In view of the error equation obtained in the Lemma 4.4, the following lemma presents a clear picture of the terms to be estimated in order to obtain a bound on \(\hat{\rho }(t)\).

Lemma 4.5

The following estimate holds for \(\hat{\rho }(t)\)

$$\begin{aligned} \max _{t \in [0,t_m]} \Vert \hat{\rho }(t)\Vert ^2 + \frac{\alpha }{2} \int _{0}^{t_m} \Big [2\Vert \rho (t)\Vert ^2_1 + \Vert \hat{\rho }(t)\Vert ^2_1 \Big ]dt \le \Vert \hat{\rho }(0)\Vert ^2 + C_7 \mathcal {I}_m, \end{aligned}$$

where

$$\begin{aligned} \mathcal {I}_m:= & {} \sum _{n = 1}^{m}\Big (\mathcal {I}^{T,1}_n + \mathcal {I}^{T,2}_n + \mathcal {I}^{M,3}_n + \mathcal {I}^{S,4}_n + \mathcal {I}^{S,5}_n + \mathcal {I}^{D,6}_n\Big )\\:= & {} \mathcal {I}^1_m + \mathcal {I}^2_m + \mathcal {I}^3_m + \mathcal {I}^4_m + \mathcal {I}^5_m + \mathcal {I}^6_m \end{aligned}$$

with

$$\begin{aligned} \mathcal {I}^{T,1}_n:= & {} \int _{t_{n-1}}^{t_n} \Vert \hat{\rho }(t) - \rho (t)\Vert ^2_1 dt, \end{aligned}$$
(4.20)
$$\begin{aligned} \mathcal {I}^{T,2}_n:= & {} \int _{t_{n-1}}^{t_n} \Bigg [\left| \left\langle \int _{0}^{t_{n-1/2}} \mathcal {B}^{n-1/2}U(s)ds - \sigma ^{n}(\mathcal {B}^{n-1/2} U), \hat{\rho }(t) \right\rangle \right| \nonumber \\&+\,\left| \left\langle \hat{\mathcal {U}}_{I,1}(t) - \hat{\mathcal {U}}(t), \hat{\rho }(t) \right\rangle \right| +\left| \left\langle \hat{\mathcal {U}}(t) - \hat{\mathcal {U}}_{I,2}(t), \hat{\rho }(t) \right\rangle \right| \nonumber \\&+\,\left| \left\langle \hat{\omega }(t) - \hat{\omega }_I(t), \nabla \hat{\rho }(t) \right\rangle \right| \Bigg ]dt, \end{aligned}$$
(4.21)
$$\begin{aligned} \mathcal {I}^{M,3}_n:= & {} \int _{t_{n-1}}^{t_n} \Bigg [ \Big |\Big \langle (P^n_0 - I)\Big \{l_{n-1}(t)\mathcal {A}^{n-1} U^{n-1} - \sigma ^{n}(\mathcal {B}^{n-1/2} U)\nonumber \\&-\,\tau ^{-1}_n U^{n-1}\Big \}, \hat{\rho }(t) \Big \rangle \Big |\Bigg ]dt, \end{aligned}$$
(4.22)
$$\begin{aligned} \mathcal {I}^{S,4}_n:= & {} \int _{t_{n-1}}^{t_n} \Big |\Big \langle (\mathcal {R}^n_w - I)(\hat{F}(t) - F^{n-1/2}), \hat{\rho }(t)\Big \rangle \Big | dt, \end{aligned}$$
(4.23)
$$\begin{aligned} \mathcal {I}^{S,5}_n:= & {} \tau ^{-1}_n \int _{t_{n-1}}^{t_n}\Big | \Big \langle (\mathcal {R}^n_w -I)U^n - (\mathcal {R}^{n-1}_w - I)U^{n-1}, \hat{\rho }(t)\Big \rangle \Big |dt \end{aligned}$$
(4.24)

and

$$\begin{aligned} \mathcal {I}^{D,6}_n := \int _{t_{n-1}}^{t_n} \Big |\Big \langle \hat{F}(t) - \Theta (t) + f(t), \hat{\rho }(t) \Big \rangle \Big |dt. \end{aligned}$$
(4.25)

Proof

Set \(\phi = \hat{\rho }(t)\) in (4.17) to obtain

$$\begin{aligned} \frac{1}{2}\frac{d}{dt} \Vert \hat{\rho }(t)\Vert ^2 + a(\rho (t),\hat{\rho }(t)) = \int _0^t b(t,s; \rho (s), \hat{\rho }(t))ds + \langle G, \hat{\rho }(t) \rangle . \end{aligned}$$

We use the identity

$$\begin{aligned} a(\rho (t),\hat{\rho }(t)) = \frac{1}{2}a(\rho (t), \rho (t)) + \frac{1}{2}a(\hat{\rho }(t), \hat{\rho }(t)) - \frac{1}{2}a(\hat{\rho }(t) - \rho (t), \hat{\rho }(t) - \rho (t)) \end{aligned}$$

to have

$$\begin{aligned}&\frac{1}{2}\frac{d}{dt} \Vert \hat{\rho }(t)\Vert ^2 + \frac{1}{2}a(\rho (t), \rho (t)) +\, \frac{1}{2}a(\hat{\rho }(t), \hat{\rho }(t)) \\&\quad = \frac{1}{2}a(\hat{\rho }(t) - \rho (t), \hat{\rho }(t) - \rho (t)) + \langle G, \hat{\rho }(t) \rangle \\&\qquad +\, \int _0^t b(t,s; \rho (s), \hat{\rho }(t))ds . \end{aligned}$$

We use the coercivity of \(a(\cdot ,\cdot )\), and continuity of \(a(\cdot ,\cdot )\), \(b(t,s;\cdot ,\cdot )\) along with the Cauchy–Schwarz and Young’s inequalities, and integrate the resulting equation from \(t_{n-1}\) to \(t_n\) to obtain

$$\begin{aligned}&\frac{1}{2} \Big \{ \Vert \hat{\rho }(t_n)\Vert ^2 - \Vert \hat{\rho }(t_{n-1})\Vert ^2 \Big \} + \frac{\alpha }{2} \int _{t_{n-1}}^{t_n} \Vert \rho (t)\Vert ^2_1 dt + \frac{\alpha }{4} \int _{t_{n-1}}^{t_n} \Vert \hat{\rho }(t)\Vert ^2_1 dt\\&\quad \le \frac{\beta }{2} \int _{t_{n-1}}^{t_n} \Vert \hat{\rho }(t) - \rho (t)\Vert ^2_1 dt + C_8(T) \int _{t_{n-1}}^{t_n} \int _0^t \Vert \rho (s)\Vert ^2_1 dsdt + \int _{t_{n-1}}^{t_n} |\langle G_1, \hat{\rho }(t) \rangle |dt, \end{aligned}$$

where we have used the fact that

$$\begin{aligned} \int _{t_{n-1}}^{t_n} (t - t_{n-1/2}) dt = 0. \end{aligned}$$

We apply Gronwall’s lemma and take sum from \(n = 1:m\) to obtain the desired result with \(C_7 = \max \{\beta C_G(T),2C_G(T)\}\), where \(C_G(T) = \exp (T)\) is a Gronwall’s constant. \(\square \)

Now, we proceed to estimate the terms appeared in Lemma 4.5. We begin with by providing a posteriori error bounds on the time discretization error.

Lemma 4.6

(Time error estimators) The following a posteriori bounds hold for the time discretization error terms \(\mathcal {I}_m^1 \) and \(\mathcal {I}_m^2\):

$$\begin{aligned} \mathcal {I}_m^1 \le \sum _{n = 1}^{m} \tau _n \Big (\eta _n^{T,Rec2}\Big )^2 \end{aligned}$$
(4.26)

and

$$\begin{aligned} \mathcal {I}_m^2 \le \sum _{n = 1}^{m} \tau _n \max _{[0,t_m]} \Vert \hat{\rho }(t)\Vert \eta _n^{T,QL} + \sum _{n=1}^m \tau _n^{1/2} \eta _{n}^{TL} \bigg (\int _{t_{n-1}}^{t_n}\Vert \hat{\rho }(t)\Vert ^2_1dt \bigg )^{1/2}, \end{aligned}$$
(4.27)

where \(\eta _n^{T,Rec2}\), \(\eta _n^{T,QL}\) and \(\eta _{n}^{TL} \) are given by (4.5), (4.7) and (4.11), respectively.

Proof

We know that

$$\begin{aligned} \hat{\rho }(t) - \rho (t) = -(\widehat{U}(t) - \mathcal {R}_w U(t)). \end{aligned}$$
(4.28)

Thus, to estimate the term \(I_n^{T,1}\), we have to first estimate \(\widehat{U}(t) - \mathcal {R}_w U(t)\).

Using (2.17), (3.5) and (3.7), we have

$$\begin{aligned} \widehat{U}_t(t) - (\mathcal {R}_w U)_t(t)= & {} \mathcal {R}^n_w \Big [F^{n-1/2} - \hat{F}(t)\Big ]. \end{aligned}$$

We integrate from \(t_{n-1}\) to t and use the fact that \(\widehat{U}(t)\) coincides with \(\mathcal {R}_w U(t)\) at \(t=t_{n-1}\) to obtain

$$\begin{aligned} \widehat{U}(t) - \mathcal {R}_w U(t)= & {} -\mathcal {R}^n_w \int _{t_{n-1}}^{t} \Big \{\hat{F}(s) - F^{n-1/2}\Big \}ds. \end{aligned}$$
(4.29)

Using (3.1), (3.2) and the identity \(l_{n-1}(t) + l_n(t) = 1,\, t \in I_n\), we have

$$\begin{aligned} \hat{F}(t) - F^{n-1/2}= & {} \Theta (t) - \Theta (t_{n-1/2}) - P^n_0[\varphi (t) - \varphi (t_{n-1/2})]\nonumber \\= & {} 2(t-t_{n-1/2})\mathcal {W}_n, \end{aligned}$$
(4.30)

where \(\mathcal {W}_n\) is given by (4.6).

Substituting (4.30) in (4.29), we obtain

$$\begin{aligned} \widehat{U}(t) - \mathcal {R}_w U(t) = (t_n - t)(t - t_{n-1})\mathcal {R}^n_w \mathcal {W}_n. \end{aligned}$$
(4.31)

Using the coercivity and the continuity of the bilinear form \(a(\cdot ,\cdot )\), it follows that

$$\begin{aligned} \alpha \Vert \hat{\rho }(t) - \rho (t)\Vert _1^2\le & {} a(\hat{\rho }(t) - \rho (t),\hat{\rho }(t) - \rho (t))\\\le & {} (t_n - t)(t - t_{n-1}) \beta \Vert \mathcal {R}^n_w \mathcal {W}_n\Vert _1\Vert \hat{\rho }(t) - \rho (t)\Vert _1, \end{aligned}$$

where we have used (4.28) and (4.31).

Thus, using (4.2) we deduce that

$$\begin{aligned} \Vert \hat{\rho }(t) - \rho (t)\Vert _1 \le \frac{\beta (t_n - t)(t - t_{n-1})}{\alpha } \Big [ \eta _n^{RVH1}(\mathcal {W}_n) +\Vert \mathcal {W}_n\Vert _1\Big ]. \end{aligned}$$
(4.32)

Finally, with an aid of (4.32), we obtain

$$\begin{aligned} \mathcal {I}^{T,1}_n := \int _{t_{n-1}}^{t_n} \Vert \hat{\rho }(s) - \rho (s)\Vert ^2_1 ds \le \frac{\beta ^2\tau ^5_n}{30\alpha ^2} \Big [\eta _n^{RVH1}(\mathcal {W}_n) + \Vert \mathcal {W}_n\Vert _1\Big ]^2. \end{aligned}$$
(4.33)

Thus, the first inequality (4.26) follows by taking summation over n and using (4.5).

Next, to prove the inequality (4.27), we first note that

$$\begin{aligned} \mathcal {I}^{T,2}_n:= & {} \int _{t_{n-1}}^{t_n} \Bigg [\Big | \Big \langle \int _{0}^{t_{n-1/2}} \mathcal {B}^{n-1/2}U(s)ds - \sigma ^{n}(\mathcal {B}^{n-1/2} U), \hat{\rho }(t) \Big \rangle \Big | + \Big | \langle \hat{\mathcal {U}}_{I,1}(t) - \hat{\mathcal {U}}(t), \hat{\rho }(t) \rangle \Big |\\&+\,\Big | \langle \hat{\mathcal {U}}(t) - \hat{\mathcal {U}}_{I,2}(t), \hat{\rho }(t) \rangle \Big | + \left| \langle \hat{\omega }(t) - \hat{\omega }_I(t), \nabla \hat{\rho }(t) \rangle \right| \Bigg ]dt, \\:= & {} \int _{t_{n-1}}^{t_n} \Big [|\mathcal {J}_1| + |\mathcal {J}_2| + |\mathcal {J}_3| + |\mathcal {J}_4|\Big ]dt. \end{aligned}$$

We start with estimating the term \(\mathcal {J}_1\). A standard Trapezoidal rule argument for a sufficiently smooth function g(s) yields

$$\begin{aligned} \int _{a}^{b} g(s)ds - \frac{(b-a)}{2}(g(a) + g(b))= & {} \frac{1}{2}\int _{a}^{b} (s - a)(s - b)g''(s)ds. \end{aligned}$$

If we define

$$\begin{aligned} \psi _{2j}(s) := \left\{ \begin{array}{ll} (s - t_{j-1})(s - t_{j}) &{} \quad \text {for} \; s \in [t_{j-1}, t_{j}] \;\;\text {and}\;\; 1 \le j \le n-1, \\ (s - t_{j-1})(s - t_{j-1/2}) &{}\quad \text {for} \;\; s \in [t_{j-1}, t_{j-1/2}]\;\; \text {and}\;\; j = n, \end{array} \right. \end{aligned}$$

then

$$\begin{aligned} \int _{ t_{j-1}}^{t_j} g(s) ds - \frac{\tau _j }{2}[g(t_j) + g(t_{j-1})] = \frac{1}{2} \int _{t_{j-1}}^{t_j} \psi _{2j}(s) g''(s)ds \end{aligned}$$
(4.34)

and

$$\begin{aligned} \int _{ t_{n-1}}^{t_{n-1/2}} g(s) ds - \frac{\tau _n}{4}[g(t_{n-1}) + g(t_{n-1/2})] = \frac{1}{2} \int _{t_{n-1}}^{t_{n-1/2}} \psi _{2n}(s) g''(s)ds. \end{aligned}$$
(4.35)

Using (2.6), (2.12), (4.34) and (4.35), we obtain

$$\begin{aligned}&\int _{0}^{t_{n-1/2}} \langle \mathcal {B}^{n-1/2}(s)U(s)ds, \hat{\rho }(t) \rangle - \langle \sigma ^{n}(\mathcal {B}^{n-1/2} U), \hat{\rho }(t) \rangle \nonumber \\&\quad = \frac{1}{2}\left\langle \sum _{j = 1}^{n-1} \int _{t_{j-1}}^{t_j} \psi _{2j}(s) \frac{d^2}{ds^2}\big \{\mathcal {B}^{n-1/2}(s)U(s)\big \}ds\right. \nonumber \\&\quad \left. +\, \int _{t_{n-1}}^{t_{n-1/2}} \psi _{2n}(s) \frac{d^2}{ds^2}\big \{ \mathcal {B}^{n-1/2}(s)U(s)\big \}ds, \hat{\rho }(t) \right\rangle \nonumber \\&\quad = \frac{1}{2} \left\langle \sum _{j = 1}^{n-1} \int _{t_{j-1}}^{t_j} \psi _{2j}(s) \Bigg \{ \frac{d^2(\mathcal {B}^{n-1/2}(s))}{ds^2} {U}(s) + \frac{2 d(\mathcal {B}^{n-1/2}(s))}{ds} \frac{d({U}(s))}{ds} \Bigg \}ds \right. \nonumber \\&\quad \left. +\, \int _{t_{n-1}}^{t_{n-1/2}} \psi _{2n}(s) \Bigg \{ \frac{d^2(\mathcal {B}^{n-1/2}(s))}{ds^2} {U}(s) + \frac{2d(\mathcal {B}^{n-1/2}(s))}{ds} \frac{d({U}(s))}{ds} \Bigg \}ds , \hat{\rho }(t) \right\rangle \nonumber \\&\quad \le \, \frac{1}{2} \Bigg \{ \sum _{j = 1}^{n-1} \tau _j^2 \Bigg [\frac{\gamma ''}{2} \tau _j\Big (\Vert \Delta ^n{U}^{j-1}\Vert + \Vert \Delta ^n{U}^j\Vert \Big ) + 2\gamma '\tau _j\Vert \Delta ^n \partial {U}^{j}\Vert \Bigg ]\nonumber \\&\quad +\, \tau _n^2 \Bigg [\frac{\gamma ''}{2} \tau _n\Big (\Vert \Delta ^n{U}^{n-1}\Vert + \Vert \Delta ^n{U}^n\Vert \Big ) + 2 \gamma '\tau _n\Vert \Delta ^n \partial {U}^{n}\Vert \Bigg ] \Bigg \}\Vert \hat{\rho }(t)\Vert \nonumber \\&\quad \le \bar{\gamma } \theta _{n} \Vert \hat{\rho }(t)\Vert , \end{aligned}$$
(4.36)

where \(\theta _n\) is given by (4.8) and \(\bar{\gamma } = \max \bigg \{\frac{\gamma ''}{4}, \frac{\gamma '}{2} \bigg \}\).

Thus, in view of (4.36) we have the following bound on \(\mathcal {J}_1\)

$$\begin{aligned} |\mathcal {J}_1|\le & {} \bar{\gamma } \theta _{n} \Vert \hat{\rho }(t)\Vert . \end{aligned}$$

Moreover, an application of Cauchy–Schwarz inequality gives

$$\begin{aligned} |\mathcal {J}_2|\le & {} \Vert \hat{\mathcal {U}}_{I,1}(t) - \hat{\mathcal {U}}(t)\Vert \Vert \hat{\rho }(t)\Vert ,\\ |\mathcal {J}_3|\le & {} \Vert \hat{\mathcal {U}}(t) - \hat{\mathcal {U}}_{I,2}(t)\Vert \Vert \hat{\rho }(t)\Vert \end{aligned}$$

and

$$\begin{aligned} |\mathcal {J}_4| \le \Vert \hat{\omega }(t) - \hat{\omega }_I(t) \Vert \Vert \nabla \hat{\rho }(t)\Vert . \end{aligned}$$

We now combine the bounds on \(|\mathcal {J}_1|\), \(|\mathcal {J}_2|\), \(|\mathcal {J}_3|\) and \(|\mathcal {J}_4|\) to obtain

$$\begin{aligned} \mathcal {I}^{T,2}_n\le & {} \int _{t_{n-1}}^{t_n} \Bigg [\bar{\gamma }\theta _n + \Vert \hat{\mathcal {U}}_{I,1}(t) - \hat{\mathcal {U}}(t)\Vert +\Vert \hat{\mathcal {U}}(t) - \hat{\mathcal {U}}_{I,2}(t)\Vert \Bigg ] \Vert \hat{\rho }(t)\Vert dt\\&+ \Bigg (\int _{t_{n-1}}^{t_n} \Vert \hat{\omega }(t) - \hat{\omega }_I(t)\Vert ^2 dt\Bigg )^{1/2} \bigg (\int _{t_{n-1}}^{t_n}\Vert \hat{\rho }(t)\Vert ^2_1dt \bigg )^{1/2}. \end{aligned}$$

Thus,

$$\begin{aligned} \mathcal {I}^{T,2}_n\le & {} \tau _n \max _{[0,t_m]} \Vert \hat{\rho }(t)\Vert \eta _n^{T,QL} + \tau _n^{1/2} \eta _{n}^{TL} \bigg (\int _{t_{n-1}}^{t_n}\Vert \hat{\rho }(t)\Vert ^2_1dt \bigg )^{1/2}, \end{aligned}$$

where \(\eta _n^{T,QL}\), \(\eta _{n}^{TL} \) are given by (4.7), (4.11), respectively and \(C_5 := \max \{\bar{\gamma },1\}\). The desired estimate now follows by taking summation over n. \(\square \)

The next lemma gives information on the a posteriori contributions due to mesh change.

Lemma 4.7

(Mesh change estimate) We have the following bound on the mesh change error term \(\mathcal {I}_m^3\):

$$\begin{aligned} \mathcal {I}_m^3 \le \sum _{n = 1}^{m}\tau ^{1/2}_n \eta _n^{M} \Bigg (\int _{t_{n-1}}^{t_n} \Vert \hat{\rho }(t)\Vert ^2_1dt\Bigg )^{1/2}, \end{aligned}$$
(4.37)

where \(\eta _n^{M}\) is given by (4.12).

Proof

The orthogonality property of \(P_0^n\) now leads to

$$\begin{aligned}&\int _{t_{n-1}}^{t_n} \Bigg \{ \Big \langle (P^n_0 - I)\Big (l_{n-1}(t)\mathcal {A}^{n-1} U^{n-1} - \sigma ^{n}(\mathcal {B}^{n-1/2} U) - \tau ^{-1}_n U^{n-1}\Big ), \hat{\rho }(t) \Big \rangle \Bigg \}dt\\&\quad = \int _{t_{n-1}}^{t_n} \Bigg \{ \Big \langle (P^n_0 - I)\Big (l_{n-1}(t)\mathcal {A}^{n-1} U^{n-1} - \sigma ^{n}(\mathcal {B}^{n-1/2} U) - \tau ^{-1}_n U^{n-1}\Big ), \hat{\rho }(t) - \Pi ^n \hat{\rho }(t) \Big \rangle \Bigg \}dt. \end{aligned}$$

An application of the Cauchy–Schwarz inequality yields

$$\begin{aligned} \mathcal {I}^{M,3}_n\le & {} C_{1,1} h_n \Bigg \{ \Big (\int _{t_{n-1}}^{t_n} l^2_{n-1}(t) dt \Big )^{1/2} \Vert (P^n_0 - I)\mathcal {A}^{n-1} U^{n-1}\Vert \\&+\,\tau ^{1/2}_n\Vert (P^n_0 - I)\sigma ^{n}(\mathcal {B}^{n-1/2} U)\Vert \\&+\,\tau ^{-1/2}_n \Vert (P^n_0 - I)U^{n-1}\Vert \Bigg \} \Big (\int _{t_{n-1}}^{t_n}\Vert \hat{\rho }(t)\Vert ^2_1 dt\Big )^{1/2} \\\le & {} \tau ^{1/2}_n \eta _n^{M} \Big (\int _{t_{n-1}}^{t_n}\Vert \hat{\rho }(t)\Vert ^2_1 dt\Big )^{1/2}, \end{aligned}$$

where \(\eta _n^{M}\) is given by (4.12). Taking summation over n we complete the proof. \(\square \)

The next lemma captures contributions due to the spatial discretizations.

Lemma 4.8

(Spatial error estimates) The following a posteriori error bound holds on the spatial discretization error term \(\mathcal {I}_m^4\):

$$\begin{aligned} \mathcal {I}_m^4 \le \sum _{n = 1}^{m} \tau _n \max _{[0,t_m]} \Vert \hat{\rho }(t)\Vert \eta _n^{S}, \end{aligned}$$
(4.38)

where \(\eta _n^{S}\) is given by (4.10). Moreover, the error bound holds for \(\mathcal {I}_m^5\) corresponds to the spatial discretization error due to mesh change:

$$\begin{aligned} \mathcal {I}_m^5 \le \max _{t \in [0,t_m]} \Vert \hat{\rho }(t)\Vert \sum _{n=1}^m \tau _n\eta _n^{SM}, \end{aligned}$$
(4.39)

where \(\eta _n^{SM}\) is given by (4.9).

Proof

Using (4.30) and (4.3), we have

$$\begin{aligned} \int _{t_{n-1}}^{t_n} \Big |\Big \langle (\mathcal {R}^n_w - I) (\hat{F}(t) - F^{n-1/2}), \hat{\rho }(t)\Big \rangle \Big |dt \le \frac{\tau _n^2}{2}\max _{[0,t_m]} \Vert \hat{\rho }(t)\Vert \eta _n^{RVL2}(\mathcal {W}_n). \end{aligned}$$

Hence, we obtain

$$\begin{aligned} \mathcal {I}^{S,4}_n \le \tau _n \max _{[0,t_m]} \Vert \hat{\rho }(t)\Vert \eta _n^{S}, \end{aligned}$$
(4.40)

where \(\eta _n^{S}\) is given by (4.10) and the estimate (4.38) follows by taking the summation over n.

Next, to estimate \(\mathcal {I}^{S,5}_n\) as given in (4.24), we exploit the orthogonality property of the Ritz–Volterra reconstructions. We use the standard duality technique here.

For \(t \in (0,T)\), let \(\psi \in H^2({\Omega })\cap H^1_0(\Omega )\) be the solution of the following elliptic problem in the weak form

$$\begin{aligned} a(\chi , \psi (t)) = \langle \chi , \hat{\rho }(t)\rangle ,\;\; \forall \chi \in H^1_0(\Omega ) \end{aligned}$$
(4.41)

satisfying the following regularity estimate:

$$\begin{aligned} \Vert \psi (t)\Vert _2 \le C_{\Omega } \Vert \hat{\rho }(t)\Vert , \end{aligned}$$
(4.42)

where the constant \(C_{\Omega }\) depends on the domain \(\Omega \).

Setting \(\chi = \mathcal {R}^n_w U^n - \mathcal {R}^{n-1}_w U^{n-1} - U^n + U^{n-1}\) in (4.41) and using (2.14), (2.7) and (2.9), we obtain

$$\begin{aligned}&\langle \mathcal {R}^n_w U^n - \mathcal {R}^{n-1}_w U^{n-1} - U^n + U^{n-1}, \hat{\rho }(t) \rangle \\&\quad = a(\mathcal {R}^n_w U^n - \mathcal {R}^{n-1}_w U^{n-1} - U^n + U^{n-1}, \psi (t) - {\Pi }^{n} \psi (t)) \\&\quad - \int _{0}^{t_n} b(t_n,s; (\mathcal {R}^n_w U - U)(s), \psi (t) - {\Pi }^{n} \psi (t)) ds\\&\quad + \int _{0}^{t_{n-1}} b(t_{n-1},s; (\mathcal {R}^{n-1}_w U - U)(s), \psi (t) - {\Pi }^{n} \psi (t)) ds \\&\quad + \int _{0}^{t_n} b(t_n,s; (\mathcal {R}^n_w U - U)(s), \psi (t)) ds - \int _{0}^{t_{n-1}} b(t_{n-1},s; (\mathcal {R}^{n-1}_w U - U)(s), \psi (t)) ds\\&\quad = \left\langle \mathcal {A}^n U^n - \int _{0}^{t_n} \mathcal {B}^n(s) U(s) ds - \mathcal {A}_{el} U^n + \int _{0}^{t_n} \mathcal {B}_{el}(t_n,s)U(s) ds, \psi (t) - {\Pi }^{n} \psi (t) \right\rangle \\&\quad - \left\langle \mathcal {A}^{n-1} U^{n-1} - \int _{0}^{t_{n-1}} \mathcal {B}^{n-1}(s)U(s)ds - \mathcal {A}_{el} U^{n-1} \right. \\&\quad + \left. \int _{0}^{t_{n-1}} \mathcal {B}_{el}(t_{n-1},s)U(s)ds, \psi (t) -{\Pi }^{n} \psi (t) \right\rangle \\&\quad + \left\langle \int _{0}^{t_n} J_2[U(s)] ds - J_1[U^n] - \int _{0}^{t_{n-1}} J_2[U(s)] ds + J_1[U^{n-1}], \psi (t) - {\Pi }^{n} \psi (t)\right\rangle _{{\Sigma }_n} \\&\quad + \int _{0}^{t_n} b(t_n,s; (\mathcal {R}^n_w U - U)(s), \psi (t)) ds - \int _{0}^{t_{n-1}} b(t_{n-1},s; (\mathcal {R}^{n-1}_w U - U)(s), \psi (t)) ds. \end{aligned}$$

We now use (2.24) and (2.25) together with \(\mathfrak {R}^n(U) - \mathfrak {R}^{n-1}(U) = \tau _n \partial \mathfrak {R}^n(U)\) and \(\mathfrak {J}^n[U] - \mathfrak {J}^{n-1}[U] = \tau _n \partial \mathfrak {J}^n[U]\) to obtain

$$\begin{aligned}&\left| \langle \mathcal {R}^n_w U^n - \mathcal {R}^{n-1}_w U^{n-1} - U^n + U^{n-1}, \hat{\rho }(t) \rangle \right| \nonumber \\&\quad \le \tau _n\Vert \partial \mathfrak {R}^n(U)\Vert \Vert \psi (t) - {\Pi }^{n} \psi (t)\Vert + \tau _n \Vert \partial \mathfrak {J}^n[U]\Vert _{{\Sigma }_n}\Vert \psi (t) - {\Pi }^{n} \psi (t) \Vert _{\mathcal {E}_n} \nonumber \\&\quad +\,\left| \int _{0}^{t_n} b(t_n,s; (\mathcal {R}^{n}_w U - U)(s), \psi (t)) ds - \int _{0}^{t_{n-1}} b(t_{n-1},s; (\mathcal {R}^{n-1}_w U - U)(s), \psi (t)) ds\right| .\nonumber \\ \end{aligned}$$
(4.43)

For the last term in the above, we use the fact

$$\begin{aligned} b(t_n,s;(\mathcal {R}^{n}_w U - U)(s),\psi (t)) := \langle (\mathcal {R}^{n}_w U - U)(s),\mathcal {B}^*(t_n,s) \psi (t)\rangle , \end{aligned}$$
(4.44)

where \(\mathcal {B}^*(t_n,s)\) is the formal adjoint of the operator \(\mathcal {B}(t_n,s)\) and then apply the Cauchy–Schwarz inequality together with \(\Vert \mathcal {B}^*(t_n,s) \psi (t) \Vert \le C_{\mathcal {B}^*_1}\Vert \psi (t)\Vert _2\) to obtain

$$\begin{aligned}&\Big |\int _{0}^{t_n} b(t_n,s; (\mathcal {R}^{n}_w U - U)(s), \psi (t)) ds - \int _{0}^{t_{n-1}} b(t_{n-1},s; (\mathcal {R}^{n-1}_w U - U)(s),\psi (t)) ds\Big | \nonumber \\&\quad \le \Big |\int _{0}^{t_n} \langle (\mathcal {R}^{n}_w U - U)(s) , \mathcal {B}^*(t_n,s)\psi (t) \rangle ds \nonumber \\&\qquad - \int _{0}^{t_{n-1}} \langle (\mathcal {R}^{n-1}_w U - U)(s) , \mathcal {B}^*(t_{n-1},s)\psi (t) \rangle ds\Big |\nonumber \\&\quad \le \Big \Vert \int _{0}^{t_n} (\mathcal {R}^{n}_w U - U)(s) \Big \Vert \Vert \mathcal {B}^*(t_{n},s)\psi (t)\Vert ds \nonumber \\&\quad +\Big \Vert \int _{0}^{t_{n-1}} (\mathcal {R}^{n-1}_w U - U)(s)\Big \Vert \Vert \mathcal {B}^*(t_{n-1},s)\psi (t)\Vert ds\nonumber \\&\quad \le 2C_{\mathcal {B}^*_1} \bigg \{ \Big \Vert \sum _{j = 1}^{n} \int _{t_{j-1}}^{t_j}\bigg ( l_{j-1}(s)(\mathcal {R}^{j-1}_w U^{j-1} -U^{j-1})+ l_{j}(s)(\mathcal {R}^{j}_w U^{j} - U^{j}) \bigg )ds\Big \Vert \Bigg \} \Vert \psi (t)\Vert _2\nonumber \\&\quad \le C_{\mathcal {B}^*_1} \Big \{ \hat{\tau }_n \sum _{j = 1}^{n} \eta ^{RVL2}_j(U) + \hat{\tau }_{n-1} \sum _{j = 0}^{n-1} \eta ^{RVL2}_j(U) \Big \} \Vert \psi (t)\Vert _2\nonumber \\&\le 2C_{\mathcal {B}^*_1} \hat{\tau }_n \Big \{\sum _{j = 0}^{n} \eta ^{RVL2}_j(U) \Big \} \Vert \psi (t)\Vert _2, \end{aligned}$$
(4.45)

where \(\hat{\tau }_n = \displaystyle {\max _{1 \le j \le n}} \tau _j\) and we used (2.16). Using (4.45) in (4.43) and applying Proposition 4.1 with \(C_{6} = \max \Big (2C_{\mathcal {B}^*_1}, 1\Big )\), we obtain

$$\begin{aligned}&\left| \langle \mathcal {R}^n_w U^n - \mathcal {R}^{n-1}_w U^{n-1} - U^n + U^{n-1}, \hat{\rho }(t) \rangle \right| \nonumber \\&\quad \le C_6 \Vert \psi \Vert _2 \Bigg \{\hat{\tau }_n \bigg ({h}^2_n \Vert \partial \mathfrak {R}^n(U)\Vert + {h}^{3/2}_n \Vert \partial \mathfrak {J}^n[U]\Vert _{\mathcal {E}_n} + \sum _{j = 0}^{n} \eta ^{RVL2}_j(U)\bigg )\Bigg \}. \end{aligned}$$
(4.46)

Combining (4.24) and (4.46), we arrive at

$$\begin{aligned} \mathcal {I}^{S,5}_n\le & {} C_6 \tau _n^{-1} \int _{t_{n-1}}^{t_n} \Vert \psi (t)\Vert _2 dt \; \Bigg \{\hat{\tau }_n \bigg ({h}^2_n \Vert \partial \mathfrak {R}^n(U)\Vert + {h}^{3/2}_n \Vert \partial \mathfrak {J}^n[U]\Vert _{\mathcal {E}_n} + \sum _{j = 0}^{n} \eta ^{RVL2}_j(U)\bigg )\Bigg \}\\\le & {} \max _{t \in I_n} \Vert \hat{\rho }(t)\Vert \tau _n \eta _n^{SM}, \end{aligned}$$

where we have used (4.9) and the regularity result (4.42). Summing from \(n = 1:m\), the desired result is obtained. \(\square \)

The data approximation error is estimated in the following lemma.

Lemma 4.9

(Data approximation error estimate) The following bound holds on the data approximation error term \(\mathcal {I}_m^6\)

$$\begin{aligned} \mathcal {I}_m^6 \le \sum _{n = 1}^{m} \Bigg \{\tau _n \eta _{n}^{D,1} \max _{t \in [0,t_m]} \Vert \hat{\rho }(t)\Vert + \tau _n^{1/2} \eta _{n}^{D,2}\Bigg (\int _{t_{n-1}}^{t_n} \Vert \hat{\rho }(t)\Vert ^2_1 dt\Bigg )^{1/2}\Bigg \}, \end{aligned}$$
(4.47)

where \(\eta _{n}^{D,1}\) and \(\eta _{n}^{D,2}\) are given by (4.13) and (4.14).

Proof

In view of (3.1) and (3.2), we have

$$\begin{aligned} \mathcal {I}^{D,6}_n:= & {} \int _{t_{n-1}}^{t_n} \Big |\Big \langle \hat{F}(t) - \Theta (t) + f(t), \hat{\rho }(t) \Big \rangle \Big |dt = \int _{t_{n-1}}^{t_n} \Big |\Big \langle f(t) - P^n_0\varphi (t), \hat{\rho }(t) \Big \rangle \Big |dt \\\le & {} \int _{t_{n-1}}^{t_n} \Big |\Big \langle f(t) - \varphi (t), \hat{\rho }(t) \Big \rangle \Big |dt + \int _{t_{n-1}}^{t_n} \Big |\Big \langle (I-P^n_0)\varphi (t), \hat{\rho }(t) \Big \rangle \Big |dt \\:= & {} \mathfrak {J}_1 + \mathfrak {J}_2. \end{aligned}$$

Using the Cauchy–Schwarz inequality, we obtain

$$\begin{aligned} \mathfrak {J}_1 \le \max _{t \in [0,t_m]} \Vert \hat{\rho }(t)\Vert \int _{t_{n-1}}^{t_n} \Vert f(t) - \varphi (t)\Vert dt. \end{aligned}$$

For \(\mathfrak {J}_2\), we use orthogonality property of \(P^n_0\) to have

$$\begin{aligned} \mathfrak {J}_2= & {} \int _{t_{n-1}}^{t_n} \Big |\Big \langle (I-P^n_0)\varphi (t), \hat{\rho }(t) \Big \rangle \Big |dt = \int _{t_{n-1}}^{t_n} \Big |\Big \langle (I-P^n_0)\varphi (t), \hat{\rho }(t) - \Pi ^n \hat{\rho }(t) \Big \rangle \Big |dt\\\le & {} C_{1,1} h_n\int _{t_{n-1}}^{t_n}\Vert (I-P^n_0)\varphi (t)\Vert \Vert \hat{\rho }(t)\Vert _1dt \\\le & {} 2 C_{1,1} h_n\tau ^{1/2}_n\max \Big \{\Vert (I-P^n_0)f^{n-1}\Vert , \Vert (I-P^n_0)f^{n-1/2}\Vert \Big \} \Bigg (\int _{t_{n-1}}^{t_n} \Vert \hat{\rho }(t)\Vert ^2_1 dt\Bigg )^{1/2}. \end{aligned}$$

Therefore,

$$\begin{aligned} \mathcal {I}^{D,6}_n \le \tau _n \eta _{n}^{D,1} \max _{t \in [0,t_m]} \Vert \hat{\rho (t)}\Vert + \tau _n^{1/2} \eta _{n}^{D,2}\Bigg (\int _{t_{n-1}}^{t_n} \Vert \hat{\rho }(t)\Vert ^2_1 dt\Bigg )^{1/2}, \end{aligned}$$

where \(\eta _{n}^{D,1}\) and \(\eta _{n}^{D,2}\) are given by (4.13) and (4.14), respectively. Now, taking summation over n, we obtain the desired result. \(\square \)

Proof of Lemma 4.3

Application of Lemmas 4.64.9 in Lemma 4.5 yields

$$\begin{aligned}&\max _{t \in [0,t_m]} \Vert \hat{\rho }(t)\Vert ^2 + \frac{\alpha }{2} \int _{0}^{t_m} \Big (2\Vert \rho (t)\Vert ^2_1 + \Vert \hat{\rho }(t)\Vert ^2_1 \Big )dt \\&\quad \le \Vert \hat{\rho }(0)\Vert ^2 + C_7 \bigg \{ \sum _{n = 1}^{m}\tau _n \Big (\eta _n^{T,Rec2}\Big )^2 \\&\qquad + \max _{t \in [0,t_m]} \Vert \hat{\rho }(t)\Vert \sum _{n = 1}^{m} \tau _n \Big (\eta _n^{T,QL} + \eta ^S_n + \eta _n^{SM} + \eta _{n}^{D,1}\Big ) \\&\qquad + \sum _{n = 1}^{m} \tau ^{1/2}_n \Big (\eta _n^{M} + \eta _{n}^{D,2} + \eta _{n}^{TL} \Big ) \Big (\int _{t_{n-1}}^{t_n} \Vert \hat{\rho }(t)\Vert ^2_1 dt\Big )^{1/2} \bigg \}, \end{aligned}$$

We now use the following elementary fact to complete the proof. For \(a = (a_0, a_1, \ldots , a_m)\), \(b = (b_0, b_1, \ldots , b_m) \in \mathbb {R}^{m+1}\) and \(c \in \mathbb {R}\), if \(|a|^2 \le c^2 + a.b,\) then \(|a| \le |c| + |b|.\)

In particular for \(n = [1:m]\), taking

$$\begin{aligned} a_0= & {} \max _{t \in [0,t_m]} \Vert \hat{\rho }(t)\Vert ,\;\; a_n = \bigg (\frac{\alpha }{2} \int _{t_{n-1}}^{t_n} \Vert \hat{\rho }(t)\Vert ^2_1 dt \bigg )^{1/2},\;\;\; \\ c= & {} \Big ( \Vert \hat{\rho }(t_0)\Vert ^2 + C_7 \sum _{n = 1}^{m}\tau _n \Big (\eta _n^{T,Rec2}\Big )^2\Big )^{1/2},\\ b_0= & {} C_7 \sum _{n = 1}^{m} \tau _n \Big ( \eta _n^{T,QL} + \eta ^S_n + \eta _n^{SM} + \eta _{n}^{D,1}\Big ),\; \;\; b_n = C_7 {(2\tau _n/\alpha )}^{1/2} \Big (\eta _n^{M} + \eta _{n}^{TL} + \eta _{n}^{D,2}\Big ), \end{aligned}$$

we obtain the desired result. \(\square \)

4.4 The Main Theorem

Now, we state the main result of this section concerning a posteriori error estimate for the fully discrete Crank–Nicolson scheme in the \(L^{\infty }(L^2)\)-norm.

Theorem 4.10

(\(L^{\infty }(L^2)\)a posteriori error estimate) Let u(t) be the exact solution of (1.1), and let U(t) be as defined in (2.12). Then, for each \(m \in [1:N]\), the following error estimate hold:

$$\begin{aligned} \max _{t \in [0,t_m]}\Vert u(t) - U(t)\Vert\le & {} \Big [\Vert \hat{\rho }(t_0)\Vert ^2 + C_7 \sum _{n = 1}^{m}\tau _n \Big (\eta _n^{T,Rec2}\Big )^2 \Big ]^{1/2} + \Bigg (\Xi ^2_{1,m} + \Xi ^2_{2,m}\Bigg )^{1/2}\\&+ \max _{0 \le n \le m} \eta _n^{RVL2}(U) + \max _{0 \le n \le m}\eta _n^{T,Rec1}, \end{aligned}$$

where \(\eta _n^{T,Rec2}\), \(\eta _n^{RVL2}(U)\), \(\eta _n^{T,Rec1}\), \(\Xi ^2_{1,m}\) and \(\Xi ^2_{2,m}\) are given by (4.5), (4.3), (4.4), (4.15) and (4.16), respectively. Moreover, the constants appeared in the a posteriori error bounds are positive constants independent of the discretization parameters but depend upon the interpolation constants and the final time T.

Proof

In view of (4.1), we apply triangle inequality to have

$$\begin{aligned} \Vert u(t) - U(t)\Vert \le \Vert \hat{\rho }(t)\Vert + \Vert \sigma (t)\Vert +\Vert \epsilon (t)\Vert . \end{aligned}$$
(4.48)

For \(t \in I_n\),

$$\begin{aligned} \Vert \epsilon (t)\Vert = \Vert l_{n-1}(t) \epsilon ^{n-1} + l_n(t) \epsilon ^n \Vert \le \max \Big (\Vert \epsilon ^{n-1}\Vert , \Vert \epsilon ^n\Vert \Big ). \end{aligned}$$

Therefore, for \(t \in [0,t_m]\), using Lemma 4.2, we have

$$\begin{aligned} \Vert \epsilon (t)\Vert \le \max _{n \in [0,m]}\Big (\Vert \epsilon ^{n-1}\Vert , \Vert \epsilon ^n\Vert \Big ) \le \max _{n \in [0,m] }\eta _n^{RVL2}(U). \end{aligned}$$
(4.49)

Also,

$$\begin{aligned} \Vert \widehat{U}(t) - \mathcal {R}_w U(t)\Vert\le & {} (t-t_{n-1})(t_n - t) \Vert \mathcal {R}^n_w \mathcal {W}_n\Vert \nonumber \\\le & {} (t-t_{n-1})(t_n - t)\Big [\Vert (\mathcal {R}^n_w - I) \mathcal {W}_n\Vert + \Vert \mathcal {W}_n\Vert \Big ] \le \eta _n^{T,Rec1},\qquad \end{aligned}$$
(4.50)

where \(\eta _n^{T,Rec1}\) is given by (4.4).

Finally, we use (4.48)–(4.50) and Lemma 4.3 to obtain the desired result. \(\square \)

Remarks (i) The estimator appeared in Theorem 4.10 is formally of optimal order. Moreover, in the absence of the memory term (i.e., \(\mathcal {B}(t,s) = 0\)), the error estimator obtained in Theorem 4.10 is similar to that for the parabolic problems [3]. Further, we note that the estimator \(\eta _n^{T,QL}\), the contribution to the error from the approximation of the integral term, is of \(O(\tau ^2)\). Thus, the a posteriori error bound in Theorem 4.10 generalizes the results of [3] to PIDE.

(ii) The mesh change error term \(\mathcal {I}_m^3\) can alternatively be estimated as

$$\begin{aligned} \mathcal {I}_m^3 \le \sum _{n = 1}^{m}\tau _n \max _{t \in [0,t_m]} \Vert \hat{\rho }(t)\Vert \eta _n^{M,1}, \end{aligned}$$

where \(\eta _n^{M,1}\) is given by

$$\begin{aligned} \eta _n^{M,1}= & {} C_{1,1} h_n \Big \{ \frac{1}{2}\Vert (P^n_0 - I)\mathcal {A}^{n-1} U^{n-1}\Vert + \Vert (P^n_0 - I)\sigma ^{n}(\mathcal {B}^{n-1/2} U)\Vert \\&+\,\tau ^{-1}_n \Vert (P^n_0 - I)U^{n-1}\Vert \Big \}. \end{aligned}$$

This estimate for mesh change error will lead to an alternative a posteriori error estimate for the main error e. In particular, the terms \(\Xi ^2_{1,m}\) and \(\Xi ^2_{2,m}\) in Lemma 4.3 take the form

$$\begin{aligned} \Xi ^2_{1,m} := \Bigg \{ C_7 \sum _{n = 1}^{m} \tau _n \Big (\eta _n^{T,QL} + \eta _n^{M,1} + \eta _n^S + \eta _n^{SM} + \eta _{n}^{D,1}\Big ) \Bigg \}^{2} \end{aligned}$$

and

$$\begin{aligned} \Xi ^2_{2,m} := \frac{4C^2_7}{\alpha } \sum _{n = 1}^{m} \tau _n (\eta _{n}^{TL} + \eta _{n}^{D,2})^2. \end{aligned}$$

The corresponding changes take place in the Theorem 4.10.

(iii) The term

$$\begin{aligned} \Bigg (\frac{1}{\tau _n} \int _{t_{n-1}}^{t_n} \Vert \hat{\omega }(t) - \hat{\omega }_I(t)\Vert ^2 dt\Bigg )^{1/2} \end{aligned}$$
(4.51)

appeared in Theorem 4.10 (see 4.11) is not a traditional a posteriori quantity, where \(\hat{\omega }(t)\) and \(\hat{\omega }_I(t)\) are given by (2.18) and (2.19), respectively. Since, the error in linear interpolation is bounded as

$$\begin{aligned} \Vert \hat{\omega }(t) - \hat{\omega }_I(t)\Vert \le C \tau ^2_n \max _{t \in I_n} \left\| \frac{d^2}{dt^2}(\hat{\omega }(t))\right\| , \;\;t \in I_n, \end{aligned}$$

where \(\frac{d^2}{dt^2}(\hat{\omega }(t))\) depends upon the quantities \(\nabla \omega _t(t)\) and \(\nabla \omega (t)\). The term \(\Vert \nabla \omega _t(t)\Vert \) can be estimated as

$$\begin{aligned} \Vert \nabla \omega _t(t)\Vert \le \Vert \nabla \epsilon _t(t)\Vert + \Vert \nabla U_t(t)\Vert\le & {} \frac{1}{\tau _n} \Big (\Vert \nabla \epsilon ^n\Vert + \Vert \nabla \epsilon ^{n-1}\Vert \Big )+ \Vert \nabla \partial U^n\Vert , \end{aligned}$$

and for the term \(\Vert \nabla \omega (t)\Vert \), we have

$$\begin{aligned} \Vert \nabla \omega (t)\Vert\le & {} \Vert \nabla \epsilon (t)\Vert + \Vert \nabla U(t)\Vert \\\le & {} \Vert l_{n-1}(t) \nabla \epsilon ^{n-1} + l_n(t) \nabla \epsilon ^n \Vert + \Vert l_{n-1}(t) \nabla U^{n-1} + l_n(t) \nabla U^n \Vert \\\le & {} \max \Big (\Vert \nabla \epsilon ^{n-1}\Vert , \Vert \nabla \epsilon ^n\Vert \Big ) + \max \Big (\Vert \nabla U^{n-1}\Vert , \Vert \nabla U^n\Vert \Big ). \end{aligned}$$

This shows that (4.51) is now a meaningful a posteriori quantity by noting the fact that \(\Vert \nabla \epsilon ^n\Vert \) is bounded and is of O(h) (see Lemma 4.2). Taking \(\tau \approx h\), it is easy to see that the term (4.51) is of optimal order.

(iv) The a posteriori error analysis of the classical Crank–Nicolson scheme leads to one additional term \(\frac{1}{2}\Vert (P^n_0 - I)\mathcal {A}^{n-1}U^{n-1}\Vert \) in the error bounds. However, it does not affect the optimality of the main estimator.

(v) We have used \(\mathbb {P}_1\) elements in the analysis, however there is no limitation on the finite element space to be used.

(vi) The term \(\hat{\tau }_n\) appearing in the Lemma 4.8 can be problematic in case of the time adaptivity as it is defined globally. However, one can easily avoid such kind of term from the final a posteriori error estimate as follows: In the proof of Lemma 4.8, instead of writing

$$\begin{aligned}&\bigg \{ \Big \Vert \sum _{j = 1}^{n} \int _{t_{j-1}}^{t_j}\bigg ( l_{j-1}(s)(\mathcal {R}^{j-1}_w U^{j-1} - U^{j-1}) + l_{j}(s)(\mathcal {R}^{j}_w U^{j} - U^{j}) \bigg )ds\Big \Vert \Bigg \} \Vert \psi (t)\Vert _2\\&\quad \le \frac{1}{2}\Big \{ \hat{\tau }_n \sum _{j = 1}^{n} \eta ^{RVL2}_j(U) + \hat{\tau }_{n-1} \sum _{j = 0}^{n-1} \eta ^{RVL2}_j(U) \Big \} \Vert \psi (t)\Vert _2 \end{aligned}$$

we could have written

$$\begin{aligned}&\bigg \{ \Big \Vert \sum _{j = 1}^{n} \int _{t_{j-1}}^{t_j}\bigg ( l_{j-1}(s)(\mathcal {R}^{j-1}_w U^{j-1} - U^{j-1}) + l_{j}(s)(\mathcal {R}^{j}_w U^{j} - U^{j}) \bigg )ds\Big \Vert \Bigg \} \Vert \psi (t)\Vert _2\\&\quad \le \frac{1}{2} \bigg \{\sum _{j = 1}^{n} \tau _j \eta ^{RVL2}_j(U) + \sum _{j = 0}^{n-1} \tau _j \eta ^{RVL2}_j(U) \Big \} \Vert \psi (t)\Vert _2 \end{aligned}$$

and the rest of the analysis follows subsequently. In doing so, we could have avoided the term \(\hat{\tau }_n\) and one can use the modified estimate for time adaptation.

5 Numerical Assessment

This section reports numerical results for a test problem to validate the derived estimators. Our aim is to study the asymptotic behaviour of the error estimators presented in the Theorem 4.10 for a two dimensional test problem. Consider the PIDE (1.1) in a square domain \(\Omega = (0,1)^2 \subset \mathbb {R}^2\) with homogeneous Dirichlet boundary conditions and \(T = 0.1\). We select the coefficient matrices to be \(A = I\) and \(B(t,s) = exp(-\pi ^2(t-s))I\). Then, the forcing term f is calculated by applying the PIDE (1.1) to the corresponding u.

Our main emphasis here is to understand the asymptotic behaviour of the estimators following which we perform numerical test on uniform meshes with uniform time-steps. All computations have been carried out using \(\text {MATLAB}\_\text {R}2015a\). We choose a sequence of space mesh-sizes (\(h(i): i \in [1:l]\)), to which we couple a sequence of time step-sizes (\(\tau (i) : i \in [1:l]\)) with \(\tau (i) \propto h(i)\). Here, l denotes the number of runs. For each run, the spatial mesh-size becomes the half of the previous mesh-size. The experiment is carried out with \(\mathbb {P}_1\) elements. Since the finite element spaces consist of \(\mathbb {P}_1\) elements and the Crank–Nicolson scheme is second-order accurate in time, the error in \(L^{\infty }(L^2)\)-norm is \(O(h^2 + \tau ^2)\) so that we expect that parts of the main estimator should decrease with second order for \(h \propto \tau \). The exact and the finite element solutions are shown in Fig. 1, respectively.

Fig. 1
figure 1

The first plot shows the exact solution and the second one corresponds to the Crank–Nicolson FEM solution for the Example. The Crank–Nicolson FEM solution is computed using \(\mathbb {P}_1\) elements with 2689 free nodes at T = 0.1 corresponding to \(\tau = 0.025\)

For each run \(i \in [1:l]\), we compute the following quantities of interest at the final time point \(t_N = T = 0.1\):

  • The Ritz–Volterra reconstruction error estimator: \(\max _{n \in [0:N]}\eta _n^{RVL2}(U)\)

  • The time reconstruction error estimators: \(\max _{n \in [0:N]}\eta _n^{T,Rec1}\) and \(\Big (\sum _{n = 1}^{N} \tau _n \big (\eta _n^{T,Rec2}\big )^2\Big )^{1/2}\).

For each quantities of interest we observe their experimental order of convergence (EOC). The EOC is defined as follows: For a given finite sequence of successive runs (indexed by i), the EOC of the corresponding sequence of quantities of interest E(i) (estimator or part of an estimator) itself is a sequence defined by

$$\begin{aligned} EOC(E(i)) = \frac{\log (E(i+1)/E(i))}{\log (h(i+1)/h(i))}, \end{aligned}$$

where h(i) denotes the mesh-size of the run i. The value of EOC of an estimator indicates its order.

In order to measure the quality of our estimator the estimated error is compared to the true error so-called effectivity index (EI). We define the effectivity indices by

$$\begin{aligned} EI^{S}= & {} \frac{\max _{n \in [0:N]} \eta _n^{RVL2}(U)}{\max _{n \in [0:N]}\Vert e(t_n)\Vert }, \quad EI^{T,1} = \frac{\max _{n \in [0:N]} \eta _n^{T,Rec1}}{\max _{n \in [0:N]}\Vert e(t_n)\Vert } \\ EI^{T,2}= & {} \frac{\Big (\sum _{n = 1}^{N} \tau _n\big (\eta _n^{T,Rec2}\big )^2\Big )^{1/2}}{\max _{n \in [0:N]}\Vert e(t_n)\Vert }, \quad EI^{Total} = \frac{\eta ^{Total}_n}{\max _{n \in [0:N]}\Vert e(t_n)\Vert }, \end{aligned}$$

where \(\eta ^{Total}_n\) is the full estimator as shown in the Theorem 4.10. All the constants involved in the estimators are taken to be equal to 1 except Gronwall’s constant which is taken to be \(\exp (T)\). The effectivity index is to be understood only qualitatively in this paper as the main emphasis is on observing asymptotic behaviour of the estimator.

Table 1 The Ritz–Volterra reconstruction error estimator \(\max _{n \in [0:N]} \eta _n^{RVL2}(U)\), its EOC and EI
Table 2 The time reconstruction error estimator \(\max _{n \in [0:N]} \eta _n^{T,Rec1}\), its EOC and EI
Table 3 The time reconstruction error estimator \(\Big (\sum _{n = 1}^{N} \tau _n \big (\eta _n^{T,Rec2}\big )^2\Big )^{1/2}\), its EOC and EI

From the Tables 12, and 3, it is apparent that each individual estimator constituting the total estimator have the optimal rate of convergence. Although, the Ritz–Volterra reconstruction estimator \(\max _n \eta _n^{RVL2}(U)\), the time reconstruction estimators \(\max _{n \in [0:N]} \eta _n^{T,Rec1}\) and \(\Big (\sum _{n = 1}^{N} \tau _n\big (\eta _n^{T,Rec2}\big )^2\Big )^{1/2}\) contribute same order of error, the time reconstruction estimator \(\max _{n \in [0:N]} \eta _n^{T,Rec1}\) seems dominant over other error estimators for prescribed choices of \((h,\tau )\) as shown in Tables 12, and 3. Furthermore, the estimator \(\max _n \eta _n^{RVL2}(U)\) is observed to be divided by 4 at each iteration when we took a small constant time-step and divide the spatial mesh-size by 2 (see Table 4). Similarly, we observe that keeping the spatial mesh-size small and constant, when the time-step is divided by 2, the estimators \(\max _{n \in [0:N]} \eta _n^{T,Rec1}\) and \(\Big (\sum _{n = 1}^{N} \tau _n\big (\eta _n^{T,Rec2}\big )^2\Big )^{1/2}\) are divided by 4 (see Tables 5 and 6). Table 7 shows the behaviour of the total estimator.

Further, a higher value of the effectivity index EI for different estimators constituting the main estimator indicates that the present analysis can be improved in order to get better reliable estimator which may lead to a better effectivity index. Moreover, for the development of an efficient adaptive algorithm one has to trace down the constants carefully.

Table 4 Behaviour of the Ritz–Volterra reconstruction error estimator \(\max _{n \in [0:N]} \eta _n^{RVL2}(U)\) w.r.t. space for small time-step
Table 5 Behaviour of the time reconstruction error estimator \(\max _{n \in [0:N]}\eta _n^{T,Rec1}\) w.r.t. time for small spatial mesh size
Table 6 Behaviour of the time reconstruction error estimator \(\Big (\sum _{n = 1}^{N} \tau _n \big (\eta _n^{T,Rec2}\big )^2\Big )^{1/2}\) w.r.t. time for small spatial mesh size
Table 7 Behaviour of the total error estimator \(\max _{n \in [0:N]} \eta _n^{Total}\)

Concluding remarks Despite the importance of PIDE, and their variants in the modelling of several physical phenomena, the topic of a posteriori analysis for such kind of equations remains unexplored. In this paper, we have derived optimal order residual based a posteriori error estimator for PIDE (1.1) in the \(L^\infty (L^2)\)-norm for the fully discrete Crank–Nicolson method. The Ritz–Volterra reconstruction operator [23] unifies a posteriori approach from parabolic problems to PIDE. Moreover, for the optimality of the estimator, the linear approximation of the Volterra integral term is found to be crucial. Computational results are provided to illustrate that the estimator exhibits optimal rate of convergence which support our theoretical findings. The computability of the estimates with optimal asymptotic convergence ensures that these estimates can be utilised for different space-time adaptive algorithms to be developed. Thus, we believe that the work presented here gives a new direction for the various space-time adaptive algorithms to be developed for the Crank–Nicolson scheme in the \(L^\infty (L^2)\)-norm for PIDE. However, the development of such adaptive algorithms is out of scope of the current study and will be considered somewhere else.

There are many other important issues to be addressed in this direction. It is challenging to study the problem of obtaining a posteriori error estimates with the constants appeared in the bounds be independent of the final time T and hence, they can serve as long-time estimates. Moreover, a posteriori error analysis for hyperbolic integro-differential equations in the \(L^{\infty }(L^2)\)-norm is an interesting research problem which will be reported elsewhere.