PHY5210 W15

Chapter 13: Hamiltonian Mechanics

Reading:

In Taylor, read sections 13.1 to 13.2 for today, and 13.3 to 13.4 for Wednesday.

Recall

The Basic Variables

Recall the definition of the Hamiltonian from Chapter 7

H = ∑ ( pi qidot ) - L.

While the Lagrangian is expressed in terms of generalized coordinates and generalized velocities (the time derivatives of the generalized coordinates), the Hamiltonian is expressed in terms of generalized coordinates and generalized momenta

H = H( qi, pi )

We call the space of the n generalized coordinates and n generalized velocities configuration space. The space of the n generalized coordinates and n generalized momenta is called phase space. In both instance, the space has 2n dimensions. The difference in switching from working in configuration space to phase space is subtle but important.

We can imagine the Lagrangian approach as yielding the evolution of a point in a configuration space of 2n dimensions. The Hamiltonian approach yields the evolution of a point in a phase space of 2n dimensions. There are important results that are derivable in phase space, such as Liouville's theorem of Sec. 13.7 of Taylor. You may see other results in a graduate level classical mechanics course.

In many situations, the Hamiltonian can be written down directly using H = T + U. When the generalized momenta are not obvious, it is better to use the definition given above for the Hamiltonian in terms of the Lagrangian. We will discuss some examples after deriving Hamilton's equations.

Hamilton's Equations for One-Dimensional Systems

Hamilton's equations are the rules for obtaining differential equations for the motion of a system from Hamiltonian. There are a number of routes to arrive at the derivation of the equations; I will follow a route slightly different from Taylor.

Starting from the definition of the Hamiltonian, we can express the differential of the Hamiltonian as

δH = pδqdot + qdotδp - (∂L/∂q) δq - (∂L/∂qdot) δqdot

Using Lagrange's equations to replace the partial derivatives of L, eliminates the pδqdot term and gives

δH = qdotδp - pdotδq

We can also write the differential of the Hamiltonian based on its dependent variables

δH = (∂H/∂p) δp + (∂H/∂q) δq

Equating the terms with the same differentials yields Hamilton's equations

pdot = -∂H /∂q        qdot = ∂H /∂p

We will see that these hold for more than one generalized coordinate, so we write

pidot = -∂H /∂qi        qidot = ∂H /∂pi

where i denotes any of n generalized coordinates. Lagrange's equation yields a second order differential equation for each coordinate. In contrast, Hamilton's equations yields two first order differential equations for each coordinate.

To transform between the Lagrangian and the Hamiltonian, it is first necessary to find the generalized momenta, p, then express qdot in terms of p and q, and finally, calculate the Hamiltonian from the definition H = pqdot - L, where qdot is eliminated in favor of p and q.

We also note that the potential energy for a conservative force is independent of qdot, and that the kinetic energy is a quadratic function of qdot, T = ½A(q) qdot², where A(q) expresses the possible dependence of the kinetic energy on position. The generalized momentum is then

p = ∂L/∂qdot = ∂T/∂qdot = A(q) qdot

The quantity pqdot evaluates to pqdot = A(q) qdot² = 2T and the Hamiltonian is

H = 2T - T + U = T + U

is the total energy of the system. This relation depends on having a relation between generalized coordinates and Cartesian coordinates that is independent of time, so-called natural generalized coordinates.

A Bead on a Straight Wire

A bead of mass m slides on a horizontal straight wire under the influence of a potential U(x). Solve for the motion first using the Lagrangian, then using the Hamiltonian.

Lagrangian Solution

The kinetic energy is just ½ m xdot², so the Lagrangian is

L = ½ m xdot² - U(x)

The equation of motion is

m xddot = -∂U/∂x
Hamiltonian Solution

Let's find the Hamiltonian the with the foolproof method and compare to the shortcut. The generalized momentum conjugate to x is p = ∂L/∂xdot = m xdot. The Hamiltonian is

H = p xdot - L = p²/m - p²/2m + U(x) = p²/2m + U

This is exactly as one would expect using the shortcut H = T + U. Hamilton's equations of motion yield

xdot = ∂H/∂p = p/m
pdot = -∂H/∂x = -∂U/∂x

The first equation is just the definition of the linear momentum, p = m xdot. Noting that pdot = m xddot, the second equation is the same equation of motion as from the Lagrange equation and what we would get from applying Newton's second law.

Atwood's Machine

An Atwood machine has two masses, m1 and m2 connected by a rope over a pulley. Use as generalized coordinate x, the height of the first mass from the center line of the pulley. Find the Hamiltonian and Hamilton's equations for the system.

These are natural coordinates, so we will write the Hamiltonian using T + U. The kinetic energy is T = p²/2(m1 + m2) and the potential energy, up to a constant term, is U = (m2 - m1)gx. The Hamiltonian is

H = T + U = p²/2(m1 + m2) + (m2 - m1)gx.

Hamilton's equations are

xdot = ∂H/∂p = p/(m1 + m2)

and

pdot = -∂H/∂x = (m1 - m2)g.

Again, the first of these is just the definition of the momentum. The second relates the force to the change in momentum, or, substituting from the first equation

xddot = g (m1 - m2) / (m1 + m2).

Bead on a Spinning Wire Hoop

This problem was solved with the Lagrangian technique in Taylor, Example 7.6. Find the Hamiltonian and Hamilton's equations for a bead of mass m on a circular wire hoop of radius R, spinning about a vertical axis with angular velocity ω.

This is an example without natural generalized coordinates. We must use the formal definition to find the Hamiltonian. There is one generalized coordinate, θ, and the Lagrangian is

L = ½ mR²(θdot² + ω² sin² θ) - mgR(1 - cos θ)

The generalized momentum is

p = ∂L/∂theta;dot = mR²θdot

so we can write the Hamiltonian as

H = pθdot - L = p²/mR² - p²/2mR² - ½mR²ω² sin² θ + mgR(1 - cos θ)
H = p²/2mR² - ½mR²ω² sin² θ + mgR(1 - cos θ)

Hamilton's equations are

qdot = p/mR²     pdot = mR²ω²sin θ cos θ - mgR sin θ

Substituting for p from the first expression into the second and rearranging terms yields the same equation of motion as found in Eq. (7.69)

θddot = (ω² cos θ - g/R) sin θ

Note that the Hamiltonian is not the same as the energy of the system, differing by the sign of the term containing ω²:

E = T + U = p²/2mR² + ½mR²ω² sin² θ + mgR(1 - cos θ).

© 2015 Robert Harr