The main result of this paper is the discretization of Hamiltonian systems of
the form xΒ¨=βKβW(x), where K is a constant symmetric matrix
and W:RnβR is a polynomial of degree dβ€4 in
any number of variables n. The discretization uses the method of polarization
and preserves both the energy and the invariant measure of the differential
equation, as well as the dimension of the phase space. This generalises earlier
work for discretizations of first order systems with d=3, and of second order
systems with d=4 and n=1.Comment: Updated to final pre-publication versio