1 Introduction

In this paper, we focus on the unconditional superconvergence error estimate of an energy-stable and linearized Galerkin finite element method (FEM) for the following two-dimensional nonlinear wave equations [7]:

$$\begin{aligned}&u_{tt}-\Delta u+\lambda u+F'(u)=0,&(\varvec{x},t)\in \varOmega \times (0,T], \end{aligned}$$
(1)
$$\begin{aligned}&u(\varvec{x},0)=u_0(\varvec{x}),\quad \quad u_{t}(\varvec{x},0)=u_1(\varvec{x}),\quad&\varvec{x}\in \varOmega , \end{aligned}$$
(2)
$$\begin{aligned}&u(\varvec{x},t)=0,&(\varvec{x},t)\in \partial \varOmega \times (0,T], \end{aligned}$$
(3)

where \(\lambda \geqslant 0\) is a constant, \(\varOmega \subset {\mathbb {R}}^2\) is a rectangular domain with the boundary \(\partial \varOmega\), \(u=u(\varvec{x},t)\) is the unknown function defined in \(\varOmega \times [0,T]\), \(u_0\) and \(u_1\) are sufficiently smooth functions, and \(\varvec{x}=(x,y)\) and \(T>0\) is a finite number. Moreover, \(F\in C^2({\mathbb {R}})\) is the nonlinear potential.

Nonlinear wave equations (1)–(3) are widely used to describe many of complicated natural phenomena in scientific fields [9, 37]. Numerous numerical methods and analyses for the nonlinear wave equations have been investigated extensively, e.g., see [1, 11, 31] for finite difference methods, [5,6,7, 10, 16, 26, 35, 36] for Galerkin FEMs. In particular, optimal error estimate was studied in [7] for the nonlinear wave equation with an energy-conserving and linearly implicit scalar auxiliary variable (SAV) Galerkin scheme with the help of the temporal-spatial error splitting technique. Optimal error estimates were derived using the standard Galerkin method for a linear second-order hyperbolic equation in [5]. An \(H^1\)-Galerkin mixed FEM was discussed and the corresponding error estimates were obtained for a class of second-order hyperbolic problems in [26].

As we all know, for nonlinear problems, some certain assumptions about the nonlinear term are indeed to obtain the corresponding error estimation. The most common assumption is that the nonlinear term is required to satisfy the Lipschitz continuity condition for differential problems [8, 13, 14, 18, 38]. However, as pointed out in [15, 27], the Lipschitz continuity assumption is not satisfied in most actual applications. For instance, the nonlinear terms appeared in phase field problems, nonlinear Schrödinger equations, and the viscous Burgers’ equations. Moreover, certain time-step restrictions dependent on the spatial mesh size for high-dimensional nonlinear problems were required using a nonlinear/linearized scheme [3, 32]. In practical applications, if similar time-step restrictions are required, one may apply an unnecessarily small time-step and be extremely time-consuming in computations. A new approach called the time-splitting technique was proposed in [20, 21] to obtain error estimates for a nonlinear thermistor system and a nonlinear system from incompressible miscible flow in porous media without the time-step restrictions (i.e., unconditional convergence). Subsequently, the time-splitting technique was successfully applied to study the unconditional error estimates for different high-dimensional nonlinear problems, such as nonlinear thermistor equations [19], the Landau-Lifshitz equation [4, 12], nonlinear Schrödinger equations [23, 28, 30, 34], nonlinear parabolic problems [22, 24, 39], etc. The key of the analysis is to introduce an additional time-discrete system ((elliptic) time-discrete equations), which leads to the error estimation process being relatively complicated. Moreover, the \(L^{\infty }\)-norm boundedness of the numerical solution is usually required in the time-splitting approach.

In this paper, the unconditional superconvergence error estimate is obtained for two-dimensional nonlinear wave equation based on an energy-stable and linearized Galerkin FEM. The difficulties come from the estimation of the nonlinear term without using the Lipschitz continuity assumption and the \(L^{\infty }\)-boundedness of the numerical solution in the error analysis. We first established a priori boundedness of the numerical solution in \(H^1\)-norm based on a rigorous analysis in terms of an energy inequality without introducing an additional time discrete system in the previous literature. Then, the unconditional superconvergence error estimates are obtained by treating the nonlinear term skillfully without using the \(L^{\infty }\)-norm boundedness of the numerical solution required in the previous literature. Meanwhile, some numerical results are provided to confirm our theoretical findings.

The rest of the paper is organized as follows. In Sect. 2, some preliminaries and notations are introduced. In Sect. 3, an energy-stable and linearized SAV Galerkin finite-element scheme is proposed and the superconvergence error estimate of the scheme is presented. In Sect. 4, numerical results are provided to demonstrate the theoretical analysis.

2 Preliminaries and Notations

Let \(W^{m,p}(\varOmega )\) be the standard Sobolev space with norm \(\Vert \cdot \Vert _{m,p}\) and semi-norm \(|\cdot |_{m,p}\) [2]. \(L^{2}(\varOmega )\) is the space of square integrable functions defined in \(\varOmega\), and its inner product and norm are denoted by \((\cdot ,\cdot )\) and \(\Vert \cdot \Vert _0\), respectively. For any Banach space X and \(I=[0,T]\), let \(L^p(I;\,X)\) be the space of all measurable functions \(f\!: I\rightarrow X\) with the norm

$$\begin{aligned} \Vert f \Vert _{L^p(I;X)}=\left\{ \begin{array}{l} \left(\displaystyle \int _0^T\Vert f \Vert _X^p{\textrm{d}t}\right)^{\frac{1}{p}},\quad 1\leqslant p < \infty ,\\ \mathop {\textrm{esssup}}\limits_{t\in I}\Vert f \Vert _X,\quad p =\infty . \end{array} \right. \end{aligned}$$

Moreover, let \({\mathcal {T}}_h=\{K\}\) be a conforming and shape regular simplicial triangulation of \(\varOmega\), and \(h=\max _{K\in {\mathcal {T}}_h}\{\!\text{diam }~K\}\) be the mesh size. Let \(V_h\) be the finite-dimensional subspace of \(H_0^1(\varOmega )\), which consists of continuous piecewise polynomials on \({\mathcal {T}}_h\). Then, for a given element \(K\in {\mathcal {T}}_h\), we define the finite-element space \(V_h\) as

$$\begin{aligned} V_h=\{v_h\in C^0(\varOmega )\!:~v_h|_K\in \textrm{span}\{1,x,y,xy\},~\forall K\in {\mathcal {T}}_h,~v_h|_{\partial \varOmega }=0\}. \end{aligned}$$
(4)

Define the Ritz projection operator \(R_h\!:H_0^1(\varOmega )\rightarrow V_h\) by

$$\begin{aligned} (\nabla (u-R_hu),\nabla \chi )=0,\quad \forall \chi \in V_h. \end{aligned}$$
(5)

Then, by the classical finite-element theory [33], there holds for \(u\in H^2(\varOmega )\cap H_0^1(\varOmega )\)

$$\begin{aligned} \Vert u-R_hu\Vert _0+h\Vert \nabla (u-R_hu)\Vert _0\leqslant Ch^2|u|_2. \end{aligned}$$
(6)

Lemma 1

[25] Suppose that \({\mathcal {T}}_h\) is a shape regular rectangular partition and \(u\in H^3(\varOmega )\), then there holds

$$\begin{aligned} (\nabla (u-I_hu),\nabla v)\leqslant Ch^2\Vert u\Vert _3\Vert \nabla v\Vert _0,\quad \forall v\in V_h, \end{aligned}$$
(7)

where \(I_h\!: H^2(\varOmega )\rightarrow V_h\) is the Lagrangian node interpolation operator.

With the help of Lemma 1, the following superclose error estimate between \(I_hu\) and \(R_hu\) in \(H^1\)-norm has been established in [29].

Lemma 2

Suppose that \(u\in H^3(\varOmega )\), then we have

$$\begin{aligned} \Vert \nabla (I_hu-R_hu)\Vert _0\leqslant Ch^2\Vert u\Vert _3. \end{aligned}$$
(8)

Following the basic idea of [15, 27], we adopt the following assumption instead of Lipschitz continuity assumption in the error estimate:

$$\begin{aligned}&|f(s)|\leqslant C(1+|s|^p),\quad p\geqslant 0, \end{aligned}$$
(9)
$$\begin{aligned}&|f^{'}(s)|\leqslant C(1+|s|^p),\quad p\geqslant 0. \end{aligned}$$
(10)

Here, we present the following Gronwall-typed inequality, which plays an important role in the error analysis.

Lemma 3

[17] Let \(\tau\), B and \(a_k\), \(b_k\), \(c_k\), \(\gamma _k\), for integers \(k>0\), be nonnegative numbers, such that

$$\begin{aligned} a_n+\tau \sum _{k=0}^nb_k\leqslant \tau \sum _{k=0}^n\gamma _ka_k+\tau \sum _{k=0}^nc_k+B\quad for ~~n\geqslant 0. \end{aligned}$$

Suppose that \(\tau \gamma _k<1\), for all k, and set \(\sigma _k=(1-\tau \gamma _k)^{-1}\). Then, there holds

$$\begin{aligned} a_n+\tau \sum _{k=0}^nb_k\leqslant \left( \tau \sum _{k=0}^nc_k+B\right) \exp \left( \tau \sum _{k=0}^n\gamma _k\sigma _k\right) . \end{aligned}$$

3 Superconvergence Error Estimates of the Energy-Stable and Linearized SAV Galerkin Scheme

Suppose

$$\begin{aligned} E_1(u)=\int _{\varOmega }F(u)\textrm{d}\varvec{x}\geqslant -c_0 \end{aligned}$$

for some \(c_0>0\), i.e., it is bounded from below, and let \(C_0>c_0\), such that

$$\begin{aligned} E_1(u)+C_0>0. \end{aligned}$$

Then, we introduce the following SAV:

$$\begin{aligned} r(t)=\sqrt{E(u)},\quad E(u)=\int _{\varOmega }F(u)\textrm{d}\varvec{x}+C_0. \end{aligned}$$

Therefore, we can rewrite (1)–(3) as

$$\begin{aligned}&u_t=v, \end{aligned}$$
(11)
$$\begin{aligned}&v_t-\Delta u+\lambda u+\frac{r(t)}{\sqrt{E(u)}}f(u)=0, \end{aligned}$$
(12)
$$\begin{aligned}&r_t=\frac{1}{2\sqrt{E(u)}}\int _{\varOmega }f(u)u_t\textrm{d}\varvec{x}, \end{aligned}$$
(13)

where \(f(u)=F'(u)\).

The weak formulation of (1)–(3) is: for any \(t\in [0,T]\), find \(u\in H_0^1(\varOmega )\), \(v\in H_0^1(\varOmega )\), and \(r\in {\mathbb {R}}\), such that

$$\begin{aligned} (u_t,\chi _1)&-(v,\chi _1)=0,\quad \forall \chi _1\in H_0^1(\varOmega ), \end{aligned}$$
(14)
$$\begin{aligned} (v_t,\chi _2)&+(\nabla u,\nabla \chi _2)+\lambda (u,\chi _2)+\frac{r(t)}{\sqrt{E(u)}}(f(u),\chi _2)=0,\quad \forall \chi _2\in H_0^1(\varOmega ),\end{aligned}$$
(15)
$$\begin{aligned}&r_t=\frac{1}{2\sqrt{E(u)}}\int _{\varOmega }f(u)u_t\textrm{d}\varvec{x}.\quad \end{aligned}$$
(16)

Let \(0=t_0<t_1<\cdots <t_N=T\) be a uniform partition of the time interval [0, T] with time-step size \(\tau =T/N\) and \(u^n=u(\cdot ,t_n)\) for \(0\leqslant n\leqslant N\). For a smooth function \(\omega\) on [0, T], we define

$$\begin{aligned} D_{\tau }\omega ^n=\frac{\omega ^{n}-\omega ^{n-1}}{\tau }. \end{aligned}$$

Based on the above notations, a linearized fully discrete SAV Galerkin scheme is to find \(u_h^n\in V_h\), \(v_h^n\in V_h\), \(r_h^n\in {\mathbb {R}}\), for given \(u_h^{n-1}\in V_h\), \(v_h^{n-1}\in V_h\), \(r_h^{n-1}\in {\mathbb {R}}\) and \(n=1,2,\cdots ,N\), such that

$$\begin{aligned}&(D_{\tau }u_h^n,\chi _{1h})-(v_h^n,\chi _{1h})=0,\quad \forall \chi _{1h}\in V_h,\end{aligned}$$
(17)
$$\begin{aligned}&(D_{\tau }v_h^n,\chi _{2h})+(\nabla u_h^n,\nabla \chi _{2h})+\lambda (u_h^n,\chi _{2h})+\frac{r_h^n}{\sqrt{E(u_h^{n-1})}}(f(u_h^{n-1}),\chi _{2h}),\quad \forall \chi _{2h}\in V_h,\end{aligned}$$
(18)
$$\begin{aligned}&r_h^n-r_h^{n-1}=\frac{1}{2\sqrt{E(u_h^{n-1})}}\int _{\varOmega }f(u_h^{n-1})(u_h^n-u_h^{n-1})\textrm{d}\varvec{x}, \end{aligned}$$
(19)

and the initial values are chosen as \((u_h^0,v_h^0,r_h^0)=(R_hu_0,R_hv_0,\sqrt{E(u_0)})\).

The scheme (17)–(19) is energy stable. In fact, taking \(\chi _{1h}=v_h^n-v_h^{n-1}\) in (17), \(\chi _{2h}=u_h^n-u_h^{n-1}\) in (18), and multiplying (19) by \(r_h^n\), then one can derive

$$\begin{aligned} (v_h^n,v_h^n-v_h^{n-1})+(\nabla u_h^n,\nabla (u_h^n-u_h^{n-1}))+\lambda (u_h^n,u_h^n-u_h^{n-1})+(r_h^n-r_h^{n-1})r_h^n=0, \end{aligned}$$

which shows that

$$\begin{aligned}&(\Vert v_h^n\Vert _0^2-\Vert v_h^{n-1}\Vert _0^2+\Vert v_h^n-v_h^{n-1}\Vert _0^2)+(\Vert \nabla u_h^n\Vert _0^2-\Vert \nabla u_h^{n-1}\Vert _0^2+\Vert \nabla (u_h^n-u_h^{n-1})\Vert _0^2)\nonumber \\& \!\!+\lambda (\Vert u_h^n\Vert _0^2-\Vert u_h^{n-1}\Vert _0^2+\Vert u_h^n-u_h^{n-1}\Vert _0^2)+((r_h^n)^2-(r_h^{n-1})^2+(r_h^n-r_h^{n-1})^2)=0. \end{aligned}$$
(20)

Thus, we have

$$\begin{aligned} \Vert v_h^n\Vert _0^2+\Vert \nabla u_h^n\Vert _0^2+\lambda \Vert u_h^n\Vert _0^2+(r_h^n)^2\leqslant \Vert v_h^{n-1}\Vert _0^2+\Vert \nabla u_h^{n-1}\Vert _0^2+\lambda \Vert u_h^{n-1}\Vert _0^2+(r_h^{n-1})^2. \end{aligned}$$
(21)

Define the energy \({\mathcal {E}}^n\) by

$$\begin{aligned} {\mathcal {E}}^n=\sqrt{\Vert v_h^n\Vert _0^2+\Vert \nabla u_h^n\Vert _0^2+\lambda \Vert u_h^n\Vert _0^2+(r_h^n)^2}, \end{aligned}$$

then we have

$$\begin{aligned} {\mathcal {E}}^n\leqslant {\mathcal {E}}^{n-1}\leqslant \cdots \leqslant {\mathcal {E}}^0, \end{aligned}$$
(22)

which implies that the SAV Galerkin scheme (17)–(19) is energy stable.

Clearly, if \(u_0\in H^1(\varOmega )\) and \(u_1\in L^2(\varOmega )\), one can check that the \(H^1\)-norm boundedness of the numerical solution, i.e.,

$$\begin{aligned} \Vert u_h^n\Vert _1\leqslant C,\quad n=0,1,\cdots ,N. \end{aligned}$$
(23)

Then, we present the convergence and superclose error estimates in the following theorem.

Theorem 1

Let \((u^n,v^n,r^n)\) and \((u_h^n,v_h^n,r_h^n)\) be the solutions of (14)–(16) and (17)–(19), respectively. Suppose that \(u\in L^{\infty }((0,T];\;H^3)\), \(u_t\in L^{\infty }((0,T];\;H^2)\), \(u_{tt}\in L^{\infty }((0,T];\;H^2)\), \(u_{ttt}\in L^{\infty }((0,T];\;L^2)\), \(v\in L^{\infty }((0,T];\;H^2)\), and \(v_t\in L^{\infty }((0,T];\;H^2)\). Then, we have for \(n=1,2,\cdots ,N,\)

$$\begin{aligned} \Vert v^n-v_h^n\Vert _0+h\Vert \nabla (u^n-u_h^n)\Vert _0+|r^n-r_h^n|\leqslant C(h^2+\tau ), \end{aligned}$$
(24)

and the superclose error estimate

$$\begin{aligned} \Vert I_hu^n-u_h^n\Vert _1\leqslant C(h^2+\tau ). \end{aligned}$$
(25)

Proof

For the convenience of error estimation, we denote

$$\begin{aligned}&u^n-u_h^n=u^n-R_hu^n+R_hu^n-u_h^n:=\xi _{u}^n+\eta _{u}^n,\\&v^n-v_h^n=v^n-R_hv^n+R_hv^n-v_h^n:=\xi _{v}^n+\eta _{v}^n,\\&r^n-r_h^n:=e_r^n. \end{aligned}$$

At \(t=t_n\), from (14)–(16), we have

$$\begin{aligned}&(D_{\tau }u^n,\chi _{1h})-(v^n,\chi _{1h})=(D_{\tau }u^n-u_t^n,\chi _{1h}),\quad \forall \chi _{1h}\in H_0^1(\varOmega ),\end{aligned}$$
(26)
$$\begin{aligned}&\quad\;(D_{\tau }v^n,\chi _{2h})+(\nabla u^n,\nabla \chi _{2h})+\lambda (u^n,\chi _{2h})+\frac{r^n}{\sqrt{E(u^{n-1})}}(f(u^{n-1}),\chi _{2h})\nonumber \\&=(D_{\tau }v^n-v_t^n,\chi _{2h})+r^n\left( \frac{f(u^{n-1})}{\sqrt{E(u^{n-1})}}-\frac{f(u^{n})}{\sqrt{E(u^{n})}},\chi _{2h}\right) ,\quad \forall \chi _{2h}\in H_0^1(\varOmega ),\end{aligned}$$
(27)
$$\begin{aligned}&r^n-r^{n-1}=\frac{1}{2\sqrt{E(u^{n-1})}}\int _{\varOmega }f(u^{n-1})(u^n-u^{n-1})\textrm{d}\varvec{x}+\tau \left( \frac{r^n-r^{n-1}}{\tau }-r_t^n\right) \nonumber \\&\qquad\qquad\quad\; -\frac{1}{2\sqrt{E(u^{n-1})}}\int _{\varOmega }f(u^{n-1})(u^n-u^{n-1})\textrm{d}\varvec{x}+\frac{\tau }{2\sqrt{E(u^n)}}\int _{\varOmega }f(u^n)u_t^n\textrm{d}\varvec{x}. \end{aligned}$$
(28)

Then, from (26)–(28) and (17)–(19), we have the following error equations:

$$\begin{aligned}&(D_{\tau }\eta _u^n,\chi _{1h})-(\eta _v^n,\chi _{1h})=-(D_{\tau }\xi _u^n,\chi _{1h})+(\xi _v^n,\chi _{1h})+(D_{\tau }u^n-u_t^n,\chi _{1h}),\quad \forall \chi _{1h}\in V_h,\end{aligned}$$
(29)
$$\begin{aligned}&\quad\,(D_{\tau }\eta _v^n,\chi _{2h})+(\nabla \eta _u^n,\nabla \chi _{2h})+\lambda (\eta _u^n,\chi _{2h})+\left( r^n\frac{f(u^{n-1})}{\sqrt{E(u^{n-1})}}-r_h^n\frac{f(u_h^{n-1})}{\sqrt{E(u_h^{n-1})}},\chi _{2h}\right) \nonumber \\&=-(D_{\tau }\xi _v^n,\chi _{2h})-(\nabla \xi _u^n,\nabla \chi _{2h})-\lambda (\xi _u^n,\chi _{2h})+(D_{\tau }v^n-v_t^n,\chi _{2h})\nonumber \\&\quad +r^n\left( \frac{f(u^{n-1})}{\sqrt{E(u^{n-1})}}-\frac{f(u^n)}{\sqrt{E(u^n)}},\chi _{2h}\right) ,\quad \forall \chi _{2h}\in V_h,\end{aligned}$$
(30)
$$\begin{aligned}e_r^n-e_r^{n-1}=&\,\frac{1}{2}\int _{\varOmega }\left( \frac{f(u^{n-1})}{\sqrt{E(u^{n-1})}}-\frac{f(u_h^{n-1})}{\sqrt{E(u_h^{n-1})}}\right) (u^n-u^{n-1})\textrm{d}\varvec{x}\nonumber \\& +\frac{1}{2}\int _{\varOmega }\frac{f(u_h^{n-1})}{E(u_h^{n-1})}((u^n-u^{n-1})-(u_h^n-u_h^{n-1}))\textrm{d}\varvec{x} +\frac{\tau }{2}\int _{\varOmega }\left( \frac{f(u^n)}{\sqrt{E(u^n)}}-\frac{f(u^{n-1})}{\sqrt{E(u^{n-1})}}\right) u_t^n\textrm{d}\varvec{x}\nonumber \\& +\frac{\tau }{2}\int _{\varOmega }\frac{f(u^{n-1})}{\sqrt{E(u^{n-1})}}(u_t^n-D_{\tau }u^n)\textrm{d}\varvec{x}+\tau (D_{\tau }r^n-r_t^n). \end{aligned}$$
(31)

Denote

$$\begin{aligned} H(u)=\frac{f(u)}{\sqrt{E(u)}}. \end{aligned}$$

Then, taking \(\chi _{1h}=D_{\tau }\eta _v^n\) in (29) and \(\chi _{2h}=D_{\tau }\eta _u^n\) in (30), we have

$$\begin{aligned} & (\eta _v,D_{\tau }\eta _v^n)+(\nabla \eta _u^n,\nabla D_{\tau }\eta _u^n)+\lambda (\eta _u^n,D_{\tau }\eta _u^n)+ (r^nH(u^{n-1})-r_h^nH(u_h^{n-1}),D_{\tau }\eta _u^n)\nonumber \\&=(D_{\tau }\xi _u^n,D_{\tau }\eta _v^n)-(\xi _v^n,D_{\tau }\eta _v^n)-(D_{\tau }u^n-u_t^n,D_{\tau }\eta _v^n)\nonumber \\&\quad -(D_{\tau }\xi _v^n,D_{\tau }\eta _u^n)-(\nabla \xi _u^n,\nabla D_{\tau }\eta _u^n)-\lambda (\xi _u^n,D_{\tau }\eta _u^n)\nonumber \\&\quad +(D_{\tau }v^n-v_t^n,D_{\tau }\eta _u^n)+r^n(H(u^{n-1})-H(u^n),D_{\tau }\eta _u^n). \end{aligned}$$
(32)

Moreover, multiplying (31) by \(e_r^n\), we derive

$$\begin{aligned} \frac{e_r^n-e_r^{n-1}}{\tau }\cdot e_r^n&=\frac{e_r^n}{2}(H(u^{n-1})-H(u_h^{n-1}),D_{\tau }u^n)+\frac{e_r^n}{2}(H(u_h^{n-1}),D_{\tau }\xi _u^n)\nonumber \\&\quad +\frac{e_r^n}{2}(H(u_h^{n-1}),D_{\tau }\eta _u^n)\nonumber +\frac{e_r^n}{2}(H(u^{n})-H(u^{n-1}),u_t^n)\\&\quad+\frac{e_r^n}{2}(H(u^{n-1}),u_t^n-D_{\tau }u^n)\nonumber +\left( D_{\tau }r^n-r_t^n\right) \cdot e_r^n. \end{aligned}$$
(33)

Note that

$$\begin{aligned} r^nH(u^{n-1})-r_h^nH(u_h^{n-1})=r^n(H(u^{n-1})-H(u_h^{n-1}))+e_r^nH(u_h^{n-1}), \end{aligned}$$

then substituting (33) into (32) yields

$$\begin{aligned}&\quad\,\,(\eta _v^n,D_{\tau }\eta _v^n)+(\nabla \eta _u^n,\nabla D_{\tau }\eta _u^n)+\lambda (\eta _u^n,D_{\tau }\eta _u^n)+\frac{2}{\tau }(e_r^n-e_r^{n-1})\cdot e_r^n\nonumber \\&=(D_{\tau }\xi _u^n,D_{\tau }\eta _v^n)-(\xi _v^n,D_{\tau }\eta _v^n)-(D_{\tau }u^n-u_t^n,D_{\tau }\eta _v^n)\nonumber \\&\quad -(D_{\tau }\xi _v^n,D_{\tau }\eta _u^n)-(\nabla \xi _u^n,\nabla D_{\tau }\eta _u^n)-\lambda (\xi _u^n,D_{\tau }\eta _u^n)+(D_{\tau }v^n-v_t^n,D_{\tau }\eta _u^n)\nonumber \\&\quad +r^n(H(u^{n-1})-H(u^n),D_{\tau }\eta _u^n)-r^n(H(u^{n-1})-H(u_h^{n-1}),D_{\tau }\eta _u^n)\nonumber \\&\quad +e_r^n(H(u^n)-H(u^{n-1}),u_t^n)+e_r^n(H(u_h^{n-1}),D_{\tau }\xi _u^n)+e_r^n(H(u^{n-1})-H(u_h^{n-1}),D_{\tau }u^n)\nonumber \\&\quad +e_r^n(H(u^{n-1}),u_t^n-D_{\tau }u^n)+2(D_{\tau }r^n-r_t^n)\cdot e_r^n:=\sum _{\ell =1}^{14} E_{\ell }. \end{aligned}$$
(34)

One can check that the left-hand side of (34) is

$$\begin{aligned}&\frac{1}{2\tau }(\Vert \eta _v^n\Vert _0^2-\Vert \eta _v^{n-1}\Vert _0^2+\Vert \eta _v^n-\eta _v^{n-1}\Vert _0^2) +\frac{1}{2\tau }(\Vert \nabla \eta _u^n\Vert _0^2-\Vert \nabla \eta _u^{n-1}\Vert _0^2+\Vert \nabla (\eta _u^n-\eta _u^{n-1})\Vert _0^2)\nonumber \\&+\frac{\lambda }{2\tau }(\Vert \eta _u^n\Vert _0^2-\Vert \eta _u^{n-1}\Vert _0^2+\Vert \eta _u^n-\eta _u^{n-1}\Vert _0^2)+\frac{1}{\tau }((e_r^n)^2-(e_r^{n-1})^2+(e_r^n-e_r^{n-1})^2). \end{aligned}$$
(35)

Now, we start to estimate the terms on the right-hand side of (34). Using summation by parts, we have for \(E_1 - E_2\) that

$$\begin{aligned} E_1&=(D_{\tau }\xi _u^n,D_{\tau }\eta _v^n)=\frac{1}{\tau }[(D_{\tau }\xi _u^n,\eta _v^n)-(D_{\tau }\xi _u^{n-1},\eta _v^{n-1})] -\frac{1}{\tau }(D_{\tau }\xi _u^n-D_{\tau }\xi _u^{n-1},\eta _v^{n-1})\nonumber \\&\leqslant \frac{1}{\tau }[(D_{\tau }\xi _u^n,\eta _v^n)-(D_{\tau }\xi _u^{n-1},\eta _v^{n-1})]+Ch^2\Vert u_{tt}\Vert _{L^{\infty }(H^2)}\Vert \eta _v^{n-1}\Vert _0, \end{aligned}$$
(36)

and

$$\begin{aligned} E_2&=-(\xi _v^n,D_{\tau }\eta _v^n)=-\frac{1}{\tau }[(\xi _v^n,\eta _v^n)-(\xi _v^{n-1},\eta _v^{n-1})]+\frac{1}{\tau }(\xi _v^n-\xi _v^{n-1},\eta _v^{n-1})\nonumber \\&\leqslant -\frac{1}{\tau }[(\xi _v^n,\eta _v^n)-(\xi _v^{n-1},\eta _v^{n-1})]+Ch^2\Vert v_t\Vert _{L^{\infty }(H^2)}\Vert \eta _v^{n-1}\Vert _0. \end{aligned}$$
(37)

In a similar way, we have

$$\begin{aligned} E_3&=-(D_{\tau }u^n-u_t^n,D_{\tau }\eta _v^n)=-\frac{1}{\tau }[(D_{\tau }u^n-u_t^n,\eta _v^n)-(D_{\tau }u^{n-1}-u_t^{n-1},\eta _v^{n-1})]\nonumber \\&\quad +\frac{1}{\tau }((D_{\tau }u^n-u_t^n)-(D_{\tau }u^{n-1}-u_t^{n-1}),\eta _v^{n-1})\nonumber \\&\leqslant -\frac{1}{\tau }[(D_{\tau }u^n-u_t^n,\eta _v^n)-(D_{\tau }u^{n-1}-u_t^{n-1},\eta _v^{n-1})]+C\tau \Vert \eta _v^{n-1}\Vert _0, \end{aligned}$$
(38)

where we have used \((D_{\tau }u^n-u_t^n)-(D_{\tau }u^{n-1}-u_t^{n-1})=O(\tau ^2)\) by the Taylor expansion.

By the Cauchy-Schwarz inequality and the Ritz projection definition, we derive

$$\begin{aligned} E_4+E_5+E_6\leqslant Ch^2\Vert D_{\tau }\eta _u^n\Vert _0. \end{aligned}$$
(39)

Applying the Taylor expansion gives that

$$\begin{aligned} E_7\leqslant C\tau \Vert D_{\tau }\eta _u^n\Vert _0. \end{aligned}$$
(40)

Note that

$$\begin{aligned} H(u^{n-1})-H(u^n)&=\frac{f(u^{n-1})}{\sqrt{E(u^{n-1})}}-\frac{f(u^n)}{\sqrt{E(u^n)}}\nonumber \\&=\frac{f(u^{n-1})}{\sqrt{E(u^{n-1})}}-\frac{f(u^{n})}{\sqrt{E(u^{n-1})}}+\frac{f(u^{n})}{\sqrt{E(u^{n-1})}}-\frac{f(u^n)}{\sqrt{E(u^n)}}\nonumber \\&=\frac{f(u^{n-1})-f(u^{n})}{\sqrt{E(u^{n-1})}}+f(u^n)\frac{E(u^{n})-E(u^{n-1})}{\sqrt{E(u^{n-1})}\sqrt{E(u^{n})}(\sqrt{E(u^{n-1})}+\sqrt{E(u^{n})})} \end{aligned}$$

and \(E(s)>0\) for \(s\in {\mathbb {R}}\), we have

$$\begin{aligned} E_8&=r^n(H(u^{n-1})-H(u^{n}),D_{\tau }\eta _u^n)=r^n\int _{\varOmega }\frac{f(u^{n-1})-f(u^{n})}{\sqrt{E(u^{n-1})}}D_{\tau }\eta _u^n \textrm{d}\varvec{x}\nonumber \\&\quad +r^n\int _{\varOmega }f(u^n)\frac{E(u^{n})-E(u^{n-1})}{\sqrt{E(u^{n-1})}\sqrt{E(u^{n})}(\sqrt{E(u^{n-1})}+\sqrt{E(u^{n})})}D_{\tau }\eta _u^n \textrm{d}\varvec{x}\nonumber \\&\leqslant C\int _{\varOmega }(f(u^{n-1})-f(u^n))D_{\tau }\eta _u^n\textrm{d}\varvec{x}+C\int _{\varOmega }\Big(F(u^n)-F(u^{n-1})\Big)\textrm{d}\varvec{x}\cdot \int _{\varOmega }f(u^n)D_{\tau }\eta _u^n\textrm{d}\varvec{x}\nonumber \\&\leqslant C\tau \Vert D_{\tau }\eta _u^n\Vert _0. \end{aligned}$$
(41)

Similar to \(E_8\), \(E_9\) can be estimated as

$$\begin{aligned} E_9&\leqslant C\int _{\varOmega }(f(u^{n-1})-f(u_h^{n-1}))D_{\tau }\eta _u^n\textrm{d}\varvec{x}\nonumber \\&\quad +C\int _{\varOmega }\left(F(u_h^{n-1})-F(u^{n-1})\right)\textrm{d}\varvec{x}\cdot \int _{\varOmega }f(u_h^{n-1})D_{\tau }\eta _u^n\textrm{d}\varvec{x}\nonumber \\&\leqslant C\int _{\varOmega }(1+|u_h^{n-1}|^p)|u^{n-1}-u_h^{n-1}||D_{\tau }\eta _u^n|\textrm{d}\varvec{x}\nonumber \\&\quad +C\int _{\varOmega }f((1-\theta )u^{n-1}+\theta u_h^{n-1})|u_h^{n-1}-u^{n-1}|\textrm{d}\varvec{x}\int _{\varOmega }f(u_h^{n-1})D_{\tau }\eta _u^n\textrm{d}\varvec{x}\nonumber \\&\leqslant C(1+\Vert u_h^{n-1}\Vert _{0,4p}^p)\Vert u^{n-1}-u_h^{n-1}\Vert _{0,4}\Vert D_{\tau }\eta _u^n\Vert _0\nonumber \\&\quad +C\int _{\varOmega }(1+|u_h^{n-1}|^p)^2\textrm{d}\varvec{x}\Vert u^{n-1}-u_h^{n-1}\Vert _{0}\Vert D_{\tau }\eta _u^n\Vert _0\nonumber \\&\leqslant C(1+\Vert \nabla u_h^{n-1}\Vert _0^p)(\Vert u^{n-1}-I_h u^{n-1}\Vert _{0,4}+\Vert \nabla (I_hu^{n-1}-R_hu^{n-1})\Vert _0\nonumber \\&\quad +\Vert \nabla \eta _u^n\Vert _0)\Vert D_{\tau }\eta _u^n\Vert _0\nonumber \\&\quad +C(1+\Vert \nabla u_h^{n-1}\Vert _0^{2p})(h^2+\Vert \eta _u^{n-1}\Vert _0)\Vert D_{\tau }\eta _u^n\Vert _0\nonumber \\&\leqslant C(h^2+\Vert \nabla \eta _u^{n-1}\Vert _0+\Vert \eta _u^{n-1}\Vert _0)\Vert D_{\tau }\eta _u^n\Vert _0, \end{aligned}$$
(42)

where \(0<\theta <1\) and we have used (9), (10), and (23) in the above estimate.

Thus, we obtain

$$\begin{aligned} E_4+E_5+E_6+E_7+E_8+E_9&\leqslant C(h^2+\tau +\Vert \nabla \eta _u^{n-1}\Vert _0+\Vert \eta _u^{n-1}\Vert _0)\Vert D_{\tau }\eta _u^n\Vert _0. \end{aligned}$$
(43)

On the other hand, taking \(\chi _{1h}=D_{\tau }\eta _u^n\) in (29) results in

$$\begin{aligned} \Vert D_{\tau }\eta _u^n\Vert _0^2&=(\eta _v^n,D_{\tau }\eta _u^n)-(D_{\tau }\xi _u,D_{\tau }\eta _u^n)+(\xi _v^n,D_{\tau }\eta _u^n)+(D_{\tau }u^n-u_t^n,D_{\tau }\eta _u^n)\nonumber \\&\leqslant\Vert \eta _v^n\Vert _0\Vert D_{\tau }\eta _u^n\Vert _0+\Vert D_{\tau }\xi _u^n\Vert _0\Vert D_{\tau }\eta _u^n\Vert _0+\Vert \xi _v^n\Vert _0\Vert D_{\tau }\eta _u^n\Vert _0+\Vert D_{\tau }u^n-u_t^n\Vert _0\Vert D_{\tau }\eta _u^n\Vert _0\nonumber \\&\leqslant C(h^2+\tau +\Vert \eta _v^n\Vert _0)\Vert D_{\tau }\eta _u^n\Vert _0, \end{aligned}$$

which shows that

$$\begin{aligned} \Vert D_{\tau }\eta _u^n\Vert _0\leqslant C(h^2+\tau +\Vert \eta _v^n\Vert _0). \end{aligned}$$
(44)

Substituting (44) into (43) gives that

$$\begin{aligned} E_4+E_5+E_6+E_7+E_8+E_9&\leqslant C(h^2+\tau )^2+C(\Vert \eta _u^{n-1}\Vert _0^2+\Vert \nabla \eta _u^{n-1}\Vert _0^2+\Vert \eta _v^n\Vert _0^2). \end{aligned}$$
(45)

Similar to \(E_8\), \(E_{10}\) can be bounded by

$$\begin{aligned} E_{10}&=e_r^n(H(u^n)-H(u^{n-1}),u_t^n)\leqslant C\tau |e_r^n|. \end{aligned}$$
(46)

Using (9) and (23), we have for \(E_{11}\) that

$$\begin{aligned} E_{11}&\leqslant C|e_r^n|\int _{\varOmega }|f(u_h^{n-1})||D_{\tau }\xi _u^n|\textrm{d}\varvec{x}\leqslant C|e_r^n|\int _{\varOmega }(1+|u_h^{n-1}|^p)|D_{\tau }\xi _u^n|\textrm{d}\varvec{x}\nonumber \\&\leqslant C|e_r^n|(1+\Vert u_h^{n-1}\Vert _{0,2p}^p)\Vert D_{\tau }\xi _u^n\Vert _0\leqslant C(1+\Vert \nabla u_h^{n-1}\Vert _0^p)|e_r^n|\Vert D_{\tau }\xi _u^n\Vert _0\nonumber \\&\leqslant Ch^2|e_r^n|. \end{aligned}$$
(47)

Using a process similar to \(E_9\), we have

$$\begin{aligned} E_{12}&\leqslant C|e_r^n|\int _{\varOmega }(f(u^{n-1})-f(u_h^{n-1}))D_{\tau }u^n \textrm{d}\varvec{x}\nonumber \\&\quad +C|e_r^n|\int _{\varOmega }\left(F(u_h^{n-1})-F(u^{n-1})\right)\textrm{d}\varvec{x}\cdot \int _{\varOmega }f(u_h^{n-1})D_{\tau }u^n\textrm{d}\varvec{x}\nonumber \\&\leqslant C(h^2+\Vert \eta _u^{n-1}\Vert _0)|e_r^n|. \end{aligned}$$
(48)

With an application of (9) and the Taylor expansion, we obtain

$$\begin{aligned} E_{13}+E_{14}&\leqslant C\tau |e_r^n|. \end{aligned}$$
(49)

Thus, it follows that

$$\begin{aligned} E_{10}+E_{11}+E_{12}+E_{13}+E_{14}&\leqslant C(h^2+\tau +\Vert \eta _u^{n-1}\Vert _0)|e_r^n|. \end{aligned}$$
(50)

Substituting (35), (36), (37), (38), (45), and (50) into (34) leads to

$$\begin{aligned}&\quad\frac{1}{2\tau }(\Vert \eta _v^n\Vert _0^2-\Vert \eta _v^{n-1}\Vert _0^2)+\frac{1}{2\tau }(\Vert \nabla \eta _u^n\Vert _0^2-\Vert \nabla \eta _u^{n-1}\Vert _0^2)+\frac{\lambda }{2\tau }(\Vert \eta _u^n\Vert _0^2\nonumber \\&\quad -\Vert \eta _u^{n-1}\Vert _0^2)+\frac{1}{\tau }(|e_r^n|^2-|e_r^{n-1}|^2)\nonumber \\&\leqslant \tau ^{-1}[(D_{\tau }\xi _u^n,\eta _v^n)-(D_{\tau }\xi _u^{n-1},\eta _v^{n-1})]+\tau ^{-1}[(\xi _v^n,\eta _v^n)-(\xi _v^{n-1},\eta _v^{n-1})]\nonumber \\&\quad +\tau ^{-1}[(D_{\tau }u^n-u_t^n,\eta _v^n)-(D_{\tau }u^{n-1}-u_t^{n-1},\eta _v^{n-1})]+C(h^2+\tau )^2+C|e_r^n|^2\nonumber \\&\quad +C(\Vert \eta _u^{n-1}\Vert _0^2+\Vert \nabla \eta _u^{n-1}\Vert _0^2+\Vert \eta _v^{n-1}\Vert _0^2). \end{aligned}$$
(51)

Summing up the above inequality and using \(\eta _u^0=0\), \(\eta _v^0=0\), and \(e_r^0=0\), we derive

$$\begin{aligned}&\frac{1}{2\tau }\Vert \eta _v^n\Vert _0^2+\frac{1}{2\tau }\Vert \nabla \eta _u^n\Vert _0^2+\frac{\lambda }{2\tau }\Vert \eta _u^n\Vert _0^2+\frac{1}{\tau }|e_r^n|^2\leqslant \tau ^{-1}(D_{\tau }\xi _u^n,\eta _v^n)+\tau ^{-1}(\xi _v^n,\eta _v^n)\nonumber \\& +\tau ^{-1}(D_{\tau }u^n-u_t^n,\eta _v^n)\nonumber + Cn(h^2+\tau )^2+C\sum _{k=1}^n(\Vert \eta _u^k\Vert _0^2+\Vert \nabla \eta _u^k\Vert _0^2+\Vert \eta _v^k\Vert _0^2+|e_r^k|^2). \end{aligned}$$
(52)

Multiplying both sides of the above inequality by \(2\tau\) and using the Cauchy-Schwarz inequality for the first three terms appeared on the right-hand side of the above inequality yields that

$$\begin{aligned} \Vert \eta _v^n\Vert _0^2+\Vert \nabla \eta _u^n\Vert _0^2&+\Vert \eta _u^n\Vert _0^2+|e_r^n|^2\leqslant C(h^2+\tau )^2+C\tau \sum _{k=1}^n(\Vert \eta _u^k\Vert _0^2+\Vert \nabla \eta _u^k\Vert _0^2+\Vert \eta _v^k\Vert _0^2+|e_r^k|^2). \end{aligned}$$
(53)

Therefore, an application of the Gronwall inequality (see Lemma 3) gives that for the sufficiently small \(\tau\)

$$\begin{aligned} \Vert \eta _v^n\Vert _0+\Vert \nabla \eta _u^n\Vert _0+\Vert \eta _u^n\Vert _0+|e_r^n|\leqslant C(h^2+\tau ). \end{aligned}$$
(54)

Then, the desired result (24) is obtained by the triangle inequality. Moreover, according to (54) and (8) and using the triangle inequality again, we have for \(n=1,2,\cdots ,N\)

$$\begin{aligned} \Vert \nabla (I_hu^n-u_h^n)\Vert _0\leqslant \Vert \nabla (I_hu^n-R_hu^n)\Vert _0+\Vert \nabla (R_hu^n-u_h^n)\Vert _0\leqslant C(h^2+\tau ), \end{aligned}$$
(55)

which the desired result (25) can be derived using the Poincare inequality.

In what follows, based on the above superclose error estimate between \(u_h^n\) and \(I_hu^n\) in (55), we employ the interpolation post-processing approach to obtain the global superconvergence result in \(H^1\)-norm. To do this, we build a macroelement \({\widetilde{K}}\) consisting of four elements \(K_j\), \(j=1,2,3,4\) (see Fig. 1), and we adopt the local interpolation operator \(I_{2\,h}\!: C({\widetilde{K}})\rightarrow Q_{22}({\widetilde{K}})\) as interpolation post-processing operator [25] with the following interpolation conditions:

$$\begin{aligned} I_{2h}u(z_i)=u(z_i),~~i=1,2,\cdots ,9, \end{aligned}$$

where \(z_i\), \(i=1,2,\cdots ,9\) are the nine vertices of \({\widetilde{K}}\) and \(Q_{22}({\widetilde{K}})\) denotes the space of polynomials degree less than or equal to 2 in variables x and y on \({\widetilde{K}}\), respectively.

Fig. 1
figure 1

The macroelement \({\tilde{K}}\)

Moreover, the following properties for operator \(I_{2h}\) have been shown in [25]:

$$\begin{aligned}&I_{2h}I_hu=I_{2h}u,\end{aligned}$$
(56)
$$\begin{aligned}&\Vert u-I_{2h}u\Vert _1\leqslant Ch^2\Vert u\Vert _3,\quad \forall u\in H^3(\varOmega ), \end{aligned}$$
(57)
$$\begin{aligned}&\Vert I_{2h}v_h\Vert _1\leqslant C\Vert v_h\Vert _1,\quad \forall v_h\in V_h. \end{aligned}$$
(58)

Then, we have the following global superconvergent result.

Theorem 2

Suppose that \(u\in L^{\infty }((0,T];\,H^3(\varOmega ))\) together with the conditions of Theorem 1, we have for \(n=1,2,\cdots ,N\)

$$\begin{aligned} \Vert u^n-I_{2h}u_h^n\Vert _1\leqslant C(h^2+\tau ). \end{aligned}$$
(59)

Proof

By the triangle inequality and the properties (56)–(58) and (55), we have

$$\begin{aligned} \Vert u^n-I_{2h}u_h^n\Vert _1&\leqslant \Vert u^n-I_{2h}I_hu^n\Vert _1+\Vert I_{2h}I_hu^n-I_{2h}u_h^n\Vert _1\nonumber \\&\leqslant \Vert u^n-I_{2h}u^n\Vert _1+\Vert I_{2h}(I_hu^n-u_h^n)\Vert _1\nonumber \\&\leqslant Ch^2\Vert u^n\Vert _3+C\Vert I_hu^n-u_h^n\Vert _1\nonumber \\&\leqslant C(h^2+\tau ), \end{aligned}$$
(60)

which is the desired result and the proof is complete.

4 Numerical Results

In this section, we present some numerical results to verify the correctness of the theoretical findings.

Example 1

Consider the following Kelin-Gordon equation [7]:

$$\begin{aligned} u_{tt}-\Delta u+u^3-u=g(\varvec{x},t), \quad (x,y)\in \varOmega ,\quad 0<t\leqslant T. \end{aligned}$$

Let the function \(g(\varvec{x},t)\) and the initial and boundary conditions be chosen corresponding to the exact solution

$$\begin{aligned} u(x,y,t)=\exp (-t)x^2(1-x)^2y^2(1-y)^2. \end{aligned}$$

We set the domain \(\varOmega =(0,1)\times (0,1)\) and the final time \(T=1.0\) in the computation.

A uniform partition with \(m +1\) nodes in both horizontal and vertical directions is made on the domain \(\varOmega\). To confirm the error estimates in Theorems 1 and 2, choose \(\tau =O(h^2)\). We present the numerical errors of \(\Vert v^n-v_h^n\Vert _0\), \(\Vert u^n-u_h^n\Vert _0\), \(\Vert u^n-u_h^n\Vert _1\), \(\Vert I_hu^n-u_h^n\Vert _1\), and \(\Vert u^n-I_{2\,h}u_h^n\Vert _1\) at \(t=1.0\) in Table 1. Obviously, we can see that the numerical results agree well with the theoretical analysis, i.e., the convergence rate is \(O(h^2)\), \(O(h^2)\), O(h), \(O(h^2)\), and \(O(h^2)\), respectively.

Table 1 The numerical errors at \(t=1.0\)

Example 2

Consider the following Kelin-Gordon equation:

$$\begin{aligned} u_{tt}-\Delta u+u^3-u=0, \quad (x,y)\in \varOmega =(0,1)\times (0,1),\quad 0<t\leqslant T=100 \end{aligned}$$

with the initial conditions

$$\begin{aligned} u_0(x,y)=x^2(1-x)^2y^2(1-y)^2,\quad \quad u_1(x,y)=-x^2(1-x)^2y^2(1-y)^2. \end{aligned}$$

The temporal direction is divided with time-step size 1, and the spatial direction is divided with stepsize \(h=\frac{\sqrt{2}}{30}\). In Fig. 2, we present some values of the discrete energy for the backward Euler scheme at various time levels \(t_n\). It can be seen that the numerical scheme preserves the nonincreasing property of the discrete energy, which is consistent with the theoretical analysis.

Fig. 2
figure 2

The profile of the discrete energy for Example 2

Example 3

Consider the following sine-Gordon equation [7]:

$$\begin{aligned} u_{tt}-\Delta u+\sin (u)=g(\varvec{x},t), \quad (x,y)\in \varOmega ,\quad 0<t\leqslant T.\end{aligned}$$

Let the function \(g(\varvec{x},t)\) and the initial and boundary conditions be chosen corresponding to the exact solution

$$\begin{aligned} u(x,y,t)=\exp (-t)\sin (2\uppi x)\sin (2\uppi y). \end{aligned}$$

We set the domain \(\varOmega =(0,1)\times (0,1)\) and the final time \(T=1.0\) in the computation.

A uniform partition with \(m +1\) nodes in both horizontal and vertical directions is made on the domain \(\varOmega\). To confirm the error estimates in Theorems 1 and 2, choose \(\tau =O(h^2)\). We present the numerical errors of \(\Vert v^n-v_h^n\Vert _0\), \(\Vert u^n-u_h^n\Vert _0\), \(\Vert u^n-u_h^n\Vert _1\), \(\Vert I_hu^n-u_h^n\Vert _1\), and \(\Vert u^n-I_{2\,h}u_h^n\Vert _1\) at \(t=1.0\) in Table 2. Obviously, we can see that the numerical results agree well with the theoretical analysis, i.e., the convergence rate is \(O(h^2)\), \(O(h^2)\), O(h), \(O(h^2)\), and \(O(h^2)\), respectively.

Table 2 The numerical errors at \(t=1.0\)

Example 4

Consider the following sine-Gordon equation:

$$\begin{aligned} u_{tt}-\Delta u+\sin (u)=0, \quad (x,y)\in \varOmega =(0,1)\times (0,1),\quad 0<t\leqslant T=100 \end{aligned}$$

with initial conditions

$$\begin{aligned} u_0(x,y)=v,\quad \quad u_1(x,y)=-\sin (2\uppi x)\sin (2\uppi y). \end{aligned}$$

The temporal direction is divided with time-step size 1, and the spatial direction is divided with stepsize \(h=\frac{\sqrt{2}}{30}\). In Fig. 3, we present some values of the discrete energy for the backward Euler scheme at various time levels \(t_n\). It can be seen that the numerical scheme preserves the nonincreasing property of the discrete energy, which is consistent with the theoretical analysis.

Fig. 3
figure 3

The profile of the discrete energy for Example 4

Example 5

Consider the following Kelin-Gordon equation [7]:

$$\begin{aligned} u_{tt}-\Delta u+u^3-u=g(\varvec{x},t), \quad (x,y)\in \varOmega ,\quad 0<t\leqslant T. \end{aligned}$$

Let the function \(g(\varvec{x},t)\) and the initial and boundary conditions be chosen corresponding to the exact solution

$$\begin{aligned} u(x,y,t)=\exp (-t)x^2(1-x)^2y^2(1-y)^2. \end{aligned}$$

We set the domain \(\varOmega =(0,1)\times (0,1)\) and the final time \(T=1.0\) in the computation.

The domain \(\varOmega\) is divide into \(m\times n\) rectangles with \(m\times n= 4\times 16\), \(8\times 32\), \(16\times 64\), \(32\times 128\), respectively (see Fig. 4 for the cases \(4\times 16\) and \(8\times 32\)). We choose \(\tau =0.001\) and present the numerical errors of \(\Vert v^n-v_h^n\Vert _0\), \(\Vert u^n-u_h^n\Vert _0\), \(\Vert u^n-u_h^n\Vert _1\), \(\Vert I_hu^n-u_h^n\Vert _1\), and \(\Vert u^n-I_{2\,h}u_h^n\Vert _1\) at \(t=1.0\) in Table 3. Obviously, we can see that the numerical results agree well with the theoretical analysis, i.e., the convergence rate is \(O(h^2)\), \(O(h^2)\), O(h), \(O(h^2)\), and \(O(h^2)\), respectively. Moreover, for clarity, we present the graphics of the exact solution and numerical solution at \(t=1.0\) in Figs. 56 on mesh \(32\times 128\), which also shows that the numerical solution approximates the exact solution very well.

Table 3 The numerical errors at \(t=0.1\)
Fig. 4
figure 4

The partition of \(\varOmega\) for Example 5

Fig. 5
figure 5

The graphics of the solutions v and \(v_h\) at \(t=1.0\) on mesh \(32\times 128\)

Fig. 6
figure 6

The graphics of the solutions u and \(u_h\) at \(t=1.0\) on mesh \(32\times 128\)