Next Article in Journal
Introduction to Special Issue: New Trends in Fuzzy Set Theory and Related Items
Next Article in Special Issue
Efficient BEM-Based Algorithm for Pricing Floating Strike Asian Barrier Options (with MATLAB® Code)
Previous Article in Journal
Quantiles in Abstract Convex Structures
Previous Article in Special Issue
On the Analysis of Mixed-Index Time Fractional Differential Equation Systems
Article Menu

Export Article

Axioms 2018, 7(2), 36; doi:10.3390/axioms7020036

Review
Line Integral Solution of Differential Problems
1
Dipartimento di Matematica e Informatica “U. Dini”, Università di Firenze, Viale Morgagni 67/A, 50134 Firenze, Italy
2
Dipartimento di Matematica, Università di Bari, Via Orabona 4, 70125 Bari, Italy
*
Author to whom correspondence should be addressed.
Received: 4 May 2018 / Accepted: 28 May 2018 / Published: 1 June 2018

Abstract

:
In recent years, the numerical solution of differential problems, possessing constants of motion, has been attacked by imposing the vanishing of a corresponding line integral. The resulting methods have been, therefore, collectively named (discrete) line integral methods, where it is taken into account that a suitable numerical quadrature is used. The methods, at first devised for the numerical solution of Hamiltonian problems, have been later generalized along several directions and, actually, the research is still very active. In this paper we collect the main facts about line integral methods, also sketching various research trends, and provide a comprehensive set of references.
Keywords:
conservative problems; Hamiltonian problems; energy-conserving methods; Poisson problems; Hamiltonian Boundary Value Methods; HBVMs; line integral methods; constrained Hamiltonian problems; Hamiltonian PDEs; highly oscillatory problems
Keywords:
65P10; 65L06; 65L05

1. Introduction

The numerical solution of differential problems in the form
y ˙ ( t ) = f ( y ( t ) ) , t 0 , y ( 0 ) = y 0 D R m ,
is needed in a variety of applications. In many relevant instances, the solution has important geometric properties and the name geometric integrator has been coined to denote a numerical method able to preserve them (see, e.g., the monographs [1,2,3,4]). Often, the geometric properties of the vector field are summarized by the presence of constants of motion, namely functions of the state vector which are conserved along the solution trajectory of (1). For this reason, in such a case one speaks about a conservative problem. For sake of simplicity, let us assume, for a while, that there exists only one constant of motion, say
C ( y ( t ) ) C ( y 0 ) , t 0 , y 0 D ,
along the solution y ( t ) of (1). Hereafter, we shall assume that both f : D R m and C : D R are suitably smooth (e.g., analytical). In order for the conservation property (2) to hold, one requires that
d d t C ( y ( t ) ) = C ( y ( t ) ) y ˙ ( t ) = C ( y ( t ) ) f ( y ( t ) ) = 0 .
Consequently, one obtains the equivalent condition
C ( y ) f ( y ) = 0 , y D .
However, the conservation property (2) can be equivalently restated through the vanishing of a line integral:
C ( y ( t ) ) C ( y 0 ) = C ( y ( t ) ) C ( y ( 0 ) ) = 0 t C ( y ( τ ) ) y ˙ ( τ ) d τ = 0 , t 0 .
In fact, since y satisfies (1), one obtains that the integrand is given by
C ( y ( τ ) ) f ( y ( τ ) ) 0 ,
because of (3). On the other hand, if one is interested in obtaining an approximation to y, ruled by a discrete-time dynamics with time-step h, one can look for any path σ joining y 0 to y 1 y ( h ) , i.e.,
σ ( 0 ) = y 0 , σ ( h ) = y 1 ,
and such that
C ( y 1 ) C ( y 0 ) C ( σ ( h ) ) C ( σ ( 0 ) ) = 0 h C ( σ ( t ) ) σ ˙ ( t ) d t = h 0 1 C ( σ ( c h ) ) σ ˙ ( c h ) d c = 0 .
Definition 1.
The path σ satisfying (5) and (6) defines aline integral methodproviding an approximation y 1 to y ( h ) such that C ( y 1 ) = C ( y 0 ) .
Obviously, the process is then repeated on the interval [ h , 2 h ] , starting from y 1 , and so on. We observe that the path σ now provides the vanishing of the line integral in (6) without requiring the integrand be identically zero. This, in turn, allows much more freedom during the derivation of such methods. In addition to this, it is important to observe that one cannot, in general, directly impose the vanishing of the integral in (6) since, in most cases, the integrand function does not admit a closed form antiderivative. Consequently, in order to obtain a ready to use numerical method, the use of a suitable quadrature rule is mandatory.
Since we shall deal with polynomial paths σ , it is natural to look for an interpolatory quadrature rule defined by the abscissae and weights ( c i , b i ) , i = 1 , , k . In order to maximize the order of the quadrature, i.e., 2 k , we place the abscissae at the zeros of the kth shifted and scaled Legendre polynomial P k (i.e., P k ( c i ) = 0 , i = 1 , , k ). Such polynomials provide an orthonormal basis for functions in L 2 [ 0 , 1 ] :
deg ( P i ) = i , 0 1 P i ( x ) P j ( x ) d x = δ i j , i , j = 0 , 1 , ,
with δ i j denoting the Kronecker delta. Consequently, (6) becomes
C ( y 1 ) C ( y 0 ) = h 0 1 C ( σ ( c h ) ) σ ˙ ( c h ) d c h i = 1 k b i C ( σ ( c i h ) ) σ ˙ ( c i h ) = 0 .
Definition 2.
The path σ satisfying (5) and (8) defines adiscrete line integral methodproviding an approximation y 1 to y ( h ) such that C ( y 1 ) C ( y 0 ) , within the accuracy of the quadrature rule.
As is clear, if C is such that the quadrature in (8) is exact, then the method reduces to the line integral method satisfying (5) and (6), exactly conserving the invariant. In the next sections we shall make the above statements more precise and operative.
Line integral methods were at first studied to derive energy-conserving methods for Hamiltonian problems: a coarse idea of the methods can be found in [5,6]; the first instances of such methods were then studied in [7,8,9]; later on, the approach has been refined in [10,11,12,13] and developed in [14,15,16,17,18]. Further generalizations, along several directions, have been considered in [19,20,21,22,23,24,25,26,27,28]: in particular, in [19] Hamiltonian boundary value problems have been considered, which are not covered in this review. The main reference on line integral methods is given by the monograph [1].
With these premises, the paper is organized as follows: in Section 2 we shall deal with the numerical solution of Hamiltonian problems; Poisson problems are then considered in Section 3; constrained Hamiltonian problems are studied in Section 4; Hamiltonian partial differential equations (PDEs) are considered in Section 5; highly oscillatory problems are briefly discussed in Section 6; at last, Section 7 contains some concluding remarks.

2. Hamiltonian Problems

A canonical Hamiltonian problem is in the form
y ˙ = J H ( y ) , y ( 0 ) = y 0 R 2 m , J = I m I m ,
with H the Hamiltonian function and, in general, I r hereafter denoting the identity matrix of dimension r. Because of the skew-symmetry of J, one readily verifies that H is a constant of motion for (9):
d d t H ( y ) = H ( y ) y ˙ = H ( y ) J H ( y ) = 0 .
For isolated mechanical systems, H has the physical meaning of the total energy, so that it is often referred to as the energy. When solving (9) numerically, it is quite clear that this conservation property becomes paramount to get a correct simulation of the underlying phenomenon. The first successful approach in the numerical solution of Hamiltonian problems has been the use of symplectic integrators. The characterization of a symplectic Runge-Kutta method
Axioms 07 00036 i001
is based on the following algebraic property of its Butcher tableau [29,30] (see also [31])
Ω A + A Ω = b b , Ω = diag ( b ) ,
which is tantamount to the conservation of any quadratic invariant of the continuous problem.
Under appropriate assumptions, symplectic integrators provide a bounded Hamiltonian error over long time intervals [2], whereas generic numerical methods usually exhibit a drift in the numerical Hamiltonian. Alternatively, one can look for energy conserving methods (see, e.g., [32,33,34,35,36,37,38,39]). We here sketch the line integral solution to the problem. According to (5) and (6) with C = H , let us set
σ ˙ ( c h ) = j = 0 s 1 P j ( c ) γ j , c [ 0 , 1 ] ,
where the coefficients γ j R 2 m are at the moment unknown. Integrating term by term, and imposing the initial condition, yields the following polynomial of degree s:
σ ( c h ) = y 0 + h j = 0 s 1 0 c P j ( x ) d x γ j , c [ 0 , 1 ] .
By defining the approximation to y ( h ) as
y 1 : = σ ( h ) = y 0 + h γ 0 ,
where we have taken into account the orthonormality conditions (7), so that 0 1 P j ( x ) d x = δ j 0 , one then obtains that the conditions (5) are fulfilled. In order to fulfil also (6) with C = H , one then requires, by taking into account (11)
H ( y 1 ) H ( y 0 ) = H ( σ ( h ) ) H ( σ ( 0 ) ) = h 0 1 H ( σ ( c h ) ) σ ˙ ( c h ) d c = h j = 0 s 1 0 1 P j ( c ) H ( σ ( c h ) ) d c γ j = 0 .
This latter equation is evidently satisfied, due to the skew-symmetry of J, by setting
γ j = J 0 1 P j ( c ) H ( σ ( c h ) ) d c , j = 0 , , s 1 .
Consequently, (12) becomes
σ ( c h ) = y 0 + h j = 0 s 1 0 c P j ( x ) d x 0 1 P j ( c ) J H ( σ ( c h ) ) d c , c [ 0 , 1 ] ,
which, according to ([12], Definition 1), is the master functional equation defining σ . Consequently, the conservation of the Hamiltonian is assured. Next, we discuss the order of accuracy of the obtained approximation, namely the difference σ ( h ) y ( h ) : this will be done in the next section, by using the approach defined in [18].

2.1. Local Fourier Expansion

By introducing the notation
f = J H , γ j ( σ ) = 0 1 P j ( c ) f ( σ ( c h ) ) d c , j 0 ,
one has that (9) can be written, on the interval [ 0 , h ] , as
y ˙ ( c h ) = j 0 P j ( c ) γ j ( y ) , c [ 0 , 1 ] ,
with γ j ( y ) defined according to (16), by formally replacing σ with y. Similarly,
f ( σ ( c h ) ) = j 0 P j ( c ) γ j ( σ ) , c [ 0 , 1 ] ,
with the polynomial σ in (15) satisfying, by virtue of (11) and (14), the differential equation:
σ ˙ ( c h ) = j = 0 s 1 P j ( c ) γ j ( σ ) , c [ 0 , 1 ] .
The following result can be proved (see [18], Lemma 1).
Lemma 1.
Let g : [ 0 , h ] V , with V a vector space, admit a Taylor expansion at 0. Then, for all j 0 :
0 1 P j ( c ) g ( c h ) d c = O ( h j ) .
Moreover, let us denote by y ( t , t ˜ , y ˜ ) the solution of the ODE-IVPs
y ˙ ( t ) = f ( y ( t ) ) , t t ˜ , y ( t ˜ ) = y ˜ ,
and by Φ ( t , t ˜ ) the fundamental matrix solution of the variational problem associated to it. We recall that
y ˜ y ( t , t ˜ , y ˜ ) = Φ ( t , t ˜ ) , t ˜ y ( t , t ˜ , y ˜ ) = Φ ( t , t ˜ ) f ( y ˜ ) .
We are now in the position to prove the result concerning the accuracy of the approximation (13).
Theorem 1.
σ ( h ) y ( h ) = O ( h 2 s + 1 ) (in other words, the polynomial σ defines an approximation procedure of order 2s).
Proof. 
One has, by virtue of (5), (16)–(19), Lemma 1, and (20):
σ ( h ) y ( h ) = y ( h , h , σ ( h ) ) y ( h , 0 , σ ( 0 ) ) = 0 h d d t y ( h , t , σ ( t ) ) d t = 0 h t ˜ y ( h , t ˜ , σ ( t ) ) t ˜ = t + y ˜ y ( h , t , y ˜ ) y ˜ = σ ( t ) σ ˙ ( t ) d t = 0 h Φ ( h , t ) σ ˙ ( t ) f ( σ ( t ) ) d t = h 0 1 Φ ( h , c h ) σ ˙ ( c h ) f ( σ ( c h ) ) d c = h 0 1 Φ ( h , c h ) j = 0 s 1 P j ( c ) γ j ( σ ) j 0 P j ( c ) γ j ( σ ) d c = h j s 0 1 P j ( c ) Φ ( h , c h ) d c = O ( h j ) γ j ( σ ) = O ( h j ) = O ( h 2 s + 1 ) .
 ☐

2.2. Hamiltonian Boundary Value Methods

Quoting Dahlquist and Björk [40], p. 521, as is well known, even many relatively simple integrals cannot be expressed in finite terms of elementary functions, and thus must be evaluated by numerical methods. In our framework, this obvious statement means that, in order to obtain a numerical method from (15), we need to approximate the integrals appearing in that formula by means of a suitable quadrature procedure. In particular, as anticipated above, we shall use the Gauss-Legendre quadrature of order 2 k , whose abscissae and weights will be denoted by ( c i , b i ) (i.e., P k ( c i ) = 0 , i = 1 , , k ). Hereafter, we shall obviously assume k s . In so doing, in place of (15), one obtains a (possibly different) polynomial,
u ( c h ) = y 0 + h j = 0 s 1 0 c P j ( x ) d x = 1 k b P j ( c ) f ( u ( c h ) ) , c [ 0 , 1 ] ,
where (see (16)):
γ ^ j : = = 1 k b P j ( c ) f ( u ( c h ) ) = 0 1 P j ( c ) f ( u ( c h ) ) d c + Δ j ( h ) γ j ( u ) + Δ j ( h ) ,
with Δ j ( h ) the quadrature error. Considering that the quadrature is exact for polynomial integrands of degree 2 k 1 , one has:
Δ j ( h ) = 0 , if H is a polynomial of degree ν ( 2 k + s 1 j ) / s , O ( h 2 k j ) , otherwise .
As a consequence, u σ   if H is a polynomial of degree ν 2 k / s . In such a case, H ( u ( h ) ) H ( u ( 0 ) ) H ( σ ( h ) ) H ( σ ( 0 ) ) = 0 ,  i.e., the energy is exactly conserved. Differently, one has, by virtue of (22) and Lemma 1:
H ( u ( h ) ) H ( u ( 0 ) ) = h 0 1 H ( u ( c h ) ) u ˙ ( c h ) d c = h 0 1 H ( u ( c h ) ) j = 0 s 1 P j ( c ) γ ^ j d c = h j = 0 s 1 0 1 P j ( c ) H ( u ( c h ) ) d c = 1 k b P j ( c ) f ( u ( c h ) ) = h j = 0 s 1 γ j ( u ) J γ j ( u ) + Δ j ( h ) = h j = 0 s 1 γ j ( u ) = O ( h j ) J Δ j ( h ) = O ( h 2 k j ) = O ( h 2 k + 1 ) .
The result of Theorem 1 continues to hold for u. In fact, by using arguments similar to those used in the proof of that theorem, one has, by taking into account (22) and that k s :
u ( h ) y ( h ) = y ( h , h , u ( h ) ) y ( h , 0 , u ( 0 ) ) = 0 h d d t y ( h , t , u ( t ) ) d t = 0 h t ˜ y ( h , t ˜ , u ( t ) ) t ˜ = t + y ˜ y ( h , t , y ˜ ) y ˜ = u ( t ) ) u ˙ ( t ) d t = 0 h Φ ( h , t ) u ˙ ( t ) f ( u ( t ) ) d t = h 0 1 Φ ( h , c h ) u ˙ ( c h ) f ( u ( c h ) ) d c = h 0 1 Φ ( h , c h ) j = 0 s 1 P j ( c ) γ ^ j j 0 P j ( c ) γ j ( u ) d c = h 0 1 Φ ( h , c h ) j = 0 s 1 P j ( c ) ( γ j ( u ) + Δ j ( h ) ) j 0 P j ( c ) γ j ( u ) d c = h j = 0 s 1 0 1 P j ( c ) Φ ( h , c h ) d c = O ( h j ) Δ j ( u ) = O ( h 2 k j ) h j s 0 1 P j ( c ) Φ ( h , c h ) d c = O ( h j ) γ j ( u ) = O ( h j ) = O ( h 2 s + 1 ) .
Definition 3.
The polynomial u defined at (21) defines a Hamiltonian Boundary Value Method (HBVM) with parameters k and s, in short HBVM ( k , s ) .
Actually, by observing that in (21) only the values of u at the abscissae are needed, one obtains, by setting Y i : = u ( c i h ) , and rearranging the terms:
Y i = y 0 + h j = 1 k b j = 0 s 1 0 c i P ( x ) d x P ( c j ) f ( Y j ) , i = 1 , , k ,
with the new approximation given by
y 1 : = u ( h ) = y 0 + h i = 1 k b i f ( Y i ) .
Consequently, we are speaking about the k-stage Runge-Kutta method with Butcher tableau given by:
Axioms 07 00036 i003
with
c = c 1 c k , b = b 1 b k , Ω = b 1 b k ,
and
P s = P 0 ( c 1 ) P s 1 ( c 1 ) P 0 ( c k ) P s 1 ( c k ) , I s = 0 c 1 P 0 ( x ) d x 0 c 1 P s 1 ( x ) d x 0 c k P 0 ( x ) d x 0 c k P s 1 ( x ) d x R k × s .
The next result summarizes the properties of HBVMs sketched above, where we also take into account that the abscissae are symmetrically distributed in the interval [0, 1] (we refer to [1,18] for full details).
Theorem 2.
For all k s , a HBVM ( k , s ) method:
  • is symmetric and y 1 y ( h ) = O ( h 2 s + 1 ) ;
  • when k = s it becomes the s-stage Gauss collocation Runge-Kutta method;
  • it is energy conserving when the Hamiltonian H is a polynomial of degree not larger than 2 k / s ;
  • conversely, one has H ( y 1 ) H ( y 0 ) = O ( h 2 k + 1 ) .
We conclude this section by showing that, for HBVM ( k , s ) , whichever is the value k s considered, the discrete problem to be solved has dimension s, independently of k. This fact is of paramount importance, in view of the use of relatively large values of k, which are needed, in order to gain a (at least practical) energy conservation. In fact, even for non polynomial Hamiltonians, one obtains a practical energy conservation, once the O ( h 2 k + 1 ) Hamiltonian error falls, by choosing k large enough, within the round-off error level.
By taking into account the stage Equation (24), and considering that Y i = u ( c i h ) , one has that the stage vector can be written as
u ( c h ) = e y 0 + h I s P s Ω I 2 m f ( u ( c h ) ) = : e y 0 + h I s I 2 m γ ^ ,
where
e = 1 1 R k , u ( c h ) = u ( c 1 h ) u ( c k h ) , f ( u ( c h ) ) = f ( u ( c 1 h ) ) f ( u ( c k h ) ) ,
and
γ ^ γ ^ 0 γ ^ s 1 = P s Ω I 2 m f ( u ( c h ) ) ,
is the block vector (of dimension s) with the coefficients (22) of the polynomial u in (21). By combining (29) and (31), one then obtains the discrete problem, equivalent to (24),
γ ^ = P s Ω I 2 m f e y 0 + h I s I 2 m γ ^ ,
having (block) dimension s, independently of k. Once this has been solved, one verifies that the new approximation (25) turns out to be given by (compare also with (13)):
y 1 : = u ( h ) = y 0 + h γ ^ 0 .
Next section will concern the efficient numerical solution of the discrete problem
G ( γ ^ ) : = γ ^ P s Ω I 2 m f e y 0 + h I s I 2 m γ ^ = 0 ,
generated by the application of a HBVM ( k , s ) method. In fact, a straightforward fixed-point iteration,
γ ^ + 1 = P s Ω I 2 m f e y 0 + h I s I 2 m γ ^ , = 0 , 1 , ,
may impose severe stepsize limitations. On the other hand, the application of the simplified Newton iteration for solving (34) reads, by considering that (see (27) and (28))
P s Ω I s = X s ξ 0 ξ 1 ξ 1 0 ξ s 1 ξ s 1 0 , ξ i = 1 2 | 4 i 2 1 | , i = 0 , , s 1 ,
and setting f ( y 0 ) the Jacobian of f evaluated at y 0 :
I s I 2 m h X s f ( y 0 ) ( γ ^ + 1 γ ^ ) = G ( γ ^ ) , = 0 , 1 , .
This latter iteration, in turn, needs to factor a matrix whose size is s times larger than that of the continuous problem. This can represent an issue, when large-size problems are to be solved and/or large values of s are considered.

2.3. Blended Implementation of HBVMs

We here sketch the main facts concerning the so called blended implementation of HBVMs, a Newton-like iteration alternative to (36), which only requires to factor a matrix having the same size as that of the continuous problem, thus resulting into a much more efficient implementation of the methods [1,16]. This technique derives from the definition of blended implicit methods, which have been at first considered in [41,42], and then developed in [43,44,45]. Suitable blended implicit methods have been implemented in the Fortran codes BIM [46], solving stiff ODE-IVPs, and BIMD [47], also solving linearly implicit DAEs up to index 3. The latter code is also available on the Test Set for IVP Solvers [48] (see also [49]), and turns out to be among the most reliable and efficient codes currently available for solving stiff ODE-IVPs and linearly implicit DAEs. It is worth mentioning that, more recently, the blended implementation of RKN-type methods has been also considered [50].
Let us then consider the iteration (36), which requires the solution of linear systems in the form
I s I 2 m h X s f ( y 0 ) x = η .
By observing that matrix X s defined at (35) is nonsingular, we can consider the equivalent linear system
ρ s X s 1 I 2 m h I s f ( y 0 ) x = ρ s X s 1 I 2 m η = : η 1 ,
where ρ s is a positive parameter to be determined. For this purpose, let
f ( y 0 ) = V Λ V 1 ,
be the Jordan canonical form of f ( y 0 ) . For simplicity, we shall assume that Λ is diagonal, and let λ be any of its diagonal entries. Consequently, the two linear systems (37) and (38), projected in the invariant subspace corresponding to that entry, respectively become
[ I s q X s ] x = η , ρ s [ X s 1 q I s ] x = η 1 , q = h λ ,
again being equivalent to each other (i.e., having the same solution x R s ). We observe that the coefficient matrix of the former system is I s + O ( q ) , when q 0 , whereas that of the latter one is   ρ s q ( I s + O ( q 1 ) ) , when | q | 1 . Consequently, one would like to solve the former system, when  q 0 , and the latter one, when | q | 1 . This can be done automatically by considering a weighting function θ ( q ) such that
θ ( 0 ) = I s , and θ ( q ) O , as q ,
then considering the blending of the two equivalent systems (39) with weights θ ( q ) and I s θ ( q ) , respectively:
M ( q ) x = η ( q ) , M ( q ) = θ ( q ) [ I s q X s ] + ( I s θ ( q ) ) ρ s [ X s 1 q I s ] , η ( q ) = θ ( q ) η + ( I s θ ( q ) ) η 1 .
In particular, (40) can be accomplished by choosing
θ ( q ) : = I s · ( 1 ρ s q ) 1 I s · ( 1 h ρ s λ ) 1 .
Consequently, one obtains that
M ( q ) = I s + O ( q ) , q 0 , and M ( q ) = ρ s q ( I s + O ( q 1 ) ) , | q | 1 .
As a result, one can consider the following splitting for solving the problem:
N ( q ) x = ( N ( q ) M ( q ) ) x + η ( q ) , N ( q ) = I s · ( 1 ρ s q ) θ ( q ) 1 .
The choice of the scalar parameter ρ s is then made in order to optimize the convergence properties of the corresponding iteration. According to the analysis in [42], we consider
ρ s = min μ σ ( X s ) | μ | ,
where, as is usual, σ ( X s ) denotes the spectrum of matrix X s . A few values of ρ s are listed in Table 1.
Coming back to the original iteration (36), one has that the weighting function (42) now becomes
Θ = I s I 2 m h ρ s f ( y 0 ) 1 = : I s Σ ,
which requires to factor only the matrix
I 2 m h ρ s f ( y 0 ) R 2 m × 2 m ,
having the same size as that of the continuous problem, thus obtaining the following blended iteration for HBVMs:
η = G ( γ ) , η 1 = ρ s X s 1 I 2 m η , γ ^ + 1 = γ ^ + I s Σ η 1 + I s Σ ( η η 1 ) , = 0 , 1 , .
It is worth mentioning that:
  • in the special case of separable Hamiltonian problems, the blended implementation of the methods can be made even more efficient, since the discrete problem can be cast in terms of the generalized coordinates only (see [16] or ([1], Chapter 4));
  • the coding of the blended iteration becomes very high-performance by considering a matrix formulation of (45) (see, e.g., ([1], Chapter 4.2.2) or [51]). As matter of fact, it has been actually implemented in the Matlab code hbvm, which is freely available on the internet at the url [52].
In order to give evidence of the usefulness of energy conservation, let us consider the solution of the well-known pendulum problem, with Hamiltonian
H ( q , p ) = 1 2 p 2 cos ( q ) .
When considering the trajectory starting at [1,53]
q ( 0 ) = 0 , p ( 0 ) = 1.99999 ,
one obtains a periodic solution of period T 28.57109480185544 . In Table 2 we list the obtained results when solving the problem over 10 periods, by using a stepsize h = T / n , with HBVM(6,3) and HBVM(3,3) (i.e., the symplectic 3-stage Gauss collocation method), for increasing values of n. As one may see, even though both methods are 6th order accurate, nevertheless, HBVM(6,3) becomes (practically) energy-conserving as soon as n 40 , whereas HBVM(3,3) does not. One clearly sees that, for the problem at hand, the energy-conserving method is pretty more accurate than the non conserving one.

2.4. Energy and QUadratic Invariants Preserving (EQUIP) Methods

According to Theorem 2, when k = s , HBVM ( s , s ) reduces to the s-stage Gauss method. For such a method, one has, with reference to (26)–(28) and (35) with k = s ,
P s X s = I s , P s 1 = P s Ω ,
so that the Butcher matrix in (26) becomes the W-transformation [54] of the s-stage Gauss method, i.e., the Butcher matrix is A = P s X s P s 1 . Moreover, since A = P s X s P s Ω , the method is easily verified to be symplectic, because of (10). In fact, by setting in general e i R s the ith unit vector, and with reference to the vector e defined in (30) with k = s , one has:
Ω A + A Ω = Ω P s ( X s + X s ) P s Ω = Ω P s ( e 1 e 1 ) P s Ω = Ω e e Ω = b b .
We would arrive at the very same conclusion if we replace X s by
X s ( α ) : = X s α V , V = V , α R .
In particular, if the parameter α is small enough, matrix α V will act as a perturbation of the underlying Gauss formula and the question is whether it is possible to choose α , at each integration step, such that the resulting integrator may be energy conserving. In order for V O , we need to assume, hereafter, s 2 . In particular, by choosing
V = e 2 e 1 e 1 e 2 ,
it is possible to show [26] that the scalar parameter α can be chosen, at each integration step, such that, when solving the Hamiltonian problem (9) with a sufficiently small stepsize h:
  • α = O ( h 2 s 2 ) ,
  • the method retains the order 2 s of the original s-stage Gauss method,
  • H ( y 1 ) = H ( y 0 ) .
This fact is theoretically intriguing, since this means that we have a kind of state-dependent Runge-Kutta method, defined by the Butcher tableau
Axioms 07 00036 i002
which is energy conserving and is defined, at each integration step, by a symplectic map, given by a small perturbation of that of the underlying s-stage Gauss method. Consequently, EQUIP methods do not infringe the well-known result about the nonexistence of energy conserving symplectic numerical methods [55,56]. Since the symplecticity condition (10) is equivalent to the conservation of all quadratic invariants of the problem, these methods have been named Energy and QUadratic Invariants Preserving (EQUIP) methods [26,57]. It would be interesting to study the extent to which the solutions generated by an EQUIP method inherit the good long time behavior of the associated Gauss integrator with reference to the nearly conservation property of further non-quadratic first integrals. This investigation would likely involve a backward error analysis approach, similar to that done in [2], and up to now remains an open question.
For a thorough analysis of such methods we refer to [26,53]. In the next section, we sketch their line-integral implementation when solving Poisson problems, a wider class than that of Hamiltonian problems.

3. Poisson Problems

Poisson problems are in the form
y ˙ = B ( y ) H ( y ) , y ( 0 ) = y 0 R n , B ( y ) = B ( y ) .
When B ( y ) J as defined in (9), then one retrieves canonical Hamiltonian problems. As in that case, since B ( y ) is skew-symmetric, then H, still referred to as the Hamiltonian, is conserved:
d d t H ( y ) = H ( y ) y ˙ = H ( y ) B ( y ) H ( y ) = 0 .
Moreover, any scalar function C ( y ) such that C ( y ) B ( y ) = 0 is also conserved, since:
d d t C ( y ) = C ( y ) y ˙ = C ( y ) B ( y ) = 0 H ( y ) = 0 .
C is called a Casimir function for (50). Consequently, all possible Casimirs and the Hamiltonian H are conserved quantities for (50). In the sequel, we show that EQUIP methods can be conveniently used for solving such problems. As before, the scalar parameter α in (49) is selected in such a way that the Hamiltonian H is conserved. Moreover, since the Butcher matrix in (49) satisfies (10), then all quadratic Casimirs turn out to be conserved as well. The conservation of all quadratic invariants, in turn, is an important property as it has been observed in [58].
Let us then sketch the choice of the parameter α to gain energy conservation (we refer to [53] for full details). By setting
ϕ i ϕ i 0 ϕ i , s 1 : = X s 1 e i , i = 1 , 2 ,
one has that the Butcher matrix in (49) can be written as
A = P s X s [ I s α ( ϕ 2 e 1 ϕ 1 e 2 ) ] P s Ω .
Consequently, by denoting f ( y ) = B ( y ) H ( y ) , and setting Y i : = u ( c i h ) , i = 1 , , s , the stages of the method, one obtains that the polynomial u ( c h ) is given by
u ( c h ) = y 0 + h j = 0 s 1 0 c P j ( x ) d x [ γ ^ j α ( ϕ 2 j γ ^ 0 ϕ 1 j γ ^ 1 ) ] , c [ 0 , 1 ] ,
with the (block) vectors γ ^ j formally defined as in (22) with k = s . In vector form, one has then (compare with (31)):
γ ^ γ ^ 0 γ ^ s 1 = P s Ω I n f ( u ( c h ) ) .
We observe that, from (51), one also obtains:
u ˙ ( c h ) = j = 0 s 1 P j ( c ) [ γ ^ j α ( ϕ 2 j γ ^ 0 ϕ 1 j γ ^ 1 ) ] , c [ 0 , 1 ] .
Nevertheless, the new approximation, still given by
y 1 = y 0 + h i = 1 s b i f ( Y i ) y 0 + h γ ^ 0 ,
now differs from
u ( h ) = y 0 + h [ γ ^ 0 α ( ϕ 20 γ ^ 0 ϕ 10 γ ^ 1 ) ] y 1 α h ( ϕ 20 γ ^ 0 ϕ 10 γ ^ 1 ) .
Consequently, in order to define a path joining y 0 to y 1 , to be used for imposing energy-conservation by zeroing a corresponding line-integral, we can consider the polynomial path made up by u plus
w ( c ) = u ( h ) + c α h ( ϕ 20 γ ^ 0 ϕ 10 γ ^ 1 ) w ˙ ( c ) α h ( ϕ 20 γ ^ 0 ϕ 10 γ ^ 1 ) , c [ 0 , 1 ] .
As a result, by considering that w ( 1 ) = y 1 , w ( 0 ) = u ( h ) , u ( 0 ) = y 0 , we shall choose α such that (see (51)–(56)):
H ( y 1 ) H ( y 0 ) = H ( w ( 1 ) ) H ( w ( 0 ) ) + H ( u ( h ) ) H ( u ( 0 ) ) = 0 1 H ( w ( c ) ) w ˙ ( c ) d c + h 0 1 H ( u ( c h ) ) u ˙ ( c h ) d c = 0 .
In more details, by defining the vectors
ρ j ( u ) = 0 1 P j ( c ) H ( u ( c h ) ) d c , j = 0 , , s 1 , ρ ¯ 0 ( w ) = 0 1 H ( w ( c ) ) d c ,
and resorting to the usual line integral argument, it is possible to prove the following result ([53], Theorem 2).
Theorem 3.
(57) holds true, provided that
α = j = 0 s 1 ρ j ( u ) γ ^ j ( ρ 0 ( u ) ρ ¯ 0 ( w ) ) ( ϕ 20 γ ^ 0 ϕ 10 γ ^ 1 ) + j = 1 s 1 ρ j ( u ) ( ϕ 2 j γ ^ 0 ϕ 1 j γ ^ 1 ) .
As in the case of HBVMs, however, we shall obtain a practical numerical method only provided that the integrals in (58) are suitably approximated by means of a quadrature which, as usual, we shall choose as the Gauss-Legendre formula of order 2 k . In so doing, one obtains an EQUIP ( k , s ) method. The following result can be proved ([53], Theorem 8).
Theorem 4.
Under suitable regularity assumptions on both B ( y ) and H ( y ) , one has that for all k s , the EQUIP ( k , s ) method has order 2 s , conserves all quadratic invariants and, moreover,
H ( y 1 ) H ( y 0 ) = 0 , i f H i s a p o l y n o m i a l o f d e g r e e ν 2 k / s , O ( h 2 k + 1 ) , o t h e r w i s e .
We observe that, for EQUIP ( k , s ) , even a not exact conservation of the energy may result in a much better error growth, as the next example shows. We consider the Lotka-Volterra problem [53], which is in the form (50) with
y = y 1 y 2 , B ( y ) = 0 y 1 y 2 y 1 y 2 0 , H ( y ) = a log y 1 y 1 + b log y 2 y 2 .
By choosing the following parameters and initial values,
a = 1 , b = 2 , y 1 ( 0 ) = y 2 ( 0 ) = 0 . 1 ,
one obtains a periodic solution of period T 7.720315563434113 . If we solve the problems (60) and (61) with the EQUIP(6,3) and the 3-stage Gauss methods with stepsize h = T / 50 over 100 periods, we obtain the error growths, in the numerical solution, depicted in Figure 1. As one may see, the EQUIP(6,3) method (which only approximately conserves the Hamiltonian), exhibits a linear error growth; on the contrary, the 3-stage Gauss method (which exhibits a drift in the numerical Hamiltonian) has a quadratic error growth. Consequently, there is numerical evidence that EQUIP methods can be conveniently used for numerically solving Poisson problems (a further example can be found in [53]).

4. Constrained Hamiltonian Problems

In this section, we report about some recent achievements concerning the line integral solution of constrained Hamiltonian problems with holonomic contraints [23]. This research is at a very early stage and, therefore, it is foreseeable that new results will follow in the future.
To begin with, let us consider the separable problem defined by the Hamiltonian
H ( q , p ) = 1 2 p M 1 p + U ( q ) , q , p R m ,
with M a symmetric and positive definite matrix, subject to the ν < m holonomic constraints
g ( q ) = 0 R ν .
We shall assume that the points are regular for the constraints, so that g ( q ) has full column rank and, therefore, the ν × ν matrix g ( q ) M 1 g ( q ) is nonsingular. By introducing the vector of the Lagrange multipliers λ R ν , problems (62) and (63) can be equivalently cast in Hamiltonian form by defining the augmented Hamiltonian
H ^ ( q , p , λ ) = H ( q , p ) + λ g ( q ) ,
thus obtaining the equivalent constrained problem:
q ˙ = M 1 p , p ˙ = U ( q ) g ( q ) λ , g ( q ) = 0 , t 0 ,
subject to the initial conditions
q ( 0 ) = q 0 , p ( 0 ) = p 0 , such   that g ( q 0 ) = 0 , g ( q 0 ) M 1 p 0 = 0 .
We observe that the first requirement ( g ( q 0 ) = 0 ) obviously derives from the given constraints. The second, in turn, derives from
0 = g ˙ ( q ) = g ( q ) q ˙ = g ( q ) M 1 p ,
which has to be satisfied by the solution of (65). These latter constraints are sometimes referred to as the hidden constraints. A formal expression of the vector of the Lagrange multipliers can be obtained by further differentiating the previous expression, thus giving
g ( q ) M 1 g ( q ) λ = 2 g ( q ) M 1 p , M 1 p g ( q ) M 1 U ( q ) ,
which is well defined, because of the assumption that g ( q ) M 1 g ( q ) is nonsingular. Consequently,
λ = g ( q ) M 1 g ( q ) 1 2 g ( q ) M 1 p , M 1 p g ( q ) M 1 U ( q ) = : λ ( q , p ) ,
where the notation λ ( q , p ) means that the vector λ is a function of q and p. It is easily seen that both the two Hamiltonians (62) and (64) are conserved along the solution of the problems (65) and (66), and assume the same value. For numerically solving the problem, we shall consider a discrete mesh with time-step h, i.e., t n = n h , n = 0 , 1 , , looking for approximations
q n q ( t n ) , p n p ( t n ) , λ n λ ( q ( t n ) , p ( t n ) ) , n = 0 , 1 , ,
such that, starting from ( q n , p n ) , one arrives at ( q n + 1 , p n + 1 ) by choosing λ n in order for:
H ( q n + 1 , p n + 1 ) = H ( q n , p n ) , g ( q n + 1 ) = 0 , g ( q n + 1 ) M 1 p n + 1 = O ( h 2 ) .
Consequently, the new approximation conserves the Hamiltonan and exactly satisfies the constraints, but only approximately the hidden contraints. In particular, we shall consider a piecewise constant approximation of the vector of the Lagrange multipliers λ , i.e., λ n is assumed to be constant on the interval [ t n , t n + 1 ] . In other words, we consider the sequence of problems (compare with (65)), for n = 0 , 1 , :
u ˙ = M 1 v , v ˙ = U ( u ) g ( u ) λ n , t [ t n , t n + 1 ] , u ( t n ) = q n , v ( t n ) = p n ,
where the constant vector λ n is chosen in order to satisfy the constraints at t n + 1 . That is, such that the new approximations, defined as
q n + 1 : = u ( t n + 1 ) , p n + 1 : = v ( t n + 1 ) ,
satisfy (68). The reason for choosing λ n as a constant vector stems from the following result, which concerns the augmented Hamiltonian (64).
Theorem 5.
For all λ n R ν , the solution of (69) and (70) satisfies H ^ ( q n + 1 , p n + 1 , λ n ) = H ^ ( q n , p n , λ n ) .
Proof. 
In fact, denoting by H ^ q ( q , p , λ ) the gradient of H ^ with respect to the q variables, and similarly for H ^ p , the usual line integral argument provides:
H ^ ( q n + 1 , p n + 1 , λ n ) H ^ ( q n , p n , λ n ) = H ^ ( u ( t n + 1 ) , v ( t n + 1 ) , λ n ) H ^ ( u ( t n ) , v ( t n ) , λ n ) = t n t n + 1 d d t H ^ ( u ( t ) , v ( t ) , λ n ) d t = t n t n + 1 H ^ q ( u ( t ) , v ( t ) , λ n ) u ˙ ( t ) + H ^ p ( u ( t ) , v ( t ) , λ n ) v ˙ ( t ) d t = t n t n + 1 U ( u ( t ) ) + g ( u ( t ) ) λ n M 1 v ( t ) v ( t ) M 1 U ( u ( t ) ) + g ( u ( t ) ) λ n d t = 0 .
 ☐
Consequently, one obtains that
g ( q n + 1 ) = g ( q n ) H ( q n + 1 , p n + 1 ) = H ( q n , p n ) ,
i.e., energy conservation is equivalent to satisfy the constraints.
In order to fulfil the constraints, we shall again resort to a line integral argument. For this purpose, we need to define the Fourier coefficients (along the Legendre basis (7)) of the functions appearing at the right-hand sides in (69):
γ j ( v , t n ) = M 1 0 1 P j ( c ) v ( t n + c h ) d c , ψ j ( u , t n ) = 0 1 P j ( c ) U ( u ( t n + c h ) ) d c , ρ j ( u , t n ) = 0 1 P j ( c ) g ( u ( t n + c h ) ) d c , j = 0 , 1 , ,
so that, in particular,
u ( t n + c h ) = q n + h j 0 0 c P j ( x ) d x γ j ( v , t n ) , v ( t n + c h ) = p n h j 0 0 c P j ( x ) d x ψ j ( u , t n ) + ρ j ( u , t n ) λ n , c [ 0 , 1 ] .
We also need the following result.
Lemma 2.
With reference to matrix X s defined in (35), one has, for all s = 1 , 2 , :
0 1 P j ( c ) 0 c P i ( x ) d x d c = ( X s ) j + 1 , i + 1 , i , j = 0 , , s 1 .
Proof. 
See, e.g., ([23], Lemma 2). ☐
We are now in the position of deriving a formal expression for the constant approximation to the vector of the Lagrange multipliers through the usual line integral approach:
0 = g ( q n + 1 ) g ( q n ) = g ( u ( t n + 1 ) ) g ( u ( t n ) ) = t n t n + 1 d d t g ( u ( t ) ) d t = t n t n + 1 g ( u ( t ) ) u ˙ ( t ) d t = h 0 1 g ( t n + c h ) u ˙ ( t n + c h ) d c = h 0 1 g ( t n + c h ) j 0 P j ( c ) γ j ( v , t n ) d c = h j 0 ρ j ( u , t n ) γ j ( v , t n ) = h j 0 ρ j ( u , t n ) M 1 0 1 P j ( c ) v ( t n + c h ) d c = h j 0 ρ j ( u , t n ) M 1 0 1 P j ( c ) p n h i 0 0 c P i ( x ) d x ψ i ( u , t n ) + ρ i ( u , t n ) λ n d c = h ρ 0 ( u , t n ) M 1 p n h 2 i , j 0 ρ j ( u , t n ) M 1 ψ i ( u , t n ) + ρ i ( u , t n ) λ n 0 1 P j ( c ) 0 c P i ( x ) d x d c .
Because of Lemma 2, one then obtains that (see (35)),
ξ 0 ρ 0 ( u , t n ) M 1 ρ 0 ( u , t n ) + j 1 ξ j ρ j ( u , t n ) M 1 ρ j 1 ( u , t n ) ρ j 1 ( u , t n ) M 1 ρ j ( u , t n ) λ n = h 1 ρ 0 ( u , t n ) M 1 p n ξ 0 ρ 0 ( u , t n ) M 1 ψ 0 ( u , t n ) + j 1 ξ j ρ j ( u , t n ) M 1 ψ j 1 ( u , t n ) ρ j 1 ( u , t n ) M 1 ψ j ( u , t n ) .
The following result can be proved [23].
Theorem 6.
The Equation (73) is consistent with (67) and is well defined for all sufficiently small h > 0 . The sequence ( q n , p n , λ n ) generated by (69)–(73) satisfies, for all n = 0 , 1 , :
q n = q ( t n ) + O ( h 2 ) , p n = p ( t n ) + O ( h 2 ) , λ n = λ ( q ( t n ) , p ( t n ) ) + O ( h ) ,
g ( q n ) M 1 p n = O ( h 2 ) , g ( q n ) = 0 , H ( q n , p n ) = H ( q 0 , p 0 ) .
Moreover, in the case where λ ( q ( t ) , p ( t ) ) λ ¯ , for all t 0 , then q n q ( t n ) , p n p ( t n ) , λ n λ ¯ .
At this point, in order to obtain a numerical method, the following two steps need to be done:
  • truncate the infinite series in (72) to finite sums, say up to j = s 1 . In so doing, the expression of λ n changes accordingly, since in (73) the infinite sums will consequently arrive up to j = s 1 ;
  • approximate the integrals in (71), for j = 0 , , s 1 . As usual, we shall consider a Gauss-Legendre formula of order 2 k , with k s , thus obtaining corresponding approximations which we denote, for n = 0 , 1 , ,
    γ j , n , ψ j , n , ρ j , n , j = 0 , , s 1 .
In so doing, it can be seen that one retrieves the usual HBVM ( k , s ) method defined in Section 2, applied for solving (69), coupled with the following equation for λ n , representing the approximation of (73):
ξ 0 , n ρ 0 , n M 1 ρ 0 , n + j = 1 s 1 ξ j ρ j , n M 1 ρ j 1 , n ρ j 1 , n M 1 ρ j , n λ n = h 1 ρ 0 , n M 1 p n ξ 0 ρ 0 , n M 1 ψ 0 , n + j = 1 s 1 ξ j ρ j , n M 1 ψ j 1 , n ρ j 1 , n M 1 ψ j , n .
The following result can be proved [23].
Theorem 7.
For all sufficiently small stepsizes h, the HBVM ( k , s ) method coupled with (74), used for solving (65) and (66) over a finite interval, is well defined and symmetric. It provides a sequence of approximations ( q n , p n , λ n ) such that (see (67)):
q n = q ( t n ) + O ( h 2 ) , p n = p ( t n ) + O ( h 2 ) , λ n = λ ( q ( t n ) , p ( t n ) ) + O ( h ) , g ( q n ) M 1 p n = O ( h 2 ) ,
g ( q n ) = 0 , i f g i s a p o l y n o m i a l o f d e g r e e n o t l a r g e r t h a t 2 k / s , O ( h 2 k ) , o t h e r w i s e , H ( q n , p n ) H ( q 0 , p 0 ) = 0 , i f g i s a p o l y n o m i a l o f d e g r e e n o t l a r g e r t h a t 2 k / s , O ( h 2 k ) , o t h e r w i s e .
Moreover, in the case where λ ( q ( t ) , p ( t ) ) λ ¯ , for all t 0 , then
q n = q ( t n ) + O ( h 2 s ) , p n = p ( t n ) + O ( h 2 s ) , λ n = λ ( q ( t n ) , p ( t n ) ) + O ( h 2 s ) , g ( q n ) M 1 p n = O ( h 2 s ) .
It is worth mentioning that, even in the case where the vector of the Lagrange multipliers is not constant, so that all HBVM ( k , s ) are second-order accurate for all s 1 , the choice s > 1 generally provides a much smaller solution error.
We refer to [23] for a number of examples of application of HBVMs to constrained Hamiltonian problems. We here only provide the application of HBVM(4,4) (together with (74) with s = 4 ) for solving the so called conical pendulum problem. In more details, let us have a pendulum of unit mass connected to a fixed point (the origin) by a massless rod of unit length. The initial conditions are such that the motion is periodic of period T and takes place in the horizontal plane q 3 = z 0 . Normalizing the acceleration of gravity, the augmented Hamiltonian is given by
H ^ ( q , p , λ ) = 1 2 p p + e 3 q + λ ( q q 1 ) H ( q , p ) + λ g ( q ) ,
where p = q ˙ and e i R 3 is the ith unit vector. Choosing q ( 0 ) = 2 1 2 ( e 1 e 3 ) , p ( 0 ) = 2 1 4 e 2 , results in
T = 2 3 4 π , z 0 = 2 1 2 , λ λ ¯ = 2 1 2 .
Since the augmented Hamiltonian H ^ is quadratic and λ is constant, any HBVM ( s , s ) method, coupled with (74), is energy and constraint conserving, and of order 2 s . If we apply the HBVM(4,4) method for solving the problem over 10 periods by using the stepsize h = T / N , N = 10 , 20 , 40 , it turns out the λ n λ ¯ , g ( q n ) = 0 , g ( q n ) p n = 0 , and H ( q n , p n ) = H ( q 0 , p 0 ) within the round-off error level, for all n = 0 , 1 , , 10 N . On the other hand, the corresponding solution errors, after 10 periods, turn out to be given by 4.9944 × 10 8 , 1.9676 × 10 10 , 7.3944 × 10 13 , thus confirming the order 8 of convergence of the resulting method.

5. Hamiltonian PDEs

Quoting [4], p. 187, the numerical solution of time dependent PDEs may often be conceived as consisting of two parts. First the spatial derivatives are discretized by finite differences, finite elements, spectral methods, etc. to obtain a system of ODEs, with t as the independent variable. Then this system of ODEs is integrated numerically. If the PDEs are of Hamiltonian type, one may insist that both stages preserve the Hamiltonian structure. Thus the space discretization should be carried out in such a way that the resulting system of ODEs is Hamiltonian (for a suitable Poisson bracket). This approach has been systematically used for solving a number of Hamiltonian PDEs by using HBVMs [1,20,22,59,60] and this research is still under development. We here sketch te main facts for the simplest possible example, provided by the semilinear wave equation,
u t t ( x , t ) = u x x ( x , t ) f ( u ( x , t ) ) , ( x , t ) ( a , b ) × ( 0 , ) ,
with f the derivative of f, coupled with the initial conditions
u ( x , 0 ) = ϕ 0 ( x ) , u t ( x , 0 ) = ϕ 1 ( x ) , x [ a , b ] ,
and periodic boundary conditions. We shall assume that f, ϕ 0 , ϕ 1 are regular enough (the last two functions, as periodic functions). By setting (hereafter, when not necessary, we shall avoid the arguments of the functions)
v = u t , z = u v , J 2 = 0 1 1 0 ,
so that v ( x , 0 ) = ϕ 1 ( x ) , x [ a , b ] , the problem can be cast into Hamiltonian form as
z t = J 2 δ H δ z , δ H δ z = δ H δ u , δ H δ v ,
i.e.,
u t = v , v t = u x x f ( u ) ,
where δ H δ z is the vector of the functional derivatives [2,3,22] of the Hamiltonian functional
H [ u , v ] ( t ) = 1 2 a b v 2 ( x , t ) + u x 2 ( x , t ) + 2 f ( u ( x , t ) ) d x = : a b E ( x , t ) d x .
Because of the periodic boundary conditions, this latter functional turns out to be conserved. In fact, by considering that
E t = v v t + u x u x t + f ( u ) u t = v ( u x x f ( u ) ) + u x v x + f ( u ) v = v u x x + u x v x = ( u x v ) x ,
one obtains:
H ˙ [ u , v ] ( t ) = a b E t ( x , t ) d x = u x ( x , t ) v ( x , t ) x = a b = 0 ,
because of the periodicity in space. Consequently,
H [ u , v ] ( t ) = H [ u , v ] ( 0 ) , t 0 .
Moreover, since u ( x , t ) is periodic for x [ a , b ] , we can expand it in space along the following slight variant of the Fourier basis,
c j ( x ) = 2 δ j 0 b a cos 2 π j x a b a , j 0 , s j ( x ) = 2 b a sin 2 π j x a b a , j 1 ,
so that, for all allowed i , j :
a b c i ( x ) c j ( x ) d x = δ i j = a b s i ( x ) s j ( x ) d x , a b c i ( x ) s j ( x ) d x = 0 .
In so doing, for suitable time dependent coefficients γ j ( t ) , η j ( t ) , one obtains the expansion:
u ( x , t ) = c 0 ( x ) γ 0 ( t ) + j 1 c j ( x ) γ j ( t ) + s j ( x ) η j ( t ) ω ( x ) q ( t ) ,
having introduced the infinite vectors
ω ( x ) = c 0 ( x ) , c 1 ( x ) , s 1 ( x ) , c 2 ( x ) , s 2 ( x ) , , q ( t ) = γ 0 ( t ) , γ 1 ( t ) , η 1 ( t ) , γ 2 ( t ) , η 2 ( t ) , .
By considering that
a b ω ( x ) ω ( x ) d x = I ,
the identity operator, and introducing the infinite matrix (see (77))
D = 2 π b a 0 1 · J 2 2 · J 2 3 · J 2 ,
so that ω ( x ) = D ω ( x ) and ω ( x ) = D 2 ω ( x ) = D D ω ( x ) , one then obtains that (79) can be rewritten as the infinite system of ODEs:
q ˙ ( t ) = p ( t ) , p ˙ ( t ) = D D q ( t ) a b ω ( x ) f ( ω ( x ) q ( t ) ) d x , t > 0 ,
subject to the initial conditions (see (76))
q ( 0 ) = a b ω ( x ) ϕ 0 ( x ) d x , p ( 0 ) = a b ω ( x ) ϕ 1 ( x ) d x .
The following result is readily established.
Theorem 8.
Problem (87) is Hamiltonian, with Hamiltonian
H ( q , p ) = 1 2 p p + q D D q + a b f ( ω ( x ) q ) d x .
This latter is equivalent to the Hamiltonian functional (80), via the expansion (83).
Proof. 
The first part of the proof is straightforward. Concerning the second part, one has, by virtue of (85):
a b v 2 ( x , t ) d x = a b q ˙ ( t ) ω ( x ) ω ( x ) q ˙ ( t ) d x = p a b ω ( x ) ω ( x ) d x = I p = p p .
Similarly, by considering that u x ( x , t ) = ω ( x ) D q ( t ) , one obtains:
a b u x 2 ( x , t ) d x = a b q ( t ) D ω ( x ) ω ( x ) D q ( t ) d x = q D a b ω ( x ) ω ( x ) d x = I D q = q D D q .
 ☐
In order to obtain a computational procedure, one needs to truncate the infinite series in (83) to a finite sum, i.e.,
u ( x , t ) c 0 ( x ) γ 0 ( t ) + j = 1 N c j ( x ) γ j ( t ) + s j ( x ) η j ( t ) = : u N ( x , t ) .
Clearly, such an approximation no longer satisfies the wave Equation (79). Nevertheless, in the spirit of Fourier–Galerkin methods [61], by requiring that the residual be orthogonal to the functional subspace
V N = span c 0 ( x ) , c 1 ( x ) , s 1 ( x ) , , c N ( x ) , s N ( x )
containing the approximation u ( x , t ) for all times t 0 , one obtains a finite dimensional ODE system, formally still given by (87) and (88), upon replacing the involved infinite vectors and matrices, previously defined in (84) and (86), with the following finite dimensional ones (of dimension 2 N + 1 ):
ω ( x ) = c 0 ( x ) c 1 ( x ) s 1 ( x ) c N ( x ) s N ( x ) , q ( t ) = γ 0 ( x ) γ 1 ( x ) η 1 ( x ) γ N ( x ) η N ( x ) , D = 2 π b a 0 1 · J 2 2 · J 2 N · J 2 .
Moreover, the result of Theorem 8 continues formally to hold for the finite dimensional problem, with the sole exception that now the Hamiltonian (89) only yields an approximation to the continuous functional (80). Nevertheless, it is well known that, under suitable regularity assumptions on f and the initial data, this truncated version converges exponentially to the original functional (80), as N (this phenomenon is usually referred to as spectral accuracy). Since problem (87) is Hamiltonian, one can use HBVM ( k , s ) methods for solving it. It is worth mentioning that, in so doing, the blended implementation of the methods can be made extremely efficient, by considering that:
  • an accurate approximation in space usually requires the use of large values of N;
  • as a consequence, in most cases one has
    [ 2 π N / ( b a ) ] 2 = D D f ,
    in a suitable neighbourhood of the solution.
Consequently, the Jacobian matrix of (87) can be approximated by the linear part alone, i.e., as
I D D I D 2 R 4 N + 2 .
This implies that matrix Σ involved in the definition of Θ in (44) becomes (all the involved matrices are diagonal and have dimension 2 N + 1 ):
Σ = D 1 D 2 D 3 D ¯ , D ¯ = ( I ( h ρ s D ) 2 ) 1 , D 1 = I + ( h ρ s D ) 2 D ¯ , D 2 = h ρ s D ¯ , D 3 = h ρ s D 2 D ¯ ,
where ρ s is the parameter defined in (43), and h is the used time-step. As a result, Σ :
  • is constant for all time steps, so that it has to be computed only once;
  • it has a block diagonal structure (and, in particular, D ¯ is positive definite).
The above features make the resulting blended iteration (45) inexpensive, thus allowing the use of large values of N and large time-steps h. As an example, let us solve the sine-Gordon equation [22],
u t t = u x x sin ( u ) , ( x , t ) [ 50 , 50 ] × [ 0 , 100 ] , u ( x , 0 ) = 0 , u t ( x , 0 ) = 4 γ sech x γ ,
with γ > 0 , whose solution is, by considering the value γ = 1.5 ,
u ( x , t ) = 4 arctan sin t 1 γ 2 γ 2 1 sech x γ .
In such a case, the value N = 300 in (90) and (91) is sufficient to obtain an error in the spatial semi-discretization comparable with the round-off error level. Then, we solve in time the semi-discrete problem (87), of dimension 2 N + 2 = 602 , by using the HBVM ( k , s ) methods. In Table 3 we list the obtained maximum errors in the computed solution, by using a time-step h = 1 , along with the corresponding Hamiltonian errors and execution times, for various choices of ( k , s ) (in particular, for k = s , s = 1 , 2 , 3 , we have the s-stage Gauss collocation methods, which are symplectic but not energy conserving) (all numerical tests have been performed on a laptop with a 2.2 GHz dual core i7 processor, 8 GB of memory, and running Matlab R2017b). From the listed results, one sees that HBVM ( 2 s , s ) methods become energy-conserving for s 4 and the error decreases until the round-off error level, for s = 10 , with a computational time 10 times larger than that of the implicit mid-point rule (obtained for k = s = 1 ) which, however, has a solution error 10 13 times larger.

6. Highly Oscillatory Problems

The Hamiltonian system of ODEs (87) is a particular instance of problems in the form
q ¨ + A 2 q + f ( q ) = 0 , t 0 , q ( 0 ) = q 0 , q ˙ ( 0 ) = q ˙ 0 R m ,
where, without loss of generality, A is a symmetric and positive definite matrix and f is a scalar function such that
ω : = A f ,
in a neighbourhood of the solution. Moreover, hereafter we consider the 2-norm, so that ω equals the largest eigenvalue of A (in general, any convenient upper bound would suffice). The problem is Hamiltonian, with Hamiltonian
H ( q , q ˙ ) = 1 2 q ˙ 2 + A q 2 + f ( q ) .
Problems in the form (94) satisfying (95) are named (multi-frequency) highly oscillatory problems, since they are ruled by the linear part, possessing large (possibly different) complex conjugate eigenvalues. Such problems have been investigated since many years, starting from the seminal papers [62,63], and we refer to the monograph [64] for more recent findings. A common feature of the methods proposed so far, however, is that of requiring the use of time-steps h such that h ω < 1 , either for stability and/or accuracy requirements. We here sketch the approach recently defined in [27], relying on the use of HBVMs, which will allow the use of stepsizes h without such a restriction.
To begin with, and for analysis purposes, let us recast problem (94) in first order form, by setting p = A 1 q ˙ , as
y ˙ = J 2 A y + J 2 I m f ˜ ( y ) , y = q p , f ˜ ( y ) = A 1 f ( q ) 0 ,
with J 2 the 2 × 2 skew-symmetric matrix defined in (77). As is usual in this context, one considers at first the linear part of (97),
y ˙ = J 2 A y , y ( 0 ) = y 0 : = q 0 p 0 , p 0 = A 1 q ˙ 0 .
The solution of (98), y ( t ) = e J 2 A t y 0 , on the interval [ 0 , h ] is readily seen to be given, according to the local Fourier expansion described in Section 2.1, by:
y ( c h ) = y 0 + h j 0 0 c P j ( x ) d x γ ¯ j ( y ) , c [ 0 , 1 ] , γ ¯ j ( y ) = J 2 A 0 1 P j ( τ ) y ( τ h ) d τ .
However, when using a finite precision arithmetic with machine epsilon u, the best we can do is to approximate
y ( c h ) σ 0 ( c h ) = y 0 + h j = 0 s 0 1 0 c P j ( x ) d x γ ¯ j ( σ 0 ) , c [ 0 , 1 ] ,
where hereafter ≐ means “equal within round-off error level”, provided that
γ ¯ j ( y ) < u · max i < s 0 γ ¯ i ( y ) , j s 0 .
In fact, further terms in the infinite series in (99) would provide a negligible contribution, in the used finite precision arithmetic. By defining the function
g ( j , ω h ) : = ( 2 j + 1 ) π ω h J j + 1 2 ω h 2 , j = 0 , 1 , ,
with J j + 1 2 ( · ) the Bessel functions of the first kind, it can be shown ([27], Criterion 1) that the requirement (101) is accomplished by requiring
g ( s 0 , ω h ) < u · max j < s 0 g ( j , ω h ) .
In so doing, one implicitly defines a function φ u , depending on the machine epsilon u, such that
s 0 = φ u ( ω h ) .
The plot of such a function is depicted in Figure 2 for the double precision IEEE: as one may see, the function is well approximated by the line [27]
24 + 0.7 · ω h .
Next, one consider the whole problem (97), whose solution, on the interval [ 0 , h ] , can be written as
y ( c h ) = y 0 + h j 0 0 c P j ( x ) d x γ j ( y ) , c [ 0 , 1 ] ,
γ j ( y ) = 0 1 P j ( τ ) J 2 A y ( τ h ) + J 2 I m f ˜ ( y ( τ h ) ) d τ .
As observed before, when using a finite precision arithmetic with machine epsilon u, the best we can do is to approximate (106) with a polynomial:
y ( c h ) σ ( c h ) = y 0 + h j = 0 s 1 0 c P j ( x ) d x γ j ( σ ) , c [ 0 , 1 ] ,
provided that
γ j ( y ) < u · max i < s γ i ( y ) , j s .
Assuming the ansatz f ˜ ( y ( c h ) ) e ν J 2 A c h , for a suitable ν 1 (essentially, one requires that f is well approximated by a polynomial of degree ν ), the requirement (109) is accomplished by choosing ([27], Criterion 2)
s = φ u ( ν ω h ) ,
where φ u is the same function considered in (104). By taking into account that ν 1 and that φ u is an increasing funcion (see Figure 2), one then obtains that s s 0 .
Next, one has to approximate the Fourier coefficients (see (107)) γ j ( σ ) , j = 0 , , s 1 , needed in (108): for this purpose, we consider the Gauss-Legendre quadrature formula of order 2 k . In order to gain full machine accuracy, when using the double precision IEEE, according to [27], we choose
k = max { 20 , s + 2 } .
In so doing, we arrive to a HBVM ( k , s ) method. For such a method, the blended iteration (45) can be made extremely efficient by approximating the Jacobian of (97) with its linear part (this has been already done when solving Hamiltonian PDEs, see (92)), so that the matrix Σ in (44) has to be computed only once. Moreover, since we are going to use relatively large stepsizes h, the initial guess for the vector γ ^ 0 in (45) is chosen, by considering the polynomial σ 0 defined in (100) derived from the linear problem (98), as:
γ ^ 0 = γ ¯ 0 ( σ 0 ) γ ¯ s 0 1 ( σ 0 ) 0 , 0 R ( s s 0 ) 2 m .
The name spectral HBVM with parameters ( k , s , s 0 ) has been coined in [27] to denote the resulting method, in short SHBVM ( k , s , s 0 ) . In order to show its effectiveness, we report here some numerical results obtained by solving the Duffing equation
q ¨ = ( κ 2 + β 2 ) q + 2 κ 2 q 3 , t [ 0 , 20 ] , q ( 0 ) = 0 , q ˙ ( 0 ) = β ,
with Hamiltonian
H ( q , q ˙ ) = 1 2 q ˙ 2 + ( κ 2 + β 2 ) q 2 κ 2 q 4 ,
and exact solution
q ( t ) = sn β t , ( κ / β ) 2 .
Here, sn is the elliptic Jacobi function, with elliptic modulus specified by the second argument. In particular, we choose the values
κ = 1 , β = 10 3 ,
providing a problem in the form (94) to (95), with a corresponding Hamiltonian value H 0 = 5 × 10 5 . For solving it, we shall use the SHBVM method with parameters:
ω = κ 2 + β 2 10 3 , ν = 3 ,
and a time-step h = 20 / N , for various values of N, as specified in Table 4. In that table we also list the corresponding:
  • maximum absolute error in the computed solution, e q ;
  • the maximum relative error in the numerical Hamiltonian, e H ;
  • the value of ω h (which is always much greater than 1);
  • the parameters ( s 0 , s , k ) , computed according to (104), (110), and (111), respectively;
  • the execution time (in sec).
As before, the numerical tests have been performed on a laptop with a 2.2 GHz dual core i7 processor, 8 GB of memory, and running Matlab R2017b.
As one may see, the method is always energy conserving and the error, as expected, is uniformly small. Also the execution times are all very small (of the order of 3.5 s). It must be emphasized that classical methods, such as the Gautschi or the Deuflhard method, would require the use of much smaller time-steps, and much larger execution times (we refer to [27] for some comparisons).

7. Conclusions

In this paper, we have reviewed the main facts concerning the numerical solution of conservative problems within the framework of (discrete) line integral methods. Relevant instances of line integral methods are provided by the energy-conserving Runge-Kutta methods named Hamiltonian Boundary Value Methods (HBVMs) and the Energy and QUadratic Invariants Preserving (EQUIP) methods, providing efficient geometric integrators for Hamiltonian problems. It is worth mentioning that HBVMs can be easily adapted to efficiently handle Hamiltonian BVPs [19], whereas EQUIP methods can be also used for numerically solving Poisson problems. In this paper, we have also reviewed some active research trends, concerning the application of HBVMs for numerically solving constrained Hamiltonian problems, Hamiltonian PDEs, and highly-oscillatory problems. The effectiveness of HBVMs is emphasized by the availability of an efficient nonlinear iteration for solving the generated discrete problems, relying on the so called blended implementation of the methods. Matlab software implementing HBVMs for Hamiltonian problems is available at the url [52].

Acknowledgments

The authors wish to thank Gianmarco Gurioli, Gianluca Frasca Caccia, Cecilia Magherini, and the three anonymous reviewers, for carefully reading the manuscript.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Brugnano, L.; Iavernaro, F. Line Integral Methods for Conservative Problems; Chapman et Hall/CRC: Boca Raton, FL, USA, 2016. [Google Scholar]
  2. Hairer, E.; Lubich, C.; Wanner, G. Geometric Numerical Integration, 2nd ed.; Springer: Berlin, Germany, 2006. [Google Scholar]
  3. Leimkuhler, B.; Reich, S. Simulating Hamiltonian Dynamics; Cambridge University Press: Cambridge, UK, 2004. [Google Scholar]
  4. Sanz-Serna, J.M.; Calvo, M.P. Numerical Hamiltonian Problems; Chapman & Hall: London, UK, 1994. [Google Scholar]
  5. Iavernaro, F.; Trigiante, D. On some conservation properties of the trapezoidal method applied to Hamiltonian systems. In Proceedings of the International Conference on Numerical Analysis and Applied Mathematics (ICNAAM), Rhodes, Greece, Germany, 16–20 September 2005; Simos, T.E., Psihoyios, G., Tsitouras, Ch., Eds.; Wiley-Vch Verlag GmbH & Co.: Weinheim, Germany, 2005; pp. 254–257. [Google Scholar]
  6. Iavernaro, F.; Trigiante, D. Discrete Conservative Vector Fields Induced by the Trapezoidal Method. JNAIAM J. Numer. Anal. Ind. Appl. Math. 2006, 1, 113–130. [Google Scholar]
  7. Iavernaro, F.; Pace, B. s-stage trapezoidal methods for the conservation of Hamiltonian functions of polynomial type. AIP Conf. Proc. 2007, 936, 603–606. [Google Scholar]
  8. Iavernaro, F.; Pace, B. Conservative block-Boundary Value Methods for the solution of polynomial Hamiltonian systems. AIP Conf. Proc. 2008, 1048, 888–891. [Google Scholar]
  9. Iavernaro, F.; Trigiante, D. High-order Symmetric Schemes for the Energy Conservation of Polynomial Hamiltonian Problems. JNAIAM J. Numer. Anal. Ind. Appl. Math. 2009, 4, 87–101. [Google Scholar]
  10. Brugnano, L.; Iavernaro, F.; Susca, T. Numerical comparisons between Gauss-Legendre methods and Hamiltonian BVMs defined over Gauss points. Monogr. Real Acad. Cienc. Zaragoza 2010, 33, 95–112. [Google Scholar]
  11. Brugnano, L.; Iavernaro, F.; Trigiante, D. Hamiltonian BVMs (HBVMs): A family of “drift-free” methods for integrating polynomial Hamiltonian systems. AIP Conf. Proc. 2009, 1168, 715–718. [Google Scholar]
  12. Brugnano, L.; Iavernaro, F.; Trigiante, D. Hamiltonian Boundary Value Methods (Energy Preserving Discrete Line Integral Methods). JNAIAM J. Numer. Anal. Ind. Appl. Math. 2010, 5, 17–37. [Google Scholar]
  13. Brugnano, L.; Iavernaro, F.; Trigiante, D. Analisys of Hamiltonian Boundary Value Methods (HBVMs): A class of energy-preserving Runge-Kutta methods for the numerical solution of polynomial Hamiltonian systems. Commun. Nonlinear Sci. Numer. Simul. 2015, 20, 650–667. [Google Scholar] [CrossRef]
  14. Brugnano, L.; Frasca Caccia, G.; Iavernaro, F. Efficient implementation of Gauss collocation and Hamiltonian Boundary Value Methods. Numer. Algorithms 2014, 65, 633–650. [Google Scholar] [CrossRef]
  15. Brugnano, L.; Frasca Caccia, G.; Iavernaro, F. Hamiltonian Boundary Value Methods (HBVMs) and their efficient implementation. Math. Eng. Sci. Aerosp. 2014, 5, 343–411. [Google Scholar]
  16. Brugnano, L.; Iavernaro, F.; Trigiante, D. A note on the efficient implementation of Hamiltonian BVMs. J. Comput. Appl. Math. 2011, 236, 375–383. [Google Scholar] [CrossRef]
  17. Brugnano, L.; Iavernaro, F.; Trigiante, D. The lack of continuity and the role of Infinite and infinitesimal in numerical methods for ODEs: The case of symplecticity. Appl. Math. Comput. 2012, 218, 8053–8063. [Google Scholar] [CrossRef]
  18. Brugnano, L.; Iavernaro, F.; Trigiante, D. A simple framework for the derivation and analysis of effective one-step methods for ODEs. Appl. Math. Comput. 2012, 218, 8475–8485. [Google Scholar] [CrossRef]
  19. Amodio, P.; Brugnano, L.; Iavernaro, F. Energy-conserving methods for Hamiltonian Boundary Value Problems and applications in astrodynamics. Adv. Comput. Math. 2015, 41, 881–905. [Google Scholar] [CrossRef]
  20. Barletti, L.; Brugnano, L.; Frasca Caccia, G.; Iavernaro, F. Energy-conserving methods for the nonlinear Schrödinger equation. Appl. Math. Comput. 2018, 318, 3–18. [Google Scholar] [CrossRef]
  21. Brugnano, L.; Calvo, M.; Montijano, J.I.; Ràndez, L. Energy preserving methods for Poisson systems. J. Comput. Appl. Math. 2012, 236, 3890–3904. [Google Scholar] [CrossRef]
  22. Brugnano, L.; Frasca Caccia, G.; Iavernaro, F. Energy conservation issues in the numerical solution of the semilinear wave equation. Appl. Math. Comput. 2015, 270, 842–870. [Google Scholar] [CrossRef]
  23. Brugnano, L.; Gurioli, G.; Iavernaro, F.; Weinmüller, E.B. Line integral solution of Hamiltonian systems with holonomic constraints. Appl. Numer. Math. 2018, 127, 56–77. [Google Scholar] [CrossRef]
  24. Brugnano, L.; Iavernaro, F. Line Integral Methods which preserve all invariants of conservative problems. J. Comput. Appl. Math. 2012, 236, 3905–3919. [Google Scholar] [CrossRef]
  25. Brugnano, L.; Iavernaro, F.; Trigiante, D. A two-step, fourth-order method with energy preserving properties. Comput. Phys. Commun. 2012, 183, 1860–1868. [Google Scholar] [CrossRef]
  26. Brugnano, L.; Iavernaro, F.; Trigiante, D. Energy and QUadratic Invariants Preserving integrators based upon Gauss collocation formulae. SIAM J. Numer. Anal. 2012, 50, 2897–2916. [Google Scholar] [CrossRef]
  27. Brugnano, L.; Montijano, J.I.; Rández, L. On the effectiveness of spectral methods for the numerical solution of multi-frequency highly-oscillatory Hamiltonian problems. Numer. Algorithms 2018. [Google Scholar] [CrossRef]
  28. Brugnano, L.; Sun, Y. Multiple invariants conserving Runge-Kutta type methods for Hamiltonian problems. Numer. Algorithms 2014, 65, 611–632. [Google Scholar] [CrossRef]
  29. Lasagni, F.M. Canonical Runge-Kutta methods. Z. Angew. Math. Phys. 1988, 39, 952–953. [Google Scholar] [CrossRef]
  30. Sanz-Serna, J.M. Runge-Kutta schemes for Hamiltonian systems. BIT Numer. Math. 1988, 28, 877–883. [Google Scholar] [CrossRef]
  31. Burrage, K.; Butcher, J.C. Stability criteria for implicit Runge-Kutta methods. SIAM J. Numer. Anal. 1979, 16, 46–57. [Google Scholar] [CrossRef]
  32. Betsch, P.; Steinmann, P. Inherently Energy Conserving Time Finite Elements for Classical Mechanics. J. Comput. Phys. 2000, 160, 88–116. [Google Scholar] [CrossRef]
  33. Betsch, P.; Steinmann, P. Conservation properties of a time FE method. I. Time-stepping schemes for N-body problems. Int. J. Numer. Methods Eng. 2000, 49, 599–638. [Google Scholar] [CrossRef]
  34. Bottasso, C.L. A new look at finite elements in time: A variational interpretation of Runge-Kutta methods. Appl. Numer. Math. 1997, 25, 355–368. [Google Scholar] [CrossRef]
  35. Celledoni, E.; McLachlan, R.I.; McLaren, D.I.; Owren, B.; Quispel, G.R.W.; Wright, W.M. Energy-preserving Runge-Kutta methods. M2AN Math. Model. Numer. Anal. 2009, 43, 645–649. [Google Scholar] [CrossRef]
  36. Hairer, E. Energy preserving variant of collocation methods. JNAIAM J. Numer. Anal. Ind. Appl. Math. 2010, 5, 73–84. [Google Scholar]
  37. McLachlan, R.I.; Quispel, G.R.W.; Robidoux, N. Geometric integration using discrete gradient. Philos. Trans. R. Soc. Lond. A 1999, 357, 1021–1045. [Google Scholar] [CrossRef]
  38. Quispel, G.R.W.; McLaren, D.I. A new class of energy-preserving numerical integration methods. J. Phys. A Math. Theor. 2008, 41, 045206. [Google Scholar] [CrossRef]
  39. Tang, Q.; Chen, C.M. Continuous finite element methods for Hamiltonian systems. Appl. Math. Mech. 2007, 28, 1071–1080. [Google Scholar] [CrossRef]
  40. Dahlquist, G.; Björk, Å. Numerical Methods in Scientific Computing; SIAM: Philadelphia, PA, USA, 2008. [Google Scholar]
  41. Brugnano, L. Blended Block BVMs (B3VMs): A Family of Economical Implicit Methods for ODEs. J. Comput. Appl. Math. 2000, 116, 41–62. [Google Scholar] [CrossRef]
  42. Brugnano, L.; Magherini, C. Blended Implementation of Block Implicit Methods for ODEs. Appl. Numer. Math. 2002, 42, 29–45. [Google Scholar] [CrossRef]
  43. Brugnano, L.; Magherini, C. Blended Implicit Methods for solving ODE and DAE problems, and their extension for second order problems. J. Comput. Appl. Math. 2007, 205, 777–790. [Google Scholar] [CrossRef]
  44. Brugnano, L.; Magherini, C. Recent advances in linear analysis of convergence for splittings for solving ODE problems. Appl. Numer. Math. 2009, 59, 542–557. [Google Scholar] [CrossRef]
  45. Brugnano, L.; Magherini, C. Blended General Linear Methods based on Boundary Value Methods in the Generalized BDF family. JNAIAM J. Numer. Anal. Ind. Appl. Math. 2009, 4, 23–40. [Google Scholar]
  46. Brugnano, L.; Magherini, C. The BiM code for the numerical solution of ODEs. J. Comput. Appl. Math. 2004, 164–165, 145–158. [Google Scholar] [CrossRef]
  47. Brugnano, L.; Magherini, C.; Mugnai, F. Blended Implicit Methods for the Numerical Solution of DAE Problems. J. Comput. Appl. Math. 2006, 189, 34–50. [Google Scholar] [CrossRef]
  48. Test Set for IVP Solvers. Available online: https://archimede.dm.uniba.it/ testset/testsetivpsolvers/ (accessed on 4 May 2018).
  49. The Codes BiM and BiMD Home Page. Available online: http://web.math.unifi.it/users/brugnano/BiM/index.html (accessed on 4 May 2018).
  50. Wang, B.; Meng, F.; Fang, Y. Efficient implementation of RKN-type Fourier collocation methods for second-order differential equations. Appl. Numer. Math. 2017, 119, 164–178. [Google Scholar] [CrossRef]
  51. Simoncini, V. Computational methods for linear matrix equations. SIAM Rev. 2016, 58, 377–441. [Google Scholar] [CrossRef]
  52. Line Integral Methods for Conservative Problems. Available online: http://web.math.unifi.it/users/brugnano/LIMbook/ (accessed on 4 May 2018).
  53. Brugnano, L.; Gurioli, G.; Iavernaro, F. Analysis of Energy and QUadratic Invariant Preserving (EQUIP) methods. J. Comput. Appl. Math. 2018, 335, 51–73. [Google Scholar] [CrossRef]
  54. Hairer, E.; Wanner, G. Solving Ordinary Differential Equations II. Stiff and Differential-Algebraic Problems, 2nd ed.; Springer: Berlin, Germany, 1996. [Google Scholar]
  55. Chartier, P.; Faou, E.; Murua, A. An algebraic approach to invariant preserving integrators: The case of quadratic and Hamiltonian invariants. Numer. Math. 2006, 103, 575–590. [Google Scholar] [CrossRef]
  56. Ge, Z.; Marsden, J.E. Lie-Poisson Hamilton-Jacobi theory and Lie-Poisson integrators. Phys. Lett. A 1988, 133, 134–139. [Google Scholar]
  57. Brugnano, L.; Iavernaro, F.; Trigiante, D. Energy and Quadratic Invariants Preserving Integrators of Gaussian Type. AIP Conf. Proc. 2010, 1281, 227–230. [Google Scholar]
  58. Sanz-Serna, J.M. Symplectic Runge-Kutta schemes for adjoint equations, automatic differentiation, optimal control, and more. SIAM Rev. 2016, 58, 3–33. [Google Scholar] [CrossRef]
  59. Brugnano, L.; Gurioli, G.; Sun, Y. Energy-conserving Hamiltonian Boundary Value Methods for the numerical solution of the Korteweg-de Vries equation. J. Comput. Appl. Math. 2018, submitted. [Google Scholar]
  60. Brugnano, L.; Zhang, C.; Li, D. A class of energy-conserving Hamiltonian boundary value methods for nonlinear Schrödinger equation with wave operator. Commun. Nonlinear Sci. Numer. Simul. 2018, 60, 33–49. [Google Scholar] [CrossRef]
  61. Boyd, J.P. Chebyshev and Fourier Spectral Methods, 2nd ed.; Dover Publications Inc.: Mineola, NY, USA, 2001. [Google Scholar]
  62. Deuflhard, P. A study of extrapolation methods based on multistep schemes without parasitic solutions. Z. Angew. Math. Phys. 1979, 30, 177–189. [Google Scholar] [CrossRef]
  63. Gautschi, W. Numerical integration of ordinary differential equations based on trigonometric polynomials. Numer. Math. 1961, 3, 381–397. [Google Scholar] [CrossRef]
  64. Wu, X.; Wang, B. Recent Developments in Structure-Preserving Algorithms for Oscillatory Differential Equations; Springer: Singapore, 2018. [Google Scholar]
Figure 1. Error growth over 100 periods when solving problems (60) and (61) by using the EQUIP(6,3) method (blue solid line) and the 3-stage Gauss method (red dashed line) with stepsize h = T / 50 0.15 . The dotted lines show the linear and quadratic error growths.
Figure 1. Error growth over 100 periods when solving problems (60) and (61) by using the EQUIP(6,3) method (blue solid line) and the 3-stage Gauss method (red dashed line) with stepsize h = T / 50 0.15 . The dotted lines show the linear and quadratic error growths.
Axioms 07 00036 g001
Figure 2. Plot of the function φ u defined in (104) versus ω h (blue plus line), for the double precision IEEE, together with its linear approximation (105) (red solid line).
Figure 2. Plot of the function φ u defined in (104) versus ω h (blue plus line), for the double precision IEEE, together with its linear approximation (105) (red solid line).
Axioms 07 00036 g002
Table 1. A few values of the parameter defined at (43).
Table 1. A few values of the parameter defined at (43).
s12345678910
ρ s 0.50.28870.19670.14750.11730.097100.082650.071850.063480.05682
Table 2. Solution error e y ( y = ( q , p ) ) and Hamiltonian error e H when solving problem (46)–(47) with stepsize h = T / n .
Table 2. Solution error e y ( y = ( q , p ) ) and Hamiltonian error e H when solving problem (46)–(47) with stepsize h = T / n .
HBVM(6,3)HBVM(3,3)
n e y Rate e H e y Rate e H
205.12 × 10 3 2.78 × 10 8 9.13 × 10 1 1.37 × 10 3
302.60 × 10 4 7.41.05 × 10 11 3.807.85.18 × 10 4
401.41 × 10 4 2.10.002.930.91.11 × 10 5
503.65 × 10 5 6.12.22 × 10 16 3.13−0.31.05 × 10 5
601.22 × 10 5 6.00.002.880.52.93 × 10 6
704.88 × 10 6 5.90.001.813.01.00 × 10 6
802.27 × 10 6 5.72.22 × 10 16 9.06 × 10 1 5.25.24 × 10 7
901.15 × 10 6 5.82.22 × 10 16 4.53 × 10 1 5.91.06 × 10 7
1006.23 × 10 7 5.81.11 × 10 16 2.40 × 10 1 6.01.74 × 10 8
Table 3. Solution error e u and Hamiltonian error e H when solving problem (93) with stepsize h = 1 and N = 300 in (90), by using HBVM ( k , s ) methods.
Table 3. Solution error e u and Hamiltonian error e H when solving problem (93) with stepsize h = 1 and N = 300 in (90), by using HBVM ( k , s ) methods.
( k , s ) e u e H Time (s)
(1,1)5.577.02 × 10 1 0.64
(2,2)9.97 × 10 1 1.09 × 10 1 1.73
(3,3)8.39 × 10 2 9.36 × 10 3 2.62
(6,3)1.05 × 10 2 8.53 × 10 8 2.98
(8,4)3.89 × 10 4 8.88 × 10 15 3.42
(10,5)1.44 × 10 5 7.11 × 10 15 4.64
(12,6)5.31 × 10 7 5.33 × 10 15 4.79
(14,7)1.92 × 10 8 5.33 × 10 15 4.97
(16,8)6.87 × 10 10 5.33 × 10 15 4.46
(18,9)2.47 × 10 11 5.33 × 10 15 5.52
(20,10)9.06 × 10 13 5.33 × 10 15 6.46
Table 4. Duffing problem (112)–(115) solved by the SHBVM ( k , s , s 0 ) method with parameters (116) and time-step h = 20 / N : e q is the maximum absolute error in the computed solution; e H is the maximum relative error in the numerical Hamiltonian.
Table 4. Duffing problem (112)–(115) solved by the SHBVM ( k , s , s 0 ) method with parameters (116) and time-step h = 20 / N : e q is the maximum absolute error in the computed solution; e H is the maximum relative error in the numerical Hamiltonian.
N ω h e q e H ( s 0 , s , k ) Time (s)
120016.74.12 × 10 8 4.44 × 10 16 (33,59,61)4.09
130015.41.41 × 10 8 4.44 × 10 16 (32,56,58)3.32
140014.33.55 × 10 9 4.44 × 10 16 (31,54,56)3.34
150013.32.02 × 10 9 3.33 × 10 16 (30,52,54)3.33
160012.56.66 × 10 10 2.22 × 10 16 (29,50,52)3.39
170011.88.61 × 10 10 4.44 × 10 16 (28,48,50)3.24
180011.12.25 × 10 10 4.44 × 10 16 (28,47,49)3.49
190010.52.20 × 10 10 4.44 × 10 16 (27,45,47)3.59
200010.02.89 × 10 10 3.33 × 10 16 (26,44,46)3.46

© 2018 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
Axioms EISSN 2075-1680 Published by MDPI AG, Basel, Switzerland RSS E-Mail Table of Contents Alert
Back to Top