Based on recent developments in the theory of variational and Hamilton
ian control systems by Crouch and van der Schaft, this paper answers t
wo questions: given an input-output differential equation description
of a nonlinear system, what is the adjoint variational system in input
-output differential form and what are the conditions for the system t
o be Hamiltonian, i.e., such that the variational and the adjoint vari
ational systems coincide? This resulting set of conditions is then use
d to generalize classical conditions such as the well-known Helmholtz
conditions for the inverse problem in classical mechanics.