Hamilton’s Equations

The formulation of the laws of mechanics in terms of the Lagrangian, and of the Euler-Lagrange’s equations derived from it, presupposes that the mechanical state of a system is described by specifying its generalized coordinates and velocities. This is not the only possible mode of description, however. A number of advantages, especially in the study of certain general problems of mechanics, attach to a description in terms of the generalized coordinates and momenta of the system. The question therefore arises of the form of the equations of motion corresponding to that formulation of mechanics.

The passage from one set of independent variables to another can be effected by means of what is called in mathematics Legendre’s transformation. In the present case of this transformation is as follows. The total differential of the Lagrangian as a function of coordinates and velocities is

This expression may be written

since the derivatives are, by definition, the generalized momentum, and by Euler-Lagrange’s equations.

Definition:

Just like generalized forces are the extension of linear forces and moments, generalized momentum are the extension of linear and angular momentum to systems described by generalized coordinates, defines as:

It is also known as canonical momentum.

Rewriting (LL40.1) gives us:

The argument of the differential is the energy of the system expressed in terms of coordinates and momentum, it is called the Hamilton’s function or Hamiltonian of the system:

From the equation in differentials

in which the independent variables are the coordinates and momenta, we have the equations

These are the required equations of motion in the variables and , and are called Hamilton’s equations. They form a set of first-order differential equations for the unknown functions and , replacing the second-order equations in the Lagrangian treatment. Because of their simplicity and symmetry of form, they are also called canonical equations.

The total time derivative of the Hamiltonian is

substitution of and from equations (L40.4) shows that the last two terms cancel, and so

In particular, if the Hamiltonian does not depend explicitly on time, then , and we have law of conservation of energy.

As well as the dynamical variables or the Lagrangian and the Hamiltonian involve various parameters which relate to the properties of the mechanical system itself, or to the external forces on it. Let be one such parameter. Regarding it as a variable, we have instead of (LL40.1)

and (LL40.3) becomes

Hence

which relates the derivatives of the Lagrangian and the Hamiltonian with respect to the parameter . The suffixes to the derivates show the quantities which are to be kept constant in differentiation.

This result can be put in another way. Let the Lagrangian be of the form , where is a small correction to the function . Then the corresponding addition in the Hamiltonian is related to by

It may be noticed that, in transforming (LL40.1) into (LL40.3), we did not include a term in to take account of a possible explicit time-dependence of the Lagrangian, since the time would there be only a parameter which would not be involved in the transformation. Analogously to formula (40.6), the partial time derivatives of and are related by

Exercises

Exercise 1

Find the Hamiltonian for a single particle in Cartesian, cylindrical and spherical coordinates.

Solution:
In Cartesian coordinates , the position and velocity are:

The Lagrangian is:

The generalized momenta are:

Inverting these relations gives the velocities in terms of momenta:

The Hamiltonian is defined as :

In cylindrical coordinates , the velocity squared is . The Lagrangian is:

The momenta are:

Velocities:

The Hamiltonian is:

In spherical coordinates , the velocity squared is . The Lagrangian is:

The momenta are:

Velocities:

The Hamiltonian is: