# Liouville’s Theorem

### Incompressibility

Liouvilles's theorem states that flows in phase space are incompressible.

We can summarise the theorem by the equation $$\nabla H = 0$$ where $H$ is the Hamiltonian of the system in question. We shall show why this is true below.

Incompressibility is central to classical mechanics, and can be thought of as information conservation, where trajectories in phase phase cannot merge or diverge. It's analogue in quantum mechanics is called unitarity.

Of course, in practise, where some variables have been ignored (friction, for example), trajectories can merge.

### One dimension

Consider a set of points on straight line, initially separated by a fixed distance. For flow to be incompressible on this line, we would just require that each point travelled at the same velocity, so that we wouldn't have any clumping together, or thinning, of points. That is, the density of the points doesn't change.

Another way to show this is to locate two markers arbitrarily on the line, at $P, Q$, and calculate the difference between the velocity of points passing each marker.

Figure 7.1 - Density of points on a line

If, for any $P, Q$, we have $$v_Q - v_P = 0$$ then the density can't vary on the line - see figure 7.1 (a). We can say that the flow is incompressible.

But, if, for some particular $P,Q$, we have $$v_Q - v_P \neq 0$$ then the density of the points must vary over the interval, $[x_P, x_Q]$ - see figure 7.1 (b). Hence the flow cannot be incompressible.

Setting $\Delta x = x_Q - x_P$ we can consider how the difference $v_Q - v_P = v(x + \Delta x) - v(x)$ behaves as we let $\Delta x \to 0$, which is called the divergence of $v$, given by $$\frac{\partial v}{\partial x} = \lim_{\Delta x \to 0} \frac{v(x + \Delta x) - v(x))}{\Delta x}$$

For incompressibility, we require that the divergence is zero $$\frac{\partial v}{\partial x} = 0$$

### Two dimensions

We can easily extend the same concept to a small region, $\Delta A = \Delta x \Delta y$, in a two dimensional space. The number of points passing through the region will be the difference of the number of points crossing the boundaries of the region over a unit time interval.

Figure 7.2 - Divergence in two dimensions

If the velocity is given by $$\vec{v} = (v_x, v_y)$$ then the difference between the number of points crossing the vertical sides at $x, x + \Delta x$ is proportional to both the change in velocity in the $x$-direction, and the length of the side, $\Delta y$.

That is, the difference in the x-direction is proportional to $$\frac{\partial v}{\partial x} \Delta x \Delta y$$

We can make exactly the same argument for the horizontal lines at $y, y + \Delta y$ and we get that the difference in the $y$-direction is proportional to $$\frac{\partial v}{\partial y} \Delta x \Delta y$$

Adding these together, we find the net change in the density of points in the region is $$\left( \frac{\partial v}{\partial x} + \frac{\partial v}{\partial y} \right) \Delta x \Delta y$$ which we can integrate over any given region.

The integrand is again the divergence of the velocity vector, $$\nabla \cdot \vec{v}$$ and for incompressibility, we require that the divergence is zero over any region. That is, $$\nabla \cdot \vec{v} = \frac{\partial v}{\partial x} + \frac{\partial v}{\partial y} = 0$$

### Many dimensional phase space

To confirm the incompressibility of phase space, we can define the velocity vector for $i$ coordinates and momenta to be $$\vec{v} = \left(v_{q_i}, v_{p_i}\right)$$ and check that the divergence of this vector is zero everywhere.

But, using Hamiltonian's equations, \begin{align*}\nabla \cdot \vec{v} &= \sum_{i}\left\{ \frac{\partial v_{q_i}}{\partial q_i} + \frac{\partial v_{p_i}}{\partial p_i} \right\}\\&= \sum_{i}\left\{ \frac{\partial}{\partial q_i} \left( \frac{\partial H}{\partial p_i} \right) + \frac{\partial}{\partial p_i} \left( -\frac{\partial H}{\partial q_i} \right) \right\}\\&= \sum_{i}\left\{ \frac{\partial^2 H}{\partial q_i \partial p_i} - \frac{\partial^2 H}{\partial p_i \partial q_i} \right\}\\&= 0\end{align*} and the result follows.

Notice that, in many dimensions, we don't require that for each $i$, $$\frac{\partial v_{q_i}}{\partial q_i} + \frac{\partial v_{p_i}}{\partial p_i} = 0$$ meaning that there isn't conservation of points in a particular region, but we can say that if the velocity increases in one direction, then it must decrease in another direction by the same factor.

To see this, consider a free particle in one dimension. The phase space are the points $(x, p_x)$. The Lagrangian of the particle is just $$L = \tfrac{1}{2} m \dot{x}^2$$ and the momentum is $$p_x = m \dot{x}$$.

Now suppose we transform the coordinate $$x \to x' = \alpha x$$

Then, the Lagrangian and the momentum become \begin{align*}L' &= \tfrac{1}{2} m \frac{\dot{x}^{'2}}{\alpha^2}\\p_{x'} &= m \frac{\dot{x}'}{\alpha^2}= m \frac{\dot{x}}{\alpha} = \frac{1}{\alpha} p_{x}\end{align*}

Therefore the transformation in phase space is \begin{align*}x &\to x' = \alpha x\\p_{x} &\to p_{x'} = \frac{1}{\alpha} p_{x}\end{align*}

So, if the coordinate is stretched by a factor $\alpha$, then the corresponding momentum is contracted by the same factor. What is conserved here is the (two dimensional) area $$x' p_{x'} = x p_x$$