Locally conservative finite difference schemes for the modified KdV equation
Gianluca Frasca-Caccia, Peter E. Hydon

TL;DR
This paper develops new finite difference schemes for the modified KdV equation that preserve key conservation laws, using a symbolic approach extended to cubic nonlinearities, resulting in highly accurate, mass-preserving numerical methods.
Contribution
It extends a symbolic conservation-preserving scheme approach to cubic nonlinear PDEs, producing new second-order accurate, mass-preserving finite difference schemes for the modified KdV equation.
Findings
Several new families of schemes preserving mass and energy or momentum.
Some schemes are highly accurate compared to existing methods.
Includes Average Vector Field schemes adapted for the modified KdV.
Abstract
Finite difference schemes that preserve two conservation laws of a given partial differential equation can be found directly by a recently-developed symbolic approach. Until now, this has been used only for equations with quadratic nonlinearity. In principle, a simplified version of the direct approach also works for equations with polynomial nonlinearity of higher degree. For the modified Korteweg-de Vries equation, whose nonlinear term is cubic, this approach yields several new families of second-order accurate schemes that preserve mass and either energy or momentum. Two of these families contain Average Vector Field schemes of the type developed by Quispel and coworkers. Numerical tests show that each family includes schemes that are highly accurate compared to other mass-preserving methods that can be found in the literature.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Locally conservative finite difference schemes for the modified KdV equation
G. Frasca-Caccia P. E. Hydon
School of Mathematics, Statistics and Actuarial Science
University of Kent, Canterbury, CT2 7NZ
G. Frasca-Caccia, P. E. Hydon
School of Mathematics, Statistics and Actuarial Science
University of Kent, Canterbury, CT2 7FS, UK Corresponding author. Email: [email protected]
Abstract
Finite difference schemes that preserve two conservation laws of a given partial differential equation can be found directly by a recently-developed symbolic approach. Until now, this has been used only for equations with quadratic nonlinearity.
In principle, a simplified version of the direct approach also works for equations with polynomial nonlinearity of higher degree. For the modified Korteweg-de Vries equation, whose nonlinear term is cubic, this approach yields several new families of second-order accurate schemes that preserve mass and either energy or momentum. Two of these families contain Average Vector Field schemes of the type developed by Quispel and co-workers. Numerical tests show that each family includes schemes that are highly accurate compared to other mass-preserving methods that can be found in the literature.
Keywords: Finite difference methods; discrete conservation laws; modified KdV equation; energy conservation; momentum conservation.
1 Introduction
Conservation laws are among the most fundamental properties of a given system of partial differential equations (PDEs); all solutions must satisfy every conservation law. Consequently, there is a need to understand how to construct finite difference schemes that preserve multiple conservation laws of a given system.
For simplicity, we will limit our discussion to scalar PDEs for , where is a spatial variable and denotes time. (The generalization to systems with two or more independent variables is straightforward, but the notation becomes messier.) A local conservation law of a given PDE,
[TABLE]
is a divergence expression,
[TABLE]
that is zero on the set of all solutions of the PDE. Here and henceforth, square brackets around a differentiable expression denote the expression and a finite number of its differential consequences using the total derivatives and . In this notation,
[TABLE]
The functions and are, respectively, the flux and density of the conservation law.
For suitable boundary conditions, the existence of such a conservation law implies that is an invariant, which means that it is constant on any solution. Some classes of PDEs have conservation laws and/or invariants built in as part of their structure. In particular, Hamiltonian PDEs are of the form
[TABLE]
where is a skew-adjoint differential operator, denotes the variational derivative and is a given function. For every Hamiltonian PDE, the Hamiltonian functional is an invariant.
Any Hamiltonian PDE can be embedded in a multisymplectic system; all such systems have a conservation law that expresses the invariance of a multisymplectic form [6, 7]. Multisymplectic finite difference schemes, which are extensions of symplectic methods for Hamiltonian ordinary differential equations (ODEs), preserve this conservation law [8, 9, 32, 33, 3, 2, 34].
Sanz-Serna, de Frutos and Durán were among the first to study the benefits of using finite difference methods to preserve invariants of a Hamiltonian PDE [21, 16, 17, 18], using what is effectively a semi-discretization in time. An alternative approach is to discretize in space first, then apply an invariant-conserving method in time to preserve the approximated Hamiltonian functional. With this approach, invariants can be conserved by symplectic methods [8, 3, 11, 38], discrete line integral methods [5, 10] or discrete gradient methods [12, 15, 22, 23].
Among the most useful discrete gradient methods for approximating Hamiltonian PDEs is the Average Vector Field (AVF) method introduced in [12], which generalizes Quispel and McLaren’s energy-preserving approach for Hamiltonian ODEs [40]. According to [12], the AVF method “is distinguished by its features of linear covariance, automatic preservation of linear symmetries, reversibility with respect to linear reversing symmetries and often by its simplicity.” Here is an outline of this method for a given PDE of the form (1).
Relative to a generic lattice point , the uniform grid points are
[TABLE]
In the following, is approximated by either the semidiscretization or the full discretization . The vectors whose -th components are and are denoted by and respectively, and is the differential operator whose -th component is . Let be a semidiscretization of and let be a discrete skew-adjoint operator (typically depending on and ) that approximates . The AVF method approximates (1) by
[TABLE]
In [35], McLachlan and Quispel proved that if the spatial discretization preserves a semidiscrete conservation law of the Hamiltonian PDE, the application of any discrete gradient method in time [24, 13, 36, 27, 41] yields a fully discrete (local) conservation law of the Hamiltonian. This is a powerful result, because conservation laws contain far more information than integral invariants do.
The current paper focuses on numerical methods that preserve two conservation laws of the modified Korteweg-de Vries (mKdV) equation,
[TABLE]
This PDE possesses a bi-Hamiltonian structure: there are two different ways to write it in the Hamiltonian form (1), namely with
[TABLE]
and with
[TABLE]
The mKdV equation has infinitely many independent conservation laws [39]. Those for mass, momentum and energy, respectively, are [1, 37]:
[TABLE]
For suitable (e.g. zero) boundary conditions, integrating (7)–(9) over the spatial domain yields the invariants
[TABLE]
For discretizations of the mKdV equation, the following notation is helpful. The forward shift operators in space and time are defined, for all functions on the grid, by
[TABLE]
The forward difference operators and forward average operators are
[TABLE]
where is the identity operator.
The AVF method (3) for (5) uses
[TABLE]
This gives the following 10-point energy-conserving scheme (and its shifts):
[TABLE]
To apply the AVF method (3) to (6), let and let be the diagonal matrix whose entry in the row and column indexed by acts on functions as
[TABLE]
This yields the 10-point momentum-conserving scheme
[TABLE]
A new direct approach that enables multiple conservation laws to be preserved was introduced recently in [25, 26] and greatly simplified in [20]. This approach, which does not exploit either Hamiltonian structures or integrability, can be applied (at least, in principle) to any system of PDEs whose conservation laws are polynomial in ; see §4 of [20] for a non-Hamiltonian, non-integrable example. In the next sections we show that the two AVF schemes and are particular members of two parametrized families of methods that can be found by using this approach.
The rest of this paper is organized as follows. Section 2 describes the simplified direct approach to finding finite difference schemes that preserve two local conservation laws, for mass and either momentum or energy. In §3, we apply this strategy to the mKdV equation and obtain several families of conservative schemes. In §4, numerical tests confirm the theoretical results and demonstrate the effectiveness of the new schemes compared with multisymplectic and narrow box schemes, each of which preserves mass, but not momentum or energy.
2 A strategy for preserving conservation laws
Given a (not necessarily Hamiltonian) PDE,
[TABLE]
a conservation law is in characteristic form if it satisfies
[TABLE]
The function is called the characteristic of the conservation law. For simplicity, we assume throughout that the domain is contractible.
Remark 1
The vector space of total divergences is the kernel of the Euler operator,
[TABLE]
From Remark 1, if
[TABLE]
there exists such that is a conservation law.
A finite difference approximation of (11) on the grid is a partial difference equation,
[TABLE]
where square brackets around an expression defined on the grid denote the expression and a finite number of its shifts. From here on, tildes denote approximations to the corresponding continuous quantities. We will abbreviate to wherever this does not cause confusion.
The aim is to find finite difference schemes that satisfy a discrete analogue of each preserved conservation law,
[TABLE]
This difference conservation law is in characteristic form if
[TABLE]
just as for the continuous case, the multiplier function is called the characteristic (see [29] for more details). The following result, due to Kuperschmidt [31] and generalized in [30], is a discrete version of Remark 1 and plays a pivotal role in our approach.
Remark 2
The kernel of the difference Euler operator
[TABLE]
is the vector space of all difference divergences (14).
Given a PDE (11) with conservation laws in characteristic form (12) that one wishes to preserve, our strategy is to seek approximations and such that
[TABLE]
From Remark 2, there exist such that each is a discretization of the corresponding continuous conservation law. This strategy can be implemented efficiently as follows.
Choose a rectangular stencil that is large enough to contain second-order approximations of and all . 2. 2.
On the given stencil, the most general finite difference approximations and will depend on a large number of coefficients. 3. 3.
Impose consistency conditions giving second-order accuracy of the approximations at the centre of the stencil (which need not be a grid point). 4. 4.
Reduce the number of free parameters remaining by making some key terms as compact as possible; typically, these include highest derivatives and highest-order nonlinear terms. 5. 5.
Some of the remaining parameters are determined by solving
[TABLE]
symbolically, whenever a solution exists. The discrete flux and density , which satisfy , can be reconstructed from the characteristics [28]. 6. 6.
Steps 2 onward are iterated to preserve more conservation laws. If has no solutions for some , the corresponding conservation law cannot be preserved on the chosen stencil without violating at least one of the earlier conservation laws.
Solving (15) is a crucial step in the procedure; it is made tractable by the compactness conditions and the restriction to second-order approximations. Without these constraints, the only practical approach is to seek a Groebner basis (see [14]) for the polynomial system that determines the coefficients. This can take weeks of symbolic computation, even for scalar equations whose conservation laws have nothing worse than quadratic nonlinearities, approximated on the smallest possible stencil. The complexity increases exponentially with the degree of the polynomial nonlinearity and the size of the stencil.
By contrast, the compactness and second-order conditions simplify the calculations to the point that schemes preserving multiple conservation laws can be found in just a few minutes; a Groebner basis may not even be needed. These simplifications were introduced in [20] and used to obtain several parametrized families of schemes, some of which are highly accurate, for the KdV equation and a nonlinear wave equation with quadratic nonlinearity.
Recently, Frasca-Caccia [19] outlined a new one-parameter family of mass- and energy-conserving 10-point schemes for the mKdV equation, which has cubic nonlinearity. In the current paper, the simplified strategy is used to extend this result to schemes that preserve mass and either momentum or energy, using 8-point and 10-point stencils. This demonstrates that the simplified strategy is not limited to quadratic nonlinearity.
3 Conservative methods for the mKdV equation
Each of the conservation laws (7)–(9) is in characteristic form; their characteristics are
[TABLE]
For simplicity, we consider only one-step schemes for the mKdV equation (4). Therefore, our stencils are as shown in Figure 1, with .
On such stencils, we construct schemes for the mKdV equation of the form
[TABLE]
so that the mass conservation law (7) is preserved.
From this starting-point, the strategy described in §2 is used to preserve either (8) or (9). Linear terms in , and or are approximated by linear combinations of the values of at the stencil points, with undetermined coefficients:
[TABLE]
Similarly, the cubic terms in and are approximated by cubics:
[TABLE]
The undetermined coefficients satisfy consistency conditions to ensure that the schemes are second-order accurate at the centre of the stencil.
Remark 3
An approximation of a conservation law in the form (14) is second-order accurate at the centre if the approximations of and are second-order accurate at the points and , respectively.
We now use the simplified strategy to obtain families of schemes, all of which depend on parameters that are . It is possible to find values of the parameters that partially remove the leading terms of the local truncation error. However, there is no choice of the parameters that eliminates the second-order error terms identically; the optimal parameter values depend on the particular problem being approximated. No scheme in these families preserves all three conservation laws, though some come fairly close to doing so.
8-point schemes
The most compact stencil for the mKdV equation has eight points. We choose in Figure 1, and seek second-order approximations of characteristics, densities and fluxes at , and , respectively.
Energy-conserving methods.
To simplify the symbolic calculation giving energy-conserving schemes on the 8-point stencil, we use the following approximations to the second derivatives in and , respectively:
[TABLE]
where . All other terms in and are of the form (19) or (20), subject only to second-order consistency and
[TABLE]
In this way, we find a family of schemes that depends on two parameters. One of these parameters is ; as this is negligible on fine grids, we set this parameter to zero, obtaining a family of schemes with
[TABLE]
Each of these schemes preserves the following discrete version of the conservation law (9):
[TABLE]
with and
[TABLE]
In both and there are terms that do not have any counterpart in the continuous density and flux. These all vanish as the stepsizes tend to zero.
Assuming that , the leading error terms are . We use the notation
[TABLE]
the parameter may be chosen to minimise the local truncation error.
Momentum-conserving methods.
The momentum-conserving schemes introduced in this section are obtained by specifying that
[TABLE]
and choosing the following compact approximations of and :
[TABLE]
Then is determined from the general forms (19) and (20) by requiring consistency and
[TABLE]
This gives a three-parameter family of schemes that preserve mass and momentum.111Without the constraint on in (21), there is another parameter. Removing (instead) the constraint on yields two other families of schemes. Two of the parameters are , so we set these to zero and obtain the one-parameter family with given in (21) and
[TABLE]
where . For any value of , the discrete momentum conservation law
[TABLE]
is preserved, with given in (21) and
[TABLE]
All terms in , and that do not approximate any quantity in the continuous expressions vanish as the stepsizes tend to zero. They are identically zero if .
If , the leading term in the local truncation error is ; by choosing optimally, one may be able to remove at least part of this error. In the numerical tests section, we use the notation
[TABLE]
10-point schemes
We now develop schemes that preserve two conservation laws of the mKdV equation on the 10-point stencil with in Figure 1. Approximations of characteristics, densities and fluxes of the conservation laws are second-order accurate at , and , respectively.
Energy-conserving methods.
To develop mass and energy conserving schemes on the 10-point stencil, we approximate and the cubic term of on the most compact possible sub-stencils. This gives the one-parameter family of schemes found in [19], namely with , , where
[TABLE]
where . The discrete local energy conservation law satisfied by each scheme in this family is
[TABLE]
where and
[TABLE]
This family of schemes is written as
[TABLE]
Note that EC is the AVF scheme AVF that was derived in §1.
Momentum-conserving methods.
The complexity of the symbolic computation for solving
[TABLE]
is reduced by using the most compact second-order approximations of and . This gives a family depending on 27 parameters. For simplicity, we discuss here only members of this family having a compact approximation of the nonlinear term in , ignoring parameters that are . This yields a one-parameter family with
[TABLE]
where . The discrete local conservation law for momentum is
[TABLE]
where and
[TABLE]
Again, all quantities that do not approximate any term in the corresponding continuous conservation law are identically zero when . We denote this family of schemes by
[TABLE]
The simplest scheme, MC, is AVF.
4 Numerical tests
In this section we consider the mKdV equation (4) on a domain , with periodic boundary conditions. We use some benchmark tests to show the effectiveness of the schemes developed in §3 compared with two well-known conservative methods (see [4, 3]). The narrow box scheme is obtained by applying a standard finite volume discretization, giving
[TABLE]
The second method is multisymplectic and amounts to
[TABLE]
This compact one-step scheme is a more efficient version of the popular Preissmann scheme [4, 2]. Each of these schemes is in divergence form, preserving a discrete version of the mass conservation law (7).
For every test in this section, the computational time is roughly the same for all of the numerical schemes. Therefore, the main difference between schemes is the solution error at the final time , evaluated as
[TABLE]
On a grid with points in space and points in time, we evaluate the error in the conservation laws by measuring the error in the global invariants in (10) as follows:
[TABLE]
Whenever or is not defined for one of the schemes considered here, the corresponding error is instead evaluated as
[TABLE]
where for schemes defined on the 10-point stencil and
[TABLE]
for 8-point schemes.
For each numerical test and family of schemes, we state the parameter value that minimizes the solution error (22). None of the schemes preserve three conservation laws, so we state the parameter values that optimize the error in the unpreserved invariant given by (24) or (25). We also include the results for the simplest schemes, obtained by setting each to zero. As EC AVF and MC AVF, this enables comparison with the AVF schemes.
The first benchmark problem is the interaction of two solitons, with the exact solution
[TABLE]
here
[TABLE]
We set
[TABLE]
and solve this problem on , using step lengths and .
The schemes , , and give the minimal solution error when , , and . The values , , and minimize the error in the invariant that is not preserved by the scheme. As the modulus of is very large, the corresponding term in MC is not merely a perturbation; it undermines the correct behaviour of the solution. So for this problem, minimizing the error in energy turns out to be a poor criterion for choosing the parameter.
Table 1 shows the errors at the final time in the conservation laws and the solution. We also show the error in the phase shift of the fastest and the slowest soliton, evaluated as, respectively,
[TABLE]
where (resp. ) denotes the location of the soliton peak in the exact and (resp. numerical) solution, using piecewise cubic interpolation of approximations at the grid points. The quantity
[TABLE]
measures the extent to which the numerical solution underestimates the phase shift produced by the interaction of the two solitons.
Table 1 shows that the new conservative schemes each preserve two discrete invariants (up to rounding errors). Each family includes schemes that are highly accurate — more so than the multisymplectic and narrow box schemes. The small values of Err, Err and Errϕ indicate that the best schemes also reproduce the correct phase shifts. Attempting to minimize the error in the unpreserved conservation law does not optimize the numerical solution; nevertheless, this approach gives MC8 and EC10 schemes that are more accurate than the narrow box and multisymplectic schemes. This is not true for EC8 and MC10 schemes.
The upper plot in Figure 2 shows the initial condition and the numerical solution at given by the most accurate of our schemes, . The lower plot compares various numerical solutions with the exact solution at , near to the top of the faster soliton. The approximations at the grid points are connected by piecewise cubic interpolation, except for the solution of (for which the interpolation would cover the exact solution). The narrow box scheme is quite accurate for this problem, but it is outclassed by the AVF scheme and more so by .
We now study the same problem on a coarser grid with and . For each family, the parameter values minimizing the error in the solution or the unpreserved invariant are as given in Table 2; they are close to the optimal values for the finer grid. The solution error for the most accurate scheme in each family is around 4 times greater than on the finer grid, as expected. Figure 3 compares the exact solution with various numerical solutions near to the top of the fastest soliton, again using piecewise cubic interpolation.
As a second benchmark problem, we approximate the breather solution (see [42]),
[TABLE]
on the domain , setting and .
Table 3 shows the error in the conservation laws and the solution at the final time: is the most accurate scheme, while , and are the best in their respective families at minimizing the solution error. The error in the unpreserved conservation law is minimized by choosing , , and . As for the two-soliton problem, minimizing the error in the non-conserved invariant is a poor criterion for choosing the parameter in MC10, so we do not show this result. By contrast, choosing the values of the parameters in and that minimize the error in the unpreserved invariant yields fairly accurate approximations.
The upper part of Figure 4 shows the numerical solution given by . The lower part compares the exact solution and the numerical solutions given by EC8(2.22), the multisymplectic scheme and EC10(0) (which is the most accurate AVF scheme for this problem) at the final time. The graph of the solution of the narrow box scheme is very close to the solution of EC, so is not shown in the figure. These schemes are more accurate than the multisymplectic scheme, but the frequency of the breather oscillations is best caught by EC, whose solution almost overlaps the exact profile.
5 Conclusions
The approach introduced in [20], which uses a fast symbolic computation to find finite difference schemes that preserve two conservation laws, is not restricted to quadratic nonlinearity. By considering stencils with eight and ten nodes, we have introduced four new one-parameter families of schemes that preserve two conservation laws of the mKdV equation, which has a cubic nonlinearity.
The AVF schemes introduced by Quispel and co-workers are found by this approach; typically, each is the simplest member of its family. However, the need to obtain a skew-adjoint approximation of the skew-adjoint differential operator means that AVF methods are restricted to stencils with an odd number of points in space.
Each of the families includes schemes that are very accurate. However, none of them preserve the first three conservation laws. Nevertheless, the value of the parameter can be chosen to minimize the error in the third invariant. Our numerical tests have shown that this criterion leads to reasonably accurate solutions for some, but not all, families.
Acknowledgments
The authors would like to thank the Isaac Newton Institute for Mathematical Sciences for support and hospitality during the programme Geometry, Compatibility and Structure Preservation in Computational Differential Equations, when work on this paper was undertaken. This work was supported by EPSRC grant number EP/R014604/1.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] S. C. Anco, M. Mohiuddin, T. Wolf. Traveling waves and conservation laws for complex m Kd V-type equations. Appl. Math. Comput. 219 (2012), 679–698.
- 2[2] U. M. Ascher, R. I. Mc Lachlan. Multisymplectic box schemes and the Korteweg–de Vries equation. Appl. Numer. Math. 48 , (2004), 255–269.
- 3[3] U. M. Ascher, R. I. Mc Lachlan. On symplectic and multisymplectic schemes for the Kd V equation. J. Sci. Comput. 25 (2005), 83–104.
- 4[4] A. Aydin, B. Karasözen. Multisymplectic box schemes for the complex modified Korteweg–de Vries equation. J. Math. Phys. 51 , (2010), 083511.
- 5[5] L. Barletti, L. Brugnano, G. Frasca-Caccia, F. Iavernaro. Energy-conserving methods for the nonlinear Schrödinger equation. Appl. Math. Comput. 318 (2018), 3–18.
- 6[6] T. J. Bridges. Multisymplectic structures and wave propagation. Math. Proc. Cambridge Philos. Soc. 121 (1997), 147–190.
- 7[7] T. J. Bridges, P. E. Hydon, J. K. Lawson. Multisymplectic structures and the variational bicomplex. Math. Proc. Camb. Phil. Soc. 148 , (2010) 159–178.
- 8[8] T. J. Bridges, S. Reich. Multi-symplectic integrators: numerical schemes for Hamiltonian PD Es that conserve symplecticity. Phys. Lett. A 284 (2001), 184–193.
