You are on page 1of 28

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/267454280

Energy conservation issues in the numerical solution of the nonlinear wave


equation

Article · October 2014


Source: arXiv

CITATIONS READS
2 111

3 authors:

Luigi Brugnano Gianluca Frasca Caccia


University of Florence University of Kent
160 PUBLICATIONS   2,503 CITATIONS    22 PUBLICATIONS   176 CITATIONS   

SEE PROFILE SEE PROFILE

Felice Iavernaro
Università degli Studi di Bari Aldo Moro
111 PUBLICATIONS   1,838 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Numerical infinities and infinitesimals in applied and pure mathematics, computer science, and philosophy of science View project

Energy-conserving methods for constrained Hamiltonian problems View project

All content following this page was uploaded by Luigi Brugnano on 31 October 2014.

The user has requested enhancement of the downloaded file.


Energy conservation issues in the numerical solution of
the nonlinear wave equation
L. Brugnanoa G. Frasca Cacciaa F. Iavernarob
arXiv:submit/1098658 [math.NA] 26 Oct 2014

a Dipartimento di Matematica e Informatica “U. Dini”, Università di Firenze, Italy


b Dipartimento di Matematica, Università di Bari, Italy

October 26, 2014

Abstract
In this paper we discuss energy conservation issues related to the numerical solution
of the nonlinear wave equation. As is well known, this problem can be cast as a Hamil-
tonian system that may be autonomous or not, depending on the specific boundary
conditions at hand. We relate the conservation properties of the original problem to
those of its semi-discrete version obtained by the method of lines. Subsequently, we show
that the very same properties can be transferred to the solutions of the fully discretized
problem, obtained by using energy-conserving methods in the HBVMs (Hamiltonian
Boundary Value Methods) class.
Keywords: nonlinear wave equation; Hamiltonian PDEs; energy-conserving methods;
Hamiltonian Boundary Value Methods; HBVMs.
AMS: 65P10, 65L05, 65M20.

1 Introduction
In this paper we discuss energy-conservation issues of the nonlinear wave equation. For
simplicity, though without loss of generality, we shall consider the 1D case,

utt (x, t) = uxx (x, t) − f 0 (u(x, t)), (x, t) ∈ (0, 1) × (0, ∞),
u(x, 0) = ψ0 (x), (1)
ut (x, 0) = ψ1 (x), x ∈ (0, 1),

coupled with suitable boundary conditions. As usual, subscripts denote partial deriva-
tives. In (1), the functions f , ψ0 and ψ1 are supposed to be suitably regular, so they
define a regular solution u(x, t) (f 0 denotes the derivative of f ). The problem is com-
pleted by assigning suitable boundary conditions which we shall, at first, assume to be
periodic,
u(0, t) = u(1, t), t > 0. (2)

1
Later on, we shall also consider the case of Dirichlet boundary conditions

u(0, t) = ϕ0 (t), u(1, t) = ϕ1 (t), t > 0, (3)

and Neumann boundary conditions

ux (0, t) = ϕ0 (t), ux (1, t) = ϕ1 (t), t > 0, (4)

with ϕ0 (t) and ϕ1 (t) suitably regular. We set

v = ut ,

and define the functional


Z 1  Z 1
1 2 1 2
H[u, v](t) = v (x, t) + ux (x, t) + f (u(x, t)) dx ≡ E(x, t) dx. (5)
0 2 2 0

We can rewrite (1) as the infinite-dimensional Hamiltonian system (for brevity, we


neglect the arguments of the functions u and v)

δH
zt = J , (6)
δz
where    
0 1 u
J= , z= , (7)
−1 0 v
and  T
δH δH δH
= , (8)
δz δu δv
is the functional derivative of H. This latter is defined as follows: given a generic
functional in the form Z b
L[q] = L(x, q(x), q 0 (x))dx,
a
δL
its functional derivative δq is defined by requiring that, for every function ξ(x),

b

L[q + εξ] − L[q]
Z
δL d
· ξdx ≡ lim = L[q + εξ] .
a δq ε→0 ε dε ε=0

In particular, by considering a function ξ vanishing at a and b, one obtains:


Z b  Z b  Z b 
δL d 0 0 ∂L ∂L 0
· ξdx = L(x, q + εξ, q + εξ )dx = ξ + 0 ξ dx
a δq dε a ε=0 a ∂q ∂q
Z b     
∂L d ∂L d ∂L
= ξ+ 0
ξ − ξ dx
a ∂q dx ∂q dx ∂q 0
Z b    Z b  
∂L d ∂L ∂L d ∂L
= ξ− ξ dx = − ξdx.
a ∂q dx ∂q 0 a ∂q dx ∂q 0

Consequently,  
δL ∂L d ∂L
= − . (9)
δq ∂q dx ∂q 0

2
Exploiting (9), one easily verifies that (6)–(8) are equivalent to (1):
δH
  !  
ut δH δv v
zt = =J = = ,
vt δz − δH uxx − f 0 (u)
δu

or

ut (x, t) = v(x, t), (x, t) ∈ (0, 1) × (0, ∞),


vt (x, t) = uxx (x, t) − f 0 (u(x, t)), (10)

that is, the first-order formulation of the first equation in (1).


The numerical treatment of Hamiltonian PDEs such as (1) has been the subject of an
intense research activity during the past decade (see, e.g., [4] for a survey). The exten-
sion of ideas and tools related to geometric integration of ordinary differential equations
(ODEs) has led to the definition and analysis of various structure preserving algorithms
suitable for specific or general classes of PDEs. Two main lines of investigations are
based on a multisymplectic reformulation of the equations or their semi-discretization
by means of the method of lines.
Multisymplectic structures generalize the classical Hamiltonian structure of a Hamil-
tonian ODE by assigning a distinct symplectic operator for each unbounded space di-
rection and time [1]. A clear advantage of this approach is that it allows for an easy
generalization from symplectic to multisymplectic integration. Multisymplectic integra-
tors are numerical methods which precisely conserve a discrete space-time symplectic
structure of Hamiltonian PDEs [32, 2, 28, 22, 21] (a backward error analysis of such
schemes may be found in [33, 29, 30]).
In the method of lines approach, the spatial derivatives are usually approximated
by finite differences or by discrete Fourier transform and the resulting system is then
integrated in time by some standard integrator. Spectral methods have revealed very
good potentialities especially in the case of periodic boundary conditions [20, 35].1 For
weakly nonlinear term f 0 in (1), the modulated Fourier expansion technique [23, Chapter
XIII] has been adapted to both the semi-discretized and the full-discretized systems to
state long time near conservation of energy, momentum, and actions [24, 18].
In this paper, we focus our attention on numerical techniques able to provide a full
discretization of the original system with the discrete energy behaving consistently with
the energy function associated with (1). More precisely, we use a central finite difference
to approximate the second order spatial derivative and then we derive a semi-discrete
analogue of the conservation law associated with the energy density.2 As is well known,
whatever the boundary conditions, the rate of change of the energy density integrated
over an interval depends only on the flux through its endpoints. We show that the use
of an energy-preserving method to discretize the time assures a precise reproduction of
the above mentioned conservation law of the semi-discrete model. In particular, if there
is no net flux into or out of the interval, then the integrated energy density is precisely
conserved, meaning that it remains constant over time.
With this premise, the paper is organized as follows. In Section 2 we study the case
in which problem (1) is completed by the periodic boundary conditions (2), whereas the
1
They have been also applied to the multisymplectic PDEs [3, 17, 34].
2
The use of other spatial discretization techniques and, in particular, of spectral methods, will be the
subject of a future research.

3
general case (3) will be the subject of Section 3. The case of homogeneous Neumann
conditions will be studied in Section 4, whereas the general case (4) will be examined
in Section 5. Finally, in Section 6 we report a few numerical tests, whereas Section 7
contains a few concluding remarks.
To the best of our knowledge, only the case of periodic boundary conditions has been
studied thoroughly. In such a case, the integral of E (see (5)) is indeed a conserved
quantity and one obtains energy conservation (see, e.g., [31]). Therefore, it makes
sense to look for a corresponding conservation property, when numerically solving the
problem.
Nevertheless, also in the other cases, which are of interest in applications, the qualita-
tive properties of the solution can be suitably reproduced in the discrete approximation
by slightly generalizing the arguments. This is exactly the main aim of our investiga-
tion and we show that it can be achieved by using the energy-conserving methods in
the class of methods named Hamiltonian Boundary Value Methods (HBVMs), recently
introduced for the numerical solution of Hamiltonian problems [8, 9, 10, 11, 12, 13, 6].
Such methods, based on the concept of discrete line integral, as defined in [25, 26, 27],
have been also generalized in [5, 7, 14, 15, 16].

2 The case of periodic boundary conditions


By considering that the time derivative of the integrand function E(x, t) defined at (5)
satisfies (see (10))

Et (x, t) = v(x, t)vt (x, t) + ux (x, t)uxt (x, t) + f 0 (u(x, t))ut (x, t)
= v(x, t)(uxx (x, t) − f 0 (u(x, t))) + ux (x, t)vx (x, t) + f 0 (u(x, t))v(x, t)
= v(x, t)uxx (x, t) + ux (x, t)vx (x, t) = (ux (x, t)v(x, t))x ≡ −Fx (x, t),

one derives the conservation law:

Et (x, t) + Fx (x, t) = 0, with F (x, t) = −ux (x, t)v(x, t). (11)

Consequently, because of the periodic boundary conditions (2), one obtains


Z 1
Ḣ[z](t) = Et (x, t)dx = [ux (x, t)v(x, t)]1x=0 = 0,
0

where, as usual, the dot denotes the time derivative. Therefore (5) is a conserved
quantity, so that at t = h one has:

H[z](h) = H[z](0).

4
We also recast the Hamiltonian function in a more convenient form to be used in the
sequel. In case of the periodic boundary conditions (2), from (5) one has
Z 1 Z 1 
1 2 1
H[z](t) ≡ E(x, t) dx = v (x, t) + u2x (x, t) + f (u(x, t)) dx
0 0 2 2
Z 1 
1 2 1
= v (x, t) + [(u(x, t)ux (x, t))x − u(x, t)uxx (x, t)] + f (u(x, t)) dx
0 2 2
Z 1 
1 2 1 1
= v (x, t) − u(x, t)uxx (x, t) + f (u(x, t)) dx + [u(x, t)ux (x, t)]1x=0
0 2 2 2| {z }
=0
Z 1 
1 2 1
= v (x, t) − u(x, t)uxx (x, t) + f (u(x, t)) dx, (12)
0 2 2

where [uux ]1x=0 = 0 because of the periodic boundary conditions (2).

2.1 Semi-discretization
For numerically solving problem (1)-(2), let us introduce the following discretization of
the spatial variable,

xi = i∆x, i = 0, . . . , N, ∆x = 1/N, (13)

and the vectors:


     
x0 u0 (t) v0 (t)
.. .. .. N
x= , q(t) =  , p(t) =  ∈R ,
     
. . .
xN −1 uN −1 (t) vN −1 (t)

with
ui (t) ≈ u(xi , t), vi (t) ≈ v(xi , t) ≡ ut (xi , t). (14)
Because of the periodic boundary conditions (2), we also set:

uN (t) ≡ u0 (t), u−1 (t) ≡ uN −1 (t), t ≥ 0.

Approximating the second derivative in (10) as

ui+1 (t) − 2ui (t) + ui−1 (t)


uxx (xi , t) ≈ , i = 0, . . . , N − 1, (15)
∆x2
yields the following semi-discrete problem

q̇ = p, (16)
1
ṗ = − TN q − f 0 (q), t > 0,
∆x2
and the following approximation of the Hamiltonian (12),
 T
p p qT TN q

T
H ≡ H(q, p) = ∆x + + e f (q) , (17)
2 2∆x2

5
where TN is a circulant matrix,3
 
2 −1 −1
 −1 . . . . . .
 

 
TN = 
 . .
.. .. ...  ∈ RN ×N ,

 
 .. .. 
 . . −1 
−1 −1 2
and T
e= 1 ... 1 ∈ RN . (18)
Problem (16) is clearly Hamiltonian. In fact, one has
1 1
q̇ = ∇p H, ṗ = − ∇q H,
∆x ∆x
or, by introducing the vector  
q
y= ,
p
one obtains the more compact form
 
1 IN
ẏ = JN ∇H(y), with JN = , (19)
∆x −IN
where here and in the sequel we use, when appropriate, the notation H(y) = H(q, p).
Consequently,
Ḣ(y) = ∇H(y)T ẏ = ∇H(y)T JN ∇H(y) = 0,
because JN is skew-symmetric. One then concludes that the discrete approximation
(17) to (12) is a conserved quantity for the semi-discrete problem (19). Writing (17) in
componentwise form
N −1  
X 1 2 qi−1 − 2qi + qi+1
H(q, p) = ∆x p i − qi + f (q i ) ,
2 2∆x2
i=0

one notices that (17) is nothing but the approximation of (12) via the rectangle rule
(provided that the second derivative uxx has been previously approximated as indicated
at (15)).

2.2 Full discretization


Problem (19) can be discretized by using a HBVM(k, s) method which allows for an
(at least practical ) conservation of (17), by using a suitably large value k ≥ s [13], as
is shown in the sequel. Let us study the approximation to the solution over the time
interval [0, h], representing the very first step of the numerical approximation, to be
repeated subsequently. For this purpose, we shall consider the orthonormal polynomial
basis over the interval [0,1], {Pj }, given by the shifted and scaled Legendre polynomials:
Z 1
deg Pi = i, Pi (x)Pj (x)dx = δij , ∀i, j ≥ 0.
0
3
Because of the periodic boundary conditions (2).

6
Let us then expand the right-hand side of (19) along this basis, thus obtaining
X
ẏ(ch) = γj (y)Pj (c), c ∈ [0, 1], (20)
j≥0

with Z 1
γj (y) = JN ∇H(y(τ h))Pj (τ )dτ, j ≥ 0. (21)
0
It is possible to prove the following result [13].
Lemma 1 Assume ∇H(y(·)) can be expanded in Taylor series at 0. Then:

RN 3 γj (y) = O(hj ), j = 0, 1, . . . .

Setting the initial condition (see (1))


 
ψ0 (x)
y0 = , (22)
ψ1 (x)

with ψj (x), j = 0, 1, the vector whose entries are given by ψj (xi ), the solution of
(20)-(22) is formally then given by:
X Z c
y(ch) = y0 + h γj (y) Pj (x)dx, c ∈ [0, 1]. (23)
j≥0 0

In order to obtain a polynomial approximation σ ∈ Πs to (23), we consider the following


truncated initial value problem [13],
s−1
X
σ̇(ch) = γj (σ)Pj (c), c ∈ [0, 1], σ(0) = y0 , (24)
j=0

where γj (σ) is still given by (21) by replacing y with σ. The polynomial approximation
to (23) is then formally given by:
s−1
X Z c
σ(ch) = y0 + h γj (σ) Pj (x)dx, c ∈ [0, 1].
j=0 0

If H(q, p) in (17) is a polynomial of degree ν ≥ 2 (which means that f ∈ Πν )4 , and k


is an integer such that
1 2k
k ≥ νs ⇔ ν≤ , (25)
2 s
we can exactly compute the integrals γj (σ) by means of a Gauss-quadrature formula of
order 2k, so that:
Z 1
H(σ(h)) − H(σ(0)) = h ∇H(σ(τ h))T σ̇(τ h)dτ (26)
0
Z 1 s−1
X s−1
X
= h ∇H(σ(τ h))T Pj (τ )γj (σ)dτ = h∆x2 γj (σ)T JN γj (σ) = 0,
0 j=0 j=0

4
Indeed, H contains at least a quadratic term.

7
due to the fact that JN is skew-symmetric. If f , and then H, is not a polynomial, the
use of a quadrature formula of order 2k to approximate the integral in (21) would give
[13]
Z 1
γj (σ) = JN ∇H(σ(τ h))Pj (τ )dτ
0
k
X
= b` Pj (c` )JN ∇H(σ(c` h)) +∆j (h) ≡ γ̂j (σ) + ∆j (h), (27)
|`=1 {z }
=γ̂j (σ)

with
∆j (h) = O(h2k−j ) ∈ RN , j = 0, . . . , s − 1. (28)
In such a case, however, we have a different polynomial u ∈ Πs , in place of σ, solution
of the problem
s−1
X
u̇(ch) = γ̂j (u)Pj (c), c ∈ [0, 1], u(0) = y0 , (29)
j=0

instead of (24). As a consequence, by taking into account (19) and (27)–(29), the error
on the Hamiltonian H, at t = h, is:
Z 1
H(u(h)) − H(u(0)) = h ∇H(u(τ h))T u̇(τ h)dτ
0
Z 1 s−1
X
= h ∇H(u(τ h))T Pj (τ ) (γj (u) − ∆j (h)) dτ
0 j=0
 
=0
s−1
X z }| {
= h∆x2 T T
γj (u) JN γj (u) −γj (u) JN ∆j (h)
 
j=0
 
2k 2k+1
= h ∆x · N
| {z } ·O(h ) ≡ O h , (30)
=1

where the last equality follows from Lemma 1. Consequently, choosing k large enough
allows us to approximate the Hamiltonian H within full machine accuracy. Summing
up all the previous arguments and taking into account the results in [13], the following
result can be proved.

Theorem 1 Assume k ≥ s, and define y1 = u(h) as the new approximation to y(h).


One then obtains:
y1 − y(h) = O(h2s+1 ),
that is the method has order 2s. Moreover, with reference to (25), and assuming that f
is suitably regular:

 0, if f ∈ Πν and ν ≤ 2k/s,
H(y1 ) − H(y0 ) =
O(h2k+1 ), otherwise.

8
Remark 1 From this result, it follows that one can always obtain the conservation
of the discrete Hamiltonian (17) when f is a polynomial, by choosing k large enough.
Moreover, as (30) suggests, also in the non-polynomial case, a practical conservation
of (17) can be gained by choosing k large enough, so that the approximation is within
round-off errors (the bulk of the computational effort associated with the implementation
of a HBVM is not affected by the choice of k [11, 13, 6]).

3 The case of general Dirichlet boundary condi-


tions
Let us now consider the case when the considered problem is given by (1) with the
boundary conditions (3). In such a case, by repeating similar steps as done in (12), one
obtains:
Z 1 Z 1 
1 2 1 2
H[z](t) = E(x, t)dx ≡ v(x, t) + ux (x, t) + f (u(x, t)) dx
0 0 2 2
Z 1 
1 2 1
= v(x, t) + [(u(x, t)ux (x, t))x − u(x, t)uxx (x, t)] + f (u(x, t)) dx
0 2 2
Z 1 
1 1 1
= v(x, t) − u(x, t)uxx (x, t) + f (u(x, t)) dx + [u(x, t)ux (x, t)]1x=0
2
0 2 2 2
Z 1 
1 1
= v(x, t)2 − u(x, t)uxx (x, t) + f (u(x, t)) dx +
0 2 2
1
[ϕ1 (t)ux (1, t) − ϕ0 (t)ux (0, t)] . (31)
2
Moreover, H[z] is no more conserved because formally (11) still holds true and, then,
one obtains (see also (5)):
Z 1
Ḣ[z](t) = Et (x, t)dx = [ux (x, t)v(x, t)]1x=0 = ux (1, t)ϕ01 (t) − ux (0, t)ϕ00 (t). (32)
0
Equation (32) may be interpreted as the instant variation of the energy which is released
or gained by the system at time t. Thus, the continuous Hamiltonian (5), though no
more conserved, has a prescribed variation in time. From (32), at t = h one easily
obtains:
Z h Z h
ux (1, t)ϕ01 (t) − ux (0, t)ϕ00 (t) dt.
 
H[z](h) − H[z](0) = Ḣ[z](t)dt = (33)
0 0

3.1 Semi-discretization
In order for numerically solving problem (1)–(3), let us introduce the following dis-
cretization of the spatial variable,
xi = i∆x, i = 0, . . . , N + 1 ∆x = 1/(N + 1), (34)
and the vectors:
     
x1 u1 (t) v1 (t)
x =  ...  , q(t) =  ..
, p(t) =  .. N
∈R , (35)
     
. .
xN uN (t) vN (t)

9
with ui (t) and vi (t) formally defined as in (14). Moreover, because of the boundary
conditions (3), one has:

u0 (t) = ϕ0 (t), uN +1 (t) = ϕ1 (t). (36)

Approximating the second derivatives in (10) as follows,

ui+1 (t) − 2ui (t) + ui−1 (t)


uxx (xi , t) ≈ , i = 1, . . . , N, (37)
∆x2
and, moreover,
ϕ1 (t) − uN (t) u1 (t) − ϕ0 (t)
ux (1, t) ≈ , ux (0, t) ≈ , (38)
∆x ∆x
we obtain the following semi-discrete approximation to the Hamiltonian (31):
N  
X 1 ui−1 − 2ui + ui+1 ϕ1 − uN ϕ0 − u1
H = ∆x vi2 − ui 2
+ f (ui ) + ϕ1 + ϕ0 ,
2 2∆x 2∆x 2∆x
i=1

which can be rewritten in vector form as


 T
p p qT TN q ϕ(t)T ϕ(t) qT ϕ(t)

T
H ≡ H(q, p, t) = ∆x + + e f (q) + − , (39)
2 2∆x2 2∆x ∆x

where e has been defined in (18) and, moreover:


 
2 −1  
ϕ0 (t)
 −1 . . . . . .
 




 0 

.. .. .. ..
TN =   ∈ RN ×N , ϕ(t) =   ∈ RN .
   
 . . .   . 
 .. ..  0
. . −1
 
 
ϕ1 (t)
−1 2

With reference to (39), the corresponding semi-discrete problem is then given by:
1
q̇ = p ≡ ∇p H, t > 0, (40)
∆x
1 1 1
ṗ = − 2
TN q + 2
ϕ − f 0 (q) ≡ − ∇q H,
∆x ∆x ∆x
which is clearly Hamiltonian, though the Hamiltonian (39) is now non-autonomous,
because of the boundary conditions (3). In order to conveniently handle this problem, we
at first transform (40) into an enlarged autonomous Hamiltonian system, by introducing
the following auxiliary conjugate scalar variables,

q̃ ≡ t, p̃, (41)

and the augmented Hamiltonian (compare with (39)),


 T
p p qT TN q ϕ(q̃)T ϕ(q̃) qT ϕ(q̃)

T
H̃(q, p, q̃, p̃) = ∆x + + e f (q) + − + p̃
2 2∆x2 2∆x ∆x
≡ H(q, p, q̃) + p̃. (42)

10
The dynamical system corresponding to this new Hamiltonian function is, for t > 0:
1
q̇ = p ≡ ∇p H̃,
∆x
1 1 1
ṗ = − 2
TN q + 2
ϕ − f 0 (q) ≡ − ∇q H̃,
∆x ∆x ∆x
d ∂
q̃ = 1 ≡ H̃, (43)
dt ∂ p̃
d ϕ0 (q̃) − q1 0 ϕ1 (q̃) − qN 0 ∂
p̃ = − ϕ0 (q̃) − ϕ1 (q̃) ≡ − H̃,
dt ∆x ∆x ∂ q̃

with initial conditions given by (see (35))

q(0) = ψ0 (x), p(0) = ψ1 (x), q̃(0) = p̃(0) = 0. (44)

The first 3 equations in (43) exactly coincides with (40) (considering that q̃ ≡ t), whereas
the last one allows for the conservation of H̃:

H̃(q(t), p(t), q̃(t), p̃(t)) = H̃(q(0), p(0), 0, 0) ≡ H(q(0), p(0), 0), t ≥ 0.

Indeed, one readily sees that


=0
d ∂ d ∂ d
z }| {
H̃(q, p, q̃, p̃) = ∇q H̃ T q̇ + ∇p H̃ T ṗ + H̃ q̃ + H̃ p̃ = 0, (45)
dt ∂ q̃ dt ∂ p̃ dt
| {z }
=0

by virtue of (43). Consequently, by recalling that q̃ ≡ t, from (39) and (45) one obtains:
 
d ∂ ϕ0 (t) − u1 0 ϕ1 (t) − uN 0
H(q, p, t) = H(q, p, t) = ϕ0 (t) + ϕ1 (t) .
dt ∂t ∆x ∆x

By taking into account (36) and (38), one then obtains the following semi-discrete
analogue of (33):

H(q(h), p(h), h) − H(q(0), p(0), 0) =


Z h 
uN +1 (t) − uN (t) 0 u1 (t) − u0 (t) 0
= ϕ1 (t) − ϕ0 (t) dt. (46)
0 ∆x ∆x

One then concludes that (46) is equivalent to keep constant H̃(q(t), p(t), t, p̃(t)) along
the solution of (43). In order to simplify the notation, let us set
   1 
q ∆x IN
1
˜N =  − ∆x IN
 p   
y=  q̃ 
, J , (47)
 1 
p̃, −1

so that (43)-(44) can be rewritten as

ẏ = J˜N ∇H̃(y), t ≥ 0, y(0) = (ψ0 (x)T , ψ1 (x)T , 0, 0)T . (48)

11
3.2 Full discretization
The full discretization of (47)-(48) follows similar steps as those seen in Section 2.2 for
(19). Let us then expand the right-hand side in (48) as done in (20)-(21), and consider
the polynomial approximation of degree s given by (24), by formally replacing H with
H̃. In such a case, one obtains energy conservation, since (compare with (26))
Z 1
H̃(σ(h)) − H̃(σ(0)) = h ∇H̃(σ(τ h))T σ̇(τ h)dτ
0
Z 1 s−1
X s−1
X
−T
= h ∇H̃(σ(τ h))T Pj (τ )γj (σ)dτ = h γj (σ)T J˜N γj (σ) = 0, (49)
0 j=0 j=0

−T
where J˜N has the same shape as J˜N given in (47) but with 1/∆x replaced by ∆x.
Consequently, if one is able to exactly compute the integrals, by means of a quadrature
rule based at k ≥ s Gaussian points, with k large enough, energy conservation is gained.
This is the case, provided that H̃ is a polynomial, that is, f ∈ Πν and ϕ0 , ϕ1 ∈ Πρ , and,
moreover, k satisfies:
1
k≥ max {νs, 2ρ + s − 1, ρ + 2s − 1} (50)
2
(we observe that, in case ρ = 0, such bound reduces to the bound (25), obtained in
the case of periodic boundary conditions). Differently, by approximating the integrals
by means of a Gaussian quadrature of order 2k, one obtains, with arguments similar to
those used in (27)-(28),
Z 1
γj (σ) = J˜N ∇H̃(σ(τ h))Pj (τ )dτ
0
k
X
= b` Pj (c` )J˜N ∇H̃(σ(c` h)) +∆j (h) ≡ γ̂j (σ) + ∆j (h), (51)
|`=1 {z }
=γ̂j (σ)

with
∆j (h) = O(h2k−j ) ∈ RN , j = 0, . . . , s − 1. (52)
In such a case, we have again a different polynomial u ∈ Πs , in place of σ, solution of
a problem formally still given by (29). As a consequence, by taking into account (52),
the error in the Hamiltonian H̃, at t = h, is given by (see (47)):
Z 1
H̃(u(h)) − H̃(u(0)) = h ∇H̃(u(τ h))T u̇(τ h)dτ
0
Z 1 s−1
X
= h ∇H̃(u(τ h))T Pj (τ ) (γj (u) − ∆j (h)) dτ
0 j=0
 
=0
s−1
X z }| {
T −T T −T
= h γj (u) J˜N γj (u) −γj (u) J˜N ∆j (h)
 
j=0
 
2k 2k+1
= h ∆x · N
| {z } ·O(h ) ≡ O h , (53)
<1

12
where the last equality follows from (34) and Lemma 1. Consequently, by choosing k
large enough, allows us to approximate the Hamiltonian H̃ within full machine accuracy.
All the above arguments can be summarized by the following theorem, which gen-
eralizes Theorem 1 to the present case.

Theorem 2 Assume k ≥ s, and define y1 = u(h) as the new approximation to y(h),


solution of (48). One then obtains:

y1 − y(h) = O(h2s+1 ),

that is the method has order 2s. Moreover, assuming that f, ϕ0 , and ϕ1 are suitably
regular:

 0, if f ∈ Πν , ϕ0 , ϕ1 ∈ Πρ , and (50) holds true,
H̃(y1 ) − H̃(y0 ) =
O(h2k+1 ), otherwise.

Clearly, considerations similar to those stated in Remark 1 can be repeated also in the
present situation.

4 The case of homogeneous Neumann boundary


conditions
Let us now discuss the case when the considered problem is given by (1) with homoge-
neous Neumann boundary conditions:

ux (0, t) = ux (1, t) = 0, t > 0. (54)

In such a case, by repeating similar steps as done in (12), one obtains:


Z 1 Z 1 
1 2 1 2
H[z](t) = E(x, t)dx ≡ v(x, t) + ux (x, t) + f (u(x, t)) dx
0 0 2 2
Z 1 
1 2 1
= v(x, t) + [(u(x, t)ux (x, t))x − u(x, t)uxx (x, t)] + f (u(x, t)) dx
0 2 2
Z 1 
1 1 1
= v(x, t)2 − u(x, t)uxx (x, t) + f (u(x, t)) dx + [u(x, t)ux (x, t)]1x=0
0 2 2 2
Z 1 
1 2 1
= v(x, t) − u(x, t)uxx (x, t) + f (u(x, t)) dx. (55)
0 2 2

where [u(x, t)ux (x, t)]1x=0 = 0 because of the boundary conditions (54) and moreover,
since (11) still holds true, one obtains:
Z 1
Ḣ[z](t) = Et (x, t)dx = [ux (x, t)v(x, t)]1x=0 = 0,
0

namely, H[z] is conserved, i.e.:

H[z](h) = H[z](0).

13
4.1 Semi-discretization
In order to numerically solve problem (1) with boundary conditions (54), we use again
the discretization (34) of the spatial variable, as well as the vectors defined at (35),
with ui (t) and vi (t) formally defined as in (14). Moreover, taking into account the
homogeneous Neumann boundary conditions (54), we set:

u0 (t) = u1 (t), uN +1 (t) = uN (t), (56)

providing a first-order spatial approximation. Approximating the second derivatives as


done in (37), we then obtain, by virtue of (56), the following semi-discrete approximation
of the Hamiltonian (55):
"N −1  
X 1
2 ui−1 − 2ui + ui+1
H = ∆x v − ui + f (ui )
2 i 2∆x2
i=2

1 2 −u1 + u2 1 2 uN −1 − uN
+ v1 − u1 + f (u1 ) + vN − uN + f (uN ) .
2 2∆x2 2 2∆x2

The previous equation can be cast, more compactly, in vector form as:
 T
p p qT TN q

T
H ≡ H(q, p) = ∆x + + e f (q) , (57)
2 2∆x2

where e has been defined in (18) and TN is a symmetric matrix defined as


 
1 −1
 −1 2 −1 
 
TN = 
 . . . . . .  ∈ RN ×N .

(58)
 . . . 
 −1 2 −1 
−1 1

The semi-discrete Hamiltonian problem corresponding to (57) is then given by:


1
q̇ = p ≡ ∇p H, t > 0, (59)
∆x
1 1
ṗ = − 2
TN q − f 0 (q) ≡ − ∇q H,
∆x ∆x
or, by setting    
q 1 IN
y= , JN = , (60)
p ∆x −IN
more compactly one has:
ẏ = JN ∇H(y). (61)
Consequently,
Ḣ(y) = ∇H(y)T ẏ = ∇H(y)T JN ∇H(y) = 0,
because JN is skew-symmetric. As consequence, the following result holds true.

Theorem 3 The semi-discrete approximation (57) to (55) is a conserved quantity for


the semi-discrete Hamitlonian problem (59)–(61).

14
4.2 Full discretization
Comparing (57) with (17), we can see that we have the same Hamiltonian function of
the case of periodic Dirichlet boundary conditions but with a different definition for the
matrix TN (and a slight difference of the state vector). This difference is not relevant
throughout the analysis performed in Section 2.2, so we can repeat the same procedure
and conclude that Theorem 1, as well as the considerations reported in Remark 1, still
hold true in the present case.

5 The case of general Neumann boundary condi-


tions
Let us consider now the case when our problem is given by (1) with the following
Neumann boundary conditions:5

ux (0, t) = ϕ0 (t), ux (1, t) = ϕ1 (t), t > 0. (62)

Let us define the function


ω(x, t) = u(x, t) − U (x, t), (63)
where u(x, t) is the solution of (1), with boundary condition given by (62) and U (x, t)
is defined as  x 
U (x, t) = x ϕ0 (t) + (ϕ1 (t) − ϕ0 (t)) , (64)
2
so that

Ux (x, t) = ϕ0 (t) + x(ϕ1 (t) − ϕ0 (t)) and Uxx (x, t) = ϕ1 (t) − ϕ0 (t). (65)

Consequently, by virtue of (63), one has:6

ωtt = utt − Utt = uxx − f 0 (u) − Utt = ωxx − f 0 (U + ω) + Uxx − Utt .

which can be written as:

ωtt (x, t) = ωxx (x, t) − f˜ω (ω, x, t) − g(x, t), (66)

so that
f˜ω (ω, x, t) ≡ f 0 (U (x, t) + ω(x, t)), (67)
and, moreover (see (64)-(65)),
 x 00 
g(x, t) ≡ Utt (x, t) − Uxx (x, t) = x ϕ000 (t) + ϕ1 (t) − ϕ000 (t) − ϕ1 (t) + ϕ0 (t). (68)
2
So ω(x, t) satisfies problem (66), where f˜ and g are defined in (67)-(68), with initial
conditions:
 x 
ω(x, 0) = u(x, 0) − U (x, 0) = ψ0 (x) − x ϕ0 (0) + (ϕ1 (0) − ϕ0 (0)) ,
2

0 x 0 
ωt (x, 0) = ut (x, 0) − Ut (x, 0) = ψ1 (x) − x ϕ0 (0) + ϕ1 (0) − ϕ00 (0) , (69)
2
5
That is, the boundary conditions (4), which we duplicate for ease of reference.
6
We omit here the formal arguments, for sake of brevity.

15
and Neumann boundary conditions given by, taking into account (62) and (65):

ωx (0, t) = ux (0, t) − Ux (0, t) = ϕ0 (t) − ϕ0 (t) = 0,


ωx (1, t) = ux (1, t) − Ux (1, t) = ϕ1 (t) − ϕ1 (t) = 0. (70)

By setting
ζ = ωt ,
we can rewrite (66) as an infinite-dimensional Hamiltonian system,

δH
κt = J
δκ
where J is defined as in (6),  
ω
κ= ,
ζ
and the Hamiltonian functional is given by:
Z 1
H[κ](t) ≡ E(x, t)dx (71)
0
Z 1 
1 2 1 2 ˜
= ζ (x, t) + ωx (x, t) + f (ω, x, t) + g(x, t)ω(x, t) dx.
0 2 2

Indeed, one obtains, by omitting the arguments x and t, for sake of brevity,
δH
  !  
ωt δH δζ ζ
κt = =J = = .
ζt δκ − δH ωxx − f˜ω (ω) − g
δω

that is,

ωt = ζ, (x, t) ∈ (0, 1) × (0, ∞)


ζt = ωxx − f˜ω (ω) − g, (72)

which is the first-order formulation of (66). Consequently, one has:

Et = ζζt + ωx ωxt + f˜ω (ω)ωt + f˜t (ω) + gωt + gt ω =


= ζ(ωxx − f˜ω (ω) − g) + ωx ζx + f˜ω (ω)ζ + f˜t (ω) + gζ + gt ω =
= ζωxx + ζx ωx + f˜t + gt ω = (ζωx )x + f˜t + gt ω.

Then, because of (70), one obtains:


Z 1
Ḣ[κ](t) = Et (x, t)dx
0
Z 1h i
= [ζ(x, t)ωx (x, t)]1x=0 + f˜t (ω, x, t) + gt (x, t)ω(x, t) dx
| {z } 0
=0
Z 1h i
= f˜t (ω, x, t) + gt (x, t)ω(x, t) dx. (73)
0

16
Except for special cases, as the one for which ϕ0 = ϕ1 , the last integral in (73) is
nonzero. Consequently, in general the Hamiltonian functional is not conserved:
Z hZ 1h i
H[κ](h) − H[κ](0) = f˜t (ω, x, t) + gt (x, t)ω(x, t) dx dt. (74)
0 0

Finally, we observe that, taking into account the boundary conditions (70), we can
rewrite (71) as:
Z 1
H[κ](t) ≡ E(x, t) dt
0
Z 1 
1 2 1 ˜
= ζ (x, t) − ω(x, t)ωxx (x, t) + f (ω, x, t) + g(x, t)ω(x, t) dx
0 2 2
1
+ [ω(x, t)ωx (x, t)]1x=0
2| {z }
=0
Z 1 
1 2 1 ˜
= ζ (x, t) − ω(x, t)ωxx (x, t) + f (ω, x, t) + g(x, t)ω(x, t) dx. (75)
0 2 2

5.1 Semi-discretization
In order for numerically solving problem (66)–(70), we use again the discretization (34)
of the spatial variable, and the vectors:
     
x1 ω1 (t) ζ1 (t)
x =  ...  , q(t) =  ..  .  N
 , p(t) =  ..  ∈ R , (76)
   
.
xN ωN (t) ζN (t)

with
ωi (t) ≈ ω(xi , t), ζi (t) ≈ ζ(xi , t) ≡ ωt (xi , t).
Since the spatial derivative ωx vanishes at x = 0 and x = 1 (see (70)), we set, in a
similar way as done in (56),

ω0 (t) = ω1 (t), ωN +1 (t) = ωN (t). (77)

thus obtaining a first-order accurate spatial approximation. Approximating the second


derivatives in (72) as follows,

ωi+1 (t) − 2ωi (t) + ωi−1 (t)


ωxx (xi , t) ≈ , i = 2, . . . , N − 1,
∆x2
we obtain the following semi-discrete approximation of the Hamiltonian (75):
N  
X 1 ωi−1 − 2ωi + ωi+1 ˜(ωi , xi , t) + g(xi , t)ωi ,
H = ∆x ζi2 − ωi + f
2 2∆x2
i=1

which, considering (77), can be rewritten in vector form as

qT TN q
 
1 T T ˜ T
H ≡ H(q, p, t) = ∆x p p + + e f (q, x, t) + g(x, t) q , (78)
2 2∆x2

17
where e has been defined in (18) and TN in (58). The semi-discrete Hamiltonian problem
generated by (78) is then:
1
q̇ = p ≡ ∇p H, t > 0, (79)
∆x
TN q 1
ṗ = − 2
− f˜q (q, x, t) − g(x, t) ≡ − ∇q H.
∆x ∆x
In a similar way as done in the case of general Dirichlet boundary conditions, we now
transform the non-autonomous Hamiltonian system (79) into an augmented autonomous
Hamiltonian one. This is done by introducing the same auxiliary conjugate (scalar)
variables (41), i.e.,
q̃ ≡ t, p̃,
and the augmented Hamiltonian (compare with (78)),
 T
p p qT TN q

T ˜ T
H̃(q, p, q̃, p̃) = ∆x + + e f (q, x, q̃) + g(x, q̃) q + p̃ ≡ H(q, p, q̃) + p̃.
2 2∆x2
(80)
Consequently, the associated Hamiltonian system is:
1
q̇ = p ≡ ∇p H̃, t > 0,
∆x
1 1
ṗ = − TN q − f˜q (q, x, q̃) − g(x, q̃) ≡ − ∇q H̃,
∆x2 ∆x
d ∂
q̃ = 1 ≡ H̃, (81)
dt ∂ p̃
d h i ∂
p̃ = −∆x eT f˜q̃ (q, x, q̃) + gq̃ (x, q̃)T q ≡ − H̃,
dt ∂ q̃
with initial conditions given by (see (63) and (76))

q(0) = ψ0 (x) − U (x, 0), p(0) = ψ1 (x) − Ut (x, 0), q̃(0) = p̃(0) = 0, (82)

with an obvious meaning of U (x, 0) and Ut (x, 0). In this way, the first three equations
in (81) match (79) (since q̃ ≡ t), whereas the last one allows for the conservation of H̃:

H̃(q(t), p(t), q̃(t), p̃(t)) = H̃(q(0), p(0), 0, 0) ≡ H(q(0), p(0), 0), t ≥ 0.

In fact, by virtue of (81), we have:


=0
d ∂ d ∂ d
z }| {
H̃(q, p, q̃, p̃) = ∇q H̃ T q̇ + ∇p H̃ T ṗ + H̃ q̃ + H̃ p̃ = 0. (83)
dt ∂ q̃ dt ∂ p̃ dt
| {z }
=0

By recalling that q̃ ≡ t, from (78) and (83) one has:


d ∂ h i
H(q, p, t) = H(q, p, t) = ∆x eT f˜t (q, x, t) + gt (x, t)T q .
dt ∂t
Consequently, we derive the following semi-discrete analogue of (74):
Z h h i
H(q(h), p(h), h) − H(q(0), p(0), 0) = ∆x eT f˜t (q, x, t) + gt (x, t)T q dt, (84)
0

18
where the argument of the integral at the right-hand side clearly approximates the inner
integral in (74).7 We can finally define the array y and the matrix J˜N as in (47), so
that (81)-(82) can be rewritten in the form:

ẏ = J˜N ∇H̃(y), t ≥ 0, (85)


T T
T
y(0) = (ψ0 (x) − U (x, 0)) , (ψ1 (x) − Ut (x, 0)) , 0, 0 .

5.2 Full discretization


Similarly to what has been done in Section 3.2 for the case of general Dirichlet bound-
ary conditions, we can proceed with the full discretization of (85) by expanding the
right-hand side of the equation as done in (20)-(21) and considering the polynomial
approximation of degree s given by (24), with H and JN replaced by H̃ and J˜N , re-
spectively, according to (85).
By repeating the same steps as in (49), one then obtains that H̃ is conserved, pro-
vided that we can exactly compute the involved integrals. This is, for example, the case
when H̃ is a polynomial, namely when f˜ and g are polynomials. Initially we assume
that f ∈ Πν , ν ≥ 2 and ϕ0 , ϕ1 ∈ Πρ . Consequently we have that f 0 = f˜q ∈ Πν−1 ,
g ∈ Πρ and gq̃ ∈ Πρ−1 . We have defined, so far, f˜(q, x, q̃) only through its derivative
f˜q (q, x, q̃), so we can choose f˜(q, x, q̃) as the primitive function of f˜q (q, x, q̃) in the
form:
f˜(q, x, q̃) = c(0) qν + c(1) (x, q̃)qν−1 + . . . + c(ν−1) (x, q̃)q,
where c(i) ∈ Πiρ , and, therefore:
(1) (ν−1)
f˜q̃ (q, x, q̃) = cq̃ (x, q̃)qν−1 + . . . + cq̃ (x, q̃)q,

is a polynomial of degree

deg(f˜q̃ ) = max{s(ν − 1) + ρ − 1, ρ(ν − 1) + s − 1}.

As a consequence, by also considering that gq̃ q ∈ Πρ−1+s and f˜q ∈ Π(ν−1) max(ρ,s) , we
have that the augmented Hamiltonian H̃ is exactly conserved, provided that k satisfies:
1
k≥ ((ν − 1) max{ρ, s} + max{min{ρ, s}, 1} + s − 1) . (86)
2
We observe that when ρ = 0, such bound reduces to the bound (25): that is, the
same bound obtained in Section 4.2 for the case of homogeneous Neumann boundary
condition.
Suppose now that H̃ is not a polynomial. In this case we can approximate the
integrals by means of a Gaussian quadrature of order 2k as done in (51)-(52). With
similar steps as in (53), by setting as usual u(ch) the new polynomial approximation
and y1 ≡ u(h) ≈ y(h) the new discrete approximation at t = h, we have that

H̃(u(h)) − H̃(u(0)) = O(h2k+1 ),

and, by choosing k large enough, we can approximate the Hamiltonian within full ma-
chine accuracy. The following result summarizes the previous arguments.
7
We observe that (84) is equivalent to keep constant H̃(q(t), p(t), t, p̃(t)), as defined in (80), along the
solution of (81).

19
Theorem 4 Assume k ≥ s, and let define y1 = u(h) the new approximation to y(h),
solution of (85). One then obtains:
y1 − y(h) = O(h2s+1 ),
that is, the method has order 2s. Moreover, assuming that f, ϕ0 , and ϕ1 are suitably
regular:

 0, if f ∈ Πν , ϕ0 , ϕ1 ∈ Πρ , and (86) holds true,
H̃(y1 ) − H̃(y0 ) =
O(h2k+1 ), otherwise.

6 Numerical tests
We now report a few numerical tests which illustrate the results described in the previous
sections. In all cases, we shall consider the following instance of the Klein-Gordon type
equation (see, e.g., [19]),
utt = uxx − m2 u + u3 , (x, t) ∈ [0, 1] × [0, T ], (87)
with initial conditions
u(x, 0) = eκx sin(πx2 ), ut (x, 0) = ω sin(πx2 ), x ∈ [0, 1], (88)
and different boundary conditions, as specified below. We shall also consider possible
different values of the (non-negative) parameters κ and ω, depending on the case. For the
semi-discretization of the problem, we shall use a spatial step ∆x defined, according to
either (13) or (34), by N = 200. Consequently, the semi-discretized first-order problem
has dimension 2N = 400. We shall consider the following cases of boundary conditions:
i) periodic boundary conditions;
ii) homogeneous Neumann boundary conditions;
iii) homogeneous Dirichlet boundary conditions;
iv) non-homogeneous Dirichlet boundary conditions.
We shall omit, for sake of brevity, the case of non-homogeneous Neumann boundary
conditions for which, however, results similar to case iv) are obtained.

Case i)
In such a case, the complete problem is obtained by coupling (87)-(88) with the periodic
boundary conditions (2). According to the analysis made in Section 2 (see Theorem 1),
the semi-discrete Hamiltonian (17) is conserved by using a HBVM(2s, s) method, having
order 2s, for all s ≥ 1. In fact, at the right-hand side in (87) a polynomial of degree
3 appears (and, therefore, its primitive is a polynomial of degree 4). We shall consider
the following set of parameters for (87)-(88):
m = 2, T = 500, κ = 1.41, ω = 1. (89)
The step-size used is h = 5 · 10−2 , so that 104 integration steps are performed. By using
the symplectic 2-stages Gauss method, i.e., HBVM(2,2), the numerical Hamiltonian
diverges, as is shown in Figure 2, and the numerical solution blows up (see Figure 1).
Conversely, by using the energy-conserving HBVM(4,2) method, the numerical solution
remains bounded and the discrete Hamiltonian is conserved.

20
Case ii)
In such a case, the complete problem is obtained by coupling (87)-(88) with the ho-
mogeneous Neumann boundary conditions (54). Also in this case, according to the
analysis made in Section 4, the semi-discrete Hamiltonian (57) is conserved by using a
HBVM(2s, s) method, having order 2s, for all s ≥ 1. We shall consider the following
set of parameters for (87)-(88):
200
m = 2, T = 500, κ = 1.3, ω= . (90)
201
The step-size used is h = 5 · 10−2 , so that 104 integration steps are performed. By using
the (symplectic) HBVM(2,2) method, the numerical solution blows up, as is shown in
Figure 3, and the numerical Hamiltonian diverges, as is shown in Figure 4. Conversely,
by using the energy-conserving HBVM(4,2) method, the numerical solution remains
bounded and the discrete Hamiltonian is conserved.

Case iii)
In such a case, the complete problem is obtained by coupling (87)-(88) with homogeneous
Dirichlet boundary conditions, i.e.

u(0, t) = u(1, t) = 0, t > 0.

Also in this case, according to the analysis made in Section 3, the semi-discrete Hamil-
tonian (39) is conserved by using a HBVM(2s, s) method, having order 2s, for all s ≥ 1,
due to the fact that ϕ(t) ≡ 0. We shall consider the same set of parameters (90) used
in Case ii), with the same step-size h = 5 · 10−2 , so that 104 integration steps are per-
formed. In Figure 5 we plot the discrete numerical Hamiltonian for the (symplectic)
HBVM(2,2) method, and the (energy-conserving) HBVM(4,2) method, thus showing
that the former method does not preserve H, in contrast with the latter method.

Case iv)
In such a case, the complete problem is obtained by coupling (87)-(88) with the following
Dirichlet boundary conditions:

u(0, t) = sin(πt), u(1, t) = − sin(πt), t > 0. (91)

According to the analysis made in Section 3, the semi-discrete Hamiltonian H in (39) is


not conserved, while the modified Hamiltonian H̃ defined in (42) is precisely conserved.
We consider the following set of parameters,

m = 2, T = 500, κ = 0, ω = 1, (92)

and use the (symplectic) HBVM(2,2) method, and the HBVM(10,2) method, with
step-size h = 10−1 . According to Theorem 2, this latter method is practically energy-
conserving, whereas the former method is not. This is confirmed by the plots of the
numerical modified Hamiltonian H̃ in Figure 6.

21
7 Conclusions
In this paper, we have compared the conservation properties of the nonlinear wave
equation with the corresponding ones obtained after semi-discretization of the space
variable. This latter properties can be conveniently inherited by the numerical solution
provided by energy-conserving methods in the HBVMs class.
The arguments can be extended in a quite straightforward way to other Hamiltonian
partial differential equations, e.g., the Schrödinger equation, as well as to different space
discretizations, which will be the subject of future investigations.

References
[1] T.J. Bridges. Multisymplectic structures and wave propagation. Math. Proc. Cam-
bridge Philos. Soc. 121 (1997) 147–190.
[2] T.J. Bridges, S. Reich. Multi-symplectic integrators: numerical schemes for Hamil-
tonian PDEs that conserve symplecticity. Physics Letters A 284 (2001) 184–193.
[3] T.J. Bridges, S. Reich. Multi-symplectic spectral discretizations for the Zakharov-
Kuznetsov and shallow water equations. Physica D 152 (2001) 491–504.
[4] T.J. Bridges, S. Reich. Numerical methods for Hamiltonian PDEs. J. Phys. A:
Math. Gen. 39 (2006) 5287–5320.
[5] L. Brugnano, M. Calvo, J.I. Montijano, L. Ràndez. Energy preserving methods for
Poisson systems. Journal of Computational and Applied Mathematics 236 (2012),
3890–3904.
[6] L. Brugnano, G. Frasca Caccia, F. Iavernaro. Efficient implementation of Gauss col-
location and Hamiltonian Boundary Value Methods. Numer. Algor. 65 (2014) 633–
650.
[7] L. Brugnano, F. Iavernaro. Line Integral Methods which preserve all invariants of
conservative problems. Journal of Computational and Applied Mathematics 236
(2012) 3905–3919.
[8] L. Brugnano, F. Iavernaro, D. Trigiante. Analysis of Hamiltonian Boundary Value
Methods (HBVMs) for the numerical solution of polynomial Hamiltonian dynami-
cal systems. (2009) arXiv:0909.5659v1
[9] L. Brugnano, F. Iavernaro, D. Trigiante. Hamiltonian BVMs (HBVMs): a family of
"drift-free" methods for integrating polynomial Hamiltonian systems. AIP Conf.
Proc. 1168 (2009) 715–718.
[10] L. Brugnano, F. Iavernaro, D. Trigiante. Hamiltonian Boundary Value Methods
(Energy Preserving Discrete Line Methods). Journal of Numerical Analysis, In-
dustrial and Applied Mathematics 5,1-2 (2010) 17–37.
[11] L. Brugnano, F. Iavernaro, D. Trigiante. A note on the efficient implementation
of Hamiltonian BVMs. Journal of Computational and Applied Mathematics 236
(2011) 375–383.
[12] L. Brugnano, F. Iavernaro, D. Trigiante. The Lack of Continuity and the Role of In-
finite and Infinitesimal in Numerical Methods for ODEs: the Case of Symplecticity.
Applied Mathematics and Computation 218 (2012) 8053–8063.

22
[13] L. Brugnano, F. Iavernaro, D. Trigiante. A simple framework for the derivation and
analysis of effective one-step methods for ODEs. Applied Mathematics and Com-
putation 218 (2012) 8475–8485.
[14] L. Brugnano, F. Iavernaro, D. Trigiante. A two-step, fourth-order method with en-
ergy preserving properties. Computer Physics Communications 183 (2012) 1860–
1868.
[15] L. Brugnano, F. Iavernaro, D. Trigiante. Energy and QUadratic Invariants Preserv-
ing integrators based upon Gauss collocation formulae. SIAM Journal on Numerical
Analysis 50, No. 6 (2012) 2897–2916.
[16] L. Brugnano, Y. Sun. Multiple invariants conserving Runge-Kutta type methods for
Hamiltonian problems. Numer. Algor. 65 (2014) 611–632.
[17] J.B. Chen, M.Z. Qin. Multi-symplectic Fourier pseudospectral method for the non-
linear Schrödinger equation. Electron. Trans. Numer. Anal. 12 (2001) 193–204.
[18] D. Cohen, E. Hairer, C. Lubich. Conservation of energy, momentum and actions in
numerical discretizations of non-linear wave equations. Numer. Math. 110 (2008)
113–143.
[19] T. D’Aprile, D. Mugnai. Solitary waves for nonlinear Klein-Gordon-Maxwell and
Schrödinger-Maxwell equations. Proceedings of the Royal Society of Edinburgh 134
A (2004) 893–906.
[20] B. Forneberg, G.B. Whitham. A Numerical and Theoretical Study of Certain Non-
linear Wave Phenomena. Proc. R. Soc. Lond. A 289 (1978) 373–403.
[21] J. Frank. Conservation of wave action under multisymplectic discretizations. J.
Phys. A: Math. Gen. 39 (2006) 5479–5493.
[22] J. Frank, B.E. Moore, S. Reich. Linear PDEs and Numerical Methods that Preserve
a Multisymplectic Conservation Law. SIAM J. Sci. Comput. 28 (2006) 260–277.
[23] E. Hairer, C. Lubich, G. Wanner. Geometric numerical integration. Structure-
preserving algorithms for ordinary differential equations (second ed.) Springer-
Verlag, Berlin, 2006.
[24] E. Hairer, C. Lubich. Spectral semi-discretisations of weakly nonlinear wave equa-
tions over long times. Found. Comput. Math. 8 (2008) 319–334.
[25] F. Iavernaro, B. Pace. s-Stage Trapezoidal Methods for the Conservation of Hamil-
tonian Functions of Polynomial Type. AIP Conf. Proc. 936 (2007) 603–606.
[26] F. Iavernaro, B. Pace. Conservative Block-Boundary Value Methods for the Solution
of Polynomial Hamiltonian Systems. AIP Conf. Proc. 1048 (2008) 888–891.
[27] F. Iavernaro, D. Trigiante. High-order symmetric schemes for the energy conserva-
tion of polynomial Hamiltonian problems. Journal of Numerical Analysis, Indus-
trial and Applied Mathematics 4,1-2 (2009) 87–101.
[28] A.L. Islas, C.M. Schober. On the preservation of phase space structure under mul-
tisymplectic discretization. Journal of Computational Physics bf 197 (no. 2) (2004)
585–609.
[29] A.L. Islas, C.M. Schober. Backward error analysis for multisymplectic discretiza-
tions of Hamiltonian PDEs. Mathematic and Computers in Simulation 69 (2005)
290–303.

23
[30] A.L. Islas, C.M. Schober. Conservation properties of multisymplectic integrators.
Future Generation Computer Systems 22 (2006) 412–422.
[31] B. Leimkulher, S. Reich. Simulating Hamiltonian Dynamics. Cambridge University
Press, 2004.
[32] J. E. Marsden, G.P. Patrick, S. Shkoller. Multi-symplectic geometry, variational in-
tegrators, and nonlinear PDEs. Communications in Mathematical Physics 199
(1999) 351–395.
[33] B. Moore, S. Reich. Backward error analysis for multi-symplectic integration meth-
ods. Numer. Math. 95 (2003) 625–652.
[34] J. Wang. A note on multisymplectic Fourier pseudospectral discretization for the
nonlinear Schrödinger equation. Appl. Math. Comput. 191 (2007), 31–41.
[35] S.B. Wineberg, J.F. McGrath, E.F. Gabl, L.R. Scott, C.E. Southwell. Implicit spec-
tral methods for wave propogation problems. J. Comp. Physics 97 (1991) 311–336.

24
Figure 1: Computed component u99 by using HBVM(2,2) and HBVM(4,2) for solving prob-
lem (87)-(88) and (89), with periodic boundary conditions, by using a stepsize h = 5 · 10−2 .

Figure 2: Discrete Hamiltonian by using HBVM(2,2) and HBVM(4,2) for solving problem
(87)-(88) and (89), with periodic boundary conditions, by using a stepsize h = 5 · 10−2 .

25
Figure 3: Computed component u99 by using HBVM(2,2) and HBVM(4,2) for solving prob-
lem (87)-(88) and (90), with homogeneous Neumann boundary conditions, by using a stepsize
h = 5 · 10−2 .

Figure 4: Discrete Hamiltonian by using HBVM(2,2) and HBVM(4,2) for solving problem
(87)-(88) and (90), with homogeneous Neumann boundary conditions, by using a stepsize
h = 5 · 10−2 .

26
Figure 5: Discrete Hamiltonian by using HBVM(2,2) and HBVM(4,2) for solving problem
(87)-(88) and (90), with homogeneous Dirichlet boundary conditions, by using a stepsize
h = 5 · 10−2 .

Figure 6: Discrete modified Hamiltonian by using HBVM(2,2) and HBVM(10,2) for solving
problem (87)-(88) and (92), with boundary conditions (91), by using a stepsize h = 10−1 .

27

View publication stats

You might also like