The Hamiltonian

Conservation

Momentum

We saw that if our Lagrangian was independent of say, $x$ or $\theta$, essentially one of the position generalized coordinates, then we could expect a conservation of momentum or angular momentum

Energy

Now, what if the Lagrangian is independent of time? that is: \begin{equation} \frac{\partial L}{\partial t} = 0 \end{equation}

If so, the Energy is also conserved.

Let E be: \begin{equation} E = \left( \frac{\partial L}{\partial \dot{q}_i} \dot{q}_1 \right) - L \end{equation}

(Provided the Euler-Lagrange equations generate the eqs. of motion)

\begin{equation} \frac{dE}{dt} = \frac{d}{dt}\left( \frac{\partial L}{\partial \dot{q}_i} \dot{q}_1 \right) - \frac{dL}{dt} \end{equation}

$$ \begin{aligned} \frac{dE}{dt} & = \frac{d}{dt}\left(\sum_{i=1}^N \frac{\partial L }{\partial \dot{q}_i }\dot{q}_i\right) - \frac{dL}{dt}\\ & = \sum_{i=1}^N \left( \left(\frac{d}{dt} \frac{\partial L}{\partial {\dot{q}_i}} \dot{q}_i \right) + \frac{\partial L}{\partial \dot{q}_i} \ddot{q}_i \right) - \left(\sum_{i=1}^N \left( \frac{\partial L}{\partial q_i} \dot{q_i} + \frac{\partial L}{\partial \dot{q}_i}\right) + \frac{\partial L}{\partial t}\right) \end{aligned} $$

Most of this cancels and we have: \begin{equation} \frac{dE}{dt} = - \frac{\partial L}{\partial t} \end{equation}

Thus, given a time independent Lagrangian, we can say that total energy is conserved.

The Hamiltonian Formulation

Take the total time derivative of the Lagrangian: \begin{equation} \frac{d L(q_k, \dot{q}_k, t)}{dt} = \frac{\partial L}{dt} + \frac{\partial L}{\partial q_k}\dot{q}_k + \frac{\partial L}{\partial \dot{q}_k}\ddot{q}_k \label{eq:ddtofLagrangian} \end{equation} (with implied summations over $k$)

Next, take the time derivative of: \begin{equation} \frac{d}{dt} \left( \dot{q}_k \frac{\partial L }{\partial \dot{q}_k} \right) = \ddot{q}_k \frac{\partial L}{\partial \dot{q}_k} + \dot{q}_k \frac{d}{dt}\left(\frac{\partial L }{\partial \dot{q}_k} \right) \end{equation}

\begin{equation} \frac{\partial L }{\partial t} - \frac{d}{dt}\left(L - \dot{q}_k \frac{\partial L}{\partial \dot{q}_k} \right) = 0 \end{equation}

Define $H$ to be: \begin{equation} H \equiv \dot{q}_k p_k - L \end{equation}

Thus: \begin{equation} \frac{\partial L} {\partial t} = - \frac{dH}{dt} \end{equation}

Meaning?

If $$\frac{\partial L }{\partial t} = 0$$ then $H$ is a conserved quantity! (i.e. doesn't change in time)

Often $H = E$ (but not always)

Bead on a rotating parabolic wire

A bead on a rotating parabolic wire

A bead of mass $m$ is confined to a wire that rotated around the $z$ axis. The wire is shaped like a parabola.

Speed (squared) in cylindrical coordinates: \begin{equation} v^2 = \dot{\rho}^2 + \rho^2 \dot{\phi}^2 + \dot{z}^2 \end{equation} That's 3 variables, but with some constraints, it can be reduced: \begin{equation} v^2 = \dot{\rho}^2 + \rho^2 \omega^2 + (2 \alpha \rho \dot{\rho})^2 \end{equation}

Potential energy: \begin{equation} U = m g z = m g \alpha \rho^2 \end{equation}

Thus the Lagrangian: \begin{equation} L = T - U = \frac{1}{2}m \left[ \left( 1 + 4 \alpha^2 \rho^2 \right) \dot{\rho}^2 + \rho^2 \omega^2 \right] - m g \alpha \rho^2 \end{equation}

Next, since we only have one coordinate: \begin{equation} \frac{\partial L}{\partial \rho} - \frac{d}{dt}\frac{\partial L}{\partial \dot{\rho}} \end{equation}

Eq. of motion : \begin{equation} \left(1 + 4 \alpha^2 \rho^2 \right)\ddot{\rho} + 4 \alpha^2 \rho \dot{\rho}^2 + \left(2 g \alpha - \omega^2 \right)\rho = 0 \end{equation}

Go back and try the generalized momentum: \begin{equation} p_\rho = \frac{\partial L}{\partial \dot{\rho}} = m(1 + 4 \alpha^2 \rho^2)\dot{\rho} \end{equation} which leads to a Hamiltonian of: \begin{equation} H = \dot{\rho}p_\rho - L = m(1+4 \alpha^2 \rho^2)\dot{\rho}^2 - \frac{1}{2}m \left[ \left( 1 + 4 \alpha^2 \rho^2 \right) \dot{\rho}^2 + \rho^2 \omega^2 \right] + m g \alpha \rho^2 \end{equation}

This cleans up to: \begin{equation} H = \frac{1}{2}m \left[ (1+4 \alpha^2\rho^2)\dot{\rho}^2 - \rho^2 \omega^2 \right] + m g \alpha \rho^2 = \textrm{constant} \end{equation}

Compare this to the total energy $E = T + U$ (note the plus) \begin{equation} E = \frac{1}{2}m \left[ \left( 1 + 4 \alpha^2 \rho^2 \right) \dot{\rho}^2 + \rho^2 \omega^2 \right] + m g \alpha \rho^2 \end{equation}

Comparing the two: \begin{equation} H - E = -m \rho^2 \omega^2 \end{equation}