The Hamiltonian and Liouville's Theorem


filed under : #physics #dynamicalSystems #math

$$\newcommand{\vol}{\mathop{\rm Vol}\nolimits}$$ $$\newcommand{\div}{\mathop{\rm div}\nolimits}$$ $$\newcommand{\tr}{\mathop{\rm tr}\nolimits}$$ $$\newcommand{\det}{\mathop{\rm det}\nolimits}$$ $$\newcommand{\lib}[2][]{\frac{\mathrm{d}#1}{\mathrm{d}#2}}$$ $$\newcommand{\pd}[2][]{\frac{\partial#1}{\partial#2}}$$ $$\newcommand{\defeq}{=}$$ $$\newcommand\at[2]{\left.#1\right|_{#2}}$$

The goal of this post is to prove Liouville's Theorem that states that volume in phase space is preserved by Hamiltonian flows. I used the wonderful book Mathematical Methods of Classical Mechanics by Arnold [1] as my reference. For the interested reader I highly recommend Spivak's rigorous treatment [2] on classical mechanics.

The Lagrangian

I wrote about the Lagrangian and the Euler-Lagrange equation in a previous post covering an introduction to the Calculus of Variations, so in this section we will only give an overview.

Let $L \colon \mathbb{R}^n \times \mathbb{R}^n \times \mathbb{R} \to \mathbb{R}$ called the Lagrangian be $C^2$ and let $J$ be defined as

$$ J(\mathbf{q}) \defeq \int_{t_0}^{t_1}L(\mathbf{q}(t),\dot{\mathbf{q}}(t), t)\mathrm{d}t, $$
with $\mathbf{q} \in C^2([t_0, t_1], \mathbb{R}^n)$. We call $\mathbf{q}$ the generalized coordinate and $\dot{\mathbf{q}}$ the generalized velocity. The extrema of $J$ satisfies the Euler-Lagrange equation
$$ \lib[]{t}\pd[L]{\dot{\mathbf{q}}} - \pd[L]{\mathbf{q}} = 0. $$

Next we'll consider a mechanical system consisting of $N$ point particles $\mathbf{x}_i \in \mathbb{R}^n$ with masses $m_i > 0$. Let $U$ be a $C^2$ function of the $\mathbf{x}_i$'s called the potential energy and let $T$ be defined as

$$ T(\dot{\mathbf{x}}) \defeq \sum_{i=1}^N\frac{m_i\dot{\mathbf{x}}_i^2}{2} $$
called the kinetic energy. We set $L \defeq T - U$ and observe that the Euler-Lagrange equations give rise to the Newtonian equations of dynamics:
$$ m_i \ddot{\mathbf{x}}_i = - \pd[U]{\mathbf{x}_i}. $$
Example. The Lagrangian of the simple pendulum is
$$ L(\theta, \dot{\theta}, t) = \frac{1}{2}l^2\dot{\theta}^2 + gl\cos\theta. $$
We see
$$ \pd[L]{\theta} = gl\sin\theta \quad \quad \pd[L]{\dot{\theta}} = l^2\dot{\theta}. $$
Therefore the Euler-Lagrange equation gives us
$$ l^2\ddot{\theta} - gl\sin\theta = 0. $$
That is $\ddot{\theta} = - \frac{g}{l}\sin\theta$.

The Hamiltonian

Before we can discuss the Hamiltonian of a Lagrangian system, we first need to introduce the Legendre transform. Our discussion of the Legendre transform will be extremely brief. The curious reader will find more properties of the transformation and the historical context in pages 513 - 519 of [2].

Definition. Let $U \subseteq \mathbb{R}^n$ with $f \colon U \to \mathbb{R}$ being convex. We define the Legendre transform $f^* \colon U^* \to \mathrm{R}$ of $f$ such that
$$ U^* \defeq \left\{ \mathbf{p} \in \mathbb{R}^n \vert \sup_{\mathbf{x} \in U}(\mathbf{p} \mathbf{x} - f(\mathbf{x})) < \infty \right\}, $$
and
$$ f^*(\mathbf{p}) \defeq \sup_{\mathbf{x} \in U}(\mathbf{p} \mathbf{x} - f(\mathbf{x})), $$
where vector multiplication is the standard dot product.
Note that if $f$ is $C^1$, then we see $g(\mathbf{x}) \defeq \mathbf{p}\mathbf{x} - f(\mathbf{x})$ is maximized for when $\mathbf{x}$ satisfies $Df(\mathbf{x}) = \mathbf{p}$. Oftentimes in this case, is useful to write the Legendre transform as the system
$$ \left\{ \begin{array}{l} f^*(\mathbf{p}) = \mathbf{p}\mathbf{x} - f(\mathbf{x}) \\ \mathbf{p} = Df(\mathbf{x}) \\ \end{array} \right.. $$
Example. For $f(x) = x^2$, we get $p = 2x$ so
$$ f^*(p) = p\left(\frac{p}{2}\right) - \left(\frac{p}{2}\right)^2 = \frac{p^2}{4}. $$
Definition. Let the Lagrangian $L \colon \mathbb{R}^n \times \mathbb{R}^n \times \mathbb{R} \to \mathbb{R}$ be $C^2$ and convex with respect to $\dot{\mathbf{q}}$. The Hamiltonian $H(\mathbf{p}, \mathbf{q}, t)$ is defined as the Legendre transformation of $L$ with respect to $\dot{\mathbf{q}}$. To be precise, we have the following relation:
$$ \left\{ \begin{array}{l} H(\mathbf{p}, \mathbf{q}, t) = \mathbf{p}\dot{\mathbf{q}} - L(\mathbf{q}, \dot{\mathbf{q}}, t) \\ \mathbf{p} = \pd[L]{\dot{\mathbf{q}}} \\ \end{array} \right.. $$
The variable $\mathbf{p}$ is called the generalized momentum.
Example. From the previous example the Lagrangian of the simple pendulum is
$$ L(\theta, \dot{\theta}, t) = \frac{1}{2}l^2\dot{\theta}^2 + gl \cos\theta. $$
The Hamiltonian is given by the system
$$ \left\{ \begin{array}{l} H(p, \theta, t) = p\dot{\theta} - L(\theta, \dot{\theta}, t) \\ p = \pd[L]{\dot{\theta}} = l^2\dot{\theta} \\ \end{array} \right.. $$
Together, we get
$$ H(p, \theta, t) = \frac{p^2}{l^2} - \frac{1}{2}\frac{p^2}{l^4}l^2 + gl\cos\theta = \frac{p^2}{2l^2} + gl\cos\theta. $$
Theorem (Hamilton's equations). Let the Lagrangian $L(\mathbf{q}, \dot{\mathbf{q}}, t)$ be convex in $\dot{\mathbf{q}}$ with $H(\mathbf{p}, \mathbf{q}, t)$ being the induced Hamiltonian. Then the system of Euler-Lagrange equations is equivalent to the following Hamilton's equations:
$$ \dot{\mathbf{p}} = - \pd[H]{\mathbf{q}} \quad \quad \dot{\mathbf{q}} = \pd[H]{\mathbf{p}}. $$
Proof. We expand the differential of $L$
$$ \mathrm{d}L = \sum_{i=1}^n\left(\pd[L]{q^i}\mathrm{d}q^i + p_i\mathrm{d}\dot{q}^i\right) + \pd[L]{t}\mathrm{d}t, $$
and apply the product rule
$$ \mathrm{d}L = \mathrm{d}(\mathbf{p}\dot{\mathbf{q}}) + \sum_{i=1}^n\left(\pd[L]{q^i}\mathrm{d}q^i - \dot{q}^i\mathrm{d}p_i\right) + \pd[L]{t}\mathrm{d}t. $$
Therefore
$$ \mathrm{d}H = \mathrm{d}\left(\mathbf{p}\dot{\mathbf{q}} - L \right) = \sum_{i=1}^n \left( \dot{q}^i\mathrm{d}p_i - \pd[L]{q^i}\mathrm{d}q^i \right) - \pd[L]{t}\mathrm{d}t. $$
Reading off the components of $dH$ we get
$$ \pd[H]{\mathbf{q}} = - \pd[L]{\mathbf{q}}, \quad \quad \pd[H]{\mathbf{p}} = \dot{\mathbf{q}} \quad \quad \pd[H]{t} = - \pd[L]{t}. $$
Hamilton's equations simply follow from the Euler-Lagrange equation:
$$ \dot{\mathbf{p}} + \pd[H]{\mathbf{q}} = 0. $$
Conversely suppose that we have a Hamiltonian system $H(\mathbf{p}, \mathbf{q}, t)$ that is convex with respect to $\mathbf{p}$. We define the Lagrangian as the Legendre transformation with respect to $\mathbf{p}$:
$$ L(\mathbf{q}, \dot{\mathbf{q}}, t) = \dot{\mathbf{q}}\mathbf{p} - H(\mathbf{p}, \mathbf{q}, t). $$
We write $\dot{\mathbf{p}} = - \pd[H]{\mathbf{q}}$ as
$$ \lib[]{t}\mathbf{p} + \pd[H]{\mathbf{q}} = 0, $$
and observe $\pd[L]{\dot{\mathbf{q}}} = \mathbf{p}$ and $\pd[L]{\mathbf{q}} = - \pd[H]{\mathbf{q}}$ by expanding out $dH$ like the previous argument. Therefore, we recover the Euler-Lagrange equation
$$ \lib[]{t}\pd[L]{\dot{\mathbf{q}}} - \pd[L]{\mathbf{q}} = 0. $$
Observe that $\dot{\mathbf{q}} = \pd[H]{\mathbf{p}}$ is independent of $L$ being a Lagrangian system and follows from properties of Legendre transformations. Moreover this gives a diffeomorphism between $\mathbf{p}$ and $\dot{\mathbf{q}}$.
Example. We continue with the example of the simple pendulum. Recall from the last example that the Hamiltonian of the simple pendulum is
$$ H(p, \theta, t) = \frac{p^2}{2l^2} + gl\cos\theta. $$
Hamilton's equations gives us
$$ \dot{p} = - gl\sin\theta \quad \quad \dot{\theta} = \frac{p}{l^2} $$
Now observe $\ddot{\theta} = \frac{\dot{p}}{l^2} = - \frac{g}{l}\sin\theta$.
In physical systems the Hamiltonian is the total energy of the system $H = T + U$ (i.e. kinetic + potential energy). Next we show that the Hamiltonian is first integral.
Proposition (Conservation of Energy). Let $\mathbf{p}(t)$ and $\mathbf{q}(t)$ be paths that satisfy Hamilton's equations for an Hamiltonian $H(\mathbf{p}, \mathbf{q})$ that does not depend on time. Then $H(\mathbf{p}(t), \mathbf{q}(t))$ is constant as a function of $t$.
Proof.
$$ \lib[H]{t} = \pd[H]{\mathbf{p}}\lib[\mathbf{p}]{t} + \pd[H]{\mathbf{q}}\lib[\mathbf{q}]{t} = - \pd[H]{\mathbf{p}}\pd[H]{\mathbf{q}} + \pd[H]{\mathbf{q}}\pd[H]{\mathbf{p}} = 0. $$

Liouville's Theorem

Let $\dot{\mathbf{x}} = \mathbf{f}(\mathbf{x})$ with $\mathbf{x}(t) \defeq (x^1(t), x^2(t), \dots, x^n(t))$ be a system of ordinary differential equations with $\phi_t$ being the induced flow. By Taylor's Theorem, we can expand $\phi_t$ at initial time $t_0$ as

$$ \phi_{t_0 + t}(\mathbf{x}) = \mathbf{x}(t_0) + \mathbf{f}(\mathbf{x}(t_0))t + \mathcal{O}(t^2) \quad t \to 0, $$
with
$$ \pd[\phi_{t_0 + t}]{\mathbf{x}} = I_n + \pd[\mathbf{f}]{\mathbf{x}}t + \mathcal{O}(t^2) \quad t \to 0. $$

Lemma. Let $D$ be a region in the phase space and define $D_{t}$ as $\phi_t(D)$, and let $v(t) \defeq \vol(D_{t})$ be the volume of $D$ at time $t$. We have
$$ \at{\lib[v]{t}}{t=t_0} = \int_{D_{t_0}}\div{\mathbf{f}(\mathbf{x})}\mathrm{d}\mathbf{x}. $$
Moreover if $\div{\mathbf{f}} \equiv 0$, then volume is preserved.
Proof. We see that by change of variables,
$$ v(t) = \int_{D_{0}} \det \pd[\phi_{t}]{\mathbf{x}}\mathrm{d}\mathbf{x}. $$
Recall that for any matrix $A$, we have
$$ \det(I_n + tA) = 1 + t \tr{A} + \mathcal{O}(t^2) \quad t \to 0. $$
See Jacobi's formula. Therefore for some $\epsilon(\mathbf{x}, t) \in \mathcal{O}(t)$ as $t \to 0$, \begin{align*} \det \pd[\phi_{t}]{\mathbf{x}} & = \det(I_n + \pd[\mathbf{f}]{\mathbf{x}}t + t\epsilon(\mathbf{x}, t)) \\ & = 1 + t \tr(\pd[\mathbf{f}]{\mathbf{x}} + \epsilon(\mathbf{x}, t)) + \mathcal{O}(t^2) \\ & = 1 + t \tr{\pd[\mathbf{f}]{\mathbf{x}}} + \mathcal{O}(t^2) = 1 + \div{\mathbf{f}} + \mathcal{O}(t^2). \quad t \to 0. \end{align*} Therefore,
$$ v(t) = v(0) + t \int_{D_{0}}\div{\mathbf{f}(\mathbf{x})}\mathrm{d}\mathbf{x} + \mathcal{O}(t^2), $$
and so
$$ \at{\lib[v]{t}}{t=0} = \int_{D_{0}}\div{\mathbf{f}(\mathbf{x})}\mathrm{d}\mathbf{x}. $$
And to complete the proof we have
$$ \at{\lib[v]{t}}{t={t_0}} = \at{\lib[]{s}}{s=0}v(s+t_0) = \at{\lib[]{s}}{s=0}\vol(\phi_s(\phi_{t_0}(D))) = \int_{D_{t_0}}\div{\mathbf{f}(\mathbf{x})}\mathrm{d}\mathbf{x}. $$
Theorem (Liouville's Theorem). The phase flow of a Hamiltonian preserves volume. That is for any region $D$, we have
$$ \vol(\phi_t(D)) = \vol(D). $$
Proof. We have
$$ \div{\mathbf{f}} = \sum_{i=0}^n\left(-\pd[]{p_i}\pd[H]{q^i} + \pd[]{q^i}\pd[H]{p_i}\right) = 0, $$
and the proof follows from the previous lemma.

References

  1. Vladimir I. Arnold. Mathematical Methods of Classical Mechanics. Springer-Verlag, 2nd edition, 1989.
  2. Michael Spivak. Physics for Mathematicians. Publish or Perish, 2010.