Subsections


D.3 Lagrangian mechanics

This note gives the derivations for the addendum on the Lagrangian equations of motion.


D.3.1 Lagrangian equations of motion

To derive the nonrelativistic Lagrangian, consider the system to be build up from elementary particles numbered by an index $j$. You may think of these particles as the atoms you would use if you would do a molecular dynamics computation of the system. Because the system is assumed to be fully determined by the generalized coordinates, the position of each individual particle is fully fixed by the generalized coordinates and maybe time. (For example, it is implicit in a solid body approximation that the atoms are held rigidly in their relative position. Of course, that is approximate; you pay some price for avoiding a full molecular dynamics simulation.)

Newton’s second law says that the motion of each individual particle $j$ is governed by

\begin{displaymath}
m_j \frac{{\rm d}^2 {\skew0\vec r}_j}{{\rm d}t^2} =
- \frac{\partial V}{\partial {\skew0\vec r}_j} + \vec F'_j
\end{displaymath}

where the derivative of the potential $V$ can be taken to be its gradient, if you (justly) object to differentiating with respect to vectors, and $\vec{F}'_j$ indicates any part of the force not described by the potential.

Now consider an infinitesimal virtual displacement of the system from its normal evolution in time. It produces an infinitesimal change in position $\delta{\skew0\vec r}_j(t)$ for each particle. After such a displacement, ${\skew0\vec r}_j+\delta{\skew0\vec r}_j$ of course no longer satisfies the correct equations of motion, but the kinetic and potential energies still exist.

In the equation of motion for the correct position ${\skew0\vec r}_j$ above, take the mass times acceleration to the other side, multiply by the virtual displacement, sum over all particles $j$, and integrate over an arbitrary time interval:

\begin{displaymath}
0 = \int_{t_1}^{t_2} \sum_j \left[- m_j \frac{{\rm d}^2 {\...
..._j}
+ \vec F'_j\right]\cdot\delta{\skew0\vec r}_j{\,\rm d}t
\end{displaymath}

Multiply out and integrate the first term by parts:

\begin{displaymath}
0 = \int_{t_1}^{t_2} \sum_j
\left[
m_j \frac{{\rm d}{\...
..._j
+ \vec F'_j \delta {\skew0\vec r}_j
\right] {\,\rm d}t
\end{displaymath}

The virtual displacements of interest here are only nonzero over a limited range of times, so the integration by parts did not produce any end point values.

Recognize the first two terms within the brackets as the virtual change in the Lagrangian due to the virtual displacement at that time. Note that this requires that the potential energy depends only on the position coordinates and time, and not also on the time derivatives of the position coordinates. You get

\begin{displaymath}
0 = \delta \int_{t_1}^{t_2} {\cal L}{\,\rm d}t
+ \int_{t...
... \left[\vec F'_j\cdot\delta{\skew0\vec r}_j\right] {\,\rm d}t
\end{displaymath} (D.3)

In case that the additional forces $\vec{F}'_j$ are zero, this produces the action principle: the time integral of the Lagrangian is unchanged under infinitesimal virtual displacements of the system, assuming that they vanish at the end points of integration. More generally, for the virtual work by the additional forces to be zero will require that the virtual displacements respect the rigid constraints, if any. The infinite work done in violating a rigid constraint is not modeled by the potential $V$ in any normal implementation.

Unchanging action is an integral equation involving the Lagrangian. To get ordinary differential equations, take the virtual change in position to be that due to an infinitesimal change $\delta{q}_k(t)$ in a single generic generalized coordinate. Represent the change in the Lagrangian in the expression above by its partial derivatives, and the same for $\delta{\skew0\vec r}_j$:

\begin{displaymath}
0 =
\int_{t_1}^{t_2}
\left[
\frac{\partial{\cal L}}{...
...al{\skew0\vec r}_j}{\partial q_k}\delta q_k\right] {\,\rm d}t
\end{displaymath}

The integrand in the final term is by definition the generalized force $Q_k$ multiplied by $\delta{q}_k$. In the first integral, the second term can be integrated by parts, and then the integrals can be combined to give

\begin{displaymath}
0 =
\int_{t_1}^{t_2}
\left[
\frac{\partial{\cal L}}{...
...artial\dot q_k}\right)
+ Q_k
\right]\delta q_k {\,\rm d}t
\end{displaymath}

Now suppose that there is any time at which the expression within the square brackets is nonzero. Then a virtual change $\delta{q}_k$ that is only nonzero in a very small time interval around that time, and everywhere positive in that small interval, would produce a nonzero right hand side in the above equation, but it must be zero. Therefore, the expression within brackets must be zero at all times. That gives the Lagrangian equations of motion, because the expression between parentheses is defined as the canonical momentum.


D.3.2 Hamiltonian dynamics

To derive the Hamiltonian equations, consider the general differential of the Hamiltonian function (regardless of any motion that may go on). According to the given definition of the Hamiltonian function, and using a total differential for ${\rm d}{\cal L}$,

\begin{displaymath}
{\rm d}H =
\left(\sum_k p^{\rm {c}}_k{\rm d}\dot q_k\rig...
... q_k\right)
- \frac{\partial {\cal L}}{\partial t} {\rm d}t
\end{displaymath}

The sums within parentheses cancel each other because of the definition of the canonical momentum. The remaining differences are of the arguments of the Hamiltonian function, and so by the very definition of partial derivatives,

\begin{displaymath}
\frac{\partial H}{\partial q_k} =
- \frac{\partial {\cal...
...ial H}{\partial t} =
- \frac{\partial {\cal L}}{\partial t}
\end{displaymath}

Now consider an actual motion. For an actual motion, $\dot{q}_k$ is the time derivative of $q_k$, so the second partial derivative gives the first Hamiltonian equation of motion. The first partial derivative gives the second equation when combined with the Lagrangian equation of motion (A.2).

It is still to be shown that the Hamiltonian of a classical system is the sum of kinetic and potential energy if the position of the system does not depend explicitly on time. The Lagrangian can be written out in terms of the system particles as

\begin{displaymath}
\sum_{j} \sum_{{\underline k}=1}^K\sum_{\underline{{\under...
...dot q_{\underline{{\underline k}}}
-V(q_1,q_2,\ldots,q_K,t)
\end{displaymath}

where the sum represents the kinetic energy. The Hamiltonian is defined as

\begin{displaymath}
\sum_k \dot q_k \frac{\partial{\cal L}}{\partial\dot q_k} - {\cal L}
\end{displaymath}

and straight substitution shows the first term to be twice the kinetic energy.


D.3.3 Fields

As discussed in {A.1.5}, the Lagrangian for fields takes the form

\begin{displaymath}
{\cal L}= {\cal L}_0 + \int \pounds {\,\rm d}^3{\skew0\vec r}
\end{displaymath}

Here the spatial integration is over all space. The first term depends only on the discrete variables

\begin{displaymath}
{\cal L}_0 = {\cal L}_0(\ldots; q_k,\dot{q}_k;\ldots)
\end{displaymath}

where $q_k$ $\vphantom0\raisebox{1.5pt}{$=$}$ $q_k(t)$ denotes discrete variable number $k$. The dot indicates the time derivative of that variable. The Lagrangian density also depends on the fields

\begin{displaymath}
\pounds = \pounds (\ldots;\varphi_\alpha,\varphi_\alpha\st...
...trut_2,\varphi_\alpha\strut_3;
\ldots;q_k;\dot{q}_k;\ldots)
\end{displaymath}

where $\varphi_\alpha$ is field number $\alpha$. A subscript $t$ indicates the partial time derivative, and 1, 2, or 3 the partial $x$, $y$ or $z$ derivative.

The action is

\begin{displaymath}
{\cal S}= \int_{t_1}^{t_2} \left( {\cal L}_0 + \int \pounds {\,\rm d}^3{\skew0\vec r}\right) {\,\rm d}t
\end{displaymath}

where the time range from $t_1$ to $t_2$ must include the times of interest. The action must be unchanged under small deviations from the correct evolution, as long as these deviations vanish at the limits of integration. That requirement defines the Lagrangian. (For simple systems the Lagrangian then turns out to be the difference between kinetic and potential energies. But it is not obvious what to make of that if there are fields.)

Consider now first an infinitesimal deviation $\delta{q}_k$ $\vphantom0\raisebox{1.5pt}{$=$}$ $\delta{q}_k(t)$ in a discrete variable $q_k$. The change in action that must be zero is then

\begin{displaymath}
0 = \delta{\cal S}=
\int_{t_1}^{t_2} \left(
\frac{\par...
...rm d}^3{\skew0\vec r}\; \delta \dot{q}_k
\right) {\,\rm d}t
\end{displaymath}

After an integration by parts of the second and fourth terms that becomes, noting that the deviation must vanish at the initial and final times,

\begin{displaymath}
0 = \delta{\cal S}=
\int_{t_1}^{t_2} \left[
\frac{\par...
..._k} {\,\rm d}^3{\skew0\vec r}
\right] \delta q_k {\,\rm d}t
\end{displaymath}

This can only be zero for whatever you take $\delta{q}_k$ $\vphantom0\raisebox{1.5pt}{$=$}$ $\delta{q}_k(t)$ if the expression within square brackets is zero. That gives the final Lagrangian equation for the discrete variable $q_k$ as
$\parbox{400pt}{\hspace{11pt}\hfill$\displaystyle
\frac{{\rm d}}{{\rm d}t} \le...
...\frac{\partial\pounds }{\partial q_k} {\,\rm d}^3{\skew0\vec r}
$\ \hfill(1)}$

Next consider an infinitesimal deviation $\delta\varphi_\alpha$ $\vphantom0\raisebox{1.5pt}{$=$}$ $\delta\varphi_\alpha({\skew0\vec r};t)$ in field $\varphi_\alpha$. The change in action that must be zero is then

\begin{displaymath}
0 =\delta S = \int_{t_1}^{t_2} \int \left(
\frac{\partia...
..._\alpha\strut_i
\right) {\,\rm d}^3{\skew0\vec r}{\,\rm d}t
\end{displaymath}

Now integrate the derivative terms by parts in the appropriate direction to get, noting that the deviation must vanish at the limits of integration,

\begin{displaymath}
0 = \delta S = \int_{t_1}^{t_2} \int \left[
\frac{\parti...
...ght] \delta\varphi_\alpha {\,\rm d}^3{\skew0\vec r}{\,\rm d}t
\end{displaymath}

Here $r_i$ for $i$ $\vphantom0\raisebox{1.5pt}{$=$}$ 1, 2, or 3 stands for $x$, $y$, or $z$. If the above expression is to be zero for whatever you take the small change $\delta\varphi_\alpha$ $\vphantom0\raisebox{1.5pt}{$=$}$ $\delta\varphi_\alpha({\skew0\vec r};t)$ to be, then the expression within square brackets will have to be zero at every position and time. That gives the equation for the field $\varphi_\alpha$:
$\parbox{400pt}{\hspace{11pt}\hfill$\displaystyle
\frac{\partial}{\partial t}
...
...t_i}\right)
= \frac{\partial\pounds }{\partial\varphi_\alpha}
$\ \hfill(2)}$

The canonical momenta are defined as

$\parbox{400pt}{\hspace{11pt}\hfill$\displaystyle
p^{\rm{c}}_k \equiv \frac{\p...
... \equiv \frac{\partial\pounds }{\partial\varphi_\alpha\strut_t}
$\ \hfill(3)}$
These are the quantities inside the time derivatives of the Lagrangian equations.

For Hamilton’s equations, assume at first that there are no discrete variables. In that case, the Hamiltonian can be written in terms of a Hamiltonian density $h$:

\begin{displaymath}
H = \int h {\,\rm d}^3{\skew0\vec r}\qquad
h = \sum_\alpha \pi^{\rm {c}}_\alpha \varphi_\alpha\strut_t - \pounds
\end{displaymath}

Take a differential of the Hamiltonian density

\begin{displaymath}
{\rm d}h = \sum_\alpha \left[
\pi^{\rm {c}}_\alpha {\rm ...
...nds }{\partial\varphi_\alpha} {\rm d}\varphi_\alpha
\right]
\end{displaymath}

The first and third terms in the square brackets cancel because of the definition of the canonical momentum. Then according to calculus

\begin{displaymath}
\frac{\partial h}{\partial\pi^{\rm {c}}_\alpha} = \varphi_...
...\alpha} =
- \frac{\partial\pounds }{\partial\varphi_\alpha}
\end{displaymath}

The first of these expressions gives the time derivative of $\varphi_\alpha$. The other expressions may be used to replace the derivatives of the Lagrangian density in the Lagrangian equations of motion (2). That gives Hamilton’s equations as
$\parbox{400pt}{\hspace{11pt}\hfill$\displaystyle
\frac{\partial\varphi_\alpha...
... \left(\frac{\partial h}{\partial\varphi_\alpha\strut_i}\right)
$\ \hfill(4)}$

If there are discrete variables, this no longer works. The full Hamiltonian is then

\begin{displaymath}
H = \sum_k p^{\rm {c}}_k \dot{q}_k
+ \int \sum_\alpha \p...
...ec r}
- {\cal L}_0 - \int \pounds {\,\rm d}^3{\skew0\vec r}
\end{displaymath}

To find Hamilton’s equations, the integrals in this Hamiltonian must be approximated. The region of integration is mentally chopped into little pieces of the same volume ${\rm d}{\cal V}$. Then by approximation

\begin{displaymath}
\int \pounds {\,\rm d}^3{\skew0\vec r}\approx \sum_n \pounds _n {\rm d}{\cal V}
\end{displaymath}

Here $n$ numbers the small pieces and $\pounds _n$ stands for the value of $\pounds $ at the center point of piece $n$. Note that this is essentially the Riemann sum of calculus. A similar approximation is made for the other integral in the Hamiltonian, and the one in the canonical momenta (3). Then the approximate Hamiltonian becomes

\begin{displaymath}
H_{\rm app} = \sum_k p^{\rm {c}}_k \dot{q}_k
+ \sum_{\al...
...d}{\cal V}
- {\cal L}_0 - \sum_n \pounds _n {\rm d}{\cal V}
\end{displaymath}

The differential of this approximate Hamiltonian is

\begin{eqnarray*}
{\rm d}H_{\rm app} & = & \sum_k \dot{q}_k {\rm d}p^{\rm {c}}...
...}_i\strut_n}
{\rm d}{\cal V}{\rm d}{\varphi_\alpha}_i\strut_n
\end{eqnarray*}

The ${\rm d}\dot{q}_k$ and ${\rm d}{\varphi_\alpha}_t\strut_n$ terms drop out because of the definitions of the canonical momenta. The remainder allows expressions for the partial derivatives of the approximate Hamiltonian to be identified.

The ${\rm d}{p}^{\rm {c}}_k$ term allows the time derivative of $q_k$ to be identified with the partial derivative of $H_{\rm {app}}$ with respect to $p^{\rm {c}}_k$. And the Lagrangian expression for the time derivative of $p^{\rm {c}}_k$, as given in (1), may be rewritten in terms of corresponding derivatives of the approximate Hamiltonian. Together that gives, in the limit ${\rm d}{\cal V}\to0$,

$\parbox{400pt}{\hspace{11pt}\hfill$\displaystyle
\frac{{\rm d}q_k}{{\rm d}t} ...
...m d}p^{\rm{c}}_k}{{\rm d}t} = - \frac{\partial H}{\partial q_k}
$\ \hfill(5)}$

For the field, consider an position ${\skew0\vec r}$ corresponding to the center of an arbitrary little volume $n$ $\vphantom0\raisebox{1.5pt}{$=$}$ ${\underline n}$. Then the ${\rm d}\pi^{\rm {c}}_\alpha\strut_{\underline n}$ term allows the time derivative of $\varphi_\alpha$ at this arbitrary position to be identified in terms of the partial derivative of the approximate Hamiltonian with respect to $\pi^{\rm {c}}_\alpha$ at the same location. And the Lagrangian expression for the time derivative of $\pi^{\rm {c}}_\alpha$, as given by (2), may be rewritten in terms of corresponding derivatives of the approximate Hamiltonian. Together that gives, in the limit ${\rm d}{\cal V}\to0$, and leaving ${\underline n}$ away since it can be any position,

$\parbox{400pt}{\hfill$\displaystyle
\frac{\partial\varphi_\alpha}{\partial t}...
...}
\frac{\partial H_{\rm app}}{\partial\varphi_\alpha\strut_i}
$\ \hfill(6)}$

Of course, in real life you would not actually write out these limits. Instead you simply differentiate the normal Hamiltonian $H$ until you have to start differentiating inside an integral, like maybe,

\begin{displaymath}
\frac{\partial}{\partial\varphi_\alpha}\int{\pounds }{\,\rm d}^3{\skew0\vec r}
\end{displaymath}

Then you think to yourself that you are not really evaluating this, but actually

\begin{displaymath}
\frac{\partial}{\partial\varphi_\alpha\strut_{\underline n...
...{\partial\varphi_\alpha\strut_{\underline n}} {\rm d}{\cal V}
\end{displaymath}

where ${\underline n}$ indicates the position that you are considering the field at. And you are going to divide out the volume ${\rm d}{\cal V}$. That then boils down to

\begin{displaymath}
\frac{\partial}{\partial\varphi_\alpha}\int{\pounds }{\,\r...
...tarrow\quad
\frac{\partial\pounds }{\partial\varphi_\alpha}
\end{displaymath}

even though the left hand side would mathematically be nonsense without discretization and division by ${\rm d}{\cal V}$.