# Hamiltonian Mechanics

## Overview

Consider a monogenic system without constraints and with $$n$$ independent generalized coordinates, $$\{q_i\}_{i\in I}$$. Then, $$\forall i\in I, \frac{d}{dt}\left(\frac{\partial\mathcal{L}}{\partial\dot{q}_i}\right) = \frac{\partial\mathcal{L}}{\partial q_i}$$.

Define $$H(q,p,t)=$$ the Hamiltonian $$= p_i\dot{q}_i - L(q,\dot{q},t)$$. Which gives us from the Legendre transformation, $$\forall i\in I$$,

\begin{align*} \dot{q}_i &= \frac{\partial H}{\partial p_i}, \\ \dot{p}_i &= -\frac{\partial H}{\partial q_i}, \\ \frac{\partial H}{\partial t} &= -\frac{\partial\mathcal{L}}{\partial t}. \end{align*}

Now, we have $$2N$$ first-order differential equations rather than $$N$$ second-order equations. These are Hamilton’s Canonical equations of motion.

In this representation, $$q$$ and $$p$$ are both ’coordinates’ – canonical coordinates in phase space.

Note, in the state space, each coordinate has its own trajectory that never touch (otherwise they would have to collapse to the same trajectory but they are independent). Hence, we have a state manifold – with a volume.

Hence, we get a Continuity equation in the state space and acts like an incompressible fluid.

Then,

\begin{align*} 0 = \delta I &= \delta\int[\sum p_i\dot{q}_i - H(q,p,t)]dt. \\ f(q,p,t) = f(q,\dot{q},p,\dot{p},t) = f(\eta,\dot{\eta},t) &= \sum p_i\dot{q}_i - H(q,p,t) = 0. \end{align*}

Thus, with zero variation at the ends,

\begin{align*} \frac{d}{dt}\left(\frac{\partial f}{\partial \dot{\eta}}\right) &= \frac{\partial f}{\partial\eta}. \\ \dot{p}_j + \frac{\partial H}{\partial q_j} &= 0, \\ \dot{q}_j - \frac{\partial H}{\partial p_j} &= 0. \end{align*}

## In Matrix Form

\begin{align*} \underline{\eta} &= \begin{pmatrix} | \\ q_i \\ | \\ | \\ p_i \\ | \end{pmatrix} \\ \frac{\partial H}{\partial\underline{\eta}} &= \begin{pmatrix} | \\ \frac{\partial H}{\partial q_i} \\ | \\ | \\ \frac{\partial H}{\partial p_i} \\ | \end{pmatrix} = \begin{pmatrix} | \\ -\dot{p}_i \\ | \\ | \\ \dot{q}_i \\ | \end{pmatrix} \\ \dot{\underline{\eta}} &= \underline{J}\frac{\partial H}{\partial\underline{n}} \\ \underline{J} &= \begin{pmatrix} 0 & 0 & \cdots & 1 & 0 & \cdots \\ 0 & 0 & \cdots & 0 & 1 & \cdots \\ \vdots & \vdots & \vdots & \vdots & \vdots & \vdots \\ \cdots & -1 & 0 & \cdots & 0 & 0 \\ \cdots & 0 & -1 & \cdots & 0 & 0 \\ \end{pmatrix} \\ &= \begin{pmatrix} 0 & \mathbb{I} \\ -\mathbb{I} & 0 \end{pmatrix}. \\ \dot{\underline{\eta}} &= \begin{pmatrix} 0 & \mathbb{I} \\ -\mathbb{I} & 0 \end{pmatrix}\begin{pmatrix}\frac{\partial H}{\partial q} \\ \frac{\partial H}{\partial q} \end{pmatrix} \\ &= \begin{pmatrix}\frac{\partial H}{\partial p} \\ -\frac{\partial H}{\partial p} \\ \end{pmatrix} \\ &= \begin{pmatrix}\dot{q} \\ \dot{p} \end{pmatrix}. \end{align*}

## Liouville’s Theorem

Starting from a cloud of points. The trajectories between two times form a sort of cylinder – most likely will have irregular shape. Then, we can have a volume of this – How does the Volume change?

Theorem: If you look at the trajectory of the cloud the volume of the cloud remains invariant.

So, we need the divergence of the $$\dot{q}$$ and $$\dot{p}$$ coordinates to be zero. $$\frac{\partial}{\partial p}\dot{p} + \frac{\partial}{\partial q}\dot{q} = 0$$, where $$\frac{\partial}{\partial\eta}\dot{\eta}$$ is shorthand for $$\sum_i\frac{\partial}{\partial\eta_i}\dot{\eta}_i$$. Then, $$\frac{\partial}{\partial p}\dot{p} + \frac{\partial}{\partial q}\dot{q} = \sum_i\frac{\partial^2H}{\partial q_i\partial p_i} + -\frac{\partial^2H}{\partial p_i\partial q_i} = 0$$.

## Canonical Transformations

Motivation: Hamiltonian does not explicitly depends on time or coordinates. Then, $$H = H(p)$$. So, $$H$$ must be a constant from $$\frac{dH}{dt} = -\frac{\partial H}{\partial t} = 0$$. Then, $$\dot{p}_i = -\frac{\partial H}{\partial q_i}$$. So $$p_i = \alpha_i$$ is a constant. Thus, the hamiltonian can be expressed in terms of constants, $$H(\alpha_1,\cdots,\alpha_n)$$. Thus, energy and momentum are conserved. Further, $$\dot{q}_i = \frac{\partial H}{\partial p_i} = \frac{\partial H}{\partial \alpha_i} = \omega_i$$ is a constant. Therefore, $$q_i = \omega_i t + q_i^0$$.

So, we want to find the Canonical Transformation to cast the Hamiltonian into this form. A point transformation in the state space: $$Q_i = Q_i(q,p,t)$$ and $$P_i = P_i(q,p,t)$$. Then, $$H\to K$$ or $$\hat{H}$$, transformation to the Camiltonian. We still require that $$\dot{P}_i = \frac{\partial K}{\partial Q_i}$$ and $$\dot{Q}_i = \frac{\partial K}{\partial P_i}$$.

### Generating Function Formalism

Introduce $$\underline{\eta} = \begin{pmatrix} q \\ p \end{pmatrix}\to\underline{\zeta} = \begin{pmatrix} Q \\ P \end{pmatrix}$$. So, $$0=\delta I = \delta\int_{t_1}^{t_2}dt\left[\sum_i p_i\dot{q}_i - H(q,p,t)\right]\Rightarrow 0 = \delta\int_{t_1}^{t_2}dt\lambda\left[\sum_iP_i\dot{Q}_i - K(Q,P,t) + \frac{dF(\eta,\zeta,t)}{dt}\right]$$. So, we want the integrands to be the same.

Thus,

\begin{align*} \sum_i p_i\dot{q}_i - H(q,p,t) &= \lambda\left(\sum_i P_i\dot{Q}_i - K(Q,P,t) + \frac{dF}{dt}\right). \end{align*}

For $$\lambda\neq 1$$, we get an extendend Canonical Transformation. For $$\lambda= 1$$, we get an Canonical Transformation. When $$\zeta = \zeta(\eta)$$ we get a restricted canonical transformation. When $$\zeta = \zeta(\eta,t)$$ we get a traditional Canonical Transformation. The $$F$$ function is the generating function.

Suppose $$\lambda=1$$.

\begin{align*} \frac{dF}{dt} &= \sum_i p_i\dot{q}_i - H(q,p,t) - \sum_i P_i\dot{Q}_i + K(Q,P,t) \\ &= \sum_i (p_i\dot{q}_i - P_i\dot{Q}_i) - (H(q,p,t) + K(Q,P,t)) \end{align*}

Type I, $$F = F_1(q,Q,t)$$. Then,

\begin{align*} \sum_i \frac{\partial F_1}{\partial q_i}\dot{q}_i + \frac{\partial F_1}{\partial Q_i}\dot{Q}_i + \frac{\partial F_1}{\partial t} &= \sum_i p_i\dot{q}_i - H(q,p,t) - \sum_i P_i\dot{Q}_i + K(Q,P,t) \\ &= \sum_i (p_i\dot{q}_i - P_i\dot{Q}_i) - (H(q,p,t) + K(Q,P,t)). \\ \Rightarrow p_i &= \frac{\partial F_1}{\partial q_i}, \\ P_i &= -\frac{\partial F_1}{\partial Q_i}, \\ K &= H + \frac{\partial F_1}{\partial t}. \end{align*}

Type II, $$F = F_2(q,p,t) - \sum P_iQ_i$$. Then,

\begin{align*} \sum_i\frac{\partial F_2}{\partial q_i}\dot{q}_i + \frac{\partial F_2}{\partial p_i}\dot{p}_i + \frac{\partial F_2}{\partial t} - \sum_i \left(P_i\dot{Q}_i + \dot{P}_iQ_i\right) &= \sum_i p_i\dot{q}_i - H(q,p,t) - \sum_i P_i\dot{Q}_i + K(Q,P,t) \\ \sum_i\frac{\partial F_2}{\partial q_i}\dot{q}_i + \frac{\partial F_2}{\partial p_i}\dot{p}_i + \frac{\partial F_2}{\partial t} - \sum_i \left(\dot{P}_iQ_i\right) &= \sum_i p_i\dot{q}_i - H(q,p,t) + K(Q,P,t) \\ P_i &= \frac{\partial F_2}{\partial q_i}, \\ Q_i &= \frac{\partial F_2}{\partial p_i}, \\ K &= H + \frac{\partial F}{\partial t}. \end{align*}

So, $$F = F_2(q,p,t) = \sum q_ip_i$$. So, $$P_i = \frac{\partial F_2}{\partial q_i} = P_i$$. Then, $$Q_i = \frac{\partial F_2}{\partial p_i} = q_i$$. This is the identity transformation.

Type 3: $$F = F_3(P,Q,t) + \sum p_iq_i$$.

Type 4: $$F = F_4(p,P,t) - \sum P_iQ_i + \sum p_iq_i$$.

## Example

For a 1D HO, $$H = \frac{1}{2m}(p^2 + kq^2)$$. Let $$\omega^2 = \frac{k}{m}$$. Then, $$H = \frac{1}{2m}(p^2 + m^2\omega^2 q^2)$$. Thus, the Hamiltonian is a constant.

$$p = f(P)\cos Q$$ and $$q = \frac{f(P)}{m\omega}\sin Q$$. So, $$\frac{p}{q} = m\omega\cot Q$$. Show that this gives a canonical transformation.

Note, $$p = m\omega q\cot Q$$.

Consider a Type 1. $$F = F(q,Q)$$. So, $$p = \frac{\partial F_1}{\partial q} = m\omega q\cot Q$$. So, $$F_1 = \frac{1}{2}\omega q^2\cot Q + h(Q)$$. Further, $$P = -\frac{\partial F_1}{\partial Q} = \frac{m\omega q^2}{2\sin^2 Q} - \frac{dh}{dQ}$$. Setting the last term to zero, $$P = \frac{m\omega q^2}{2\sin^2 Q}$$. So, $$q = \sqrt{\frac{2P}{m\omega}}\sin Q$$ and $$p = \sqrt{2m\omega P}\cos Q$$. Then, $$f(P) = \sqrt{2m\omega P}$$. $$K = H + \frac{dF_1}{dt} = H = \omega P$$. So, $$P = \frac{E}{\omega}$$. Then, $$\dot{Q} = \frac{\partial K}{\partial P} = \omega$$. $$Q = \omega t + \beta$$. $$q = \sqrt{\frac{2P}{m\omega}}\sin Q$$ and $$p = \sqrt{2Pm\omega}\sin Q$$.

## Sympletic Approach

### Restricted Canonical Transformations

Suppose we have $$\eta\to\zeta$$. So, $$\zeta = \zeta(\eta)$$. So, for the $i-$th coordinate, $$\zeta_i = \zeta(\eta)$$.

\begin{align*} \dot{\zeta}_i &= \sum_j\frac{\partial\zeta_i}{\partial\eta_j}\dot{\eta}_j \end{align*}

Then,

\begin{align*} \dot{\zeta} &= \begin{pmatrix} \frac{\partial\zeta_1}{\partial\eta_1} & \frac{\partial\zeta_1}{\partial\eta_2} & \cdots \\ \frac{\partial\zeta_2}{\partial\eta_1} & \frac{\partial\zeta_2}{\partial\eta_2} & \cdots \\ \vdots & \vdots & \cdots \\ \frac{\partial\zeta_{2n}}{\partial\eta_1} & \frac{\partial\zeta_{2n}}{\partial\eta_2} & \cdots \\ \end{pmatrix}\begin{pmatrix}\dot{\eta}_1 \\\dot{\eta}_2 \\\vdots\end{pmatrix}, \\ &= \frac{\partial\zeta}{\partial\eta}\dot{\eta} = M\dot{\eta} = MJ\frac{\partial H}{\partial \eta}. \end{align*}

$$M$$ is the sympletic matrix. Recall, $$J = \begin{pmatrix} 0 & \mathbb{I} \\ -\mathbb{I} & 0 \end{pmatrix}$$. Because, this is a restricted canonical transformation, $$K = H$$. Then, $$H = H(\zeta)$$. ($$\frac{\partial H}{\partial \eta_i} = \sum\frac{\partial H}{\partial\zeta_j}\frac{\partial\zeta_i}{\partial \eta_i}$$.) So, $$\dot{\zeta} = J\frac{\partial K}{\partial\zeta} = MJ\frac{\partial\zeta}{\partial\eta}^T\frac{\partial H}{\partial\zeta} = MJM^T\frac{\partial H}{\partial\zeta}$$. Hence, $$\dot{\zeta} = J\frac{\partial H}{\partial\zeta}$$. Thus, $$J = MJM^T = M^TJM$$. Hence, this is a necessary and sufficient condition for the Canonical Transformation. Thus, the transformation is canonical iff $$J = MJM^T$$.

### SHO Example

\begin{align*} \begin{pmatrix} p \\ q \end{pmatrix} &= \begin{pmatrix} \sqrt{2m\omega P}\cos Q \\ \sqrt{\frac{2P}{m\omega}}\sin Q \end{pmatrix}. \end{align*}

Then, $$p = m\omega q\cot Q$$. Also, $$P = \frac{E}{\omega}$$. Then, $$P_p = 0, P_q = 0$$.

Suppose we have time dependence, after many steps, you can show that this is still true. You can also use infinitesimal canonical transformations to show it.

### Infinitesimal Canonical Transformation

Consider $$\eta\to\zeta(t)$$. So, $$\eta\to\zeta(t_0)$$ is also canonical and no longer involves time, a restricted canonical transformation. Hence, it satisfies $$MJM^T = J$$. So, we must show $$\zeta(t_0)\to\zeta(t)$$ satsifies $$MJM^T=J$$. Consider $$\zeta(t_0+ndt)\to\zeta(t_0+(n+1)dt)$$. So, $$Q_i = q_i + \delta q_i$$ and $$P_i = p_i + \delta p_i$$. Then, $$Q = q + \delta q$$ and $$P = p + \delta p$$. Hence, $$\zeta = \eta + \delta\eta$$. This is nearly an identity transformation. We know $$F_2 = \sum q_ip_i$$ is an identity transformation. So, $$F_2 = \sum q_ip_i + \varepsilon G(q,p,t)$$ includes the small variation. Then, $$Q_i = \frac{\partial F_2}{\partial p_i} = q_i + \varepsilon\frac{\partial G}{\partial P_i}$$. So, $$P_i = \frac{\partial F_2}{\partial q_i} = p_i + \varepsilon\frac{\partial G}{\partial q_i}$$. Then, $$Q_i = q_i + \varepsilon\frac{\partial G}{\partial p_i} + \mathcal{O}(\varepsilon^2)$$. Hence, $$P_i - p_i = -\varepsilon\frac{\partial G}{\partial q_i}$$. So, $$\delta q_i = \varepsilon\frac{\partial G}{\partial p_i}$$ and $$\delta p_i = -\varepsilon\frac{\partial G}{\partial q_i}$$. Therefore, $$\delta\eta = \varepsilon J\frac{\partial G}{\partial\eta}$$. So, $$\zeta = \eta + \delta\eta = \eta + \varepsilon J\frac{\partial G}{\partial\eta}$$. We need to show $$MJM^T = J$$.

Recall, $$M=\frac{\partial\zeta}{\partial\eta}=\begin{pmatrix}\frac{\partial\zeta_1}{\partial\eta_1} & \frac{\partial\zeta_1}{\partial\eta_2} & \cdots\\\vdots & \vdots & \vdots\end{pmatrix}$$. So, $$M_i^j = \frac{\partial\zeta_i}{\partial\eta_j}$$. So, $$\frac{\partial}{\partial \eta}\left(\eta + \delta\eta\right) = \frac{\partial}{\partial\eta}\left(\eta + \varepsilon J\frac{\partial G}{\partial\eta}\right) = \mathbb{I} + \varepsilon \frac{\partial}{\partial\eta}\left(J\frac{\partial G}{\partial \eta}\right) = \mathbb{I} + \varepsilon J\frac{\partial^2G}{\partial\eta\partial\eta}$$. The $$\frac{\partial^2G}{\partial\eta^2}$$ is a symmetric matrix. Further, $$J$$ is an antisymmetric matrix. Thus, we get an antisymmetric matrix $$M$$. Hence, $$M^T = \mathbb{I} - \varepsilon\frac{\partial^2G}{\partial\eta\partial\eta}J$$. Therefore, $$MJM^T = \left(\mathbb{I} + \varepsilon J\frac{\partial^2G}{\partial\eta^2}\right)J\left(\mathbb{I} - \varepsilon\frac{\partial^2G}{\partial\eta^2}J\right) = J + \varepsilon JG_2J - \varepsilon JG_2J - \varepsilon^2 JG_2JG_2J = J + \mathcal{O}(\varepsilon^2)$$. Hence, for infinitesimal transformations we have the sympletic condition satisfied. Thus, by repeated infinitesimal transformations, we finally are able to transform, for fixed times $$t',t_0$$, $$\eta(t')\to\zeta(t_0)\to\zeta(t)$$. Therefore, the sympletic condition is necessary and sufficient for a canonical transformation.

Created: 2024-05-30 Thu 21:19

Validate