  One main issue, when numerically integrating autonomous Hamiltonian systems,
is the long-term conservation of some of its invariants, among which the
Hamiltonian function itself. For example, it is well known that classical
symplectic methods can only exactly preserve, at most, quadratic Hamiltonians.
In this paper, a new family of methods, called "Hamiltonian Boundary Value
Methods (HBVMs)", is introduced and analyzed. HBVMs are able to exactly
preserve, in the discrete solution, Hamiltonian functions of polynomial type of
arbitrarily high degree. These methods turn out to be symmetric, precisely
A-stable, and can have arbitrarily high order. A few numerical tests confirm
the theoretical results.
