From Lagrangian to Hamiltonian Mechanics


Starting from the Lagrangian form of classical mechanics, we define the energy and momentum of the system, and introduce the Hamiltonian form with canonical coordinates. We show how Newton’s law emerges from the principle of least action, and the connection to Heisenberg equation of motion in quantum mechanics.

copyright © jxu@ustb.edu.cn


 

In Lagrangian mechanics, we have a pair of classical coordinates $q(t)$ and $\dot{q}(t)$, corresponding to position and velocity (derivative of position to time). That is to say, once we know the position and velocity at a given time, we can predict the following dynamics of this object. Information about the object’s dynamics is coined in a function called the Lagrangian $L(q,\dot{q},t)$, and the action of the system is defined as
\begin{eqnarray}
S[q]=\int L(q, \dot{q}, t) dt.
\end{eqnarray}
The classical trajectory of the object $q(t)$ follows the principle of least action, which states that the object runs in a way that minimizes the action. This means
\begin{eqnarray}
\delta S[q]=\int \delta L(q,\dot{q},t) dt=\int \left(\frac{\partial L}{\partial q}\delta q+\frac{\partial L}{\partial \dot{q}}\delta \dot{q}\right)dt=\int \left[\frac{\partial L}{\partial q}-\frac{d}{dt}\left(\frac{\partial L}{\partial \dot{q}}\right)\right]\delta qdt=0,
\end{eqnarray}
which gives us the Euler-Lagrange equation
\begin{eqnarray}
\frac{\partial L}{\partial q}-\frac{d}{dt}\left(\frac{\partial L}{\partial \dot{q}}\right)=0.
\end{eqnarray}
This equation plays the same role as Newton’s second law in Hamiltonian mechanics, and we will see in the following how Newton’s law can emerge from this equation.

First, let’s consider the system with a time translational symmetry. By this we mean the system shares the same behaviors starting at any given time (time translation), so that we can not distinguish what time it is based on the state of the system. In this case, the Lagrangian should not be an explicit function of time, and we have
\begin{eqnarray}
\frac{dL(q,\dot{q})}{dt}=\frac{\partial L}{\partial q}\dot{q}+\frac{\partial L}{\partial \dot{q}}\ddot{q}=\frac{d}{dt}\left(\frac{\partial L}{\partial \dot{q}}\right)\dot{q}+\frac{\partial L}{\partial \dot{q}}\ddot{q}=\frac{d}{dt}\left(\frac{\partial L}{\partial \dot{q}}\dot{q}\right),
\label{time}
\end{eqnarray}
where we have used the Euler-Lagrange equation. So under time translational symmetry, we can define a conserved quantity called Hamiltonian
\begin{eqnarray}
H=\frac{\partial L}{\partial \dot{q}}\dot{q}-L=p\dot{q}-L,
\label{ham}
\end{eqnarray}
where we have defined the momentum $p$, and to summarize the relation to our Lagrangian form, we have
\begin{eqnarray}
p=\frac{\partial L}{\partial \dot{q}},\ \dot{p}=\frac{\partial L}{\partial q}.
\end{eqnarray}
This gives
\begin{eqnarray}
dH=d(p\dot{q})-dL=\dot{q}dp+pd\dot{q}-(\dot{p}dq+pd\dot{q})=\dot{q}dp-\dot{p}dq,
\end{eqnarray}
which tells us the Hamiltonian $H$ has two independent variables $q$ and $p$. This is a type of Legendre transform, and changes our variables now from $q, \dot{q}$ to canonical coordinates $q, p(\dot{q})$.

As you might have realized, the Hamiltonian $H$ is just the energy of the system, and Eq. (4) tells us that if the system has a translational symmetry of time, then the energy of the system is conserved. This is an example of Noether’s theorem, which states that every continuous symmetry of the system comes with a conservation law.

Let’s consider another example, the translational symmetry of space, in which case the Lagrangian is not an explicit function of $q$, so we have
\begin{eqnarray}
0=\frac{dL}{dq}&=&\frac{\partial (p\dot{q}-H)}{\partial q}=\frac{\partial p}{\partial q}\dot{q}-\frac{\partial H}{\partial q}=-\frac{\partial H}{\partial q}\nonumber\\
&=&\frac{d}{dt}\left(\frac{\partial L}{\partial \dot{q}}\right)=\frac{d}{dt}\left(\frac{\partial p}{\partial \dot{q}}\dot{q}+p-\frac{\partial H}{\partial p}\frac{\partial p}{\partial \dot{q}}\right)=\frac{dp}{dt},
\end{eqnarray}
where we have used the fact that $p(\dot{q})$ is only a function of $\dot{q}$. As previous, we can see the momentum $p$ is the conserved quantity for translational symmetry of space. We also find the following relationship based on the above equation
\begin{eqnarray}
\dot{q}=\frac{\partial H}{\partial p},\ -\dot{p}=\frac{\partial H}{\partial q},
\end{eqnarray}
which is called the canonical equations, with the last equation our familiar Newton’s second law.

In the Hamiltonian mechanics, you can further define a Poisson bracket
\begin{eqnarray}
\{A,B\}=\frac{\partial A}{\partial q}\frac{\partial B}{\partial p}-\frac{\partial A}{\partial p}\frac{\partial B}{\partial q},
\end{eqnarray}
and in terms of this bracket, we have
\begin{eqnarray}
\dot{q}=\{q,H\},\ \dot{p}=\{p,H\},
\end{eqnarray}
You might find that is just the classical version of Heisenberg equation of motion that you have been struggled with in quantum mechanics.

Full text copyright © jxu@ustb.edu.cn