In Taylor, read sections 13.1 to 13.2 for today, and 13.3 to 13.4 for Wednesday.
Recall the definition of the Hamiltonian from Chapter 7
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
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 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
Using Lagrange's equations to replace the partial derivatives of L, eliminates the pδqdot term and gives
We can also write the differential of the Hamiltonian based on its dependent variables
Equating the terms with the same differentials yields Hamilton's equations
We will see that these hold for more than one generalized coordinate, so we write
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
The quantity pqdot evaluates to pqdot = A(q) qdot² = 2T and the Hamiltonian is
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 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.
The kinetic energy is just ½ m xdot², so the Lagrangian is
The equation of motion is
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
This is exactly as one would expect using the shortcut H = T + U. Hamilton's equations of motion yield
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.
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
Hamilton's equations are
and
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
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
The generalized momentum is
so we can write the Hamiltonian as
Hamilton's equations are
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)
Note that the Hamiltonian is not the same as the energy of the system, differing by the sign of the term containing ω²: