1 Introduction

We introduce and study the local discontinuous Galerkin (LDG) methods to approximate the \(\mu \)-Camassa–Holm (\(\mu \)CH) equation

$$\begin{aligned} \mu (u)_t-u_{xxt}+2\mu (u)u_x = 2u_xu_{xx}+uu_{xxx}, \end{aligned}$$
(1.1)

and the \(\mu \)-Degasperis–Procesi (\(\mu \)DP) equation

$$\begin{aligned} \mu (u)_t-u_{xxt}+3\mu (u)u_x = 3u_xu_{xx}+uu_{xxx}. \end{aligned}$$
(1.2)

In fact, the \(\mu \)CH and \(\mu \)DP equations are the cases \(\lambda =2\) and \(\lambda =3\), respectively, of the following family of equations

$$\begin{aligned} \mu (u)_t-u_{xxt}+\lambda \mu (u)u_x = \lambda u_xu_{xx}+uu_{xxx},\qquad \lambda \in {\mathbb {Z}}, \end{aligned}$$
(1.3)

which is a corresponding \(\mu \)-version of the family of equations defined as follows

$$\begin{aligned} u_t-u_{xxt} + (\lambda +1)u u_x = \lambda u_xu_{xx}+uu_{xxx},\qquad \lambda \in {\mathbb {Z}}, \end{aligned}$$
(1.4)

that consists of the well known Camassa–Holm (CH) and Degasperis–Procesi (DP) equations with respective choices \(\lambda =2\) and \(\lambda =3\).

The \(\mu \)CH equation (1.1) originally derived and studied in [10] attracts a lot of attention. The variable u(xt) is a time-dependent function on the unit circle \({\mathcal {S}}^1={\mathbb {R}}/{\mathbb {Z}}\) and \(\mu (u)=\int _{{\mathcal {S}}^1}udx\) denotes its mean. In [10], the authors generalize that the \(\mu \)CH equation can be regarded as a natural generalization of the rotator equation in some sense and can also describe the geodesic flow endowed with the \(H^1_{\mu }\)-inner product \((\cdot ,\cdot )_{\mu }\) and associated \(H^1_{\mu }\)-norm \(\Vert \cdot \Vert _{\mu }\) as defined in [4]

$$\begin{aligned} (u,v)_{\mu }&:=\mu (u)\mu (v)+\int _{{\mathcal {S}}^1}u_xv_xdx, \end{aligned}$$
(1.5)
$$\begin{aligned} \Vert u\Vert _{\mu }&:=\sqrt{(u,u)_{\mu }}=\sqrt{\mu (u)^2+\int _{{\mathcal {S}}^1}u_x^2dx}. \end{aligned}$$
(1.6)

The closest relative of the \(\mu \)CH equation should be the Camassa–Holm equation

$$\begin{aligned}&u_t-u_{xxt} + 3uu_x = 2u_xu_{xx}+uu_{xxx}, \end{aligned}$$
(1.7)

which is a completely integrable system with the bi-Hamiltonian structure and can be viewed as a shallow water approximation. In [20], Xu and Shu developed a high-order accuracy and stable LDG method to solve the Camassa–Holm equation (1.7). The \(L^2\) stability of their LDG method to CH equation is given, and a detailed error estimate for the scheme is also proven. Some efficient numerical experiments have validated their scheme and illustrated that the LDG methods have a good potential in solving these kinds of nonlinear equations. Our numerical schemes and main framework are inspired greatly by their contributions. Besides, another invariant preserving DG method for CH equation presented in [12] also give us some useful hints in designing conservative schemes for the \(\mu \)CH equation.

Based on the study from [4, 10, 11], we know that the \(\mu \)CH equation is also a completely integrable system with the bi-Hamiltonian structure and hence it has an infinite number of conservation laws. The first two invariants of the \(\mu \)CH equation described by

$$\begin{aligned} E_0(u)=\int _{{\mathcal {S}}^1}u dx, \qquad E_1(u) = \mu (u)^2 +\int _{{\mathcal {S}}^1} u_x^2 dx, \end{aligned}$$
(1.8)

illustrate that, on the unit circle \({\mathcal {S}}^1\), the mean of any solution u and the \(H^1_{\mu }\)-norm of u defined in (1.6) are both conservative in the time evolution. These properties enlighten us to design a conservative numerical scheme preserving the discrete counterpart of these conservation laws. A conservative scheme, together with a dissipative one, for the \(\mu \)CH equation are designed and analyzed in the present paper. Owing to the term \(2\mu (u)u_x\) in the \(\mu \)CH equation (1.1), which is in fact a linearization of the analogue term \(3uu_x\) in CH equation (1.7), the subtle difference between the conservative and dissipative LDG schemes only exists in the choice of numerical flux for this term. For high order schemes, we will see that there is no qualitative distinction between these two schemes in numerical experiments. Owing to the really analogous structures and attributes of the \(\mu \)CH equation and CH equation, we will give the error estimates of the semi-discrete LDG schemes for the \(\mu \)CH equation by following the ideas and procedures of error estimates in [20] and applying some important tools to handle the unexpected terms, such as the Poincaré-Friedrichs inequality for discontinuous piecewise polynomials and the relationship between the auxiliary variables of the LDG methods.

As to the \(\mu \)DP equation (1.2), the notations u(xt) and \(\mu (u)\) have the same meanings as in the \(\mu \)CH equation (1.1). Formally, the \(\mu \)DP equation can be described as an evolution equation on the space of tensor densities over the Lie algebra of smooth vector fields on the circle. The \(\mu \)DP equation is an extensive study of the well-known Degasperis–Procesi equation

$$\begin{aligned}&u_t-u_{xxt} + 4uu_x = 3u_xu_{xx}+uu_{xxx}, \end{aligned}$$
(1.9)

which has a similar form to the CH equation. Otherwise the DP equation truly possesses specific features, and one of them is that it admits not only peaked solutions but also shock waves. Xu and Shu in [24] first proposed two provable stable LDG schemes to simulate this DP equation. In their work, the \(L^2\) stability for general solutions and total variation stability for piecewise constant case are both given. Motivated by the stability analysis in [24], high order methods such as the Fourier spectral methods [16] and weighted essentially non-oscillatory (WENO) schemes [17] for the DP equation have also been developed. The idea of constructing the \(L^2\) stable scheme for the DP equation is also an important guideline to design the numerical method for the \(\mu \)DP equation.

By the work for the \(\mu \)DP equation in [11], we know the facts: analogous to the \(\mu \)CH equation, it is also a completely integrable system with a bi-Hamiltonian form and has an infinite number of conservation laws. Here we also list the first two conserved invariants

$$\begin{aligned} H_0(u)=\int _{{\mathcal {S}}^1}u dx, \qquad H_1(u) = \int _{{\mathcal {S}}^1} u^2 dx. \end{aligned}$$
(1.10)

This indicates that the mean and \(L^2\)-norm of numerical solutions to the \(\mu \)DP equation keep conserved in the time evolution, which motivates us to design \(L^2\) stable LDG schemes for the \(\mu \)DP equation. For this purpose, we choose another equivalent form of the \(\mu \)DP equation (1.2)

$$\begin{aligned} {u_t + uu_x + 3 \mu (u)(A_{\mu }^{-1}u)_x = 0,} \end{aligned}$$
(1.11)

where \(A_{\mu }\) is an invertible linear operator defined as \(A_{\mu }(u)=\mu (u)-u_{xx}\). Equation (1.11) is a consequence by applying \(A_{\mu }^{-1}\) to both sides of (1.2), and the detailed derivation is given in “Appendix A.1”. We will design and analyze two different schemes for the \(\mu \)DP equation. One scheme is conservative, which preserves the mean and \(L^2\) energy of solutions to this nonlinear equation; another one is dissipative that still preserves \(H_0(u)\) and just keeps the \(L^2\) stability of numerical solutions. There is a relatively large difference between these two schemes due to the choices of numerical fluxes. The global \(L^2\) projection, to deal with the central fluxes and thus requiring special assumptions over the parity of the degree of polynomial and the number of cells of the mesh, is used in the error estimates for such conservative scheme. Meanwhile the local \(L^2\) projection is enough for the dissipative scheme which has no extra restrict on the approximation spaces and meshes. To the best of our knowledge, there is no study on the error estimates for the DG method to the DP equation because of the obstacles caused by the nonlinear term \(4uu_x\) in (1.9). However, the term \(3\mu (u)u_x\) of the \(\mu \)DP equation, which is a linear term in some conservative sense, make us avoid this difficulty appeared in the DP equation. In this paper, we present two a priori error estimates for both conservative and dissipative schemes to the \(\mu \)DP equation and finally obtain two different results.

The LDG method discussed in present paper is an extension of the discontinuous Galerkin (DG) method to solve PDEs containing higher than first order spatial derivatives, using discontinuous piecewise polynomials as numerical solutions and test functions in the spacial variables. The LDG method was firstly constructed by Cockburn and Shu [7] in solving nonlinear convection-diffusion equations, which was inspired by the efficient numerical experiments of Bassi and Rebay [1] for simulating the compressible Navier-Stokes equations. In the procedure of the LDG method, higher order derivatives are rewritten into a first order system and applied with DG method subsequently. The cardinal technique in the LDG method is the design of the so-called numerical fluxes. The literatures on designing and analyzing the LDG schemes for different kinds of equations are quite plenty, and we suggest the reader consulting [7, 18, 20,21,22,23, 25] and the references therein. These contributions about the LDG method could supply rich and efficient guidance for us when encountering new equations or similar problems.

The extremely local, element based discretization in the DG method is effectively favorable for parallel computing and retaining high-precision on unstructured meshes. Particularly, DG methods are well suited for hp-adaptation, which consists of local mesh refinement and the adjustment of the polynomial order in individual elements. The LDG schemes for the \(\mu \)CH (1.1) and \(\mu \)DP (1.11) equations in present paper keep all these good properties.

Our paper is organized as follows: In Sect. 2, notations and other preliminary materials, such as the function spaces are firstly introduced. Section 3 is devoted to the study of the LDG schemes for the \(\mu \)CH equation. In Sects. 3.2 and 3.3 , the conservation of \(E_0\) and \(E_1\) of the \(\mu \)CH equation are proved valid for the conservative scheme and the \(H_\mu ^1\) error estimate of the scheme is also given. Besides, we also supplement a dissipative scheme for the \(\mu \)CH equation by altering the numerical fluxes and prove the corresponding stability according to \(E_1\) and the error estimate. Section 4 is on the subject of the \(\mu \)DP equation. Similarly we design two LDG schemes for the \(\mu \)DP equation, one is conservative and the other one is dissipative. The evolution of Hamiltonian invariants \(H_0\) and \(H_1\) of the \(\mu \)DP equation is analyzed in Sect. 4.2. Then in Sect. 4.3, we give the \(L^2\) error estimates of these two schemes. In Sect. 5, we implement these numerical schemes for some examples to illustrate the accuracy and capability of LDG schemes for both \(\mu \)CH and \(\mu \)DP equations. In particular, the features of admitting peakon solutions (for both \(\mu \)CH and \(\mu \)DP) and shock solutions (for \(\mu \)DP only) are numerically validated in this part. Concluding remarks are given in Sect. 6. Some proofs of several lemmas for the \(\mu \)CH equation are placed in “Appendix A”.

2 Notations, Function Spaces and Norms

In the following discussion, we just take one period, denoted by \(I=[0,L]\), of the whole domain \({\mathbb {R}}\) to replace the unit circle \({\mathbb {S}}\) by setting \(L=1\). Let \({\mathcal {T}}_h\) denote the partition of I with the mesh denoted by \(I_j=[x_{j-\frac{1}{2}},x_{j+\frac{1}{2}}]\) for \(j=1,\ldots ,N\). The center of the cell is \(x_j=\frac{1}{2}(x_{j-\frac{1}{2}}+x_{j+\frac{1}{2}})\) and the mesh size is denoted by \(h_j=x_{j+\frac{1}{2}}-x_{j-\frac{1}{2}}\) with \(h=\max _{1\le j \le N}h_j\) being the maximum cell size. The mesh is assumed to be regular, which means the ratio between the maximum and minimum mesh sizes keeps bounded in the mesh refinements.

The so-called broken Sobolev spaces \(W^{s,p}({\mathcal {T}}_h)\) are the finite Cartesian products of the standard Sobolev spaces \(W^{s,p}(I_j)\) on all cells in \({\mathcal {T}}_h\). Norms of \(W^{s,p}({\mathcal {T}}_h)\) with \(p=2,\infty \) are given by

$$\begin{aligned} \Vert u\Vert _{W^{s,2}({\mathcal {T}}_h)} = \Vert u\Vert _{H^s({\mathcal {T}}_h)}=\left( \sum _{j=1}^{N}\Vert u\Vert ^2_{H^s(I_j)} \right) ^{\frac{1}{2}},\quad \Vert u\Vert _{W^{s,\infty }({\mathcal {T}}_h)}=\max _{1\le j\le N}\Vert u\Vert _{W^{s,\infty }(I_j)}. \end{aligned}$$

In the case \(s=0\) with the interval I being clear from context, we would like to use the norms \(\Vert u\Vert \) and \(\Vert u\Vert _{\infty }\) to connote \(\Vert u\Vert _{L^2({\mathcal {T}}_h)} \) and \(\Vert u\Vert _{L^{\infty }({\mathcal {T}}_h)}\), respectively. Then we choose the following discontinuous piecewise polynomial space as the finite element space

$$\begin{aligned} {V_h=\left\{ v(x):v(x)\in P^k(I_j),\ \text {for} \ x \in I_j,\ j=1,\dots ,N \right\} ,} \end{aligned}$$
(2.1)

where \(P^k(I_j)\) denotes the set of polynomials of the degree up to k in each cell \(I_j\). It transpires that the functions belonging to \(V_h\) could be discontinuous on the element interfaces.

The solution of the numerical scheme is denoted by \(u_h\), which belongs to the finite element space \(V_h\). We denote the values of \(u_h\) at \(x_{j+\frac{1}{2}}\) by \((u_h)_{j+\frac{1}{2}}^+\) and \((u_h)_{j+\frac{1}{2}}^-\), from the right cell \(I_{j+1}\) and the left cell \(I_{j}\), respectively. We use the usual notations \([u_h]=u_h^+-u_h^-\) and \(\{u_h\}=\frac{1}{2}(u_h^+ + u_h^-)\) to denote the jump and the mean of the function \(u_h\), respectively, at each element boundary point.

3 The \(\mu \)-Camassa–Holm Equation

In this section, we devote to construct and analyze a conservative LDG scheme for the \(\mu \)CH equation, verify the properties of preserving Hamiltonian invariants and give the detailed error estimates. Besides, a dissipative scheme for this equation is also presented and the Hamiltonian stability is given. The main structure of this part is guided by the study for the LDG method to the CH equation in [20].

3.1 The LDG Schemes for the \(\mu \)CH Equation

In this part, we apply the LDG method to the \(\mu \)CH equation (1.1) which is written in following equivalent form

$$\begin{aligned} \mu (u)-u_{xx}&=q , \end{aligned}$$
(3.1)
$$\begin{aligned} q_t+f(u)_x&=\frac{1}{2}(u^2)_{xxx}-\frac{1}{2}\left( (u_x)^2\right) _x , \end{aligned}$$
(3.2)

with the initial condition

$$\begin{aligned} u(x,0)&=u_0(x), \end{aligned}$$
(3.3)

and periodic boundary conditions

$$\begin{aligned} u(x,t)&=u(x+L,t), \end{aligned}$$
(3.4)

where L is the measure of one period in the x direction and \(f(u)=2\mu (u)u\).

To define the local discontinuous Galerkin method, we further rewrite (3.1) as a first-order system

$$\begin{aligned} {\left\{ \begin{array}{ll} \mu (u)-r_x&{}=q, \\ r-u_x&{}=0. \end{array}\right. } \end{aligned}$$
(3.5)

Assume that q is known and u is to be solved, then we can formulate the LDG method for (3.5) as follows: Find \(u_h,r_h \in V_h\) such that, for all test functions \(\chi ,\phi \in V_h\),

$$\begin{aligned} \mu (u_h)\int _{I_j}\chi dx+\int _{I_j}r_h\chi _xdx-\left( {\widehat{r}}_h\chi ^-\right) _{j+\frac{1}{2}}+\left( {\widehat{r}}_h\chi ^+\right) _{j-\frac{1}{2}}&=\int _{I_j}{q_h\chi dx}, \end{aligned}$$
(3.6)
$$\begin{aligned} \int _{I_j}r_h\phi dx+\int _{I_j}u_h\phi _x-\left( {\widehat{u}}_h\phi ^-\right) _{j+\frac{1}{2}}+\left( {\widehat{u}}_h\phi ^+\right) _{j-\frac{1}{2}}&=0 . \end{aligned}$$
(3.7)

The “hat” terms in (3.6)–(3.7) appeared in the cell boundary terms are the so-called “numerical fluxes”, which are single-valued functions defined on the nodes and should be designed to ensure the stability of the numerical schemes. For Eq. (3.5), we take the alternating fluxes such that

$$\begin{aligned} {\widehat{r}}_h=r_h^-, \quad {\widehat{u}}_h=u_h^+. \end{aligned}$$
(3.8)

For (3.2), we can also rewrite it into a first-order system

$$\begin{aligned} {\left\{ \begin{array}{ll} q_t+f(u)_x-p_x+B(r)_x&{}=0, \\ p-(b(r)u)_x&{}=0, \\ r-u_x&{}=0. \end{array}\right. } \end{aligned}$$
(3.9)

where \(B(r)=\frac{1}{2}r^2\) and \(b(r)=B'(r)=r\). Now the LDG method for this system can be formulated as: Find \(q_h,p_h,r_h \in V_h\) such that, for all test functions \(\eta ,\psi ,\zeta \in V_h\),

$$\begin{aligned}&\int _{I_j}(q_h)_t\eta dx-\int _{I_j}(f(u_h)-p_h+B(r_h))\eta _xdx \nonumber \\&\quad +\left( \left( {\widehat{f}}-{\widehat{p}}_h+\widehat{B(r_h)}\right) \eta ^-\right) _{j+\frac{1}{2}} -\left( \left( {\widehat{f}}-{\widehat{p}}_h+\widehat{B(r_h)}\right) \eta ^+\right) _{j-\frac{1}{2}}=0, \end{aligned}$$
(3.10)
$$\begin{aligned}&\int _{I_j}p_h\psi dx+\int _{I_j}b(r_h)u_h\psi _xdx -\left( \widehat{b(r_h)}{\widetilde{u}}_h\psi ^-\right) _{j+\frac{1}{2}} +\left( \widehat{b(r_h)}{\widetilde{u}}_h\psi ^+\right) _{j-\frac{1}{2}}=0, \end{aligned}$$
(3.11)
$$\begin{aligned}&\int _{I_j}r_h\zeta dx+\int _{I_j}u_h\zeta _xdx -\left( \breve{u}_h\zeta ^-\right) _{j+\frac{1}{2}}+\left( \breve{u}_h\zeta ^+\right) _{j-\frac{1}{2}}=0. \end{aligned}$$
(3.12)

We choose the numerical fluxes in (3.10)–(3.12) as follows

$$\begin{aligned}&{\widehat{p}}_h=p_h^-,\ { \breve{u}_h=u_h^+,}\ \widehat{B(r_h)}=B(r_h^-),\ \widehat{b(r_h)}=\frac{B(r_h^+)-B(r_h^-)}{r_h^+-r_h^-},\ {\widetilde{u}}_h=u_h^+, \end{aligned}$$
(3.13)

and the numerical flux \({\widehat{f}}(u_h^-,u_h^+)\) is Lipschitz continuous in both arguments and consistent \(({\widehat{f}}(u,u)=f(u))\). Choices of the monotone numerical fluxes \({\widehat{f}}\), which is non-decreasing in the first argument and non-increasing in the second argument, in DG methods for conservation laws can be found in [6]. In our paper, two different schemes are presented by the numerical flux \({\widehat{f}}\) being chosen as the following two scenarios.

  • For a conservative scheme, we choose

    $$\begin{aligned}&{\widehat{f}}(u_h^-,u_h^+)=\frac{1}{2}\left( f(u_h^-)+f(u_h^+)\right) . \end{aligned}$$
    (3.14)

    Since \(\mu (u)\) is conserved, we can simplify the numerical flux as \({\widehat{f}}(u_h^-,u_h^+) = 2\mu _0\{u_h\}\), where \( \mu _0 =\mu (u) \).

  • For a dissipative scheme, the monotone numerical flux \({\widehat{f}}\) is chosen as the Lax-Friedrichs flux

    $$\begin{aligned} {\widehat{f}}(u_h^-,u_h^+) = \frac{1}{2}(f(u_h^-)+f(u_h^+)-\alpha (u_h^+-u_h^-)),\quad \alpha =\max \limits _{u_h}|f'(u_h)|. \end{aligned}$$
    (3.15)

    For simplification, \({\widehat{f}}(u_h^-,u_h^+)\) can be chosen as the upwind flux based on the constant \(\mu _0 = \mu (u)\).

Remark 3.1

We remark that the choices of the fluxes in (3.8) and (3.13) are not unique. The cardinal rule of choosing is that we must take the fluxes from opposite sides for each of the following couples: \({\widehat{r}}_h\) and \({\widehat{u}}_h\), \({\widehat{p}}_h\) and \(\breve{u}_h\), \(\widehat{B(r_h)}\) and \({\widetilde{u}}_h\). Here we list a sequence of possible choices of the numerical fluxes (using \({\widehat{m}}\) and \({\widehat{n}}\) as the representation notations): for all \(j=1,\ldots ,N\)

$$\begin{aligned} {\widehat{m}}_{j+\frac{1}{2}}&=\{m\}_{j+\frac{1}{2}}+\theta ([m])_{j+\frac{1}{2}}, \nonumber \\ {\widehat{n}}_{j+\frac{1}{2}}&=\{n\}_{j+\frac{1}{2}}-\theta ([n])_{j+\frac{1}{2}}, \end{aligned}$$

where \(\theta \) is a constant. Particularly, \(\theta \) taking \(\pm \frac{1}{2}\) leads to the alternating fluxes and \(\theta =0\) to the central fluxes.

3.1.1 Algorithm Flowchart (I)

This section shows some details about the implementation of the numerical method.

  • From (3.6)–(3.7) with the fluxes (3.8), we can obtain the relationships among \({\mathbf {u}}_h\), \({\mathbf {r}}_h\) and \({\mathbf {q}}_h\) in the matrix form

    $$\begin{aligned} {\mathbf {A}}_{\mu } {\mathbf {u}}_h + {\mathbf {B}}_r {\mathbf {r}}_h&= {\mathbf {A}} {\mathbf {q}}_h, \end{aligned}$$
    (3.16)
    $$\begin{aligned} {\mathbf {A}} {\mathbf {r}}_h + {\mathbf {B}}_u{\mathbf {u}}_h&= {\mathbf {0}}. \end{aligned}$$
    (3.17)

    where \({\mathbf {r}}_h\), \({\mathbf {q}}_h\) and \({\mathbf {u}}_h\) are the vectors containing the degrees of freedom for \(r_h\), \(q_h\) and \(u_h\), respectively. And the matrices \({\mathbf {A}}_{\mu }\), \({\mathbf {B}}_r\), \({\mathbf {A}}\) and \({\mathbf {B}}_u\) are the corresponding discrete operators in the scheme (3.6)–(3.7). We can deduce that

    $$\begin{aligned}&{\mathbf {D}}{\mathbf {u}}_h={\mathbf {A}}{\mathbf {q}}_h, \end{aligned}$$
    (3.18)

    where \({\mathbf {D}}={\mathbf {A}}_{\mu }-{\mathbf {B}}_r{\mathbf {A}}^{-1}{\mathbf {B}}_u\).

  • Then from (3.10)–(3.12) equipped with the corresponding fluxes (3.13) and (3.14), we get the LDG discretization of the residue \(\displaystyle -f(u)_x+\frac{1}{2}(u^2)_{xxx}-\frac{1}{2}((u_x)^2)_x\) as follows

    $$\begin{aligned} {\mathbf {A}}({\mathbf {q}}_h)_t = \mathbf {res}({\mathbf {u}}_h). \end{aligned}$$
    (3.19)
  • Combining (3.18) and (3.19), we get

    $$\begin{aligned} {\mathbf {D}}({\mathbf {u}}_h)_t=\mathbf {res}({\mathbf {u}}_h). \end{aligned}$$
    (3.20)
  • Finally, we can utilize a time discretization method to solve

    $$\begin{aligned} ({\mathbf {u}}_h)_t = {\mathbf {D}}^{-1}\mathbf {res}({\mathbf {u}}_h). \end{aligned}$$
    (3.21)

3.2 Hamiltonian Stability and Conservative Properties

In this part, we turn to establish the conservation of two invariants \(E_0\) and \(E_1\) of our numerical schemes designed for the \(\mu \)CH equation. Recall the definitions of \(E_0\) and \(E_1\)

$$\begin{aligned} E_0(u)=\int _{0}^{1} u dx, \qquad E_1(u) = \mu (u)^2 +\int _{0}^{1} u_x^2 dx. \end{aligned}$$

Here we replace the unit circle \({\mathcal {S}}^1\) by the interval [0, 1] in \({\mathbb {R}}\). We further define the discrete analogs to these two invariants of the LDG schemes

$$\begin{aligned} {E_0^h(u_h)=\int _{0}^{1} u_h dx, \qquad E_1^h(u_h) = \mu (u_h)^2 +\int _{0}^{1} r_h^2 dx .} \end{aligned}$$
(3.22)

Proposition 3.2

Let \(u_h\) be the solution of the scheme (3.6)–(3.7) and (3.10)–(3.12) equipped with numerical fluxes (3.8), (3.13) in addition to (3.14) or (3.15). Then the discrete versions of Hamiltonian invariants \(E_0^h\) and \(E_1^h\) satisfy

  • The conservative scheme with numerical flux (3.14) for the \(\mu \)CH equation preserves the invariants \(E_0^h\) and \(E_1^h\)

    $$\begin{aligned} \frac{d}{dt}\big (\mu (u_h))= 0,\quad \frac{d}{dt}\big (\mu (u_h)^2+\int _{0}^{1}r_h^2dx\big ) = 0. \end{aligned}$$
    (3.23)
  • The dissipative scheme with numerical flux (3.15) for the \(\mu \)CH equation preserves only the invariant \(E_0^h\) yet keeps \(E_1^h\) stability

    $$\begin{aligned} \frac{d}{dt}\big (\mu (u_h))= 0,\quad \frac{d}{dt}\big (\mu (u_h)^2+\int _{0}^{1}r_h^2dx\big ) \le 0. \end{aligned}$$
    (3.24)

Proof

First, we consider the properties of \(E_0^h\) for both schemes. For (3.6), we first take the time derivative and obtain

$$\begin{aligned}&\mu (u_h)_t\int _{I_j}\chi dx+\int _{I_j}(r_h)_t\chi _xdx - \left( ({\widehat{r}}_h)_t\chi ^-\right) _{j+\frac{1}{2}}+\left( ({\widehat{r}}_h)_t\chi ^+\right) _{j-\frac{1}{2}} =\int _{I_j}(q_h)_t\chi dx. \end{aligned}$$
(3.25)

Since (3.25), (3.7) and (3.10)–(3.12) hold for any test functions in \(V_h\), then by choosing

$$\begin{aligned}&\chi =1,\ \eta =1,\ \phi =0,\ \psi =0,\ \zeta =0, \end{aligned}$$

we can get two valid equations

$$\begin{aligned} \mu (u_h)_t |I_j| - \left( ({\widehat{r}}_h)_t\right) _{j+\frac{1}{2}} + \left( ({\widehat{r}}_h)_t\right) _{j-\frac{1}{2}}&= \int _{I_j}(q_h)_{t}dx, \\ \int _{I_j}(q_h)_{t}dx - \left( {\widehat{f}}-{\widehat{p}}_h+\widehat{B(r_h)}\right) _{j+\frac{1}{2}} + \left( {\widehat{f}}-{\widehat{p}}_h+\widehat{B(r_h)}\right) _{j-\frac{1}{2}}&=0, \end{aligned}$$

where \(|I_j|=\int _{I_j}1dx\). Considering the periodic boundary condition, and summing up both equations over all cells, we obtain the conservation of \(E_0^h\) for both schemes

$$\begin{aligned}&\mu (u_h)_t = 0. \end{aligned}$$

Next, we turn to the analysis about \(E_1^h\). Take the test functions in (3.25), (3.7) and (3.10)–(3.12) as follows

$$\begin{aligned}&\chi =u_h, \phi =(r_h)_t, \eta =u_h, \psi =-r_h, \zeta =p_h. \end{aligned}$$
(3.26)

Summing up these equations (3.25), (3.7) and (3.10)–(3.12), we obtain

$$\begin{aligned}&\mu (u_h)_t\int _{I_j}u_hdx+\int _{I_j}(r_h)_tr_hdx -\int _{I_j}f(u_h)(u_h)_xdx+\left( {\widehat{f}}u_h^-\right) _{j+\frac{1}{2}} -\left( {\widehat{f}}u_h^+\right) _{j-\frac{1}{2}}\\&\qquad +\int _{I_j}(p_hu_h)_xdx-\left( {\widehat{p}}_hu_h^- +\breve{u}_hp_h^-\right) _{j+\frac{1}{2}}+\left( {\widehat{p}}_hu_h^+ +\breve{u}_h p_h^+\right) _{j-\frac{1}{2}}\\&\qquad -\int _{I_j}(B(r_h)u_h)_xdx + \left( \widehat{B(r_h)}u_h^-+\widehat{b(r_h)}{\widetilde{u}}_hr_h^-\right) _{j+\frac{1}{2}} -\left( \widehat{B(r_h)}u_h^++\widehat{b(r_h)}{\widetilde{u}}_hr_h^+\right) _{j-\frac{1}{2}}\\&\qquad +\int _{I_j}(u_h(r_h)_t)_xdx - \left( ({\widehat{r}}_h)_tu_h^- + {\widehat{u}}_h(r_h^-)_t\right) _{j+\frac{1}{2}} +\left( ({\widehat{r}}_h)_tu_h^+ + {\widehat{u}}_h(r_h^+)_t\right) _{j-\frac{1}{2}}=0. \end{aligned}$$

Taking \(F(u)=\int ^{u}{f(\tau )d\tau }\), we have

$$\begin{aligned}&\mu (u_h)_t\int _{I_j}{u_h}dx + \int _{I_j}{(r_h)_tr_h}dx + \Psi _{j+\frac{1}{2}} - \Psi _{j-\frac{1}{2}} + \Theta _{j-\frac{1}{2}} = 0, \end{aligned}$$
(3.27)

where the function \(\Psi _{j+\frac{1}{2}}\), which will disappear for the reason of periodic boundary condition when summing up over all cells, are given by

$$\begin{aligned} \Psi _{j+\frac{1}{2}}&= \left( -F(u_h^-) + {\widehat{f}}u_h^- + {p_h^-u_h^-} - ({\widehat{p}}_hu_h^- + \breve{u}_hp_h^-)\right. \\&\left. \quad - B(r_h^-)u_h^- + \widehat{B(r_h)}u_h^- + \widehat{b(r_h)}{\widetilde{u}}_hr_h^- + (r_h^-)_tu_h^--\left( ({\widehat{r}}_h)_tu_h^- + ({\widehat{u}}_h(r_h^-)_t)\right) \right) _{j+\frac{1}{2}}, \end{aligned}$$

and the extra term \(\Theta \) is given by

$$\begin{aligned} \Theta _{j-\frac{1}{2}}&= \left( [F(u_h)] - {\widehat{f}}[u_h] - [p_hu_h] + {\widehat{p}}_h[u_h] + \breve{u}_h[p_h]\right. \\&\left. \quad +[B(r_h)u_h] - \widehat{b(r_h)}{\widetilde{u}}_h[r_h] - \widehat{B(r_h)}[u_h] -[(r_h)_tu_h] + ({\widehat{r}}_h)_t[u_h] + {\widehat{u}}_h[(r_h)_t] \right) _{j-\frac{1}{2}}. \end{aligned}$$

On account of the choices of the numerical fluxes in (3.8) and (3.13) and applying some algebraic manipulation, we have

$$\begin{aligned} -[p_hu_h] + {\widehat{p}}_h[u_h] + \breve{u}_h[p_h]&= 0, \\ [B(r_h)u_h] - \widehat{b(r_h)}{\widetilde{u}}_h[r_h] - \widehat{B(r_h)}[u_h]&= 0, \\ -[(r_h)_tu_h] + ({\widehat{r}}_h)_t[u_h] + {\widehat{u}}_h[(r_h)_t]&= 0. \end{aligned}$$

Now the extra term \(\Theta _{j-\frac{1}{2}}\) becomes

$$\begin{aligned} \Theta _{j-\frac{1}{2}} = ([F(u_h)] - {\widehat{f}}[u_h]_{j-\frac{1}{2}}). \end{aligned}$$
(3.28)
  • Conservative scheme

We first consider the conservative scheme with the numerical flux \({\widehat{f}}(u_h^-,u_h^+) = \frac{1}{2}(f(u_h^-)+f(u_h^+))\). Noticing that \(\mu (u_h)_t=0\), namely \(\mu (u_h)\) is a constant in time evolution denoted by \(\mu _0\), then \({\widehat{f}}(u_h^-,u_h^+) = 2\mu _0 \{u_h\}\) and this leads to

$$\begin{aligned} \Theta _{j-\frac{1}{2}}&= \left( [F(u_h)] - {\widehat{f}}[u_h]\right) _{j-\frac{1}{2}} =\int _{u_h^-}^{u_h^+}(f(s)-{\widehat{f}}(u_h^-,u_h^+))ds \\&=\int _{u_h^-}^{u_h^+}2\mu _0 s ds-\mu _0\left( (u_h^+)^2 - (u_h^-)^2\right) =0. \end{aligned}$$

Summing up the equalities (3.27), and noticing \( \sum _{j=1}^{N}\int _{I_j}u_hdx = \mu (u_h)\), then we obtain the desired result (3.23) for the conservative scheme.

  • Dissipative scheme

Besides, the dissipative scheme with numerical flux \({\widehat{f}}\) chosen as (3.15) has the only difference in the term \(\Theta _{j-\frac{1}{2}}\) comparing to the conservative scheme. By the monotonicity and consistency of the Lax-Friedrichs flux, we have

$$\begin{aligned} \Theta _{j-\frac{1}{2}}&=\left( [F(u_h)]-{\widehat{f}}(u_h^-,u_h^+)[u_h]\right) _{j-\frac{1}{2}} \\&=\int _{u_h^-}^{u_h^+}\left( {\widehat{f}}(s,s)-{\widehat{f}}(s,u_h^+)+{\widehat{f}}(s,u_h^+)-{\widehat{f}}(u_h^-,u_h^+) \right) \ge 0. \end{aligned}$$

This alteration gives rise to some dissipative \(E_1^h\) property of this scheme

$$\begin{aligned} \frac{d}{dt}\big (\mu (u_h)^2+\int _{0}^{1}r_h^2dx\big ) \le 0. \end{aligned}$$

\(\square \)

Remark 3.3

On account of the conservation of \(E_0^h\), the essence of the conservation of \(E_1^h\) is

$$\begin{aligned} {E_1^h = \int _{0}^{1} r_h^2 dx}, \end{aligned}$$
(3.29)

which indicates the \(L^2\) energy of the numerical approximation to \(u_x\).

Remark 3.4

There is another equivalent form of the CH or \(\mu \)CH equation

$$\begin{aligned} m_t + um_x + 2mu_x = 0, \end{aligned}$$
(3.30)

where \(m=u-u_{xx}\) (for the CH equation) or \(m=\mu (u)-u_{xx}\) (for the \(\mu \)CH equation). Based on this form, Liu and Xing present a fully-discrete invariant preserving DG method for the CH equation in [12]. The semi-discretization of their method can preserve the invariants spatially by choosing the central fluxes. We remark that this semi-discrete scheme can also be adapted to the \(\mu \)CH equation via almost the same procedures given in [12] except the last step of solving u from m. In the implementation of the scheme for the \(\mu \)CH equation, if we choose the central fluxes, the matrix \({\mathbf {D}}={\mathbf {A}}_{\mu }-{\mathbf {B}}_r{\mathbf {A}}^{-1}{\mathbf {B}}_u\) in (3.18), which is generated by the operator \(A=\mu -\partial _x^2\), will be singular without some essential restricts on the degree of polynomial of \(V_h\) and the number of cells in \({\mathcal {T}}_h\). This phenomenon also appears in the numerical experiments for the conservative LDG scheme for the \(\mu \)DP equation in next section, and therein we will give some detailed information about it.

3.3 Error Estimates of the LDG Method

In this subsection, we show the procedure to get the error estimates of our conservative and dissipative LDG schemes for the \(\mu \)CH equation.

3.3.1 Notations and Auxiliary Results

In this part, we introduce some notations and assumptions to be used and some auxiliary results to be cited later in this paper. We would define some projections and present certain interpolation and inverse properties for the finite element spaces.

\(\bullet \)Notations and assumptions We will denote by C a positive constant independent of h, which may depend on the solution of the \(\mu \)CH equation considered in this paper. Besides, the constant C may have a different value in each occurrence for the sake of facility. In this part, the exact solution of the problem to be considered is assumed to be sufficiently smooth equipped with the periodic boundary conditions. The time evolution about the problem is also bounded as \(0 \le t \le T\) for a fixed T. Consequently, the exact solution is bounded too.

\(\bullet \)Projection and interpolation properties In the following, we will introduce the standard \(L^2\) projection of a function \(\omega \) with \(k+1\) order bounded derivatives into the finite element space \(V_h\), denoted by \({\mathcal {P}}\); i.e., for each j,

$$\begin{aligned}&\int _{I_j}({\mathcal {P}}\omega (x)-\omega (x))v(x)dx = 0 \quad for \quad \forall v \in P^k(I_j), \end{aligned}$$
(3.31)

and the special projection \({\mathcal {P}}^{\pm }\) into \(V_h\), satisfying that: for each j and \(\forall v \in P^{k-1}(I_j)\),

$$\begin{aligned}&\int _{I_j}({\mathcal {P}}^+\omega (x)-\omega (x))v(x)dx = 0, \quad and \quad {\mathcal {P}}^+\omega (x^+_{j-\frac{1}{2}})=\omega (x_{j-\frac{1}{2}}), \end{aligned}$$
(3.32)
$$\begin{aligned}&\int _{I_j}({\mathcal {P}}^-\omega (x)-\omega (x))v(x)dx = 0, \quad and \quad {\mathcal {P}}^-\omega (x^-_{j+\frac{1}{2}})=\omega (x_{j+\frac{1}{2}}). \end{aligned}$$
(3.33)

For both projections mentioned above, authors in [26] generalized the following results from [5] as follows

$$\begin{aligned}&\Vert \omega ^e\Vert + h\Vert \omega ^e\Vert _\infty + h^\frac{1}{2}\Vert \omega ^e\Vert _{\Gamma _h} \le Ch^{k+1}, \end{aligned}$$
(3.34)

where \(\omega ^e={\mathcal {P}}\omega -\omega \) or \(\omega ^e = {\mathcal {P}}^{\pm }\omega -\omega \). The positive constant C depends only on \(\omega \), namely it is independent of h. \(\Gamma _h\) denotes the set of boundary points of all cells \(I_j\) belonging to the mesh grid, and the norm \(\Vert u\Vert _{\Gamma _h} = \sqrt{\frac{1}{N}\sum _{j=1}^{N} \Vert u\Vert ^2_{L^2(\partial {I_j})}}\).

\(\bullet \)Inverse properties We show several inverse properties of space \(V_h\) which will be utilized in the following error estimates. For any \(\omega _h \in V_h\), there exists a positive constant C independent of \(\omega _h\) and h, such that

$$\begin{aligned} {\mathrm{(i)} \Vert \nabla \omega _h\Vert \le Ch^{-1}\Vert \omega _h\Vert ,}\quad \mathrm{(ii)} \Vert \omega _h\Vert _{\Gamma _h} \le Ch^{-\frac{1}{2}}\Vert \omega _h\Vert ,\quad \mathrm{(iii)} \Vert \omega _h\Vert _{\infty } \le Ch^{-\frac{1}{2}}\Vert \omega _h\Vert . \end{aligned}$$
(3.35)

3.3.2 The Main Error Estimates Result

In what follows, we give the main error estimates of the semi-discrete LDG numerical schemes for the \(\mu \)CH equation. Both conservative and dissipative schemes are considered here, and the same results are obtained.

Theorem 3.5

Let u be the exact solution of the problem (3.1)–(3.2), which is smooth enough with bounded derivatives. Let \(u_h\) be the numerical solution of the conservative or dissipative semi-discrete LDG scheme (3.6)–(3.8) and (3.10)–(3.13) equipped with numerical fluxes (3.8) and (3.13) in addition to (3.14) or (3.15), and denote the corresponding numerical error by \(e_r=r-r_h\), where \(r=u_x\) is defined by (3.5). For a regular partition of \(I=[0,1]\), we assume the finite element space \(V_h\) defined in (2.1) with kth-order piecewise polynomial, then for sufficiently small h, the following error estimate holds for both schemes

$$\begin{aligned}&\Vert {r-r_h}\Vert ^2 \le Ch^{2k}, \end{aligned}$$
(3.36)

where the constant C depends on the terminal time T, k, \(\Vert {u}\Vert _{k+1}\), \(\Vert {r}\Vert _{k+1}\), and the bound of \(|f'|\). Here \(\Vert u\Vert _{k+1}\) and \(\Vert r\Vert _{k+1}\) are the maximum over \(0 \le t \le T\) of the standard Sobolev \((k+1)\) norm in space.

Remark 3.6

In the Example 5.1 of Sect. 5, we see that the kth-order accuracy in (3.36) is optimal for \(k\ge 1\). Moreover, recall the definition of the Hamiltonian energy \(E_1(u)\) in (1.8) and the conservation of \(\mu (u)\) and \(\mu (u_h)\), then we recognize that the error estimate presented above is exactly the error equipped with the \(H^1_{\mu }\)-norm. Although we could not get the error estimate for \(u-u_h\), the numerical results in Example 5.1 verify the optimal convergence rate \({\mathcal {O}}(h^{k+1})\) for \(\Vert u-u_h\Vert \).

\(\bullet \)The error equation Now we need to put forward the proof of Theorem 3.5. It is necessary to obtain the error equation first.

Replacing \(u_h\) by the exact solution u in the scheme (3.6)–(3.7) and (3.10)–(3.12), the equations can also hold. Recalling the facts that \(\mu (u)_t=0\) and \(\mu (u_h)_t=0\), then it is easy to get the error equation: for any test functions \(\chi , \phi , \eta , \psi , \zeta \in V_h\),

$$\begin{aligned}&\int _{I_j} \left( (q-q_h)_t(\chi +\eta )+(r-r_h)\phi +(p-p_h)\psi +(r-r_h)\zeta \right) dx \\&\quad -\int _{I_j}(r-r_h)_t \chi _{x}dx +\left( (r_t-({\widehat{r}}_h)_t)\chi ^{-}\right) _{j+\frac{1}{2}} -\left( (r_t-({\widehat{r}}_h)_t)\chi ^{+}\right) _{j-\frac{1}{2}} \\&\quad +\int _{I_j}(u-u_h)\phi _{x}dx - \left( (u-{\widehat{u}}_h)\phi ^{-}\right) _{j+\frac{1}{2}} + \left( (u-{\widehat{u}}_h)\phi ^{+}\right) _{j-\frac{1}{2}} \\&\quad +\int _{I_j}(p-p_h)\eta _{x}dx - \left( (p-\widehat{p_h})\eta ^{-}\right) _{j+\frac{1}{2}} + \left( (p-\widehat{p_h})\eta ^{+}\right) _{j-\frac{1}{2}} \\&\quad +\int _{I_j}(u-u_h)\zeta _{x}dx - \left( (u-\breve{u}_h)\zeta ^{-}\right) _{j+\frac{1}{2}} + \left( (u-\breve{u}_h)\zeta ^{+}\right) _{j-\frac{1}{2}} \\&\quad -\int _{I_j}(B(r)-B(r_h))\eta _{x}dx + \left( \left( B(r)-\widehat{B(r_h)}\right) \eta ^{-}\right) _{j+\frac{1}{2}} - \left( \left( B(r)-\widehat{B(r_h)}\right) \eta ^{+}\right) _{j-\frac{1}{2}} \\&\quad +\int _{I_j}(b(r)u-b(r_h)u_h)\psi _{x}dx - \left( \left( b(r)u-\widehat{b(r_h)}{\widetilde{u}}_h\right) \psi ^{-}\right) _{j+\frac{1}{2}}\\&\quad + \left( \left( b(r)u-\widehat{b(r_h)}{\widetilde{u}}_h\right) \psi ^{+}\right) _{j-\frac{1}{2}} \\&\quad -\int _{I_j}(f(u)-f(u_h))\eta _{x}dx + \left( (f(u)-{\widehat{f}})\eta ^{-}\right) _{j+\frac{1}{2}} - \left( (f(u)-{\widehat{f}})\eta ^{+}\right) _{j-\frac{1}{2}}=0. \end{aligned}$$

Define

$$\begin{aligned}&{\mathcal {B}}_{j}(u-u_h,q-q_h,p-p_h,r-r_h;\chi ,\phi ,\eta ,\psi ,\zeta ) \nonumber \\&\quad = \int _{I_j} \left( (q-q_h)_t(\chi +\eta )+(r-r_h)\phi +(p-p_h)\psi +(r-r_h)\zeta \right) dx \nonumber \\&\qquad -\int _{I_j}(r-r_h)_t \chi _{x}dx +\left( \left( r_t-({\widehat{r}}_h)_t\right) \chi ^{-}\right) _{j+\frac{1}{2}} -\left( \left( r_t-({\widehat{r}}_h)_t\right) \chi ^{+}\right) _{j-\frac{1}{2}} \nonumber \\&\qquad +\int _{I_j}(u-u_h)\phi _{x}dx - \left( (u-{\widehat{u}}_h)\phi ^{-}\right) _{j+\frac{1}{2}} + \left( (u-{\widehat{u}}_h)\phi ^{+}\right) _{j-\frac{1}{2}} \nonumber \\&\qquad +\int _{I_j}(p-p_h)\eta _{x}dx - \left( (p-\widehat{p_h})\eta ^{-}\right) _{j+\frac{1}{2}} + \left( (p-\widehat{p_h})\eta ^{+}\right) _{j-\frac{1}{2}} \nonumber \\&\qquad +\int _{I_j}(u-u_h)\zeta _{x}dx - \left( (u-\breve{u}_h)\zeta ^{-}\right) _{j+\frac{1}{2}} + \left( (u-\breve{u}_h)\zeta ^{+}\right) _{j-\frac{1}{2}}, \end{aligned}$$
(3.37)
$$\begin{aligned}&{\mathcal {H}}_j(f;u,u_h \eta ) = \int _{I_j}(f(u)-f(u_h))\eta _{x}dx - \left( (f(u)-{\widehat{f}})\eta ^{-}\right) _{j+\frac{1}{2}} + \left( (f(u)-{\widehat{f}})\eta ^{+}\right) _{j-\frac{1}{2}}, \end{aligned}$$
(3.38)

and

$$\begin{aligned}&{\mathcal {R}}_j(b,B;r,u,r_h,u_h;\eta ,\psi ) \nonumber \\&\quad = \int _{I_j}\left( B(r)-B(r_h)\right) \eta _{x}dx - \left( \left( B(r)-\widehat{B(r_h)}\right) \eta ^{-}\right) _{j+\frac{1}{2}} + \left( \left( B(r)-\widehat{B(r_h)}\right) \eta ^{+}\right) _{j-\frac{1}{2}} \nonumber \\&\qquad -\int _{I_j}(b(r)u-b(r_h)u_h)\psi _{x}dx + \left( \left( b(r)u-\widehat{b(r_h)}{\widetilde{u}}_h\right) \psi ^{-}\right) _{j+\frac{1}{2}}\nonumber \\&\qquad - \left( \left( b(r)u-\widehat{b(r_h)}{\widetilde{u}}_h\right) \psi ^{+}\right) _{j-\frac{1}{2}}. \end{aligned}$$
(3.39)

Summing over j, the error equation becomes

$$\begin{aligned}&\sum _{j=1}^{N}{\mathcal {B}}_{j}(u-u_h,q-q_h,p-p_h,r-r_h;\chi ,\psi ,\eta ,\psi ,\zeta ) \nonumber \\&= \sum _{j=1}^{N}\big ({\mathcal {H}}_{j}(f;u,u_h;\eta ) + {\mathcal {R}}_{j}(b,B;r,u,r_h,u_h;\eta ,\psi ) \big ), \end{aligned}$$
(3.40)

for all \(\chi ,\phi ,\eta ,\psi ,\zeta \in V_h\).

Denoting

$$\begin{aligned} s&={\mathcal {P}}^{+}u-u_h,\quad s^{e}={\mathcal {P}}^{+}u-u, \end{aligned}$$
(3.41)
$$\begin{aligned} \xi&={\mathcal {P}}q-q_h, \quad \ \ \xi ^{e}={\mathcal {P}}q-q, \end{aligned}$$
(3.42)
$$\begin{aligned} v&={\mathcal {P}}p-p_h, \quad \ \ v^{e}={\mathcal {P}}p-p, \end{aligned}$$
(3.43)
$$\begin{aligned} \delta&={\mathcal {P}}r-r_h, \quad \ \ \delta ^{e}={\mathcal {P}}r-r, \end{aligned}$$
(3.44)

and taking the test functions

$$\begin{aligned}&\chi =-s,\ \phi =\delta _t,\ \eta =s,\ \psi =-\delta ,\ \zeta =v, \end{aligned}$$

we obtain the important energy equality

$$\begin{aligned}&\sum _{j=1}^{N}{\mathcal {B}}_{j}(s-s^e,\xi -\xi ^e,v-v^e,\delta -\delta ^e;-s, \delta _t,s,-\delta ,v)\nonumber \\&=\sum _{j=1}^{N}\left( { {\mathcal {H}}_{j}(f;u,u_h;s)+{\mathcal {R}}_{j}(b,B;r,u,r_h,u_h;s,-\delta ) }\right) . \end{aligned}$$
(3.45)

\(\bullet \)Proof of the main result. In this part, we will follow the ideas of [20] to give the main proof of Theorem 3.5. We shall analyze each term of the error equation (3.45), and some proofs of following lemmas will be given in “Appendix A”.

Firstly, under the condition that the mean of the exact solution, namely \(\mu (u)\), is conservative and the property of \(L^2\) projection, we can verify the fact that the mean \(\mu (u_h)\) and \(\mu (\mathcal {P^{+}}u)\) are also conservative quantities. The proof of this lemma will be given in “Appendix A.2”.

Lemma 3.7

Under the assumption of conservation of \(\mu (u)\), the mean of the numerical solution \(\mu (u_h)\) and the \(L^2\) projection \(\mu ({\mathcal {P}}^{+}u)\) are also conservative; In other words, the errors \(s={\mathcal {P}}^{+}u-u_h\), \(s^e={\mathcal {P}}^{+}u-u\) and \(u-u_h\) satisfy

$$\begin{aligned}&\mu (s)_t \equiv 0,\quad \mu (s^e)_t\equiv 0,\quad \mu (u-u_h)_t\equiv 0. \end{aligned}$$
(3.46)

As for the left-hand side of the energy equation (3.45), we give the following lemma, and the proof will be shown in “Appendix A.3”.

Lemma 3.8

Under the discussion in Lemma 3.7, the following equation holds

$$\begin{aligned}&\sum _{j=1}^{N}{\mathcal {B}}_{j}(s-s^e,\xi -\xi ^e,v-v^e,\delta -\delta ^e;-s, \delta _t,s,-\delta ,v) =\int _{0}^{1} \delta _t\delta dx-\sum _{j=1}^{N}\left( ({\widehat{v}}^e+{\widehat{\delta }}_{t}^{e})[s]\right) _{j+\frac{1}{2}}. \end{aligned}$$
(3.47)

We then rewrite the right-hand side of the energy equation (3.45) into the following forms

$$\begin{aligned} \sum _{j=1}^{N}{\mathcal {H}}_{j}(f;u,u_h;s)&=\sum _{j=1}^{N}\int _{I_j}(f(u)-f(u_h))s_{x}dx +\sum _{j=1}^{N}\left( (f(u)-f(\{u_h\}))[s]\right) _{j+\frac{1}{2}}\nonumber \\&\qquad +\sum _{j=1}^{N}\left( (f(\{u_h\})-{\widehat{f}})[s]\right) _{j+\frac{1}{2}}, \end{aligned}$$
(3.48)
$$\begin{aligned} \sum _{j=1}^{N}{\mathcal {R}}_j(b,B;r,u,r_h,u_h;s,-\delta )&= \sum _{j=1}^{N}\int _{I_j}(B(r)-B(r_h))s_{x}dx\nonumber \\&\qquad +\sum _{j=1}^{N}((B(r)-B(r_h^-))[s])_{j+\frac{1}{2}}\nonumber \\&\qquad +\sum _{j=1}^{N}\int _{I_j}(b(r)u-b(r_h)u_h)\delta _{x}dx \nonumber \\&\qquad +\sum _{j=1}^{N}\left( (b(r)u-\widehat{b(r_h)}u_h^+)[\delta ]\right) _{j+\frac{1}{2}}, \end{aligned}$$
(3.49)

where we apply the periodic boundary conditions and recall the average notation for \(u_h\) as \(\{u_h\}=\frac{1}{2}(u_h^+ + u_h^-)\).

The difference between the conservative and dissipative scheme only exits in the choices of numerical flux \({\widehat{f}}\) which is reflected in the term \({\mathcal {H}}_j\), yet the same estimate results for \({\mathcal {H}}_{j}\) of both schemes are given in the following lemma. The proof will be given in “Appendix A.4”.

Lemma 3.9

Suppose that the interpolation property (3.34) is satisfied; then we obtain the estimates for (3.48) with the numerical flux \({\widehat{f}}\) chosen as (3.14) or (3.15)

$$\begin{aligned}&\sum _{j=1}^{N}{\mathcal {H}}_{j}(f;u,u_h;s) \le C \Vert s\Vert ^{2}+Ch^{2k}. \end{aligned}$$
(3.50)

The estimates for \({\mathcal {R}}_{j}\) in (3.49) are given in the following lemma, and as for the proof of this lemma, we refer the reader to Lemma 4.6 in [20].

Lemma 3.10

Suppose that the interpolation property (3.34) is satisfied, then we have the following estimates for (3.49)

$$\begin{aligned}&\left| \sum _{j=1}^{N}{\mathcal {R}}_{j}(b,B;r,u,r_h,u_h;s,-\delta )\right| \nonumber \\&\qquad \le \sum _{j=1}^{N}\left( |b'(r)u\{\delta ^{e}\}[\delta ]|+|b(r)(\delta ^{e})^{-}[s]|\right) _{j+\frac{1}{2}} +\frac{1}{2}\Vert s\Vert ^{2}+C\Vert \delta \Vert ^{2}+Ch^{2k+2}. \end{aligned}$$
(3.51)

Now it is the time to present the final error estimates (3.36). Combining (3.40), (3.47), (3.50) and (3.51), we obtain

$$\begin{aligned} \int _{0}^{1}{\delta _{t}\delta }dx&\le \sum _{j=1}^{N}\left( (\widehat{v^e} + {\widehat{\delta }}_{t}^{e})[s]\right) _{j+\frac{1}{2}}\nonumber \\&\quad + \sum _{j=1}^{N}\left( |b'(r)u\{\delta ^{e}\}[\delta ]|+|b(r)(\delta ^{e})^{-}[s]|\right) _{j+\frac{1}{2}} + C\Vert s\Vert ^{2} + Ch^{2k} + C\Vert \delta \Vert ^{2}. \end{aligned}$$

By Young’s inequality and the interpolation property (3.34), we can obtain

$$\begin{aligned} \sum _{j=1}^{N}\left( (\widehat{v^e} + {\widehat{\delta }}_{t}^{e})[s]\right) _{j+\frac{1}{2}}&\le Ch^{2k} + \Vert s\Vert ^{2}, \\ \sum _{j=1}^{N}\left( |b'(r)u\{\delta ^{e}\}[\delta ]|+|b(r)(\delta ^{e})^{-}[s]|\right) _{j+\frac{1}{2}}&\le Ch^{2k} + \Vert \delta \Vert ^{2} + \Vert s\Vert ^{2}, \end{aligned}$$

then the inequality becomes

$$\begin{aligned}&\int _{0}^{1}\delta _{t}\delta dx \le C\left( \Vert s\Vert ^2 + \Vert \delta \Vert ^2\right) + Ch^{2k}. \end{aligned}$$
(3.52)

Till now, we have deduced a preliminary form for the final error estimate. We need some auxiliary tools to deal with the inequality (3.52).

Firstly, we introduce the Poincaré-Friedrichs inequality for \(W^{p,1}({\mathcal {T}}_h)\) functions (here we take \(p=2\) for our finite element space \(V_h\)) from Chapter 10 of [3]

$$\begin{aligned}&\Vert w\Vert \le C\left( \left| \int _{I}wdx\right| +\Vert w_x\Vert +\left( h^{-1}\sum _{j=1}^{N}([w])^2_{j+\frac{1}{2}}\right) ^{\frac{1}{2}}\right) , \end{aligned}$$
(3.53)

for any \(w \in H^1({\mathcal {T}}_h)\). Here the positive constant C depends only on \({\mathcal {T}}_h\). Noticing that \(s \in V_h\subseteq H^1({\mathcal {T}}_h) \), together with \(\mu (s)=0\) in Lemma 3.7, we obtain

$$\begin{aligned}&\Vert s\Vert \le C\left( \Vert s_x\Vert +\left( h^{-1}\sum _{j=1}^{N}([s])^2_{j+\frac{1}{2}}\right) ^{\frac{1}{2}}\right) . \end{aligned}$$
(3.54)

Secondly, to deal with (3.54), we refer the reader to the conclusion (4.17) in [15], which says

$$\begin{aligned}&{\Vert s_x\Vert +\sqrt{c_0h^{-1}}\left( \sum _{j=1}^{N}([s])^2_{j+\frac{1}{2}}\right) ^{\frac{1}{2}} \le C\Vert \delta \Vert + Ch^{k+1},} \end{aligned}$$
(3.55)

where the \(c_0\) is a positive constant from the inverse properties (3.35), and C is independent of h but maybe depends on \(c_0\).

Combining (3.52), (3.54) and (3.55), then we can obtain the desirable inequality for both conservative and dissipative schemes

$$\begin{aligned}&\frac{1}{2}\frac{d}{dt}\left( \int _{0}^{1}\delta ^2 dx\right) \le C\Vert \delta \Vert ^2 + Ch^{2k}. \end{aligned}$$
(3.56)

Finally, Theorem 3.5 follows by implementing (3.56) with the Gronwall’s inequality.

4 The \(\mu \)-Degasperis–Procesi Equation

In this section, by using the notations and preliminary materials given in Sect. 2, we turn to construct and analyze the LDG schemes for the \(\mu \)DP equation (1.2). We shall design a general form of the LDG method for the \(\mu \)DP equation and introduce the conservative and dissipative schemes by choosing different numerical fluxes. The Hamiltonian stability, conservative properties and error estimates for both two schemes for the \(\mu \)DP equation are all given in following parts.

4.1 The LDG Schemes for the \(\mu \)DP Equation

Recall the rewritten form of the \(\mu \)DP equation in (1.11)

$$\begin{aligned} u_t + uu_x + 3 \mu (u)(A_{\mu }^{-1}u)_x = 0, \end{aligned}$$
(4.1)

where \(A_{\mu }\) is invertible. By introducing the auxiliary variables q and v, we once again rewrite this form into the following first-order system

$$\begin{aligned} u_{t} + f(u)_{x} + 3\mu (u)q&= 0, \end{aligned}$$
(4.2)
$$\begin{aligned} q - v_{x}&= 0,\end{aligned}$$
(4.3)
$$\begin{aligned} \mu (v) - q_{x}&= u, \end{aligned}$$
(4.4)

with the initial and periodic boundary conditions

$$\begin{aligned}&u(x,0)=u_0(x), \end{aligned}$$
(4.5)
$$\begin{aligned}&u(x,t)=u(x+L,t), \end{aligned}$$
(4.6)

where L is the length of one period and \(f(u)=\displaystyle \frac{1}{2}u^{2}\). Now we present a general form of the LDG schemes of (4.2)–(4.4): Find \(u_{h} \in V_{h}\), s.t. for all test functions \(\gamma \), \(\phi \) and \(\psi \)

$$\begin{aligned}&\int _{I_{j}} (u_h)_{t}\gamma dx + 3\mu (u_h) \int _{I_{j}} q_{h} \gamma dx \nonumber \\&\quad - \int _{I_{j}} f(u_h)\gamma _{x} dx + \left( {\widehat{f}}(u_h)\gamma ^{-}\right) _{j+\frac{1}{2}} - \left( {\widehat{f}}(u_{h})\gamma ^{+}\right) _{j-\frac{1}{2}} =0, \end{aligned}$$
(4.7)
$$\begin{aligned}&\int _{I_{j}} q_{h} \phi dx + \int _{I_{j}} v_{h} \phi _{x} dx -\left( {\widehat{v}}_h\phi ^{-}\right) _{j+\frac{1}{2}} + \left( {\widehat{v}}_h\phi ^{+}\right) _{j-\frac{1}{2}} = 0, \end{aligned}$$
(4.8)
$$\begin{aligned}&\mu (v_h) \int _{I_{j}} \psi dx + \int _{I_{j}} q_h \psi _{x} dx - \left( {\widehat{q}}_h\psi ^{-}\right) _{j+\frac{1}{2}} + \left( {\widehat{q}}_h\psi ^{+}\right) _{j-\frac{1}{2}} = \int _{I_{j}} u_h \psi dx. \end{aligned}$$
(4.9)

Two different schemes are induced by the numerical fluxes in (4.7)–(4.9) which are chosen as the following two scenarios

  • The conservative numerical scheme

    $$\begin{aligned} {\widehat{v}}_h=\{v_h\}, \ {\widehat{q}}_h = \{q_h\}, \ {\widehat{f}} = \frac{1}{6}\left( (u_h^+)^2+u_h^+u_h^-+(u_h^-)^2\right) , \end{aligned}$$
    (4.10)
  • The dissipative numerical scheme

    $$\begin{aligned}&{{\widehat{v}}_h=\{v_h\}- \beta [v_h], \ {\widehat{q}}_h=\{q_h\}+ \beta [q_h],} \ {\widehat{f}}(u_h) \nonumber \\&\quad = \frac{1}{2}\left( f(u_h^-)+f(u_h^-)-\alpha (u_h^+-u_h^-)\right) , \end{aligned}$$
    (4.11)

    where \(\alpha =\max \limits _{u_h}|f'(u_h)|\) and \(\beta = \text{ sign }(\mu (u_h))\).

Here the choice of \({\widehat{f}}\) in the conservative scheme stems from the work of [2] and the flux \({\widehat{f}}\) in the dissipative scheme is the Lax-Friedrichs flux aforementioned in (3.15).

Remark 4.1

We remark that the fluxes \({\widehat{v}}_h\) and \({\widehat{q}}_h\) in the dissipative scheme depends on the sign of \(\mu (u_h)\). For example, when \(\mu (u_h) > 0\), the numerical fluxes are actually the alternating fluxes \({\widehat{v}}_h=v_h^-\) and \({\widehat{q}}_h=q_h^+\). Furthermore, like the discussion in Remark 3.1, we can also choose \({\widehat{v}}_h\) and \({\widehat{q}}_h\) in a larger range as follows

$$\begin{aligned} {\widehat{v}}_h=\{v_h\}-\beta (\theta ) [v_h], \ {\widehat{q}}_h=\{q_h\}+\beta (\theta ) [q_h], \end{aligned}$$

where \(\beta (\theta ) = \text{ sign }(\mu (u_h))\theta \) and \(\theta \ge 0\) is a parameter. To achieve a compact stencil as it was done in [27], we would like to use the numerical fluxes as in (4.11) with setting \(\theta = 1\).

4.1.1 Algorithm Flowchart (II)

This section shows some details about implementation of these two numerical schemes. And the matrices \({\mathbf {A}}\) and \({\mathbf {A}}_{\mu }\) below have the same meanings as in Algorithm flowchart (I).

  • By (4.8)–(4.9) and the fluxes \({\widehat{v}}_h\) and \({\widehat{q}}_h\) defined in (4.10), we can obtain the relationships in matrix sense

    $$\begin{aligned} {\mathbf {A}} {\mathbf {q}}_h + {\mathbf {B}}_{v} {\mathbf {v}}_h&= {\mathbf {0}}, \end{aligned}$$
    (4.12)
    $$\begin{aligned} {\mathbf {A}}_{\mu } {\mathbf {v}}_h + {\mathbf {B}}_{q}{\mathbf {q}}_h&= {\mathbf {A}} {\mathbf {u}}_h, \end{aligned}$$
    (4.13)

    where \({\mathbf {v}}_h\), \({\mathbf {q}}_h\) and \({\mathbf {u}}_h\) are the vectors containing degrees of freedom for \(v_h\), \(q_h\) and \(u_h\), respectively. And we state that different choices of numerical fluxes, \({\widehat{q}}\) and \({\widehat{v}}\), result in different matrices, \({\mathbf {B}}_{v}\) and \({\mathbf {B}}_{q}\). Manipulate these two equalities then we can obtain \({\mathbf {v}}_h\), \({\mathbf {q}}_h\) as follows

    $$\begin{aligned}&{\mathbf {v}}_h = {\mathbf {D}}^{-1} {\mathbf {A}} {\mathbf {u}}_h, \end{aligned}$$
    (4.14)
    $$\begin{aligned}&{\mathbf {q}}_h = -{\mathbf {A}}^{-1} {\mathbf {B}}_{v} {\mathbf {v}}_h. \end{aligned}$$
    (4.15)

    where \({\mathbf {D}} = {\mathbf {A}}_{\mu }-{\mathbf {B}}_{q}{\mathbf {A}}^{-1}{\mathbf {B}}_{v}\).

  • Next, by the virtue of the equation (4.7) equipped with \({\widehat{f}}\) and necessary data of \({\mathbf {q}}_h\) which can be expressed by \(u_h\) deduced in last step, we can further get the LDG discretization of the residual \(\left( -f(u)_x-3\mu (u)q\right) \) as follow

    $$\begin{aligned} {{\mathbf {A}}({\mathbf {u}}_h)_t=\mathbf {res}({\mathbf {u}}_h).} \end{aligned}$$
    (4.16)
  • Finally, we apply a temporal discretization to solve

    $$\begin{aligned} {({\mathbf {u}}_h)_t = {\mathbf {A}}^{-1}\mathbf {res}({\mathbf {u}}_h).} \end{aligned}$$
    (4.17)

Remark 4.2

We remark that the matrix \({\mathbf {A}}_{\mu }\) which is formed by term \(\mu (u)\) in the \(\mu \)DP (or \(\mu \)CH) equation performs on solving linear system not as well as the mass matrix \({\mathbf {A}}\) generated in the DP (or CH) equation. The mass matrix \({\mathbf {A}}\) possesses some nice properties, such as good condition number and invertibility, which are beneficial for the coefficient matrix \({\mathbf {D}}\) while the singular matrix \({\mathbf {A}}_{\mu }\) only provides necessary degrees of freedom to determine the uniqueness of numerical solution \(u_h\). This fact will cause some undesired phenomena when applying the central fluxes to \({\widehat{v}}_h\) or \({\widehat{q}}_h\). In detail, by choosing central fluxes, coefficient matrix \({\mathbf {D}}\) is nonsingular only under essential assumptions of the order of \(P^k\) polynomial being even and the number of cells being odd, and we will show this phenomenon in the numerical experiments in Sect. 5.

4.2 Hamiltonian Stability and Conservative Properties

In this part, we turn to study the performance of our schemes on the \(H_0\) and \(H_1\) invariants. Recall the definitions of the first two Hamiltonian invariants in (1.10)

$$\begin{aligned} H_0(u)=\int _{0}^{1}u dx, \qquad H_1(u) = \int _{0}^{1} u^2 dx, \end{aligned}$$
(4.18)

here the unit circle \({\mathcal {S}}\) is replaced by the interval [0, 1]. In fact, these two quantities represent the mean and \(L^2\)-norm of the numerical solution in each period. The choices of flux \({\widehat{f}}\) in (4.10) and (4.11) can result in different conclusions about the conservation of the discrete versions of the Hamiltonian invariants.

Proposition 4.3

Let \(u_h\) be the numerical solution to the LDG scheme (4.7)–(4.9) equipped with numerical fluxes in (4.10) or (4.11). Then the discrete versions of Hamiltonian invariants of \(u_h\), \(H_0(u_h)\) and \(H_1(u_h)\), satisfy the following properties in the time evolution

  • The conservative scheme with numerical fluxes (4.10) for the \(\mu \)DP equation preserves both invariants \(H_0\) and \(H_1\)

    $$\begin{aligned} \frac{d}{dt}\mu (u_h)=0,\quad \frac{d}{dt}\left( \int _{0}^{1}u_h^2dx\right) = 0. \end{aligned}$$
    (4.19)
  • The dissipative scheme with numerical fluxes (4.11) for the \(\mu \)DP equation preserve only \(H_0\) but still keeps the \(L^2\) stability

    $$\begin{aligned} \frac{d}{dt}\mu (u_h)=0,\quad \frac{d}{dt}\left( \int _{0}^{1}u_h^2dx\right) \le 0. \end{aligned}$$
    (4.20)

Proof

Take the test functions in (4.7)–(4.9) as follows

$$\begin{aligned} \gamma = u_h, \quad \phi = 1, \quad \psi = 3 \mu (u_h) q_h, \end{aligned}$$
(4.21)

then we can obtain three equations

$$\begin{aligned}&\int _{I_{j}} (u_{h})_{t}u_h dx + 3\mu (u_h) \int _{I_{j}} q_h u_h dx - \int _{I_{j}} f(u_h)(u_h)_{x} dx + \left( {\widehat{f}}u_h^{-}\right) _{j+\frac{1}{2}} - \left( {\widehat{f}}u_h^{+}\right) _{j-\frac{1}{2}} =0, \\&3\mu (u_h) \left( \mu (v_h) \int _{I_{j}} q_h dx + \int _{I_{j}} q_h (q_h)_{x} - \left( {\widehat{q}}_h q_h^{-}\right) _{j+\frac{1}{2}} + \left( {\widehat{q}}_h q_h^{+}\right) _{j-\frac{1}{2}} - \int _{I_{j}} u_h q_h dx\right) = 0, \\&\int _{I_{j}}q_h dx - \left( {\widehat{v}}_h\right) _{j+\frac{1}{2}} + \left( {\widehat{v}}_h\right) _{j-\frac{1}{2}} = 0. \end{aligned}$$

By summing up all the cells \(I_{j}\), we immediately get the truth: \(\mu (q_h)=0\). Then combining the first two equations above, we obtain a simplified equality

$$\begin{aligned}&\frac{1}{2}\frac{d}{dt} \left( \int _{I} u_h^{2} dx \right) + \sum _{j=1}^{N} \left( [F(u_h)] - {\widehat{f}}(u_h)[u_h] \right) _{j-\frac{1}{2}} - \sum _{j=1}^{N} 3\mu (u_h) \left( \left[ \frac{1}{2}q_h^{2}\right] - {\widehat{q}}_h[q_h] \right) _{j-\frac{1}{2}} = 0, \end{aligned}$$
(4.22)

where \(F(u)=\int ^{u}f(\tau )d\tau \).

Next, based on the two choices of numerical fluxes in (4.10) and (4.11), we discuss the \(H_1\) energy stability in following two cases.

  • Conservative scheme

In fact, we can rewrite the form of \({\widehat{f}}\) in (4.10) with an essential expression

$$\begin{aligned} {\widehat{f}}(u_h)=\frac{1}{3}\left( \frac{1}{2}(u_h^+)^2+\frac{1}{2}(u_h^+u_h^-)+\frac{1}{2}(u_h^-)^2\right) =\frac{[F(u_h)]}{[u_h]}, \end{aligned}$$
(4.23)

when the jump \([u_h]\ne 0\). Besides, notice the transformation: \(\displaystyle [\frac{1}{2}q^2]=\{q\}\cdot [q] \), then we realize that the numerical fluxes in (4.10) induce the following equalities

$$\begin{aligned}{}[F(u_h)] - {\widehat{f}}(u_h)[u_h]&= 0, \end{aligned}$$
(4.24)
$$\begin{aligned} \mu (u_h) (\frac{1}{2}[q_h^2] - {\widehat{q}}_h[q_h])&= 0. \end{aligned}$$
(4.25)

We can prove that the conservative scheme can preserve the \(L^2\)-norm of solution \(u_h\) by substitute (4.24) and (4.25) into (4.22)

$$\begin{aligned} \frac{1}{2}\frac{d}{dt} \left( \int _{I} u_h^{2} dx \right) = 0. \end{aligned}$$
(4.26)
  • Dissipative scheme

If we choose the numerical flux \({\widehat{f}}\) as the Lax-Friedrichs flux and apply the alternative numerical fluxes as \({\widehat{q}}_h=\{q_h\}+\beta [q_h]\) with \(\beta = \text{ sign }(\mu (u_h))\), then we subsequently get two inequalities at each node

$$\begin{aligned}{}[F(u_h)] - {\widehat{f}}(u_h)[u_h]&\ge 0, \end{aligned}$$
(4.27)
$$\begin{aligned} \mu (u_h) \left( \frac{1}{2}\left[ q_h^2\right] - {\widehat{q}}_h[q_h]\right) = -\frac{1}{2}|\mu (u_h)| [q_h]^2&\le 0, \end{aligned}$$
(4.28)

where the first inequality follows from the monotonicity and consistency of the Lax-Friedrichs flux

$$\begin{aligned}{}[F(u_h)] - {\widehat{f}}(u_h)[u_h] = \int _{u^-}^{u^+}\left( f(\tau ;\tau )-{\widehat{f}}(u^-;u^+)\right) d\tau \ge 0. \end{aligned}$$

Substituting the above inequalities (4.27) and (4.28) into (4.22), we finally obtain the \(L^2\) stability of the dissipative scheme

$$\begin{aligned} \frac{1}{2}\frac{d}{dt} \left( \int _{I} u_h^{2} dx \right) \le 0. \end{aligned}$$
(4.29)

Now, we complete the proof of the \(H_1\) energy analysis for both two schemes.

As to the conservation of \(H_0\), we just retake the test function \(\gamma =1\) in (4.7) and sum up over j along with the periodic boundary condition, then it is easy to get

$$\begin{aligned} \int _{I} (u_{h})_{t} dx + 3\mu (u_h) \mu (q_h) =0. \end{aligned}$$
(4.30)

Substitute \(\mu (q_h)=0\) into the above equality, then the conclusion comes out

$$\begin{aligned} \frac{d}{dt}\mu (u_h)=0. \end{aligned}$$
(4.31)

This result adapts to both the conservative and dissipative schemes for the \(\mu \)DP equation. \(\square \)

4.3 Error Estimates of the LDG Method

In this part, two different error estimates of the conservative and dissipative schemes for the \(\mu \)DP equation mentioned in previous part are given. The framework of these two proofs are so similar that we would like to complete the analysis of the conservative scheme first and give the essential supplements for the dissipative scheme subsequently.

4.3.1 Notations and Auxiliary Results

Other than the notations and tools mentioned in the previous Sect. 3.3.1, more special tools are useful in our following estimates of the conservative scheme. We list them here.

\(\bullet \)Global projection and interpolation property. In consideration of the central flux \({\widehat{p}}_h=\{p_h\}\) in the energy conservative scheme, we need to introduce a global \(L^2\) projection of \(\omega \) with \(k+1\) continuous derivatives into the finite element space \(V_h\), denoted by \({\mathcal {P}}^{\star }\); i.e.,

$$\begin{aligned} \int _{I_j}{\mathcal {P}}^{\star }w(x)v_h dx&= \int _{I_j}w(x)v_h dx, \ \forall v_h \in P^{k-1}(I_j), \nonumber \\ \{{\mathcal {P}}^{\star }w\}&= \{w\},\ at\ x_{j+\frac{1}{2}},\ j=1,2,\ldots ,N, \end{aligned}$$
(4.32)

This special global projection mentioned above is described in [13], which states that the existence and optimal approximation property of this projection can be obtained under the assumptions on the polynomial degree k being even and the number of cells N of the partition \({\mathcal {T}}_h\) being odd. And the authors in [9] give the detailed description about the approximation property as follow

Lemma 4.4

Assume that u is sufficiently smooth and periodic. Further assume that \(k\ge 0\) is even and the number of cells N of the partition \({\mathcal {T}}_h\) is odd. Then, the projection operator \({\mathcal {P}}^{\star }\) is well-defined and possesses the following approximation properties: for \(s=0,1\) and \(p=2,\infty \), there holds

$$\begin{aligned} \Vert u-{\mathcal {P}}^{\star }u\Vert _{W^{s,p}(I_j)}\le Ch_j^{1-s}\left( \sum _{I_i\in {\mathcal {T}}_h^N}h_i^k\Vert u\Vert _{W^{s+1,\infty }(I_i)}+\sum _{I_i\in {\mathcal {T}}_h \setminus {\mathcal {T}}_h^N} h_i^{k+1} \Vert u\Vert _{W^{s+2,\infty }(I_i)} \right) , \end{aligned}$$
(4.33)

for a constant C independent of \(I_j\), where \({\mathcal {T}}_h^N\) is the set of cells whose length differs from at least one of its immediate neighbors.

We remark that for an uniform mesh, the number of cells at least one of whose immediate neighbors have different lengths is zero and so the estimate (4.33) become optimal. And in our paper, we just use this ideal uniform mesh for projection \({\mathcal {P}}^{\star }\).

4.3.2 The Main Error Estimates Result

In what follows, we give the main error estimates of the semi-discrete LDG schemes for the \(\mu \)DP equation.

Theorem 4.5

Let u be the exact solution of the \(\mu \)DP equation (4.1), which is smooth enough with bounded derivatives. Let \(u_h\) be the numerical solutions of the semi-discrete LDG schemes (4.7)–(4.9) equipped with the numerical fluxes (4.10) or (4.11), and denote the corresponding numerical errors by \(e_u=u-u_h\). For a regular partition of \(I=[0,1]\) with N cells, we assume the finite element spaces \(V_h\) defined in (2.1) with kth-order piecewise polynomial where \(k\ge 1\). For sufficiently small h and assuming that \(\Vert u_h(0)-u(0)\Vert ={\mathcal {O}}(h^{k+1})\), the following two error estimates hold

  • The numerical solution \(u_h\) of the dissipative LDG scheme (4.7)–(4.9) equipped with the numerical fluxes (4.11) satisfies

    $$\begin{aligned} \Vert u-u_h\Vert ^2 \le Ch^{2k+1}, \end{aligned}$$
    (4.34)
  • Further assume that k is even, N is odd and the partitions \({\mathcal {T}}_h\) is uniform, then the numerical solution \(u_h\) of the conservative LDG scheme (4.7)–(4.9) along with (4.10) satisfies

    $$\begin{aligned} \Vert u-u_h\Vert ^2 \le Ch^{2k}, \end{aligned}$$
    (4.35)

where the constant C depends on the terminal time T, k, \(\mu (u)\) and \(\Vert u\Vert _{k+1}\). Here \(\Vert u\Vert _{k+1}\) is the maximum over \(0\le t \le T\) of the standard Sobolev \((k+1)\) norm in space.

4.3.3 The Error Equation

In what follows, we just simply assume \(\beta = \text{ sign }(\mu (u_h)) =1\) in (4.11), and this indicates that the numerical flux \({\widehat{q}}_h=q_h^+\) in the dissipative scheme. And the other case with \(\mu (u_j)<0\) can be easily proven following the analog strategy.

Recognize that the weak formulation (4.7)–(4.9) is also available when replacing \(u_h\) by u, then we can get the error equation

$$\begin{aligned}&\int _{I_j}(u-u_h)_t\gamma dx + 3\mu _0 \int _{I_j}(q-q_h)\gamma dx - \int _{I_j}(u-u_h)\psi dx \\&\qquad + \int _{I_j}(q-q_h)\psi _x dx - \left( (q-{\widehat{q}}_h)\psi ^-\right) _{j+\frac{1}{2}} + \left( (q-{\widehat{q}}_h)\psi ^+\right) _{j-\frac{1}{2}} \\&\qquad - \int _{I_j}(f(u)-f(u_h))\gamma _x dx + \left( \left( f(u)-{\widehat{f}}(u_h)\right) \gamma ^-\right) _{j+\frac{1}{2}} - \left( \left( f(u)-{\widehat{f}}(u_h)\right) \gamma ^+\right) _{j-\frac{1}{2}} = 0, \end{aligned}$$

here we use the constant \(\mu _0=\mu (u_h)\) on account of it being a conserved quantity. Then we divide the error equation into two parts

$$\begin{aligned} {\mathcal {B}}_j(u-u_h,q-q_h;\gamma ,\psi )&=\int _{I_j}(u-u_h)_t\gamma dx + 3\mu _0 \int _{I_j}(q-q_h)\gamma dx - \int _{I_j}(u-u_h)\psi dx \nonumber \\&\qquad + \int _{I_j}(q-q_h)\psi _x dx - \left( (q-{\widehat{q}}_h)\psi ^-\right) _{j+\frac{1}{2}} + \left( (q-{\widehat{q}}_h)\psi ^+\right) _{j-\frac{1}{2}}, \end{aligned}$$
(4.36)

and

$$\begin{aligned} {\mathcal {H}}_j(f;u,u_h;\gamma ) =&\int _{I_j}(f(u)-f(u_h))\gamma _x dx - \left( (f(u)-{\widehat{f}}(u_h))\gamma ^-\right) _{j+\frac{1}{2}} \nonumber \\&+\left( (f(u)-{\widehat{f}}(u_h))\gamma ^+\right) _{j-\frac{1}{2}}. \end{aligned}$$
(4.37)

Now we denote

$$\begin{aligned}&s = {\mathcal {P}}u-u_h,\quad s^e={\mathcal {P}}u-u, \end{aligned}$$
(4.38)
$$\begin{aligned}&\sigma = \widetilde{{\mathcal {P}}}q-q_h,\quad \sigma ^e = \widetilde{{\mathcal {P}}}q-q, \end{aligned}$$
(4.39)
$$\begin{aligned}&\omega = {\mathcal {P}}v-v_h,\quad \omega ^e = {\mathcal {P}}v-v, \end{aligned}$$
(4.40)

here the new notation \(\widetilde{{\mathcal {P}}}\) can be choose as \({\mathcal {P}}^{\star }\) and \({\mathcal {P}}^+\) for the conservative and dissipative schemes, respectively. Then the error equation becomes

$$\begin{aligned} \sum _{j=1}^{N} {\mathcal {B}}_j(s-s^e,\sigma -\sigma ^e;\gamma ,\psi )=\sum _{j=1}^{N} {\mathcal {H}}_j(f;u,u_h;\gamma ). \end{aligned}$$
(4.41)

Taking the test functions

$$\begin{aligned} \gamma =s,\quad \psi =3\mu _0\sigma , \end{aligned}$$
(4.42)

we can get the important energy equality

$$\begin{aligned} \sum _{j=1}^{N} \left( {\mathcal {B}}_j(s,\sigma ;s,\sigma )-{\mathcal {B}}_j(s^e,\sigma ^e;s,\sigma )\right) =\sum _{ j=1}^{N} {\mathcal {H}}_j(f;u,u_h;s). \end{aligned}$$
(4.43)

4.3.4 Proof of the Main Result

In this part, we follow ideas of the proof for the \(\mu \)CH equation in previous section to analyze each term of the energy equation (4.43). And for the sake of textual coherence, we would like to keep our mind on the analysis of the conservative scheme, and supplement the residual proof for the dissipative-scheme subsequently.

  • Error estimates for the conservative scheme

For the first term in the LHS of (4.43), we reuse the similar technology in the verification of the conservation laws in Proposition 4.3, to obtain

$$\begin{aligned}&\sum _{j=1}^{N}{\mathcal {B}}_j(s,\sigma ;s,\sigma ) = \sum _{j=1}^{N}\int _{I_j} s_t s dx. \end{aligned}$$
(4.44)

As to the second term of LHS in (4.43), we have

$$\begin{aligned}&{\mathcal {B}}_j(s^e,\sigma ^e;s,\sigma ) \nonumber \\&\quad = \int _{I_j} s^e_t s dx + 3\mu _0\int _{I_j} \sigma ^e s dx - 3\mu _0 \int _{I_j} s^e\sigma dx + \int _{I_j} \sigma ^e \sigma _x dx - \left( {\widehat{\sigma }}^e\sigma ^-\right) _{j+\frac{1}{2}} + \left( {\widehat{\sigma }}^e\sigma ^+\right) _{j-\frac{1}{2}} \nonumber \\&\quad = \int _{I_j} s^e_t s dx - 3\mu _0 \int _{I_j} s^e\sigma dx + \int _{I_j} \sigma ^e \sigma _x dx \nonumber \\&\qquad + 3\mu _0\int _{I_j} \sigma ^e s dx +\left( {\widehat{\sigma }}^e[\sigma ]\right) _{j+\frac{1}{2}}- \left( {\widehat{\sigma }}^e\sigma ^+\right) _{j+\frac{1}{2}} + \left( {\widehat{\sigma }}^e\sigma ^+\right) _{j-\frac{1}{2}}. \end{aligned}$$
(4.45)

Because \({\mathcal {P}}\) is a local \(L^2\) projection and \(\widetilde{{\mathcal {P}}}={\mathcal {P}}^{\star }\) in (4.39) have the property that \(\sigma ^e={\mathcal {P}}^{\star }q-q\) is locally orthogonal to all polynomials of degree up to \(k-1\), we have

$$\begin{aligned}&\int _{I_j} s^e_t s dx - 3\mu _0 \int _{I_j} s^e\sigma dx + \int _{I_j} \sigma ^e \sigma _x dx = 0. \end{aligned}$$

By virtue of the special definition of \(\{{\mathcal {P}}^{\star }q\} = \{q\}\) at the nodes and the flux \({\widehat{\sigma }}^e=\{{\mathcal {P}}^{\star }q\}-\{q\}\) in the conservative scheme, we also get

$$\begin{aligned}&\left( {\widehat{\sigma }}^e[\sigma ]\right) _{j+\frac{1}{2}} = 0. \end{aligned}$$
(4.46)

Thus the equality (4.45) becomes

$$\begin{aligned}&{\mathcal {B}}_j(s^e,\sigma ^e;s,\sigma ) = 3\mu _0\int _{I_j} \sigma ^e s dx - \left( {\widehat{\sigma }}^e\sigma ^+\right) _{j+\frac{1}{2}} + \left( {\widehat{\sigma }}^e\sigma ^+\right) _{j-\frac{1}{2}}. \end{aligned}$$

Combine the above equation with (4.44), sum up over j, and take into consideration the periodic boundary condition, then we finally obtain

$$\begin{aligned} \sum _{j=1}^{N} \left( {\mathcal {B}}_j(s,\sigma ;s,\sigma )-{\mathcal {B}}_j(s^e,\sigma ^e;s,\sigma )\right) = \int _0^1 s_ts dx - 3\mu _0\int _0^1 \sigma ^e s dx. \end{aligned}$$
(4.47)

To deal with the nonlinearity of the flux f(u) in the RHS of (4.43), we make the a priori assumption first: for arbitrary \(t^{\star } \in (0,T]\),

$$\begin{aligned} h^{-1} \Vert s(t)\Vert _{L^{\infty }(0,1)} + \Vert s_x(t)\Vert _{L^{\infty }({\mathcal {T}}_h)} \le 1, \quad \forall \ t \in [0,t^{\star }]. \end{aligned}$$
(4.48)

Then we introduce the result of Proposition 3.3 in [2] under the a priori assumption mentioned above

$$\begin{aligned} \left| \sum _{j=1}^N {\mathcal {H}}_j(f;u,u_h;s)\right| \le C\Vert s\Vert ^2+Ch^k\Vert s\Vert . \end{aligned}$$
(4.49)

We remark that the a priori assumption validates for \(t \in [0,T]\) automatically when \(k\ge 2\) and the initial condition satisfies \(\Vert u_h(0)-u(0)\Vert ={\mathcal {O}}(h^{k+1})\) as \(h \downarrow 0\) and the mesh size h is sufficiently small with an upper boundary \(h_0\) depending on u and T. We refer the reader to the detailed discussion about this conclusion in [2].

Combining (4.47) and (4.49), we can get

$$\begin{aligned} \int _0^1 s_ts dx&\le 3\mu _0\int _0^1 \sigma ^e s dx + C\Vert s\Vert ^2 + Ch^k\Vert s\Vert . \end{aligned}$$
(4.50)

We already know that \(\mu _0\) is a constant, thus we can get the following error estimates

$$\begin{aligned} \frac{1}{2}\frac{d}{dt}\int _0^1 s^2 dx \le C\Vert s\Vert ^2+Ch^{2k}. \end{aligned}$$
(4.51)

Finally, under assumptions on the polynomial degree k being even and the number of cells in an uniform mesh being odd, we get the desired error estimate

$$\begin{aligned} \Vert u-u_h\Vert ^2 \le Ch^{2k}. \end{aligned}$$
(4.52)

Till now we complete the error analysis of the conservative scheme.

  • Error estimates for the dissipative scheme

Now we turn to supplement the analogous analysis of the dissipative scheme for the \(\mu \)DP equation. Based on the structure of proof mentioned above, we alter the choice of numerical fluxes in scheme (4.7)–(4.9) by the dissipative ones (4.11) and replace the global \(L^2\) projection \({\mathcal {P}}^{\star }\) in (4.39) by the local projection \({\mathcal {P}}^+\) defined in (3.32). Consequently these changes cause some essential modifications in the process of error analysis:

  1. (i)

    The term \({\mathcal {B}}_j(s,\sigma ;s,\sigma )\) estimated in (4.44) is no more a conservative one

    $$\begin{aligned}&\sum _{j=1}^N {\mathcal {B}}_j(s,\sigma ;s,\sigma ) \le \int _{0}^{1} s_t s dx, \end{aligned}$$

    and this fact can be easy obtained via the analogous analysis referring to (4.27), (4.28) and (4.29) in the proof of \(L^2\) stability of the dissipative scheme.

  2. (ii)

    The simultaneous alternation of fluxes and projection of in the dissipative scheme keeps the equality (4.46) still valid

    $$\begin{aligned}&\left( {\widehat{\sigma }}^e[\sigma ]\right) _{j+\frac{1}{2}} = 0. \end{aligned}$$
    (4.53)
  3. (iii)

    The choice of the Lax-Friedrichs flux \({\widehat{f}}\) will result in a different analysis about the term \(\sum _{j=1}^{N} {\mathcal {H}}_j(f;u,u_h;s)\) in (4.43), yet Xu and Shu in [20] have already constructed the estimates for it

    $$\begin{aligned}&\sum _{j=1}^N {\mathcal {H}}_j(f;u,u_h;s) \nonumber \\&\quad \le -\frac{1}{4} \alpha ({\widehat{f}};u_h)[s]^2 + (C+C_{\star }(\Vert s\Vert _{\infty }+h^{-1}\Vert e_u\Vert _{\infty }^2))\Vert s\Vert ^2\nonumber \\&\qquad + (C+C_{\star }h^{-1}\Vert e_u\Vert _{\infty }^2 )h^{2k+1}, \end{aligned}$$

    where \(C_{\star }\) is a positive constant depending on the maximum of \(|f''|\) and the non-negative function \(\alpha ({\widehat{f}};u_h)\) is the important quantity of measuring the difference between numerical flux \({\widehat{f}}\) and the physical flux f, which is in detail described in [26].

Combine these above modifications together and apply some manipulations, we get

$$\begin{aligned}&\int _0^1 s_ts dx + \frac{1}{4} \alpha ({\widehat{f}};u_h)[s]^2 \nonumber \\&\quad \le 3\mu _0\int _0^1 \sigma ^e s dx + \left( C+C_{\star }\left( \Vert s\Vert _{\infty }+h^{-1}\Vert e_u\Vert _{\infty }^2\right) \right) \Vert s\Vert ^2 + \left( C+C_{\star }h^{-1}\Vert e_u\Vert _{\infty }^2 \right) h^{2k+1}, \nonumber \\&\quad \le \left( C+C_{\star }\left( \Vert s\Vert _{\infty }+h^{-1}\Vert e_u\Vert _{\infty }^2\right) \right) \Vert s\Vert ^2 + \left( C+C_{\star }h^{-1}\Vert e_u\Vert _{\infty }^2 \right) h^{2k+1} + Ch^{2k+2}. \end{aligned}$$
(4.54)

Taking account of the positive property of \(\alpha ({\widehat{f}};u_h)\), the Young’s inequality and the a priori assumption with \(k\ge 1\), we can further get the following inequality

$$\begin{aligned} \frac{1}{2}\frac{d}{dt}\int _0^1s^2dx \le C(\Vert s\Vert ^2)+Ch^{2k+1}. \end{aligned}$$
(4.55)

Finally, we obtain the error estimate of this dissipative scheme for the \(\mu \)DP equation

$$\begin{aligned} \Vert u-u_h\Vert ^2 \le Ch^{2k+1}. \end{aligned}$$

Here assumptions about the parity of order of polynomial, number of cells and the uniform mesh can be omitted.

5 Numerical Results

In what follows, we give several numerical examples for each \(\mu \)-version equation. Accuracy experiments for smooth travelling waves and simulations for peakon solutions are successively presented and validated for both \(\mu \)CH and \(\mu \)DP equations. Besides, the explicit total variation diminishing (TVD) Runge–Kutta method in [14], also known as strong stability preserving (SSP) Runge–Kutta method in [8], is utilized as the temporal discretization in following experiments. As we know, for the purpose of maintaining the conservative property of the fully discrete scheme, it is better to choose a conservative time discretization method, such as the midpoint method used in [2, 12]. While the nonlinear terms in both two equations make it not very efficient in the performance of computing. Thus we choose the explicit Runge–Kutta methods, with the time step \(\Delta t = 0.1 \Delta x\). The numerical scheme will be verified available in that the numerical results are convergent in a sequence of successive mesh refinement and the concerned conservation of invariants keeps numerically even in the peakon solutions.

In [11], a class of multi-peakons solutions for both \(\mu \)CH and \(\mu \)DP equations and a series of multi-shocks solutions for the \(\mu \)DP equation are given via explicit expressions. For the sake of facility and concision, we list here these expressions in advance.

Firstly, we introduce the multi-peakons waves for both equations. The exact solutions with M peaks take the form of

$$\begin{aligned} u(x,t) = \sum _{i=1}^{M}p_{i}(t)g(x-q^{i}(t)), \end{aligned}$$
(5.1)

where g(x) is the Green’s function given by

$$\begin{aligned} {g(x)=\frac{1}{2}x(x-1) + \frac{13}{12}, \quad \text {for} \ x \in [0,1),} \end{aligned}$$
(5.2)

and is extended periodically to \({\mathbb {R}}\), namely

$$\begin{aligned} {g(x-x')=\frac{(x-x')^2}{2} - \frac{|x-x'|}{2} + \frac{13}{12}, \quad for \ x \in [x',x'+1),} \end{aligned}$$
(5.3)

where \(x'\) denotes a translation of one periodic interval. The variables \(p_i(t)\) and \(q^i(t)\) depend on time t and they evolve according to

$$\begin{aligned} {\dot{q}}^i = \sum _{j=1}^{M}p_jg(q^i-q^j), \quad {\dot{p}}_i=-(\lambda -1)\sum _{j=1}^{M}p_ip_jg'(q^i-q^j), \end{aligned}$$

here \(\lambda \) is defined in (1.4) and the \(\mu \)CH and \(\mu \)DP are cases \(\lambda =2\) and \(\lambda =3\), respectively. And the value zero is assigned to the otherwise undetermined derivative \(g'(x)\). In other words,

$$\begin{aligned} g'(x):=\left\{ \begin{array}{ll} 0,&{}\quad x=0,\\ x-\frac{1}{2}, &{} \quad 0<x<1. \end{array} \right. \end{aligned}$$
(5.4)

Secondly, we list the expressions of multi-shocks solutions for the \(\mu \)DP equation

$$\begin{aligned} u=\sum _{i=1}^{M} \left( p_i g(x-q^i)+s_i g'(x-q^i) \right) . \end{aligned}$$
(5.5)

The components in above equation evolve according to

$$\begin{aligned}&{\dot{q}}^i=u(q^i), \nonumber \\&{\dot{p}}_i=2(s_i\{u_{xx}(q^i)\}-p_i\{u_x(q^i)\}), \nonumber \\&{\dot{s}}_i=-s_i\{u_x(q^i)\}, \end{aligned}$$
(5.6)

where

$$\begin{aligned} \{u_x(q^i)\}=\sum _{j=1}^N p_jg'(q^i-q^j)+\sum _{j=1}^Ns_j,\quad \left\{ u_{xx}(q^i)\right\} =\sum _{j=1}^Np_j, \end{aligned}$$

and \(g'(x)\) is defined by (5.4).

5.1 The \(\mu \)CH Equation

In this part, numerical experiments are designed to show the accuracy and capability of the conservative and dissipative schemes for the \(\mu \)CH equation

$$\begin{aligned} \mu (u)_t-u_{xxt}=-2\mu (u)u_x+2u_xu_{xx}+uu_{xxx}. \end{aligned}$$
(5.7)

As mentioned before, the difference between these two schemes for the \(\mu \)CH only exists in the choice of numerical flux for the term \(f(u)=2\mu (u)u\). In fact, this different choices cause very small influence on numerical results in that f(u) with constant \(\mu (u)\) is no more a nonlinear term. We will see this phenomenon in the numerical sense in following experiments.

Example 5.1

Smooth periodic waves for \(\mu \)CH

In [10], the authors present that the smooth travelling waves are of the form \(u(x,t)=\phi (x-ct)\) where \(\phi \) is a solution of the ODE

$$\begin{aligned} \phi _{xx}=\frac{2\mu _0(M-\phi )(\phi -m)}{c-\phi }. \end{aligned}$$
(5.8)

The constant M, m and c in (5.8) can be set under the condition \(m<c<M\) which brings about a smooth periodic traveling wave \(\phi (x-ct)\) with \(\min \limits _{x \in {\mathbb {R}}}\phi (x)=m\) and \(\max \limits _{x \in {\mathbb {R}}}\phi (x)=M\). Here we choose \(M=1.5\), \(m=0.5\), and \(c=2\). It leads to a smooth periodic travelling wave with \(period=2.73321849515629\) and

$$\begin{aligned} \mu _0=\mu (\phi )=\int _{0}^{period} \phi (x) dx = 2.55499933801271. \end{aligned}$$

The ODE can be evolved from an initial condition for \(\phi \)

$$\begin{aligned} \phi (0.796433828683979)=1, \end{aligned}$$
(5.9)

which can be computed by setting \(\theta =\frac{\pi }{2}\) in (6.10) in [10]. Then we can get a high-precision numerical solution of (5.8) by utilizing the fourth-order Runge–Kutta method with 40,000 points. We apply the conservative and dissipative LDG schemes discussed in Sect. 3.1 to test this smooth solution of the \(\mu \)CH equation. The \(L^2\) and \(H^{1}_{\mu }\) errors and orders of accuracy for both two schemes at time \(t=0.5\) are showed in Table 1. For the error computation in our paper, we just split each element into uniform 20 subintervals and compute the discrete \(L^2\)/\(H^{1}_{\mu }\) norm on these points. In the process of implementation, periodic boundary conditions and uniform meshes are used. The numerical results show that the numerical schemes with \(P^k\) elements give a \((k+1)\)th order of accuracy for u in the \(L^2\)-norm, and kth order in \(H^{1}_{\mu }\) norm. That is the fact that \(H^{1}_{\mu }\) norm of \(u-u_h\) is equivalent to \(\Vert r-r_h\Vert \) for the reason of \(\mu (u-u_h)=0\). This illustrates that our method is numerically optimal for u and r. Meanwhile, as we analyzed before, these two schemes have a really tiny difference from each other on account of the linearization of \(f(u)=2\mu (u)u\) with the operator \(\mu \), and the experiment here verifies this judgment: the numerical solutions for both schemes in Table 1 are close to each other in acceptable error ranges. For the conservative scheme, people usually expect accuracy reduction with odd order polynomials, but the optimal convergence rate has been found for our conservative scheme. This may be caused by the degeneration of the “nonlinear” term \(f(u) = 2\mu (u)u_x\) to “linear” term for the conservation of \(\mu (u)\). Also, it is found that the \(P^0\) case achieves some superconvergence than expected.

Table 1 Example 5.1, accuracy test for the \(\mu \)CH equation (5.7) with exact smooth solution (5.8)

Example 5.2

Periodic one-peakon solution for \(\mu \)CH

Referring to the explicit expression (5.1) of the peakon solution, we take one peak with \(M=1\), and set the initial data as

$$\begin{aligned} p_1(0)=0.1,\ q^1(0)=0. \end{aligned}$$

For \(x \in [0,1]\) and the solution will be extended periodically to \({\mathbb {R}}\). We implement both the conservative scheme and the dissipative one to simulate the peakon solution of the \(\mu \)DP equation. The \(P^4\) polynomial element, fourth order TVD Runge–Kutta method and a partition with \(N=160\) cells are used in the process of computation. The Fig. 1, containing the peak profiles at time \(t=0,1,5,10,15\) clearly shows us that these two schemes can simulate the periodic one-peakon solution well. The differences, \(|E_0(t)-E_0(0)|\) and \(|E_1(t)-E_1(0)|\), describing the evolution of two invariants are showed in the last graph in Fig. 1. It shows that \( E_0(u_h) \) and \( E_1(u_h) \) keep numerically conservative in both two schemes when simulating one-peakon solution for the \(\mu \)CH equation.

Fig. 1
figure 1

The one-peakon profiles and evolution \( E_0(u_h) \) and \( E_1(u_h)\) of the \(\mu \)CH equation. Periodic boundary condition in [0, 1]. \(P^4\) elements and uniform mesh with \(N=160\) cells

Example 5.3

Periodic three-peakons solution for \(\mu \)CH

In this example, we take \(M=3\) in (5.1) to study the case of three-peakons solution to the \(\mu \)CH equation (5.7) with the initial condition

$$\begin{aligned} u_0(x)=\sum _{i=1}^{3}p_{i}(0)g(x-q^{i}(0)), \end{aligned}$$
(5.10)

where g, \(p_i\) and \(q^i\), \(i=1,2,3\), are set as follows:

$$\begin{aligned} p_1(0)=0.1,\ q^1(0)=0.5,\ p_2(0)=0.08,\ q^2(0)=0.2,\ p_3(0)=0.12, \ q^3(0)=0.05. \end{aligned}$$

The computational domain is [0, 1]. The \(P^4\) polynomial elements with \(N=160\) cells is utilized in our numerical method. In Fig. 2, the numerical and exact solutions at \(t=0,1,5,10,15\) are showed. The evolution of two Hamiltonian invariants, \( E_0(u_h) \) and \( E_1(u_h) \), of the \(\mu \)CH equation is also displayed with \( t \in [0,15] \). It illustrates that the moving peaks interaction can be described well by our numerical methods, and both the invariants can keep conservative in the time evolution.

Fig. 2
figure 2

The three-peakons interaction, evolution of \( E_0(u_h) \) and \( E_1(u_h)\) of the \(\mu \)CH equation. Periodic boundary condition in [0, 1]. \(P^4\) elements and uniform mesh with \(N=160\) cells

5.2 The \(\mu \)DP Equation

In this part, we turn to test the conservative and dissipative schemes for the \(\mu \)DP equation (4.1)

$$\begin{aligned} u_t + uu_x + 3 \mu (u)(A_{\mu }^{-1} u)_x = 0, \end{aligned}$$

As we discussed previously, the essential differences between these two schemes are the choices of numerical fluxes, as described in (4.10) and (4.11), respectively. We firstly devote to verify the accuracy of both schemes. Then we apply several examples to verify their capability on the multi-peakons and multi-shocks solutions.

Table 2 Example 5.4, accuracy test for the \(\mu \)DP equation with sufficiently smooth solution
Fig. 3
figure 3

The evolution of one-peakon solution for the \(\mu \)DP equation with initial data (5.11). Periodic boundary condition in [0, 1]. \(P^2\) elements and uniform mesh with \(N=81\) cells

Fig. 4
figure 4

The interaction of two-peakon solution for the \(\mu \)DP equation with initial data (5.12). Periodic boundary condition in [0, 1]. \(P^2\) elements and uniform mesh with \(N=81\) cells

Example 5.4

Smooth periodic waves for \(\mu \)DP

For the lack of smooth travelling examples for the \(\mu \)DP equation, we just use the smooth initial condition as described in Example 5.1 to start evolving our numerical schemes for the \(\mu \)DP equation. Here we take the parameters as before and apply the same skills to get a high-precision numerical solution of the ODE (5.8). We apply the piecewise \(P^4\) polynomial, the uniform mesh with \(N=321\) cells and the fourth-order TVD Runge–Kutta method with the CFL number 0.05 in the dissipative scheme to get a sufficiently accurate numerical simulation, which is regarded as a reference solution to the \(\mu \)DP equation in the process of error computations. The \(L^2\) and \(L^{\infty }\) errors and orders of accuracy for both schemes, at time \(t=0.5\) are showed in Table 2. The periodic boundary conditions and uniform meshes are used in the implementation of both methods. The numerical results verify that the dissipative LDG method for the \(\mu \)DP equation obtains the optimal order of accuracy, which is better than the suboptimal order of accuracy \(k+\frac{1}{2}\) as illustrated in Theorem 4.34. It is also found that the conservative scheme of \(P^0\) case achieves some superconvergence than expected. However, the desired results of the conservative scheme are only obtained with restrictions on the parity of order of \(P^k\) polynomial (k is even) and number of cells (N is odd), which are assumptions declared in the error estimates for the conservative scheme in (4.35). In the process of implementation of the conservative scheme, we find the matrix \({\mathbf {D}}={\mathbf {A}}_{\mu }-{\mathbf {B}}_{q}{\mathbf {A}}^{-1}{\mathbf {B}}_{v}\), defined in Algorithm Flowchart 3.1.1, is invertible only in case of k being even and N being odd. So we only display valid results of the conservative scheme in Table 2.

Fig. 5
figure 5

The profiles of one-shock wave of the \(\mu \)DP equation with initial data (5.13). Periodic boundary condition in [0, 1]. \(P^2\) elements and uniform mesh with \(N=161\) cells

Fig. 6
figure 6

Interaction of two-shocks solution of the \(\mu \)DP equation with initial data (5.14). Periodic boundary condition in [0, 1]. \(P^2\) elements and uniform mesh with \(N=161\) cells

Fig. 7
figure 7

Interaction of three-shocks solution of the \(\mu \)DP equation with initial data (5.15). Periodic boundary condition in [0, 1]. \(P^2\) elements and uniform mesh with \(N=321\) cells

Example 5.5

Peakon solutions for \(\mu \)DP

Now we turn to verify the capability of the two LDG schemes for the \(\mu \)DP equation to simulate the peakon solutions. Initializing the expression we mentioned in (5.1) by setting parameters as follows

$$\begin{aligned} p_1 = 0.333,\ q^1 = -0.5, \end{aligned}$$
(5.11)

we get an example for the one-peakon wave of the \(\mu \)DP equation. The numerical simulations with time \(t\in [0,15]\) are depicted in Fig. 3. The evolution of two invariants, \(H_0(u_h)\) and \(H_1(u_h)\), of the \(\mu \)DP equation is also showed together.

We also apply the initial condition settings as

$$\begin{aligned}&p_1 = 0.1,\ p_2 = 0.08, \nonumber \\&q^1 = 0.4,\ q^2 = 0.1, \end{aligned}$$
(5.12)

to validate the two-peakons interactive example for the \(\mu \)DP equation. The numerical results and the evolution of \(H_0(u_h)\) and \(H_1(u_h)\) are depicted in Fig. 4. In both examples, \(P^2\) element, an uniform mesh with \(N=81\) cells and the third order TVD Runge–Kutta method with CFL number 0.1 are utilized. It illustrates that both conservative and dissipative schemes are qualified to simulate the peakon solutions in a long time. And the invariants of \(u_h\) keep numerically conservative in both examples.

Example 5.6

Multi-shocks wave solutions for \(\mu \)DP

In this part, we pay attention to the different solutions with multi-shocks for the \(\mu \)DP equation with the initial settings in (5.5) as follows

  • One shock

    $$\begin{aligned} p_1(0)=0.333,\ q^1(0)=0.1,\ s_1(0)=0.1, \end{aligned}$$
    (5.13)
  • Two shocks

    $$\begin{aligned} p_1(0)=0.3,\ q^1(0)=0.2,\ s_1(0)=0.4, \nonumber \\ p_2(0)=0.1,\ q^2(0)=0.5,\ s_2(0)=0.2, \end{aligned}$$
    (5.14)
  • Three shocks

    $$\begin{aligned} p_1(0)=1,\ q^1(0)=0.1,\ s_1(0)=0.12, \nonumber \\ p_2(0)=0.8,\ q^2(0)=0.5,\ s_2(0)=0.8, \nonumber \\ p_3(0)=0.12,\ q^3(0)=0.4,\ s_3(0)=0.2. \end{aligned}$$
    (5.15)

Implement the conservative and dissipative schemes to solve the \(\mu \)DP equation with these three initial conditions successively, then we can obtain the respective simulations displayed in Figs. 56 and 7. Other information about simulations is gathered as follows: the domain [0, 1], the \(P^2\) piecewise element and the third order TVD Runge–Kutta method with CFL number 0.1. And we use \(N=161\) cells of uniform mesh for the one-shock and two-shocks waves, yet a more refined mesh with \(N=321\) cells are applied for the three-shocks solution. The TVB limiter in [6] is adopted to modify the shock solutions. In the experiments of one-shock and two-shocks waves, the conservative and dissipative schemes simulate well for the \(\mu \)DP equation. But for the three-shocks solution, the dissipative scheme performs slightly better than the conservative one.

6 Conclusion

In this paper, we have developed a series of LDG schemes, including the conservative and dissipative ones, for both the \(\mu \)-Camassa–Holm and \(\mu \)-Degasperis–Procesi equations. The conservation of the Hamiltonian invariants for each equation has been analyzed and a priori error estimates for the schemes have also been given. Several numerical examples in different circumstances were shown to illustrate the accuracy and capability of these LDG schemes. Besides, these LDG schemes inherit the nice properties of DG methods on the flexibility for general geometry meshes, the hp-adaptivity, and excellent parallel efficiency. The LDG method possesses a good potential in solving the \(\mu \)-version equations and other similar problems.