  Discrete Hamiltonian variational integrators are derived from Type II and
Type III generating functions for symplectic maps, and in this paper we
establish a variational error analysis result that relates the order of
accuracy of the associated numerical methods with the extent to which these
generating functions approximate the exact discrete Hamiltonians. We also
introduce the notion of an adjoint discrete Hamiltonian, and relate it to the
adjoint of the associated symplectic integrator. We show that when constructing
discrete Lagrangians and discrete Hamiltonians using the Taylor variational
integrator approach, the same underlying one-step method and quadrature rule
does not necessarily lead to the same symplectic integrator, and the same
observation holds when developing variational integrators based on averaging
techniques. Numerical experiments also indicate that the resonance behavior of
variational integrators also depend on the type of generating functions used,
and we relate this resonance behavior to the ill-posedness of the
boundary-value problems used to define the exact discrete Lagrangian and exact
discrete Hamiltonian.
