If the constraints are holonomic, then the forces of constraints do no virtual work . Assume that the generalized applied forces are given by , with U some scalar function, i.e. the generalized applied forces are derivable from a potential. L is a function of the coordinates and the velocities . Define the generalized momentum or conjugate momentum or canonical momentum through . The Hamiltonian H of a system is given by .
H is a function of the generalized coordinates and momenta of the system.
The equations of motion can be obtained from Hamilton's equations, . Assume you have chosen coordinate for a system that are not independent, but are connected by m equations of constraints of the form . The l l are called the undetermined Lagrange multipliers .