\chapter{Hamiltonian Mechanics }
\label{ch:HamiltonianMechanics}
\vspace{-0.2in}
In the first six chapters of this book, we worked entirely with the Newtonian form of mechanics, which describes the world in terms of forces and accelerations (as related by the second law) and is primarily suited for use in Cartesian coordinate systems. In Chapter \ref{ch:Lagrange'sEquations}, we met the Lagrangian formulation. This second formulation is entirely equivalent to Newton's, in the sense that either one can be derived from the other, but the Lagrangian form is considerably more flexible with regard to choice of coordinates. The $n$ Cartesian coordinates that describe a system in Newtonian terms are replaced by a set of $n$ generalized coordinates $q_1, q_2, \cdots, q_n$, and Lagrange's equations are equally valid for essentially any choice of $q_1, q_2, \cdots, q_n$. As we have seen on many occasions, this versatility allows one to solve many problems much more easily using Lagrange's formulation. The Lagrangian approach also has the advantage of eliminating the forces of constraint. On the other hand, the Lagrangian method is at a disadvantage when applied to dissipative systems (for example, systems with friction). By now, I hope you feel comfortable with both formulations and are familiar with the advantages and disadvantages of each.
Newtonian mechanics was first expounded by Newton in his {\em Principia Mathematica}, published in 1687. Lagrange published his formulation in his book {\em M\'{e}chanique Analytique} in 1788. In the early nineteenth century, various physicists, including Lagrange, developed yet a third formulation of mechanics, which was put into a complete form in 1834 by the Irish mathematician William Hamilton (1805--1865) and has come to be called Hamiltonian mechanics. It is this third formulation of mechanics that is the subject of this chapter.
Like the Lagrangian version, Hamiltonian mechanics is equivalent to Newtonian but is considerably more flexible in its choice of coordinates. In fact, in this respect it is even more flexible than the Lagrangian approach. Where the Lagrangian formalism centers on the Lagrangian function \Ell, the Hamiltonian approach is based on the Hamiltonian function \HH\ (which we met briefly in Chapter \ref{ch:Lagrange'sEquations}). For most of the systems we shall meet, \HH\ is just the total energy. Thus one advantage of Hamilton's formalism is that it is based on a function, \HH, which (unlike the Lagrangian \Ell) has a clear physical significance and is frequently conserved. The Hamiltonian approach is also especially well suited for handling other conserved quantities and implementing various approximation schemes. It has been generalized to various different branches of physics; in particular, Hamiltonian mechanics leads very naturally from classical mechanics into quantum mechanics. For all these reasons, Hamilton's formulation plays an important role in many branches of modern physics, including astrophysics, plasma physics, and the design of particle accelerators. Unfortunately, at the level of this book, it is hard to demonstrate many of the advantages of Hamilton's version over Lagrange's, and in this chapter I shall have to ask you to be content with learning the former as just an alternative to the latter --- an alternative several of whose advantages I can mention but not explore in depth. If you go on to take a more advanced course in classical mechanics or to study quantum mechanics, you will certainly meet many of this chapter's ideas again.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{The Basic Variables}
Since the Hamiltonian version of mechanics is closer to the Lagrangian than to the Newtonian and arises naturally from the Lagrangian, let us start by reviewing the main features of the latter, which centers on the Lagrangian function \Ell. For most systems of interest, \Ell\ is just the difference of the kinetic and potential energies, $\Ell = T - U$, and in this chapter we shall confine attention to systems for which this is the case. The Lagrangian \Ell\ is a function of the $n$ generalized coordinates $q_1, \cdots, q_n$, their $n$ time derivatives (or generalized velocities) $\dot{q}_1, \cdots , \dot{q}_n$, and, perhaps, the time:
\be
\Ell = \Ell(q_1, \cdots, q_n,\dot{q}_1, \cdots , \dot{q}_n,t) = T-U.
\ee
The $n$ coordinates $(q_1, \cdots, q_n)$ specify a position or ``configuration'' of the system, and can be thought of as defining a point in an $n$-dimensional {\bf configuration space}. The $2n$ coordinates $(q_1, \cdots, q_n, \dot{q}_1, \cdots , \dot{q}_n)$ define a point in {\bf state space}, and specify a set of initial conditions (at any chosen time $t\so$) that determine a unique solution of the $n$ second-order differential equations of motion, Lagrange's equations,
\be
\frac{\p \Ell}{\p q_i} = \frac{d}{dt} \frac{\p \Ell}{\p \dot{q}_i}
\hspace{0.4in}[i = 1, \cdots, n].
\label{eq:LagrangeEqsOfMotion}
\ee
For each set of initial conditions, these equations of motion determine a unique path or ``orbit'' through state space.
You may also recall that we defined a {\bf generalized momentum} given by
\be
p_i = \frac{\p \Ell}{\p \dot{q}_i}.
\label{eq:DefnOfGeneralizedMom}
\ee
If the coordinates $(q_1, \cdots, q_n)$ are in fact Cartesian coordinates, the generalized momenta $p_i$ are the corresponding components of the usual momenta; in general, $p_i$ is not actually a momentum, but does, as we have seen, play an analogous role. The generalized momentum $p_i$ is also called the {\bf canonical momentum} or the {\bf momentum conjugate to} $q_i$.
In the Hamiltonian approach, the central role of the Lagrangian \Ell\ is taken over by the {\bf Hamiltonian function}, or just {\bf Hamiltonian}, \HH\, defined as
\be
\HH = \sum_{i=1}^n p_i \dot{q}_i - \Ell.
\label{eq:DefnOfHamiltonian}
\ee
The equations of motion, which we shall derive in the next two sections, involve derivatives of \HH\ rather than \Ell\ as in Lagrange's equations. We met the Hamiltonian function briefly in Section \ref{sec:ConsLawsInLMechanics}, where we proved that, provided the generalized coordinates $(q_1, \cdots, q_n)$ are ``natural'' (that is, the relation between the $q$'s and the underlying Cartesian coordinates is time independent), \HH\ is just the total energy of the system and is, therefore, familiar and easy to visualize.
There is a second important difference between the Lagrangian and Hamiltonian formalisms. In the former we label the state of the system by the $2n$ coordinates
\be
(q_1, \cdots, q_n, \dot{q}_1, \cdots , \dot{q}_n), \hspace{0.3in} \mbox{[Lagrange]}
\label{eq:StateSpaceCoords}
\ee
whereas in the latter we shall use the coordinates
\be
(q_1, \cdots, q_n,p_1, \cdots, p_n), \hspace{0.3in} \mbox{[Hamilton]}
\label{eq:PhaseSpaceCoords}
\ee
consisting of the $n$ generalized positions and the $n$ generalized {\em momenta} (instead of the generalized velocities). This choice of coordinates has several advantages, a few of which I shall sketch and some of which you will have to take on faith.
Just as we can regard the $2n$ coordinates (\ref{eq:StateSpaceCoords}) of the Lagrange approach as defining a point in a $2n$-dimensional state space, so we can regard the $2n$ coordinates (\ref{eq:PhaseSpaceCoords}) of the Hamiltonian approach as defining a point in a $2n$-dimensional space, which is usually called {\bf phase space}.\footnote{
Many authors use the names ``state space'' and ``phase space'' interchangeably, but it is convenient to have different names for the different spaces, and I shall reserve ``state space'' for the space of positions and generalized velocities, and ``phase space'' for that of positions and generalized momenta.
}
Just as the Lagrange equations of motion (\ref{eq:LagrangeEqsOfMotion}) determine a unique path in state space starting from any initial point (\ref{eq:StateSpaceCoords}), so (we shall see) Hamilton's equations determine a unique path in phase space starting from any initial point (\ref{eq:PhaseSpaceCoords}). A succinct way to state some of the advantages of the Hamiltonian formalism is that phase space has certain geometrical properties that make it more convenient than state space.
Like Lagrange's approach, Hamilton's is best suited to systems that are subject to no frictional forces. Accordingly, I shall assume throughout this chapter that all the forces of interest are conservative or can at least be derived from a potential-energy function. Although this restriction excludes many interesting mechanical systems, it still includes a huge number of important problems, especially in astrophysics and at the microscopic --- atomic and molecular --- level.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Hamilton's Equations for One-Dimensional \mbox{Systems}}
\label{sec:HamInOneDim}
To minimize notational complications, I shall first derive Hamilton's equations of motion for a conservative, one-dimensional system with a single ``natural'' generalized coordinate~$q$. For example, you could think of a simple, plane pendulum, in which case $q$ could be the usual angle $\phi$, or a bead on a stationary wire, in which case $q$ could be the horizontal distance $x$ along the wire. For any such system, the Lagrangian is a function of $q$ and $\dot{q}$, that is,
\be
\Ell = \Ell(q,\dot{q}) = T(q,\dot{q}) - U(q).
\ee
Recall that, in general, the kinetic energy can depend on $q$ as well as $\dot{q}$, whereas, for conservative systems, the potential energy depends only on $q$. For example, for the simple pendulum (mass $m$ and length $L$),
\be
\Ell = \Ell(\phi,\dot{\phi}) = \half m L^2 \dot{\phi}^2 - m g L (1 - \cos\phi),
\label{eq:LagrangianForSimplePendulum}
\ee
where, in this case, the kinetic energy involves only $\dot{\phi}$, not $\phi$. For a bead sliding on a frictionless wire of variable height $y = f(x)$, we saw in Example \ref{eg:Bead'sApproxLagrangian} (page \pageref{eg:Bead'sApproxLagrangian}) that
\be
\Ell = \Ell(x,\dot{x}) = T - U = \half m [1 + f'(x)^2]\dot{x}^2 - mg f(x).
\label{eq:LagrangianForBeadOnWire}
\ee
Here the $x$ dependence of the kinetic energy came about when we rewrote the $v$ in $\half m v^2$ in terms of the horizontal distance $x$. The two examples (\ref{eq:LagrangianForSimplePendulum}) and (\ref{eq:LagrangianForBeadOnWire}) illustrate a general result that we proved in Section \ref{sec:ConsLawsInLMechanics} that the Lagrangian for a conservative system with ``natural'' coordinates (and in one dimension here) has the general form
\be
\Ell = \Ell(q,\dot{q}) = T - U = \half A(q) \dot{q}^2 - U(q).
\label{eq:GenFormOf1DLagrangian}
\ee
Notice that, while the kinetic energy can depend on $q$ in a complicated way, through the function $A(q)$, its dependence on $\dot{q}$ is just through the simple quadratic factor $\dot{q}^2$. As you can easily check by writing it down, Lagrange's equation for this Lagrangian is automatically a second-order differential equation for $q$.
The Hamiltonian is defined by (\ref{eq:DefnOfHamiltonian}), which in one dimension reduces to
\be
\HH = p \dot{q} - \Ell.
\label{eq:DefnOf1DHamiltonian}
\ee
In the discussion of Section \ref{sec:ConsLawsInLMechanics}, I offered some reason why one might perhaps expect a function defined in this way to be an interesting function to study. For now, let us just accept the definition as an inspired suggestion by Hamilton --- a suggestion whose merit will appear as we proceed.\footnote
{
Actually, the change from \Ell\ to \HH\ as the object of primary interest is an example of a mathematical maneuver, called a {\em Legendre transformation}, which plays an important role in several fields, most notably thermodyamics. For example, the change from the thermodynamic internal energy $U$ to enthalpy $H$ is a Legendre transformation, closely analogous to Hamilton's change from \Ell\ to \HH.
}
Given the form (\ref{eq:GenFormOf1DLagrangian}) of \Ell, we can calculate the generalized momentum $p$ as
\be
p = \frac{\p \Ell}{\p \dot{q}} = A(q) \dot{q}
\label{eq:p=Aqdot}
\ee
so that $p \dot{q} = A(q) \dot{q}^2 = 2T$. Substituting into (\ref{eq:DefnOf1DHamiltonian}), we find that
\[
\HH = p \dot{q} - \Ell = 2T - (T-U) = T+U.
\]
That is, the Hamiltonian $\HH$ for the ``natural'' system considered here is precisely the total energy --- the same result we proved for any ``natural'' system in any number of dimensions in Section \ref{sec:ConsLawsInLMechanics}.
The next step in setting up the Hamiltonian formalism is perhaps the most subtle. In the Lagrangian approach, we think of \Ell\ as a function of $q$ and $\dot{q}$, as is indicated explicitly in (\ref{eq:GenFormOf1DLagrangian}). Similarly, (\ref{eq:p=Aqdot}) gives the generalized momentum $p$ in terms of $q$ and $\dot{q}$. However, we can solve (\ref{eq:p=Aqdot}) for $\dot{q}$ in terms of $q$ and $p$:
\be
\dot{q} = p/A(q) = \dot{q}(q,p),
\ee
say. With $\dot{q}$ expressed as a function of $q$ and $p$, let us now look at the Hamiltonian. Wherever $\dot{q}$ appears in \HH, we can replace it by $\dot{q}(q,p)$, and \HH\ becomes a function of $q$ and $p$. In all its horrible detail, (\ref{eq:DefnOf1DHamiltonian}) becomes
\be
\HH(q,p) = p\, \dot{q}(q,p) - \Ell\mbox{\large(}q,\dot{q}(q,p)\mbox{\large)}.
\label{eq:H(q,p)=FnOf(q,p)}
\ee
Our final step is to get Hamilton's equations of motion. To find these, we just evaluate the derivatives of $\HH(q,p)$ with respect to $q$ and $p$. First, using the chain rule, we differentiate (\ref{eq:H(q,p)=FnOf(q,p)}) with respect to $q$:
\[
\frac{\p \HH}{\p q} = p \frac{\p \dot{q}}{\p q} -
\left[ \frac{\p \Ell}{\p q} + \frac{\p \Ell}{\p \dot{q}} \frac{\p \dot{q}}{\p q}
\right].
\]
Now, in the third term on the right, you will recognize that $\p \Ell/\p \dot{q} = p$. Thus, the first and third terms on the right cancel one another, leaving just
\be
\frac{\p \HH}{\p q} = - \frac{\p \Ell}{\p q} = -\frac{d}{dt} \frac{\p \Ell}{\p \dot{q}} =
-\frac{d}{dt} p = -\dot{p}
\label{eq:dH/dq=pdot}
\ee
where the second equality follows from the Lagrange equation (\ref{eq:LagrangeEqsOfMotion}). This equation gives the time derivative of $p$ (that is, $\dot{p}$) in terms of the Hamiltonian \HH\ and is the first of the two Hamiltonian equations of motion. Before we discuss it, let's derive the second one.
Differentiating (\ref{eq:H(q,p)=FnOf(q,p)}) with respect to $p$ and using the chain rule, we find
\be
\frac{\p \HH}{\p p} = \left[ \dot{q} + p \frac{\p \dot{q}}{\p p}\right] -
\frac{\p \Ell}{\p \dot{q}} \frac{\p \dot{q}}{\p p} = \dot{q}
\label{eq:dH/dp=-qdot}
\ee
since the second and third terms in the middle expression cancel exactly. This is the second of the Hamiltonian equations of motion and gives $\dot{q}$ in terms of the Hamiltonian \HH. Collecting them together (and reordering a bit), we have {\bf Hamilton's equations} for a one-dimensional system:
\be
\fbox{ \hspace{0.2in} $ \ds
\dot{q} = \frac{\p \HH}{\p p} \mbox{\hspace{0.2in} and \hspace{0.2in}}
\dot{p} = -\frac{\p \HH}{\p q} \, .
$ \hspace{0.2in}
}
\label{eq:HamsEqsIn1D}
\ee
In the Lagrangian formalism, the equation of motion of a one-dimensional system is a {\em single second-order} differential equation for $q$. In the Hamiltonian approach, there are {\em two first-order} equations, one for $q$ and one for $p$. Before we extend this result to more general systems or discuss any advantages the new formalism may have, let us look at a couple of simple examples.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{eg} {\bf A Bead on a Straight Wire}
\end{eg} \vspace{-0.1in}
Consider a bead sliding on a frictionless rigid straight wire lying along the $x$ axis, as shown in Figure \ref{fig:pfc13BeadOnStraightWire}.
%PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP
\begin{figure}[hbtp]
\vspace{1.7in} \hspace*{2in}
\special{wmf:pfc13BeadOnStraightWire.wmf x=2.5in}
\vspace{-1.1in}
\caption{\small A bead of mass $m$ sliding on a frictionless straight wire.}
\label{fig:pfc13BeadOnStraightWire}
\end{figure}
%pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp
The bead has mass $m$ and is subject to a conservative force, with corresponding potential energy $U(x)$. Write down the Lagrangian and Lagrange's equation of motion. Find the Hamiltonian and Hamilton's equations, and compare the two approaches.
Naturally, we take as our generalized coordinate $q$ the Cartesian $x$. The Lagrangian is then
\[
\Ell(x,\dot{x}) = T - U = \half m \dot{x}^2 - U(x).
\]
The corresponding Lagrange equation is
\be
\frac{\p \Ell}{\p x} = \frac{d}{dt} \frac{\p \Ell}{\p \dot{x}}
\hspace{0.3in} \mbox{or} \hspace{0.2in}
-\frac{dU}{dx} = m \ddot{x}
\ee
which is just Newton's $F = ma$, as we would expect.
To set up the Hamiltonian formalism, we must first find the generalized momentum,
\[
p = \frac{\p \Ell}{\p \dot{x}} = m\dot{x}.
\]
As expected, this is just the conventional $mv$ momentum. This equation can be solved to give $\dot{x} = p/m$, which can then be substituted into the Hamiltonian to give
\[
\HH = p \dot{x} - \Ell = \frac{p^2}{m} - \left[ \frac{p^2}{2m} - U(x) \right] =
\frac{p^2}{2m} + U(x)
\]
which you will recognize as the total energy, with the kinetic term $\half m \dot{x}^2$ rewritten in terms of momentum as $p^2/(2m)$. Finally, the two Hamilton equations (\ref{eq:HamsEqsIn1D}) are
\[
\dot{x} = \frac{\p \HH}{\p p} = \frac{p}{m} \mbox{\hspace{0.2in} and \hspace{0.2in}}
\dot{p} = -\frac{\p \HH}{\p x} = -\frac{dU}{dx}\,.
\]
The first of these is, from a Newtonian point of view, just the traditional definition of momentum, and, when we substitute this definition into the second equation, it gives us back $m \ddot{x} = -dU/dx$ again. As had to be the case, Newton, Lagrange, and Hamilton all lead us to the same familiar equation. In this very simple example, neither Lagrange nor Hamilton has any visible advantage over Newton.
\wxyz
\vspace{-0.2in}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{eg} {\bf Atwood's Machine}
\label{eg:AtwoodMachineHamilton}
\end{eg} \vspace{-0.1in}
Set up the Hamiltonian formalism for the Atwood machine, first shown as Figure \ref{fig:pfc4AtwoodMachine} and shown again here as Figure \ref{fig:pfc13AtwoodMachine2}. Use the height $x$ of $m_1$ measured downward as the one generalized coordinate.
%PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP
\begin{figure}[hbtp]
\vspace{1.75in} \hspace*{2.2in}
\special{wmf:pfc13Atwoodmachine.wmf y=1.8in}
\vspace{-0.15in}
\caption{\small An Atwood machine consisting of two masses, $m_1$ and $m_2$, suspended by a massless inextensible string that passes over a massless, frictionless pulley. Because the string's length is fixed, the position of the whole system is specified by the distance $x$ of $m_1$ below any convenient fixed level.
}
\label{fig:pfc13AtwoodMachine2}
\end{figure}
%ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp
The Lagrangian is $\Ell = T - U$, where, as we saw in Example \ref{eg:AtwoodByRegularLagrange} (page \pageref{eg:AtwoodByRegularLagrange}),
\be
T = \half (m_1 + m_2) \dot{x}^2 \mbox{\hspace{0.2in} and \hspace{0.2in}}
U = -(m_1 - m_2) g x
\ee
We can calculate the Hamiltonian \HH\ either as $\HH = p \dot{x} - \Ell$ or, what is usually a little quicker, (provided it is true\footnote
{
Remember that this second expression is true provided the generalized coordinate is ``natural,'' that is, the relation between the generalized coordinate and the underlying Cartesian coordinates is independent of time --- a condition which is certainly met here (Problem \ref{prob:HamII}).
}
) as $\HH = T + U$. Either way, we must first find the generalized momentum $p = \p \Ell/\p \dot{x}$ or, since $U$ does not involve $\dot{x}$,
\[
p = \frac{\p T}{\p \dot{x}} = (m_1 + m_2) \dot{x}.
\]
We solve this to give $\dot{x}$ in terms of $p$ as $\dot{x} = p/(m_1 + m_2)$, which we substitute into \HH\ to give \HH\ as a function of $x$ and $p$:
\be
\HH = T + U = \frac{p^2}{2(m_1 + m_2)} - (m_1 - m_2) g x.
\ee
We can now write down the two Hamilton equations of motion (\ref{eq:HamsEqsIn1D}) as
\[
\dot{x} = \frac{\p \HH}{\p p} = \frac{p}{m_1 + m_2} \mbox{\hspace{0.2in} and \hspace{0.2in}}
\dot{p} = -\frac{\p \HH}{\p x} = (m_1 - m_2)g.
\]
Again, the first of these is just a restatement of the definition of the generalized momentum and, when we combine this with the second, we get the well known result for the acceleration of the Atwood machine,
\[
\ddot{x} = \frac{m_1 - m_2}{m_1 + m_2}g.
\] \vspace{-0.2in}
\wxyz
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
These two examples illustrate several of the general features of the Hamiltonian approach: Our first task is alway to write down the Hamiltonian \HH\ (just as in the Lagrangian approach the first task is to write down \Ell). In the Hamiltonian approach there are usually a couple of extra steps, which are to write down the generalized momentum, to solve the resulting equation for the generalized velocity, and to express \HH\ as a function of position and momentum. Once this is done, one can just turn the handle and crank out Hamilton's equations. In general, there is no guarantee that the resulting equations will be easy to solve, but it is a wonderful property of Hamilton's approach (like Lagrange's) that it provides an almost infallible way to find the equations of motion.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Hamilton's Equations in Several Dimensions}
\label{sec:HamInSeveralDims}
Our derivation of Hamilton's equations for a one-dimensional system is easily extended to multi-dimensional systems. The only real problem is that the equations can become badly cluttered with indices, so, to minimize the clutter, I shall use the abbreviation introduced in Section \ref{sec:TheGeneralCase}: The configuration of an $n$-dimensional system is given by $n$ generalized coordinates $q_1, \cdots , q_n$, which I shall represent to a single bold-face {\bf q}:
\[
{\bf q} = (q_1, \cdots , q_n).
\]
Similarly, the generalized velocities become ${\bf \dot{q}} = (\dot q_1, \cdots , \dot q_n)$, and the generalized momenta are
\[
{\bf p} = (p_1, \cdots , p_n).
\]
It is important to remember that for now a bold-face {\bf q} or {\bf p} is not necessarily a three-dimensional vector. Rather {\bf q} and {\bf p} are $n$-dimensional vectors in the space of generalized positions or generalized momenta.
Hamilton's equations follow directly from Lagrange's equations in their standard form. Thus to prove the former, we have only to assume the truth of the latter. To be specific, however, I shall make the same assumptions that we used in Chapter \ref{ch:Lagrange'sEquations}: I shall assume that any constraints are holonomic; that is, the number of degrees of freedom is equal to the number of generalized coordinates. I shall also assume that the non-constraint forces can be derived from a potential energy function, though it is not essential that they be conservative (that is, the potential energy is allowed to depend on $t$). The equations that relate the $N$ underlying Cartesian coordinates ${\bf r}_1, \cdots ,{\bf r}_N$ to the $n$ generalized coordinates $q_1, \cdots , q_n$ {\em can} depend on time; that is, it is not essential that the generalized coordinates be ``natural.'' These assumptions are enough to guarantee that the standard Lagrangian formalism applies, and will let us derive from it the Hamiltonian one. Thus our starting point is that there is a Lagrangian
\[
\Ell = \Ell({\bf q, \dot{q}},t) = T - U
\]
and that the evolution of our system is governed by the $n$ Lagrange equations,
\be
\frac{\p \Ell}{\p q_i} = \frac{d}{dt} \frac{\p \Ell}{\p \dot{q}_i}
\hspace{0.4in}[i = 1, \cdots, n].
\label{eq:LagrangeEqsOfMotion2}
\ee
We shall define the Hamiltonian function as in (\ref{eq:DefnOfHamiltonian}),
\be
\HH = \sum_{i=1}^n p_i \dot{q}_i - \Ell,
\label{eq:DefnOfHamiltonian2}
\ee
where the generalized momenta are defined by
\be
p_i = \frac{\p \Ell({\bf q, \dot{q}},t)}{\p \dot{q}_i} \hspace{0.4in}[i = 1, \cdots, n]
\label{eq:DefnOfGeneralizedMom2}
\ee
as in (\ref{eq:DefnOfGeneralizedMom}). Just as in the one-dimensional case, our next step is to express the Hamiltonian as a function of the $2n$ variables {\bf q} and {\bf p}. To this end, note that we can view the equations (\ref{eq:DefnOfGeneralizedMom2}) as $n$ simultaneous equations for the $n$ generalized velocities $\bf \dot{q}$. We can in principle solve these equations to give the generalized velocities in terms of the variables {\bf p}, {\bf q}, and $t$:
\[
\dot{q}_i = \dot{q}_i(q_1, \cdots, q_n,p_1, \cdots , p_n,t) \hspace{0.4in}[i = 1, \cdots, n]
\]
or, more succinctly
\[
{\bf\dot{q} = \dot{q}(q,p,}t).
\]
We can now eliminate the generalized velocities from our definition of the Hamiltonian to give (again in agonising detail)
\be
\HH = \HH({\bf q,p},t) = \sum_{i=1}^n p_i \dot{q}_i({\bf q,p},t) - \Ell\mbox{\large(}{\bf q,\dot{q}(q,p},t),t\mbox{\large)}.
\label{eq:H(q,p)=FnOf(q,p)MultiDim}
\ee
The derivation of Hamilton's equations now proceeds very much as in one dimension, and I shall leave you to fill in the details (Problem \ref{prob:HamJ}). Following the same steps as led from (\ref{eq:H(q,p)=FnOf(q,p)}) to (\ref{eq:HamsEqsIn1D}), we differentiate \HH\ with respect to $q_i$ and then $p_i$, and this leads to {\bf Hamilton's equations}:
\be
\fbox{ \hspace{0.2in} $ \ds
\dot{q}_i = \frac{\p \HH}{\p p_i} \mbox{\hspace{0.1in} and \hspace{0.1in}}
\dot{p_i} = -\frac{\p \HH}{\p q_i} \hspace{0.5in}[i = 1, \cdots, n].
$ \hspace{0.2in}
}
\label{eq:HamsEqsInMultiDim}
\ee
Notice that for a system with $n$ degrees of freedom, the Hamiltonian approach gives us $2n$ first-order differential equations, instead of the $n$ second-order equations of Lagrange.
Before we discuss an example of Hamilton's equations, there is one more derivative of \HH\ to consider, its derivative with respect to time. This is actually quite subtle. The function $\HH({\bf q,p},t)$ could vary with time for two reasons: First, as the motion proceeds, the $2n$ coordinates $\bf (q,p)$ vary, and this could cause $\HH({\bf q,p},t)$ to change; in addition, $\HH({\bf q,p},t)$ may have an explicit time dependence, as indicated by the final argument $t$, and this also can make \HH\ vary with time. Mathematically, this means that $d\HH/dt$ contains $2n+1$ terms, as follows
\be
\frac{d \HH}{dt} = \sum_{i=1}^n \left[ \frac{\p \HH}{\p q_i} \dot{q_i} +
\frac{\p \HH}{\p p_i} \dot{p_i} \right] + \frac{\p \HH}{\p t}
\label{eq:dH/dt=sum+partialdH/dt}
\ee
It is important to understand the difference between the two derivatives of \HH\ in this equation. The derivative on the left, $d\HH/dt$, (sometimes called the total derivative) is the actual rate of change of \HH\ as the motion proceeds, with all the coordinates $q_1, \cdots, q_n, p_1, \cdots, p_n$ changing as $t$ advances. That on the right, $\p \HH/\p t$, is the partial derivative, which is the rate of change of \HH\ if we vary its last argument $t$ holding all the other arguments fixed. In particular, if \HH\ does not depend explicitly on $t$, this partial derivative will be zero. Now it is easy to see that, because of Hamilton's equations (\ref{eq:HamsEqsInMultiDim}), each pair of terms in the sum of (\ref{eq:dH/dt=sum+partialdH/dt}) is exactly zero, so that we have the simple result
\[
\frac{d \HH}{dt} = \frac{\p \HH}{\p t}.
\]
That is, \HH\ varies with time only to the extent that it is explicitly time dependent. In particular, if \HH\ does not depend explicitly on $t$ (as is often the case), then \HH\ is a constant in time; that is, the quantity \HH\ is conserved. This is the same result we derived in Section \ref{sec:ConsLawsInLMechanics}.\footnote
{
We proved there, in Equations (\ref{eq:dEll/dt=2}) and (\ref{eq:HH=SumpqDot-L}), that \HH\ is conserved if and only if \Ell\ does not depend explicitly on the time. These two conditions (\HH\ not explicitly time dependent or \Ell\ likewise) are equivalent, for, as you can easily check, $\p \HH/\p t = -\p \Ell/\p t$. See Problem \ref{prob:HamEE}.
}
In Section \ref{sec:ConsLawsInLMechanics}, we proved a second result regarding time dependence: If the relation of the generalized coordinates $q_1, \cdots, q_n$ to the underlying rectangular coordinates is independent of $t$ (that is, our generalized coordinates are ``natural''), then the Hamiltonian \HH\ is just the total energy, $\HH = T + U$. In the remainder of this chapter, I shall consider only the case that the generalized coordinates {\em are} ``natural'' {\em and} that \HH\ is {\em not} explicitly time-dependent. Thus it will be true from now on that \HH\ is the total energy and that total energy is conserved.
Let us now work out an example of the Hamiltonian formalism for a system in two spatial dimensions. Unfortunately, like all reasonably simple examples, this does not exhibit any significant advantages of the Hamiltonian over the Lagrangian approach; rather, in this example, the Hamiltonian approach is just an alternative route to the same final equation of motion.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{eg} {\bf Hamilton's Equations for a Particle in a Central Force Field}
\label{eg:HamForCentralForce}
\end{eg} \vspace{-0.15in}
Set up Hamilton's equations for a particle of mass $m$ subject to a conservative central force field with potential energy $U(r)$, using as generalized coordinates the usual polar coordinates $r$ and $\phi$.
By conservation of angular momentum, we know that the motion is confined to a fixed plane, in which we can define the polar coordinates $r$ and $\phi$. The kinetic energy is given in terms of these generalized coordinates by the familiar expression
\be
T = \half m (\dot{r}^2 + r^2 \dot{\phi}^2).
\label{T=halfM(RDotSqu+RSquThetaDotsqu)}
\ee
Since the equations relating $(r, \phi)$ to $(x,y)$ are time-independent, we know that $\HH = T+U$, which we must express in terms of $r$ and $\phi$ and the corresponding generalized momenta $p_r$ and $p_\phi$. These latter are defined by the relation\footnote
{
In any problem where the potential energy $U = U({\bf q})$ is independent of the velocities $\bf \dot{q}$ (as we are certainly assuming here), there is this small simplification that we can replace \Ell\ by $T$ in the definition of $p_i$.
}
$p_i = \p \Ell/\p \dot{q}_i = \p T/\p \dot{q}_i$, which gives
\be
p_r = \p T/\p \dot{r} = m\dot{r} \hspace{0.3in} \mbox{and} \hspace{0.3in}
p_\phi = \p T/\p \dot{\phi} = m r^2 \dot{\phi}.
\label{eq:PrAndPtheta}
\ee
The momentum $p_r$ conjugate to $r$ is just the radial component of the ordinary momentum $m{\bf v}$, but, as we first saw in Section \ref{sec:L'sEqsForUnconstrMotion} [Equation (\ref{eq:ptheta=AngMom})], the momentum $p_\phi$ conjugate to $\phi$ is the {\em angular} momentum. We must next solve the two equations (\ref{eq:PrAndPtheta}) to give the velocities $\dot{r}$ and $\dot{\phi}$ in terms of the momenta $p_r$ and $p_\phi$:
\[
\dot{r} = \frac{p_r}{m} \hspace{0.3in} \mbox{and} \hspace{0.3in}
\dot{\phi} = \frac{p_\phi}{m r^2}
\]
We can now substitute these into (\ref{T=halfM(RDotSqu+RSquThetaDotsqu)}) and we arrive at the Hamiltonian, expressed as a function of the proper variables,
\be
\HH = T + U = \frac{1}{2m} \left( p_r\sqd + \frac{p_\phi \sqd}{r^2} \right) + U(r).
\label{eq:HamForCentralForce}
\ee
We can now write down the four Hamilton equations (\ref{eq:HamsEqsInMultiDim}). The two radial equations are:
\be
\dot{r} = \frac{\p \HH}{\p p_r} = \frac{p_r}{m} \hspace{0.3in} \mbox{and} \hspace{0.3in}
\dot{p_r} = -\frac{\p \HH}{\p r} = \frac{p_\phi\sqd}{m r^3} - \frac{d U}{d r}.
\ee
The first of these reproduces the definition of the radial momentum. If we substitute the first into the second, we obtain the familiar result that $m \ddot{r}$ is the sum of the actual radial force ($-dU/dr$) plus the centrifugal force $p_\phi \sqd/mr^3$. [See Equations (\ref{eq:RadEqWithThetaDot}) and (\ref{eq:Fcf=Lsqd/mrCubed}).] The two $\phi$ equations are:
\be
\dot{\phi} = \frac{\p \HH}{\p p_\phi} = \frac{p_\phi}{m r^2}
\hspace{0.3in} \mbox{and} \hspace{0.3in}
\dot{p_\phi} = -\frac{\p \HH}{\p \phi} = 0.
\label{eq:HamiltonsThetaEqs}
\ee
The first of these reproduces the definition of $p_\phi$. The second tells us, what we already knew, that the angular momentum is conserved. As in the previous two examples, we see that the Hamiltonian formalism provides an alternative route to the same final equations of motion as we could find using either the Newtonian or Lagrangian approaches.
\wxyz
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
This example illustrates the general procedure to be followed in setting up Hamilton's equations for any given system:
\begin{enumerate}
\item Choose suitable generalized coordinates, $q_1, \cdots, q_n$.
\item Write down the kinetic and potential energies, $T$ and $U,$ in terms of the $q$'s and $\dot{q}$'s.
\item Find the generalized momenta $p_1, \cdots , p_n$. (We are now assuming our system is conservative, so $U$ is independent of $\dot{q}_i$ and we can use $p_i = \p T/\p \dot{q}_i$. In general, one must use $p_i = \p \Ell/\p \dot{q}_i$.)
\item Solve for the $\dot{q}$'s in terms of the $p$'s and $q$'s.
\item Write down the Hamiltonian \HH\ as a function of the $p$'s and $q$'s. [Provided our coordinates are ``natural'' (relation between generalized coordinates and underlying Cartesians is independent of time), $\HH$ is just the total energy $\HH = T + U$, but when in doubt, use $\HH = \sum p_i \dot{q}_i - \Ell$. See Problems \ref{prob:HamJJ} and \ref{prob:HamKK}.]
\item Write down Hamilton's equations (\ref{eq:HamsEqsInMultiDim}).
\end{enumerate}
If you look back over the last example, you will see that the solution followed all of these six steps, and the same will be true of all later examples and problems. Before we do another example, let us compare these six steps with the corresponding steps in the Lagrangian approach. To set up Lagrange's equations, we follow the same first two steps (choose generalized coordinates and write down $T$ and $U$). Steps (3) and (4) are unnecessary, since we don't have to know the generalized momenta, nor to eliminate the $\dot{q}$'s in favor of the $p$'s. Finally, one must carry out the analogs of (5) and (6); namely, write down the Lagrangian and Lagrange's equations. Evidently, setting up the Hamiltonian approach involves two small extra steps [Steps (3) and (4) above] as compared to the Lagrangian. Although both steps are usually quite straightforward, this is undeniably a small disadvantage of Hamilton's formalism. Now, here is another example. \bigskip
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{eg} {\bf Hamilton's Equations for a Mass on a Cone}
\label{eg:MassOnCone}
\end{eg} %\vspace{-0.15in}
Consider a mass $m$ which is constrained to move on the frictionless surface of a vertical cone $\rho = c z$ (in cylindrical polar coordinates $\rho, \phi, z$ with $z>0$) in a uniform gravitational field $g$ vertically down (Figure \ref{fig:pfc13MassOnCone}). Set up Hamilton's equations using $z$ and $\phi$ as generalized coordinates. Show that for any given solution there are maximum and minimum heights $z_{\rm max}$ and $z_{\rm min}$ between which the motion is confined. Use this result to describe the motion of the mass on the cone. Show that for any given value of $z > 0$ there is a solution in which the mass moves in a circular path at fixed height $z$.
%PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP
\begin{figure}[hbtp]
\vspace{2.25in} \hspace*{2.0in}
\special{wmf:pfc13MassOnCone.wmf y=2.3in}
\vspace{-0.15in}
\caption{\small A mass $m$ is constrained to move on the surface of the cone shown. For clarity, the cone is shown truncated at the height of the mass, although it actually continues upward indefinitely.
}
\label{fig:pfc13MassOnCone}
\end{figure}
%ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp
Our generalized coordinates are $z$ and $\phi$, with $\rho$ determined by the constraint that the mass remain on the cone, $\rho = c z$. The kinetic energy is therefore
\[
T = \half m \! \left[\dot{\rho}^2 + (\rho \dot{\phi})^2 + \dot{z}^2 \right] =
\half m \! \left[( c^2 + 1) \dot{z}^2 + (c z \dot{\phi})^2 \right].
\]
The potential energy is of course $U = m g z$. The generalized momenta are
\be
p_z = \frac{\p T}{\p \dot{z}} = m(c^2 + 1) \dot{z}
\hspace{0.2in} \mbox{and} \hspace{0.2in}
p_\phi = \frac{\p T}{\p \dot{\phi}} = mc^2 z^2 \dot{\phi}.
\ee
These are trivially solved for $\dot{z}$ and $\dot{\phi}$, and we can write down the Hamiltonian,
\be
\HH = T + U = \frac{1}{2m} \left[ \frac{p_z \sqd}{(c^2 + 1)} + \frac{p_\phi \sqd}{c^2 z^2}
\right] + mgz.
\label{eq:HamForMassOnCone}
\ee
Hamilton's equations are now easily found: The two $z$ equations are
\be
\dot{z} = \frac{\p \HH}{\p p_z} = \frac{p_z}{m(c^2+1)} \hspace{0.3in} \mbox{and} \hspace{0.3in}
\dot{p}_z = -\frac{\p \HH}{\p z} = \frac{p_\phi\sqd}{m c^2 z^3} - mg.
\label{eq:pzdotForMassOnCone}
\ee
The two $\phi$ equations are
\be
\dot{\phi} = \frac{\p \HH}{\p p_\phi} = \frac{p_\phi}{mc^2z^2} \hspace{0.3in} \mbox{and} \hspace{0.3in}
\dot{p}_\phi = -\frac{\p \HH}{\p \phi} = 0
\ee
The last of these tells us, what we could well have guessed, that $p_\phi$, which is just the $z$ component of angular momentum, is constant.
The easiest way to see that, for any given solution, $z$ is confined between two bounds, $z_{\rm min}$ and $z_{\rm max}$, is to remember that the Hamiltonian function (\ref{eq:HamForMassOnCone}) is equal to the total energy, and that energy is conserved. Thus, for any given solution, (\ref{eq:HamForMassOnCone}) is equal to a fixed constant $E$. Now, the function \HH\ in (\ref{eq:HamForMassOnCone}) is the sum of three positive terms, and as $z \rightarrow \infty$ the last term tends to infinity. Since \HH\ must equal the fixed constant $E$, there must be a $z_{\rm max}$ which $z$ cannot exceed. In the same way, the second term in (\ref{eq:HamForMassOnCone}) approaches infinity as $z \rightarrow 0$; so there has to be a $z_{\rm min} > 0$ below which $z$ cannot go. In particular, this means that the mass can never fall all the way into the bottom of the cone at $z = 0$.\footnote
{
Two comments: It is easy to see that the second term in (\ref{eq:HamForMassOnCone}) is related to the centrifugal force; thus, we can say that the mass is held away from the bottom of the cone by the centrifugal force. Second, the one exception to this statement is if the angular momentum $p_\phi = 0$; in this case, the mass moves up and down the cone in the radial direction ($\phi$ constant) and {\em will} eventually fall to the bottom.
}
The motion of the mass on the cone is now easy to describe. It moves around the $z$ axis with constant angular momentum $p_\phi = mc^2 z^2 \dot{\phi}$. Since $p_\phi$ is constant, the angular velocity $\dot{\phi}$ varies --- increasing as $z$ gets smaller and decreasing as $z$ gets bigger. At the same time, the mass's height $z$ oscillates up and down between $z_{\rm min}$ and $z_{\rm max}$. (See Problems \ref{prob:HamI} and \ref{prob:HamK} for more details.)
To investigate the possibility of a solution in which the mass stays at a fixed height $z$, notice that this requires that $\dot{z} = 0$ for all time. This in turn requires that $p_z =0$ for all time, and hence $\dot{p}_z=0$. From the second of the $z$ equations (\ref{eq:pzdotForMassOnCone}), we see that $\dot{p}_z=0$ if and only if
\be
p_\phi = \pm \sqrt{m^2c^2gz^3}.
\ee
If, for any chosen initial height $z$, we launch the mass with $p_z = 0$ and $p_\phi$ equal to one of these two values (going either clockwise or counterclockwise), then since $\dot{p}_z = 0$, $p_z$ and hence $\dot{z}$ both remain zero, and the mass continues to move at its initial height around a horizontal circle.
\wxyz
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Ignorable Coordinates}
\label{sec:IgnorableCoords}
So far we have set up Hamilton's formalism and have seen that it is valid whenever Lagrange's is. The former enjoys almost all the advantages and disadvantages of the latter, when either is compared with the Newtonian formalism. But it is not yet clear that there are any significant advantages to using Hamilton instead of Lagrange, or vice versa. As I have already mentioned, in more advanced theoretical work, Hamilton's approach has some distinct advantages, and, I shall try to give some feeling for a few of these advantages in the next four sections.
In Chapter \ref{ch:Lagrange'sEquations}, we saw that if the Lagrangian \Ell\ happens to be independent of a coordinate $q_i$, then the corresponding generalized momentum $p_i$ is constant. [This followed at once from the Lagrange equation $\p \Ell/\p q_i = (d/dt)\p \Ell/\p \dot{q_i}$, which can be rewritten as $\p \Ell/\p q_i = \dot{p_i}$. Therefore, if $\p \Ell/\p q_i = 0$, it immediately follows that $\dot{p}_i = 0$.] When this happens, we say that the coordinate $q_i$ is {\bf ignorable}.
In the same way, if the Hamiltonian \HH\ is independent of $q_i$, it follows from the Hamilton equation $\dot{p}_i = -\p \HH/\p q_i$ that its conjugate momentum $p_i$ is a constant. We saw this in Equation (\ref{eq:HamiltonsThetaEqs}) of the last example, where \HH\ was independent of $\phi$, and the conjugate momentum $p_\phi$ (actually the angular momentum) was constant. The results of this and the last paragraph are in fact the {\em same} result, since it is easy to prove that $\p \Ell/\p q_i = -\p \HH/\p q_i$ (Problem \ref{prob:HamO}). Thus \Ell\ is independent of $q_i$ if and only if \HH\ is independent of $q_i$. If a coordinate $q_i$ is ignorable in the Lagrangian then it is also ignorable in the Hamiltonian and vice versa.
It is nevertheless true that the Hamiltonian formalism is more convenient for handling ignorable coordinates. To see this, let us consider a system with just two degrees of freedom and suppose that the Hamiltonian is independent of $q_2$. This means that the Hamiltonian depends on only three variables,
\be
\HH = \HH(q_1,p_1,p_2).
\label{eq:HamWithQ2Ignorable}
\ee
For example, the Hamiltonian (\ref{eq:HamForCentralForce}) for the central force problem has this property, being independent of the coordinate $\phi$. This means that $p_2 = k$, a constant that is determined by the initial conditions. Substitution of this constant into the Hamiltonian leaves
\[
\HH = \HH(q_1,p_1,k)
\]
which is a function of just the two variables $q_1$ and $p_1$, and the solution of the motion is reduced to a one-dimensional problem with this effectively one-dimensional Hamiltonian. More generally, if a system with $n$ degrees of freedom has an ignorable coordinate $q_i$, then solution of the motion in the Hamiltonian framework is exactly equivalent to a problem with $(n-1)$ degrees of freedom in which $q_i$ and $p_i$ can be entirely ignored. If there are several ignorable coordinates, the problem is correspondingly further simplified.
In the Lagrangian formalism, it is of course true that that if $q_i$ is ignorable, then $p_i$ is constant, but this does not lead to the same elegant simplification: Supposing again that the system has two degrees of freedom and that $q_2$ is ignorable, then corresponding to (\ref{eq:HamWithQ2Ignorable}) we would have
\[
\Ell = \Ell(q_1,\dot{q}_1,\dot{q}_2).
\]
Now, even though $q_2$ is ignorable and $p_2$ is a constant, it is not necessarily true that $\dot{q}_2$ is constant. Thus the Lagrangian does not reduce cleanly to a one-dimensional function that depends only on $q_1$ and $\dot{q}_1$. [For example, in the central-force problem, the Lagrangian has the form $\Ell(r, \dot{r}, \dot{\phi})$, but, even though $\phi$ is ignorable, $\dot{\phi}$ still varies as the motion proceeds, and the problem does not automatically reduce to a problem with one degree of freedom.\footnote
{
In this particular case, the difficulty is fairly easy to circumvent. In the discussion of Section \ref{sec:TheEquiv1DProblem}, we wrote the Lagrange radial equation (\ref{eq:RadEqWithThetaDot}) in terms of the variable $\dot{\phi}$ and then rewrote it eliminating $\dot{\phi}$ in favor of $p_\phi = \ell$, which is constant.
}
]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Lagrange's Equations vs. Hamilton's Equations}
\label{sec:LagrangeVsHamilton}
For a system with $n$ degrees of freedom, the Lagrangian formalism presents us with $n$ second-order differential equations for the $n$ variables $q_1, \cdots, q_n$. For the same system, the Hamiltonian formalism gives us $2n$ {\em first-order} differential equations for the $2n$ variables $q_1, \cdots, q_n,p_1, \cdots, p_n$. That Hamilton could recast $n$ second-order equations into $2n$ first-order equations is no particular surprise. In fact it is easy to see that {\em any} set of $n$ second-order equations can be recast in this way: For simplicity, let us consider the case that there is just one degree of freedom, so that Lagrange's approach gives just one second-order equation for the one coordinate $q$. This equation can be written as
\be
f(\ddot{q}, \dot{q}, q) = 0
\label{eq:f(Qddot,Qdot,Q)=0}
\ee
where $f$ is some function of its three arguments. Let us now define a second variable
\be
s = \dot{q}.
\label{eq:S=Qdot}
\ee
In terms of this second variable, $\ddot{q} = \dot{s}$ and our original differential equation (\ref{eq:f(Qddot,Qdot,Q)=0}) becomes
\be
f(\dot{s},s,q) = 0.
\label{eq:f(Sdot,S,Q)=0}
\ee
We have now replaced the one second-order equation (\ref{eq:f(Qddot,Qdot,Q)=0}) for $q$ with the two first-order equations (\ref{eq:S=Qdot}) and (\ref{eq:f(Sdot,S,Q)=0}) for $q$ and $s$.
Evidently, the fact that Hamilton's equations are first-order where Lagrange's are second-order is no particular improvement. However, the specific form of Hamilton's equations is in fact a big improvement. To see this, let us rewrite Hamilton's equations in a more streamlined form. First we can rewrite the first $n$ of Equations (\ref{eq:HamsEqsInMultiDim}) as
\be
\dot{q}_i = \frac{\p \HH}{\p p_i} = f_i({\bf q, p}) \hspace{0.5in}[i = 1, \cdots, n]
\ee
where each $f_i$ is some function of {\bf q} and {\bf p}, and we can combine these $n$ equations into a single $n$-dimensional equation
\be
\bf \dot{q} = f(q,p)
\label{eq:qdot=f(q,p)}
\ee
where the boldface $\bf f$ stands for the vector comprised of the $n$ functions $f_i = \p \HH/\p p_i$. In the same way we can rewrite the $n$ equations for the $\dot{p}_i$ in a similar form:
\be
\bf \dot{p} = g(q,p)
\label{eq:pdot=g(q,p)}
\ee
where the boldface $\bf g$ stands for the vector comprised of the $n$ functions $g_i = -\p \HH/\p q_i$. Finally, we can introduce a $2n$-dimensional vector
\be
{\bf z = (q,p)} = (q_1, \cdots, q_n, p_1, \cdots, p_n).
\label{eq:DefOfPhase-SpaceVector}
\ee
This {\bf phase-space vector} or {\bf phase point} $\bf z$ comprises all of the generalized coordinates {\em and} all of their conjugate momenta. Each value of $\bf z$ labels a unique point in phase space and identifies a unique set of initial conditions for our system. With this new notation, we can combine the two equations (\ref{eq:qdot=f(q,p)}) and (\ref{eq:pdot=g(q,p)}) into a single grand, $2n$-component equation of motion
\be
\bf \dot{z} = h(z)
\label{eq:zdot=h(z)}
\ee
where the function $\bf h$ is a vector comprising the $2n$ functions $f_1, \cdots, f_n$ and $g_1, \cdots, g_n$ of Equations (\ref{eq:qdot=f(q,p)}) and (\ref{eq:pdot=g(q,p)}).
Equation (\ref{eq:zdot=h(z)}) expresses Hamilton's equations as a first-order differential equation for the phase-space vector {\bf z}. Furthermore, it is a first-order equation with the especially simple form:\footnote
{
If the Hamiltonian was explicitly time-dependent, then (\ref{eq:zdot=h(z)}) would take the (still very simple) form ${\bf \dot{z} = h(z,}t)$. The form (\ref{eq:zdot=h(z)}) without any explicit time dependence is said to be {\em autonomous}.
}
\[
\mbox{(first derivative of {\bf z})} = \mbox{(function of {\bf z}).}
\]
A large part of the mathematical literature on differential equations is devoted to equations with this standard form, and it is a distinct advantage of the Hamiltonian formalism that Hamilton's equations --- unlike Lagrange's --- are automatically of this form.
Our combining of the $n$ position coordinates $\bf q$ with the $n$ momenta $\bf p$ to form a single phase-space vector $\bf z = (q,p)$ suggests a certain equality between the position and momentum coordinates in phase-space, and this suggestion proves correct. We have known since Chapter \ref{ch:Lagrange'sEquations} that one of the strengths of the Lagrangian formalism is its great flexibility with respect to coordinates: Any set of generalized coordinates ${\bf q} = (q_1, \cdots, q_n)$ can be replaced by a second set ${\bf Q} = (Q_1, \cdots, Q_n)$, where each of the new $Q_i$ is a function of the original $(q_1, \cdots, q_n)$,
\be
\bf Q = Q(q),
\label{eq:CoordTransfInConfigSpace}
\ee
and Lagrange's equations will be just as valid with respect to the new coordinates $\bf Q$ as they were with respect to the old $\bf q$.\footnote
{
Of course, this statement has to be qualified a little: The coordinates $\bf Q$ must be ``reasonable'' in the sense that each set $\bf Q$ determines a unique set $\bf q$ and vice versa, and the function $\bf Q(q)$ has to be suitably differentiable.
}
We can paraphrase this to say that Lagrange's equations are unchanged (or invariant) under any coordinate change in the $n$-dimensional configuration space defined by ${\bf q} = (q_1, \cdots, q_n)$. The Hamiltonian formalism shares this same flexibility --- Hamilton's equations are invariant under any coordinate change (\ref{eq:CoordTransfInConfigSpace}) in configuration space. However, the Hamiltonian formalism actually has a much greater flexibility and allows for certain coordinate changes in the $2n$-dimensional phase space. We can consider changes of coordinates of the form
\be
\bf Q = Q(q,p) \hspace{0.2in} \mbox{and} \hspace{0.2in} P = P(q,p)
\label{eq:CanonicalTransf}
\ee
that is, coordinate changes in which both the $q$'s and the $p$'s are intermingled. If the equations (\ref{eq:CanonicalTransf}) satisfy certain conditions, this change of coordinates is called a {\bf canonical transformation}, and it turns out that Hamilton's equations are invariant under these canonical transformations. Any further discussion of canonical transformations would carry us beyond the scope of this book, but you should be aware of their existence and that they are one of the properties that make the Hamiltonian approach such a powerful theoretical tool.\footnote
{
I should emphasize that there is no corresponding transformation in Lagrangian mechanics, which operates in the state space defined by the $2n$-dimensional vector $(\bf q,\dot{q})$. Since $\bf \dot{q}$ is defined as the time derivative of $\bf q$, there is no analog to (\ref{eq:CanonicalTransf}) in which the $q$'s and $\dot{q}$'s get intermingled.
}
Problems \ref{prob:HamQ} and \ref{prob:HamR} offer two examples of canonical transformations.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Phase-Space Orbits}
\label{sec:PhaseSpaceOrbits}
One can view the phase-space vector $\bf z = (q,p)$ of (\ref{eq:DefOfPhase-SpaceVector}) as defining the system's ``position'' in phase space. Any point ${\bf z}\so$ defines a possible initial condition (at any chosen time $t\so$), and Hamilton's equations (\ref{eq:zdot=h(z)}) define a unique {\bf phase-space orbit} or {\bf trajectory} which starts from ${\bf z}\so$ at $t\so$ and which the system follows as time progresses. Since phase space has $2n$ dimensions, the visualization of these orbits presents some challenges unless $n = 1$. For example, for a single unconstrained particle in three dimensions, $n = 3$, and the phase space is six-dimensional --- not something that most of us can visualize easily. There are various techniques, such as the \poinc\ section described in Section \ref{sec:PoincSections}, for viewing phase-space orbits in a subspace of fewer dimensions than the full phase space, but here I shall just give two examples of systems for which $n = 1$, and the phase space is therefore only two-dimensional.
Before we look at these examples, there is an important property of phase-space orbits that deserves mention right away: It is easy to see that no two different phase-space orbits can pass through the same point in phase space; that is, no two phase-space orbits can cross one another. For suppose two orbits pass through one and the same point ${\bf z}\so$, as in Figure \ref{fig:pfc13CrossingOrbits}.
%PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP
\begin{figure}[hbtp]
\vspace{1.2in} \hspace*{2.4in}
\special{wmf:pfc13CrossingOrbits.wmf y=1.3in}
\vspace{-0.2in}
\caption{\small One can imagine two orbits passing through the same point ${\bf z}\so$ in phase space. However, Hamilton's equations guarantee that for any given point ${\bf z}\so$, there is a unique orbit passing through ${\bf z}\so$, so the two orbits must in fact be the same.
}
\label{fig:pfc13CrossingOrbits}
\end{figure}
%ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp
Now, from Hamilton's equations (\ref{eq:zdot=h(z)}), it follows that for any point ${\bf z}\so$ there can be only one distinct orbit passing through ${\bf z}\so$. Therefore the two orbits passing through ${\bf z}\so$ have to be the same. Notice that this result excludes different orbits from passing through the same point {\em even at different times}: If one orbit passes through ${\bf z}\so$ today, then no different orbit can pass through ${\bf z}\so$ today, yesterday or tomorrow.\footnote
{
This is because our Hamiltonian is time-independent. If \HH\ is explicitly time-dependent, then we can only assert that no two orbits can pass through one point at the same time.
}
This result --- that no two phase-space orbits can cross --- places severe restrictions on the way in which these orbits are traced out in phase space. It has important consequences in, for example, the analysis of chaotic motion of Hamiltonian systems.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{eg} {\bf A One-Dimensional Harmonic Oscillator}
\end{eg} \vspace{-0.15in}
Set up Hamilton's equations for a one-dimensional simple-harmonic oscillator with mass $m$ and force constant $k$, and describe the possible orbits in the phase space defined by the coordinates $(x,p)$.
The kinetic energy is $T = \half m \dot{x}^2$ and the potential energy is $U = \half k x^2 = \half m \omega^2 x^2$, if we introduce the natural frequency $\omega = \sqrt{k/m}$. The generalized momentum is $p = \p T/\p \dot{x} = m\dot{x}$, and the Hamiltonian (written as a function of $x$ and $p$) is
\be
\HH = T + U = \frac{p^2}{2m} + \frac{1}{2} m \omega^2 x^2.
\label{eq:HamiltonianForSHO}
\ee
Thus, Hamilton's equations give
\[
\dot{x} = \frac{\p \HH}{\p p} = \frac{p}{m} \mbox{\hspace{0.2in} and \hspace{0.2in}}
\dot{p} = -\frac{\p \HH}{\p x} = -m \omega^2 x.
\]
The simplest way to solve these two equations is to eliminate $p$ and get the familiar second-order equation $\ddot{x} = -\omega^2 x$, with the equally familiar solution
\be
x = A \cos(\omega t -\delta) \mbox{\hspace{0.2in} and hence \hspace{0.2in}}
p = m\dot{x} = -m \omega A\sin(\omega t - \delta).
\label{eq:SHOPhaseSpaceOrbit}
\ee
Phase space for the one-dimensional oscillator is the two-dimensional space with coordinates $(x,p)$. In this space, the solution (\ref{eq:SHOPhaseSpaceOrbit}) is the parametric form for an ellipse, traced in the clockwise direction, as in Figure \ref{fig:pfc13SHOPhaseSpaceOrbit}, which shows two phase-space orbits for the cases that the oscillator started out from rest at $x = A$ (solid curve) and $x = A/2$ (dashed curve).
%PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP
\begin{figure}[hbtp]
\vspace{2.2in} \hspace*{1.8in}
\special{wmf:pfc13SHOPhaseSpaceOrbit.wmf y=2.8in}
\vspace{-0.55in}
\caption{\small The phase space for a one-dimensional harmonic oscillator is a plane, with axes labelled by $x$ (the position) and $p$ (the momentum), in which the point representing the state of motion traces a clockwise ellipse. There is a unique orbit through each phase point $(x,p)$. The outer orbit (solid curve) started from rest with $x = A$ and $p = 0$; the inner one started from $x = A/2$ and $p = 0$.
}
\label{fig:pfc13SHOPhaseSpaceOrbit}
\end{figure}
%ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp
That the orbits {\em have} to be ellipses follows from conservation of energy: The total energy is given by the Hamiltonian (\ref{eq:HamiltonianForSHO}), whose initial value (for the solid curve with $x=A$ and $p=0$) is $\half m \omega^2 A^2$. Thus conservation of energy implies that
\[
\frac{p^2}{2m} + \frac{1}{2} m \omega^2 x^2 = \frac{1}{2} m \omega^2 A^2
\]
or
\be
\frac{x^2}{A^2} + \frac{p^2}{(m \omega A)^2} = 1.
\label{eq:EqForEllipse}
\ee
This is the equation for an ellipse with semi-major and -minor axes $A$ and $m\omega A$, in agreement with (\ref{eq:SHOPhaseSpaceOrbit}).
It is perhaps worth following one of the phase-space orbits of Figure \ref{fig:pfc13SHOPhaseSpaceOrbit} in detail. For the solid curve, the motion starts from rest with $x$ at its maximum, at the point $x = A, p = 0$, shown as a dot in the figure. The restoring force causes $m$ to accelerate back towards $x = 0$, so that $x$ gets smaller while $p$ becomes increasingly negative. By the time $x$ has reached 0, $p$ has reached its largest negative value $p = -m \omega A$. The oscillator now overshoots the equilibrium point, so $x$ becomes increasingly negative, while $p$ is still negative but getting less so. By the time $x$ reaches $-A$, $p$ is again zero, and so on, until the oscillator gets back to its starting point $x=A, p=0$ and the cycle starts over again. Notice that, in agreement with our general argument, the two orbits shown in Figure \ref{fig:pfc13SHOPhaseSpaceOrbit} do not cross one another. In fact, it is easy to see that no two ellipses with the form (\ref{eq:EqForEllipse}) can have any point in common unless they have the same value of $A$ (in which case they are the {\em same} ellipse).
In this simple one-dimensional case, the phase-space plot doesn't tell us anything we couldn't learn from the simple solution $x = A \cos(\omega t - \delta)$, but I hope you will agree that it does show some details of the motion rather clearly.
\wxyz
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
If you have read Chapter \ref{ch:NonlinearMechanics}, you will recognize that a phase-space orbit is closely related to the state-space orbit described in Section \ref{sec:StateSpaceOrbits}. The only difference is that the former traces the system's evolution in the $(x,p)$ plane whereas the latter uses the $(x, \dot{x})$ plane. In the present case there is almost no difference, since for one-dimensional motion along the $x$ axis, $p$ is proportional to $\dot{x}$ (specifically, $p = m\dot{x}$). Thus the two kinds of plot are identical except that the former is stretched by a factor of $m$ in the vertical direction. Nevertheless, in the general $2n$-dimensional case, the spaces defined by $\bf (q,p)$ and by $\bf (q,\dot{q})$ can be very different. As we shall see in the next section, the phase-space plot has some elegant properties not shared by the state-space one.
It often happens that one needs to follow not just one orbit but several different orbits through phase space. For example, in the study of chaos we saw that it is of great interest to follow the evolution of two identical systems that are launched with slightly different initial conditions. If the motion is non-chaotic, then the two systems remain close together in phase space, but if the motion is chaotic they move apart so rapidly that their detailed motion is effectively unpredictable. In the next example, we look at four neighboring phase-space orbits of a particle falling under the influence of gravity. \medskip
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{eg} {\bf A Falling Body}
\label{eg:FallingBodyPhaseSpace}
\end{eg} \vspace{-0.1in}
Set up the Hamiltonian formalism for a mass $m$ constrained to move in a vertical line, subject only to the force of gravity. Use the coordinate $x$, measured downward from a convenient origin, and its conjugate momentum. Describe the phase-space orbits and, in particular sketch the orbits from time 0 to a later time $t$ for the following four different initial conditions at $t = 0$: \\
{\bf (a)}~$x\so = p\so = 0$, (that is, the mass is released from rest at $x = 0$);\\
{\bf (b)}~$x\so = X$, but $p\so = 0$, (the mass is released from rest at $x = X$);\\
{\bf (c)}~$x\so = X$ and $p\so = P$, (the mass is thrown from $x = X$ with initial momentum $p = P$);\\
{\bf (d)}~$x\so = 0$ and $p\so = P$, (the mass is thrown from $x = 0$ with initial momentum $p = P$).
The kinetic and potential energies are $T = \half m \dot{x}^2$ and $U = -m g x$. (Rememer that $x$ is measured downward.) The conjugate momentum is, of course, $p = m \dot{x}$ and the Hamiltonian is
\be
\HH = T + U = \frac{p^2}{2m} - m g x.
\label{eq:HamForFallingBody}
\ee
To find the shape of the phase-space orbits, we don't have to solve the equations of motion, since conservation of energy requires that they satisfy $\HH = $ const. For the Hamiltonian (\ref{eq:HamForFallingBody}), this defines a parabola with the form $x = kp^2 +$ const, with its symmetry axis on the $x$ axis.
To draw the four orbits asked for, it is helpful to solve the equations of motion
\[
\dot{x} = \frac{\p \HH}{\p p} = \frac{p}{m} \mbox{\hspace{0.2in} and \hspace{0.2in}}
\dot{p} = -\frac{\p \HH}{\p x} = m g.
\]
The second of these gives
\[
p = p\so + m g t
\]
and the first then gives
\[
x = x\so + \frac{p\so}{m}t + \frac{1}{2}g t^2
\]
--- both results that are very familiar from elementary mechanics. Putting in the given initial conditions, one gets the four curves shown in Figure \ref{fig:pfc13PhaseSpaceDroppedBody}.
%PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP
\begin{figure}[hbtp]
\vspace{2.5in} \hspace*{1.8in}
\special{wmf:pfc13PhaseSpaceDroppedBody.wmf y=3.0in}
\vspace{-0.55in}
\caption{\small Four different phase-space orbits for a body moving vertically under the influence of gravity, with position $x$ (measured vertically down) and momentum $p$. The four different initial states at time 0 are shown by the dots labeled $A\so, B\so, C\so,$ and $D\so$, with corresponding final states at a later time $t$ labeled $A, B, C,$ and $D$.
}
\label{fig:pfc13PhaseSpaceDroppedBody}
\end{figure}
%ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp
As expected, the four orbits $A\so A, \cdots, D\so D$ are parabolas, no one of which crosses any other. You can see that the initial rectangle $A\so B\so C\so D\so$ has evolved into a parallelogram $ABCD$. However, it is easy to show that the area of the parallelogram is the same as that of the original rectangle. (Same base, $A\so B\so = AB$, and same height. See Problem \ref{prob:HamS}.) We shall see in the next section that these two properties (changing shape but unchanging area) are general properties of all phase-space orbits. In particular, that the area does not change is an example of the important result known as Liouville's theorem. \vspace{-0.1in} \enlargethispage*{0.2in}
\wxyz
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Liouville's Theorem*}
\label{sec:LiouvillesTheorem}
\noi * {\footnotesize This section contains material that is more advanced than most other material in this book. In particular, it uses the divergence operator and divergence theorem of vector calculus. If you haven't met these ideas before, you could, if you wish, omit this section.}
\vspace{0.2in}
\noi In Example \ref{eg:FallingBodyPhaseSpace} we saw that one can use a plot of phase space to track the motion of several identical systems evolving from various different initial conditions. In many problems, especially those of statistical mechanics, one has occasion to track the motion of an enormous number of identical systems. The state of each system can be labeled by a dot in phase space, and, if the number of these dots is large enough, we can view the resulting swarm of dots as a kind of fluid, with a density $\rho$ measured in dots per volume of phase space. For example, in the statistical mechanics of an ideal gas, one wants to follow the motion of some $10^{23}$ identical molecules as they move inside a container. Each molecule is governed by the same Hamiltonian and moves in the same six-dimensional phase space with coordinates $(x, y, z, p_x, p_y, p_z)$. Thus the state of the system at any one time can be specified by giving the positions of $10^{23}$ dots in this phase space; these $10^{23}$ dots form a swarm whose motion can (for many purposes) be treated like that of a fluid. For most of this section, you could bear this example in mind, though in specific cases I shall often specialize to a system with just one spatial dimension and hence two dimensions of phase space.
The tracking of the motion of many identical systems by means of a cloud of dots in their phase space is illustrated in Figure \ref{fig:pfc13SwarmInPhaseSpace}.
%PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP
\begin{figure}[hbtp]
\vspace{2.3in} \hspace*{1.8in}
\special{wmf:pfc13SwarmInPhaseSpace.wmf y=3.0in}
\vspace{-0.75in}
\caption{\small The dots in the lower cloud label the states of some 300 identical systems at time $t\so$. As time progresses each dot moves through phase space in accordance with Hamilton's equations, and the whole cloud moves to the upper position.
}
\label{fig:pfc13SwarmInPhaseSpace}
\end{figure}
%ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp
This picture could be viewed as a schematic representation of a multi-dimensional phase space, but let us, for simplicity, think of it as the two-dimensional phase space, with the coordinates ${\bf z} = (q,p)$ of a system with one degree of freedom.
Each dot in the lower cloud represents the initial state of one system (for example, one molecule in a gas) by giving its position ${\bf z} = (q,p)$ in phase space at time $t\so$. Hamilton's equations determine the ``velocity'' with which each dot moves through phase space:
\be
\mbox{(phase-space velocity)} = {\bf \dot{z}} = (\dot{q}, \dot{p}) =
\left( \frac{\p \HH}{\p p},-\frac{\p \HH}{\p q} \right).
\ee
For each dot $\bf z$ in the initial cloud, there is a unique velocity $\bf \dot{z}$, and each dot moves off with its assigned velocity. In general, different dots will have different velocities, and the cloud can change its shape and orientation, as shown. On the other hand, as we shall prove shortly, the volume occupied by the cloud cannot change --- the result called Liouville's theorem.
To make this last idea more precise, we need to consider a closed surface in phase space such as that shown at the lower left of Figure \ref{fig:pfc13ClosedSurfaceInPhaseSpace}.
%PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP
\begin{figure}[hbtp]
\vspace{2.3in} \hspace*{1.8in}
\special{wmf:pfc13ClosedSurfaceInPhaseSpace.wmf y=3.0in}
\vspace{-0.75in}
\caption{\small As time progresses, the closed surface at the lower left moves through phase space. Any point that is initially inside the surface remains inside for all time.
}
\label{fig:pfc13ClosedSurfaceInPhaseSpace}
\end{figure}
%ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp
Each point on this closed surface defines a unique set of initial conditions and moves along the corresponding phase-space orbit as time advances. Thus the whole surface moves through phase space. It is easy to see that any point that is initially {\em inside} the surface must remain inside for all time: For suppose that such a point could move outside. Then at a certain moment it would have to cross the moving surface. At this moment we would have two distinct orbits crossing one another, which we know is impossible. By the same argument, any point that is initially outside the surface remains outside for all time. Thus the number of dots (representing molecules, for example) inside the surface is a constant in time. The main result of this section --- Liouville's theorem --- is that the volume of the moving closed surface in Figure \ref{fig:pfc13ClosedSurfaceInPhaseSpace} is constant in time. To prove this, we need to know the relationship between the rate of change of this kind of volume and the so-called {\em divergence} of the velocity vector.
\subsection*{Changing Volumes}
\label{page:ChangingVolumes}
The two mathematical results that we need hold in spaces with any number of dimensions. We shall need to apply them in the $2n$-dimensional phase space. Nevertheless, let us consider them first in the familiar context of our everyday three-dimensional space. We imagine a three-dimensional space filled with a moving fluid. The fluid at each point $\bf r$ is moving with velocity $\bf v $. For each position $\bf r$ there is a unique velocity $\bf v$, but $\bf v$ can, of course, have different values at different points $\bf r$; thus, we can write $\bf v = v(r)$. This is exactly analogous to the situation in phase space, where each phase point $\bf z$ is moving with a velocity that is uniquely determined by its position in phase space, $\bf \dot{z} = \dot{z}(z)$.
Let us now consider a closed surface $S$ in the fluid at a certain time $t$. We can imagine marking this surface with dye so that we can follow its motion as it moves with the fluid. The question we have to ask is this: If $V$ denotes the volume contained inside $S$, how fast does $V$ change as the fluid moves? Figure \ref{fig:pfc13ChangingVolume}(a) shows two successive positions of the surface $S$ at two successive moments a short time $\delta t$ apart.
%PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP
\begin{figure}[hbtp]
\vspace{4.1in} \hspace*{0.1in}
\special{wmf:pfc13ChangingVolume.wmf x=6.5in}
\vspace{-2.5in}
\caption{\small {\bf (a)} The surface $S$ moves with the fluid from its initial position (solid curve) at time $t$ to a new position (dashed curve) at time $t+\delta t$. The change in $V$ is just the volume between the two surfaces. {\bf (b)}~Enlarged view of the shaded volume of part~(a). The vector $\bf n$ is a unit vector normal to the surface $S$, pointing outward.
}
\label{fig:pfc13ChangingVolume}
\end{figure}
%ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp
The change in $V$ during the interval $\delta t$ is the volume between these two surfaces. To evaluate this, consider first the contribution of the small shaded volume in Figure \ref{fig:pfc13ChangingVolume}(a), which is enlarged in Figure \ref{fig:pfc13ChangingVolume}(b). This small volume is a cylinder whose base has an area $dA$. The side of the cylinder is given by the displacement ${\bf v}\, \delta t$, so the cylinder's height is the component of ${\bf v}\, \delta t$ normal to the surface. If we introduce a unit vector $\bf n$ in the direction of the outward normal to $S$, then the height of our cylinder is ${\bf n \scp v}\, \delta t$ and its volume is ${\bf n \scp v}\, \delta t \, dA$. The total change in the volume inside our surface $S$ is found by adding up all these small contributions to give
\be
\delta V = \int_S {\bf n \scp v}\, \delta t \, dA,
\label{eq:dV=Intndotvdt}
\ee
where the integral is a surface integral running over the whole of our closed surface $S$. Dividing both sides by $\delta t$ and letting $\delta t \rightarrow 0$, we get the first of our two key results:
\be
\frac{dV}{dt} = \int_S {\bf n \scp v} \, dA.
\label{eq:dV/dt=Intndotv}
\ee
Figure \ref{fig:pfc13ChangingVolume}(a) showed a fluid flow with the velocity $\bf v$ everywhere outward, as would be the case for the expanding air in a balloon whose temperature is rising. With $\bf v$ outward, the scalar product $\bf n \scp v$ is positive (since $\bf n$ was defined as the outward normal) and the integral (\ref{eq:dV/dt=Intndotv}) is positive, implying that $V$ is increasing, as it should. If $\bf v$ were everywhere inward (air in a balloon whose temperature is falling), then $\bf n \scp v$ would be negative and $V$ would be decreasing. In general, $\bf n \scp v$ can be positive on parts of the surface $S$ and negative on others. In particular, if the fluid is incompressible, so that $V$ can't change, then the contributions from positive and negative values of $\bf n \scp v$ must exactly cancel so that $dV/dt$ can be zero.
We have derived the result (\ref{eq:dV/dt=Intndotv}) for a surface $S$ and volume $V$ in three dimensions, but it is equally valid in any number of dimensions. In an $m$-dimensional space both of the vectors $\bf n$ and $\bf v$ have $m$ components and their scalar product is ${\bf n \scp v} = n_1 v_1 + \cdots + n_m v_m$. With this definition, the result (\ref{eq:dV/dt=Intndotv}) is valid whatever the value of $m$.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection*{The Divergence Theorem}
The second mathematical result that we need is called the {\bf divergence theorem} or {\bf Gauss's theorem}. This is one of the standard results of vector calculus (similar to Stokes' theorem that we used in Chapter \ref{ch:Energy}) and you can find its proof in any text on vector calculus,\footnote
{
See, for example, Mary Boas, {\em Mathematical Methods in the Physical Sciences} (Wiley, 1983), p.271.
}
although its proof is quite straightforward and instructive in various simple cases. (See Problem \ref{prob:HamCC}.) The theorem involves the vector operator called the divergence. For any vector $\bf v$, the {\bf divergence} of $\bf v$ is defined as
\be
\del \scp {\bf v} = \frac{\p v_x}{\p x} + \frac{\p v_y}{\p y} + \frac{\p v_z}{\p z}\, ;
\label{eq:DefnOfDiv}
\ee
here $\bf v$ can be any vector (a force or an electric field, for instance), but for us it will always be a velocity. If you have not met the divergence operator before, you might like to practice with some of Problems \ref{prob:HamX}, \ref{prob:HamY}, or \ref{prob:HamAA}.
The divergence theorem asserts that the surface integral in (\ref{eq:dV/dt=Intndotv}) can be expressed in terms of $\del \scp \bf v$:
\be
\int_S {\bf n \scp v} \, dA = \int_V \del \scp {\bf v} \, dV.
\label{eq:DivergenceThm}
\ee
Here the integral on the right is a volume integral over the volume $V$ interior to the surface $S$. This theorem is an amazingly powerful tool. It plays a crucial role in applications of Gauss's law of electrostatics. It often allows us to perform integrals that would otherwise be hard to evaluate. In particular, there are many interesting fluid flows with the property that $\del \scp {\bf v} = 0$; for such flows, the integral on the left may be very awkward to evaluate directly, but thanks to the divergence theorem we can see immediately that the integral is in fact zero. Since this is how we shall be using the divergence theorem, let us look at an example of such a flow right away.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{eg} {\bf A Shearing Flow}
\end{eg} \vspace{-0.15in}
The velocity of flow of a certain fluid is
\be
{\bf v} = k y {\bf \hat{x}}
\label{eq:ShearFlow}
\ee
where $k$ is a constant; that is, $v_x = k y$ and $v_y = v_z = 0$. Describe this flow and sketch the motion of a closed surface that starts out as a sphere. Evaluate the divergence $\del \scp \bf v$ and show that the volume enclosed by any closed surface $S$ moving with the fluid cannot change; that is, the fluid flows incompressibly.
%PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP
\begin{figure}[hbtp]
\vspace{2.0in} \hspace*{1.7in}
\special{wmf:pfc13ShearFlow.wmf x=2.5in}
\vspace{-0.6in}
\caption{\small The fluid flow described by (\ref{eq:ShearFlow}) is a laminar, shearing flow. The planes parallel to the plane $y = 0$ all move rigidly in the $x$ direction with speed proportional to $y$. This shearing motion stretches the sphere into an ellipse.
}
\label{fig:pfc13ShearFlow}
\end{figure}
%ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp
The velocity $\bf v$ is everywhere in the $x$ direction and depends only on $y$. Thus all the points in any plane $y =$ constant move like a sliding rigid plate --- a pattern called laminar flow.\footnote
{
From the latin {\em lamina} meaning a thin layer or plate, from which we also get the verb ``to laminate.''
}
The speed increases with $y$, so each plane moves a little faster than the planes below it, in a {\em shearing motion}, as indicated by the three thin arrows in Figure \ref{fig:pfc13ShearFlow}. If we consider a closed surface moving with the fluid and initially spherical, then its top will be dragged along a little faster than its bottom and it will be stretched into an ellipsoid of ever increasing eccentricity as shown.
We can easily evaluate $\del \scp \bf v$ using the definition (\ref{eq:DefnOfDiv})
\be
\del \scp {\bf v} = \frac{\p v_x}{\p x} + \frac{\p v_y}{\p y} + \frac{\p v_z}{\p z} =
\frac{\p ky}{\p x} +0+0 = 0.
\ee
Now, combining our two results (\ref{eq:dV/dt=Intndotv}) and (\ref{eq:DivergenceThm}), we see that the rate of change of the volume inside any closed surface is
\be \fbox{$ \hspace{0.2in} \ds
\frac{dV}{dt} = \int_V \del \scp {\bf v} \, dV. \hspace{0.2in} $}
\label{eq:dV/dt=IntDivvdV}
\ee
Since we have shown that $\del \scp {\bf v} = 0$ everywhere, it follows that $dV/dt = 0$ and the volume inside any closed surface moving with the fluid is constant for the flow of (\ref{eq:ShearFlow}).
\wxyz
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
If you have never met the divergence theorem before, you might want to try one or both of the Problems \ref{prob:HamZ} and \ref{prob:HamCC}. Here let me say just one more thing about the significance of $\del \scp \bf v$. If we apply (\ref{eq:dV/dt=IntDivvdV}) to a sufficiently small volume $V$, then $\del \scp \bf v$ will be approximately constant throughout the region of integration, and the right side of (\ref{eq:dV/dt=IntDivvdV}) becomes just $(\del \scp {\bf v})V$ and (\ref{eq:dV/dt=IntDivvdV}) itself implies that
\[
\del \scp {\bf v} = \frac{1}{V} \frac{dV}{dt}
\]
for any small volume $V$. Since $dV/dt$ can be called the outward flow of $\bf v$, we can say that $\del \scp \bf v$ is the {\em outward flow per volume}. If $\del \scp \bf v$ is positive at a point $\bf r$, then there is an outward flow around $\bf r$ and any small volume around $\bf r$ is expanding (like the gas in a balloon that is heating up); if $\del \scp \bf v$ is negative, then there is an inward flow and any small volume around $\bf r$ is contracting (like the gas in a balloon that is cooling down). In our example, $\del \scp \bf v$ was zero, and any volume moving with the fluid was constant.
The divergence generalizes easily to any number of dimensions. In an $m$-dimensional space with coordinates $(x_1, \cdots, x_m)$ the divergence of a vector ${\bf v} = (v_1, \cdots, v_m)$ is defined as
\[
\del \scp {\bf v} = \frac{\p v_1}{\p x_1} + \cdots + \frac{\p v_m}{\p x_m}
\]
and, with these definitions, the crucial result (\ref{eq:dV/dt=IntDivvdV}) takes exactly the same form, except that the integral is an integral over an $m$-dimensional region with volume element $dV = dx_1\,dx_2 \cdots dx_m$.
\subsection*{Liouville's Theorem}
We are finally ready to prove the main goal of this section --- Liouville's theorem. This is a theorem about motion in phase space, the $2n$-dimensional space with coordinates ${\bf z = (q,p)} = (q_1, \cdots, q_n,p_1, \cdots, p_n)$. To simplify the notation, I shall consider just a system with one degree of freedom, so that $n=1$ and the phase space is just two-dimensional with phase points ${\bf z} = (q,p)$. The general case goes through in almost exactly the same way, as you can check for yourself by doing Problem \ref{prob:HamDD}.
Each phase point ${\bf z} = (q,p)$ moves through the 2-dimensional phase space in accordance with Hamilton's equations, with velocity
\be
{\bf v}= {\bf \dot{z}} = (\dot{q}, \dot{p}) =
\left( \frac{\p \HH}{\p p},-\frac{\p \HH}{\p q} \right).
\label{eq:PhaseVelInTermsOfHam}
\ee
We consider an arbitrary closed surface $S$ moving through phase space with the phase points, as was illustrated in Figure \ref{fig:pfc13ClosedSurfaceInPhaseSpace}. The rate at which the volume inside $S$ changes is given by (\ref{eq:dV/dt=IntDivvdV}), where now the volume is a two-dimensional volume (really an area) and
\be
\del \scp {\bf v} = \frac{\p \dot{q}}{\p q} + \frac{\p \dot{p}}{\p p} =
\frac{\p}{\p q} \left(\frac{\p \HH}{\p p}\right) +
\frac{\p}{\p p} \left(-\frac{\p \HH}{\p q}\right) = 0,
\label{eq:LiouvilleDivv=0}
\ee
which is zero because the order of the two differentiations in the double derivatives is immaterial. Since $\del \scp {\bf v} = 0$, it follows that $dV/dt = 0$, and we have proved that the volume $V$ enclosed by any closed surface is a constant as the surface moves around in phase space. This is {\bf Liouville's theorem}.
There is another way to state Liouville's theorem: We saw before that the number $N$ of dots, representing identical systems, inside any given volume $V$ cannot change. (No dot can cross the boundary $S$ from the inside to the outside or vice versa.) We have now seen that the volume $V$ cannot change. Therefore, the density of dots, $\rho = N/V$ cannot change either. This statement is sometimes paraphrased to say that the cloud of dots moves through phase space like an incompressible fluid. However, it is important to be aware what this statement means. The density $\rho$ can, of course, be different at different phase points ${\bf z} = (q,p)$; all we are claiming is that as we follow a phase point along its orbit, the density at this point does not change.
Unfortunately we cannot pursue here the consequences of Liouville's theorem, but I can just mention one example: We saw in Chapter \ref{ch:NonlinearMechanics} that when motion is chaotic, two identical systems that start out with nearly identical initial conditions move rapidly apart in phase space. Thus if we consider a small initial volume in phase space, such as is shown in Figure \ref{fig:pfc13ClosedSurfaceInPhaseSpace}, and if the motion is chaotic, then at least some pairs of points inside the volume must move rapidly apart. But we have now seen that the total volume $V$ cannot change. Therefore, as the volume grows in one direction, it must contract in another direction, becoming something like a cigar. Now it frequently happens that the region in which the phase points can move is bounded. (For example, conservation of energy has this effect for the harmonic oscillator of Figure \ref{fig:pfc13SHOPhaseSpaceOrbit}.) In this case, as the volume $V$ gets longer and thinner, it has to become intricately folded in on itself, adding another twist to the already fascinating story of chaotic motion.
Finally, a couple of points on the validity of Liouville's theorem: First, in all of the examples of this chapter, we have assumed that the Hamiltonian is not explicitly dependent on time, $\p \HH/\p t = 0$, and that the forces are conservative and the coordinates ``natural,'' so that $\HH = T + U$. However, none of these assumptions is necessary for the truth of Liouville's theorem. The proof given in this section depends only on the validity of Hamilton's equations, and any system which obeys Hamilton's equations also obeys Liouville's theorem. For example, a charged particle in an electromagnetic field obeys Hamilton's equations (Problem \ref{prob:HamHH}) and hence also Liouville's theorem, even though $\p \HH/\p t$ may be nonzero and \HH\ is certainly not equal to $T + U$. Second, Liouville's theorem applies to the Hamiltonian phase space with coordinates $({\bf q,p})$, and there is no corresponding theorem for the Lagrangian state space with coordinates $({\bf q,\dot{q}})$. This is one of the most important advantages of the Hamiltonian over the Lagrangian approach.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{\small
\section{Problems for Chapter \ref{ch:HamiltonianMechanics}}
\forsec{sec:HamInOneDim}{Hamilton's Equations for One-Dimensional Systems}
\bpr \st [13a, old 13.1]
\label{prob:13a}
Find the Lagrangian, the generalized momentum, and the Hamiltonian for a free particle (no forces at all) confined to move along the $x$ axis. (Use $x$ as your generalized coordinate.) Find and solve Hamilton's equations.
\epr
\bpr \st [13b, old 13.2]
\label{prob:13b}
Consider a mass $m$ constrained to move in a vertical line under the influence of gravity. Using the coordinate $x$ measured vertically down from a convenient origin $O$, write down the Lagrangian \Ell\ and find the generalized momentum $p = \p \Ell/\p \dot{x}$. Find the Hamiltonian \HH\ as a function of $x$ and $p$, and write down Hamilton's equations of motion. (It is too much to hope with a system this simple that you would learn anything new by using the Hamiltonian approach, but do check that the equations of motion make sense.)
\label{pr:HamA}
\epr
\bpr \st [13c, old 13.3]
\label{prob:13c}
Consider the Atwood machine of Figure \ref{fig:pfc13AtwoodMachine2}, but suppose that the pulley is a uniform disc of mass $M$ and radius $R$. Using $x$ as your generalized coordinate, write down the Lagrangian, the generalized momentum $p$, and the Hamiltonian $\HH = p \dot{x} - \Ell$. Find Hamilton's equations and use them to find the acceleration~$\ddot{x}$.
\epr
\bpr \st [13d, old 13.4]
\label{prob:13d}
The Hamiltonian \HH\ is always given by $\HH = p q - \Ell$ (in one dimension), and this is the form you should use if in doubt. However, if your generalized coordinate $q$ is ``natural'' (relation between $q$ and the underlying Cartesian coordinates is independent of time) then $\HH = T + U$, and this form is almost always easier to write down. Therefore, in solving any problem you should quickly check to see if the generalized coordinate is ``natural,'' and if it is you can use the simpler form $\HH = T + U$. For the Atwood machine of Example \ref{eg:AtwoodMachineHamilton} (page \pageref{eg:AtwoodMachineHamilton}), check that the generalized coordinate was ``natural.'' [{\em Hint}: There is one generalized coordinate $x$ and two underlying Cartesian coordinates $x$ and $y$. You have only to write equations for the two Cartesians in terms of the one generalized coordinate and check that they don't involve the time, so it's safe to use $\HH = T + U$. This is ridiculously easy!]
\label{prob:HamII}
\epr
\bpr \sst [13e, old 13.5]
\label{prob:13e}
A bead of mass $m$ is threaded on a frictionless wire that is bent into a helix with cylindrical polar coordinates $(\rho, \phi, z)$ satisfying $z = c \phi$ and $\rho = R$, with $c$ and $R$ constants. The $z$ axis points vertically up and gravity vertically down. Using $\phi$ as your generalized coordinate, write down the kinetic and potential energies, and hence the Hamiltonian \HH\ as a function of $\phi$ and its conjugate momentum $p$. Write down Hamilton's equations and solve for $\ddot{\phi}$ and hence $\ddot{z}$. Explain your result in terms of Newtonian mechanics and discuss the special case that $R = 0$.
\epr
\bpr \sst[13g, old 13.7]
\label{prob:13g}
In discussing the oscillation of a mass on the end of a spring , we almost always ignore the mass of the spring. Set up the Hamiltonian \HH\ for a mass $m$ on a spring (force constant $k$) whose mass $M$ is {\em not} negligible, using the extension $x$ of the spring as the generalized coordinate. Solve Hamilton's equations and show that the mass oscillates with angular frequency $\omega = \sqrt{k/(m + M/3)}$. That is, the effect of the spring's mass is to add $M/3$ to $m$. (Assume that the spring's mass is distributed uniformly and that it stretches uniformly: If the free end has extended by a distance $x$, then the midpoint has moved a distance $x/2$ and so on.)
\epr
\bpr \ssst [13f, old 13.6]
\label{prob:13f}
A roller coaster of mass $m$ moves along a frictionless track that lies in the $xy$ plane ($x$ horizontal and $y$ vertically up). The height of the track above the ground is given by $y = h(x)$. {\bf (a)}~Using $x$ as your generalized coordinate, write down the Lagrangian, the generalized momentum $p$, and the Hamiltonian $\HH = p \dot{x} - \Ell$ (as a function of $x$ and $p$). {\bf (b)}~Find Hamilton's equations and show that they agree with what you would get from the Newtonian approach. [{\em Hint}: You know from Section \ref{sec:NonLinear1DSystems}, that Newton's second law takes the form $F_{\rm tang} = m \ddot{s}$, where $s$ is the distance measured along the track. Rewrite this as an equation for $\ddot{x}$ and show that you get the same result from Hamilton's equations.]
\epr
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\forsec{sec:HamInSeveralDims}{Hamilton's Equations in Several Dimensions}
\bpr \st [13h, old 13.8]
\label{prob:13h}
Find the Lagrangian, the generalized momenta, and the Hamiltonian for a free particle (no forces at all) moving in three dimensions. (Use $x,y,z$ as your generalized coordinates.) Find and solve Hamilton's equations.
\epr
\bpr \st [13i, old 13.9]
\label{prob:13i}
Set up the Hamiltonian and Hamilton's equations for a projectile of mass $m$, moving in a vertical plane and subject to gravity but no air resistance. Use as your coordinates $x$ measured horizontally and $y$ measured vertically up. Comment on each of the four equations of motion.
\epr
\bpr \st [13j, old 13.10]
\label{prob:13j}
Consider a particle of mass $m$ moving in two dimensions, subject to a force ${\bf F} = -k x {\bf \hat{x}} + K {\bf \hat{y}}$, where $k$ and $K$ are positive constants. Write down the Hamiltonian and Hamilton's equations, using $x$ and $y$ as generalized coordinates. Solve the latter and describe the motion.
\epr
\bpr \st [13k, old 13.11]
\label{prob:13k}
The simple form $\HH = T + U$ is only true if your generalized coordinates are ``natural'' (relation betweeen generalized and underlying Cartesian coordinates is independent of time). If the generalized coordinates are not ``natural,'' you must use the definition $\HH = \sum p_i \dot{q}_i - \Ell$. To illustrate this point, consider the following: Two children are playing catch inside a railroad car that is moving with varying speed $V$ along a straight horizontal track. For generalized coordinates you can use the position $(x,y,z)$ of the ball relative to a point fixed in the car, but in setting up the Hamiltonian you must use coordinates in an inertial frame --- a frame fixed to the ground. Find the Hamiltonian for the ball and show that it is not equal to $T + U$ (neither as measured in the car, nor as measured in the ground-based frame.)
\label{prob:HamJJ}
\epr
\bpr \st [13l, old 13.12]
\label{prob:13l}
Same as Problem \ref{prob:HamJJ}, but use the following system: A bead of mass $m$ is threaded on a frictionless, straight rod, which lies in a horizontal plane and is forced to spin with constant angular velocity $\omega$ about a vertical axis through the midpoint of the rod. Find the Hamiltonian for the bead and show that it is not equal to $T + U$.
\label{prob:HamKK}
\epr
\bpr \sst [13m, old 13.13]
\label{prob:13m}
Consider a particle of mass $m$ constrained to move on a frictionless cylinder of radius $R$, given by the equation $\rho = R$ in cylindrical polar coordinates $(\rho, \phi, z)$. The mass is subject to just one external force, ${\bf F} = -k r {\bf \hat{r}}$, where $k$ is a positive constant, $r$ is its distance from the origin and $\bf \hat{r}$ is the unit vector pointing away from the origin, as usual. Using $z$ and $\phi$ as generalized coordinates, find the Hamiltonian \HH. Write down and solve Hamilton's equations and describe the motion.
\epr
\bpr \sst [13n, old 13.14]
\label{prob:13n}
Consider the mass confined to the surface of a cone described in Example \ref{eg:MassOnCone} (page \pageref{eg:MassOnCone}). We saw there that there have to be maximum and minimum heights $z_{\rm max}$ and $z_{\rm min}$, beyond which the mass cannot stray. When $z$ is a maximum or minimum, it must be that $\dot{z} = 0$. Show that this can happen if and only if the conjugate momentum $p_z = 0$, and use the equation $\HH = E$, where \HH\ is the Hamiltonian function (\ref{eq:HamForMassOnCone}), to show that, for a given energy $E$, this occurs at exactly two values of $z$. [{\em Hint}: Write down the function \HH\ for the case that $p_z = 0$ and sketch its behavior as a function of $z$ for $00$. Sketch and describe the phase-space orbits.
\epr
\bpr \sst [13aa, old 13.27]
\label{prob:13aa}
Figure \ref{fig:pfc13PhaseSpaceDroppedBody} shows some phase-space orbits for a mass in free fall. The points $A\so,B\so,C\so,D\so$ represent four different possible initial states at time 0, and $A,B,C,D$ are the corresponding states at a later time. Write down the position $x(t)$ and momentum $p(t)$ as functions of $t$ and use these to prove that $ABCD$ is a parallelogram with area equal to the rectangle $A\so B\so C\so D\so$. [This is an example of Liouville's theorem.]
\label{prob:HamS}
\epr
\bpr \sst [13ab, old 13.28]
\label{prob:13ab}
Consider a mass $m$ confined to the $x$ axis and subject to a force $F_x = k x$ where $k > 0$. {\bf (a)}~Write down and sketch the potential energy $U(x)$ and describe the possible motions of the mass. (Distinguish between the cases that $E>0$ and $E<0$.) {\bf (b)}~Write down the Hamiltonian $\HH(x,p)$, and describe the possible phase-space orbits for the two cases $E>0$ and $E<0$. (Remember that the function $\HH(x,p)$ must equal the constant energy $E$.) Explain your answers to part (b) in terms of those to part (a).
\epr
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\forsec{sec:LiouvillesTheorem}{Liouville's Theorem*}
\bpr \st [13ac, old 13.29]
\label{prob:13ac}
Figure \ref{fig:pfc13ShearFlow} shows an initially spherical volume getting stretched into an ellipsoid by the shearing flow (\ref{eq:ShearFlow}). Make a similar sketch for a volume that is initially spherical and centered on the origin.
\epr
\bpr \st [13ad, old 13.30]
\label{prob:13ad}
Figure \ref{fig:pfc13ChangingVolume} shows a fluid flow where the flow is everywhere outward (at least for all points on the surface $S$ shown). This means that all contributions to the change $\delta V$ in volume are positive, and $V$ is definitely increasing. Sketch the corresponding picture for the case that the flow is outward on the upper part of $S$ and inward on the lower part. Explain clearly why the contributions ${\bf n \scp v}\, \delta t \, dA$ to the change in $V$ from the lower part of $S$ are {\em negative}, and hence that $\delta V$ can be of either sign, depending on whether the positive contributions outweigh the negative or vice versa.
\epr
\bpr \st [13ae, old 13.31]
\label{prob:13ae}
Evaluate the three-dimensional divergence $\del \scp \bf v$ for each of the following vectors: {\bf (a)}~${\bf v} = k {\bf r}$, \hspace{0.05in} {\bf (b)}~${\bf v} = k(z,x,y)$, \hspace{0.05in} {\bf (c)}~${\bf v} = k(z,y,x)$, \hspace{0.05in} {\bf (d)}~${\bf v} = k(x,y,-2z)$, where ${\bf r} = (x,y,z)$ is the usual position vector and $k$ is a constant.
\label{prob:HamX}
\epr
\bpr \sst [13af, old 13.32]
\label{prob:13af}
Evaluate the three-dimensional divergence $\del \scp \bf v$ for each of the following vectors: {\bf (a)}~${\bf v} = k \bf \hat{x}$, \hspace{0.05in} {\bf (b)}~${\bf v} = k x \bf \hat{x}$, \hspace{0.05in} {\bf (c)}~${\bf v} = k y \bf \hat{x}$. We know that $\del \scp \bf v$ represents the net outward flow associated with $\bf v$. In those cases where you found $\del \scp \bf v = 0$, make a simple sketch to illustrate that the outward flow is zero; in those cases where you found $\del \scp \bf v \neq 0$, make a sketch to show why and whether the outflow is positive or negative.
\label{prob:HamY}
\epr
\bpr \sst [13ag, old 13.33]
\label{prob:13ag}
The divergence theorem is a remarkable result, relating the {\em surface} integral that gives the flow of $\bf v$ out of a closed surface $S$ to the {\em volume} integral of $\del \scp \bf v$. Occasionally it is easy to evaluate both of these integrals and one can check the validity of the theorem. More often, one of the integrals is much easier to evaluate than the other, and the divergence theorem then gives one a slick way to evaluate a hard integral. The following exercises illustrate both of these situations. {\bf (a)}~Let ${\bf v} = k {\bf r}$, where $k$ is a constant and let $S$ be a sphere of radius $R$ centered on the origin. Evaluate the left side of the divergence theorem (\ref{eq:DivergenceThm}) (the surface integral). Next calculate $\del \scp \bf v$ and use this to evaluate the right side of (\ref{eq:DivergenceThm}) (the volume integral). Show that the two agree. {\bf (b)}~ Now use the same velocity $\bf v$, but let $S$ be a sphere {\em not} centered on the origin. Explain why the surface integral is now hard to evaluate directly, but don't actually do it. Instead, find its value by doing the volume integral. (This second route should be no harder than before.)
\label{prob:HamZ}
\epr
\bpr \sst [13ah, old 13.34]
\label{prob:13ah}
{\bf (a)} Evaluate $\del \scp \bf v$ for ${\bf v} = k {\bf \hat{r}}/r^2$ using rectangular coordinates. (Note that ${\bf \hat{r}}/r^2 = {\bf r}/r^3$.) {\bf (b)}~Inside the back cover, you will find expressions for the various vector operators (divergence, gradient, etc.) in polar coordinates. Use the expression for the divergence in spherical polar coordinates to confirm your answer to part (a). (Take $r \neq 0$.)
\label{prob:HamAA}
\epr
\bpr \sst [13ai, old 13.35]
\label{prob:13ai}
A beam of particles is moving along an accelerator pipe in the $z$ direction. The particles are uniformly distributed in a cylindrical volume of length $L\so$ (in the $z$ direction) and radius $R\so$. The particles have momenta uniformly distributed with $p_z$ in an interval $p\so \pm \Delta p_z$ and the transverse momentum $p_{\bot}$ inside a circle of radius $\Delta p_{\bot}$. To increase the particles' spatial density, the beam is focused by electric and magnetic fields, so that the radius shrinks to a smaller value $R$. What does Liouville's theorem tell you about the spread in the transverse momentum $p_{\bot}$ and the subsequent behavior of the radius $R$? (Assume that the focusing does not affect either $L\so$ or $\Delta p_z$.)
\epr
\bpr \sst [13aj, old 13.36]
\label{prob:13aj}
Prove Liouville's theorem in the $2n$-dimensional phase space of a system with $n$ degrees of freedom. You can follow closely the argument around Equations (\ref{eq:PhaseVelInTermsOfHam}) and (\ref{eq:LiouvilleDivv=0}). The only difference is that now the phase velocity $\bf v = \dot{z}$ is a $2n$-dimensional vector and $\del \scp \bf v$ is a $2n$-dimensional divergence.
\label{prob:HamDD}
\epr
\bpr \ssst [13ak, old 13.37]
\label{prob:13ak}
The general proof of the divergence theorem
\be\int_S {\bf n \scp v} \, dA = \int_V \del \scp {\bf v} \, dV
\label{eq:DivergenceThm2}
\ee
is fairly complicated and not especially illuminating. However, there are a few special cases where it is reasonably simple and quite instructive. Here is one: Consider a rectangular region bounded by the six planes $x= X$ and $X+A$, $y = Y$ and $Y+B$, and $z= Z$ and $Z+C$, with total volume $V = ABC$. The surface $S$ of this region is made up of six rectangles that we can call $S_1$ (in the plane $x=X$), $S_2$ (in the plane $x = X+A$), and so on. The surface integral on the left of (\ref{eq:DivergenceThm2}) is then the sum of six integrals, one over each of the rectangles $S_1$, $S_2$, etc. {\bf (a)}~Consider the first two of these integrals and show that
\[
\int_{S_1} \! {\bf n \scp v} \, dA + \int_{S_2} \! {\bf n \scp v} \, dA =
\int_Y^{Y+B} \!\! dy \int_Z^{Z+C} \!\! dz \, \mbox{\large [}v_x(X+A,y,z) - v_x(X,y,z)\mbox{\large ]}.
\]
{\bf (b)}~Show that the integrand on the right can be rewritten as an integral of $\p v_x/\p x$ over $x$ running from $x = X$ to $x = X+A$. {\bf (c)}~Substitute the result of part (b) into part (a), and write down the corresponding results for the two remaining pairs of faces. Add these results to prove the divergence theorem (\ref{eq:DivergenceThm2}).
\label{prob:HamCC}
\epr
}