# Liouvilles Theorem

### From bio-physics-wiki

\begin{align} \dot{q}_i=\frac{\partial H}{\partial p_i} \end{align} \begin{align} \dot{p}_i=-\frac{\partial H}{\partial q_i} \end{align} For each point we can define a vector $\mathbf{v}$ with components \begin{align} \mathbf{v}= \begin{pmatrix} q_1 \\ q_2 \\ \vdots \\ q_r \\ p_1 \\ p_2 \\ \vdots \\ p_r\end{pmatrix} \end{align} We choose let's say $1000$ different initial conditions that lie on and in a sphere in $2r$ dimensional space with volume $V$. We calculate the trajectory of each point, starting at time $t_0$. For some later time $t_1$ each point has now moved according to the laws of motion. As in general some points move fast/slower and into different directions, the sphere will be deformed at time $t_1$. There are two important questions to ask that are equivalent. (i) If we follow the points on the sphere in phase space, is the volume of the sphere conserved? (ii) If we keep the shape of the sphere fixed, are there as many states flowing into the sphere as flow out?

*For frictionless systems that conserve energy (e.g. Harmonic Oscillator) the volume in phase space is also conserved. For dissipative systems the phase space volume contracts with time.*

In the following lines we want to derive a theorem that gives an answer to question (ii). To make our statement more general we introduce the density of initial conditions $\rho$ in $V$. The flow of states through an infinitesimal surface area $d\mathbf{s}$ of the sphere is given by the product $\rho \cdot \mathbf{v}$. We denote the unit vector normal to $ds$ with $\mathbf{n}$. The net flux out of the surface $S$ of the volume $V$ is given by the integral over all elements $d\mathbf{s}$ \begin{align} S= \int_S \rho \cdot \mathbf{v} \cdot \mathbf{n} \, ds \end{align} The change in the number of states per unit time is given by the integral of the time derivative of the density of states over the volume of the sphere. \begin{align} \int_V \frac{\partial \rho}{\partial t} dV \end{align} For a positive flux of points out of the surface, the density of states decreases \begin{align} \int_V \frac{\partial \rho}{\partial t} dV=-\int_S \rho \cdot \mathbf{v} \cdot \mathbf{n} \, ds \end{align} By convergence theorem we can make the integral over the surface an integral over volume \begin{align} \int_V \frac{\partial \rho}{\partial t} dV=-\int_S \nabla (\rho \cdot \mathbf{v}) \, dV \end{align} An infinitesimal volume element has the change in density \begin{align} \frac{\partial \rho}{\partial t}=-\nabla (\rho \cdot \mathbf{v}) \end{align}

This equation is known as continuity equation. \begin{align} \frac{\partial \rho}{\partial t}+\nabla (\rho \cdot \mathbf{v}) =0 \end{align}

The total time derivative of the density is \begin{align} \frac{d \rho}{d t}=\frac{\partial \rho}{\partial t}+\sum_i \frac{\partial \rho}{\partial q_i} \dot{q}_i+\frac{\partial \rho}{\partial p_i} \dot{p}_i \tag{1} \end{align} If we plug in derivatives of the Hamiltonian for $\dot{q}_i$ and $\dot{p}_i$ and use Poisson Brackets \begin{align} \frac{d \rho}{d t}=\frac{\partial \rho}{\partial t}+\sum_i \frac{\partial \rho}{\partial q_i} \frac{\partial H}{\partial p_i}-\frac{\partial \rho}{\partial p_i} \frac{\partial H}{\partial q_i} \end{align} \begin{align} \frac{d \rho}{d t}=\frac{\partial \rho}{\partial t} +\{ \rho, H \} \end{align}

We can also define the Liouville Operator
\[L=\sum_{i=1}^{n}\left[\frac{\partial H}{\partial p_{i}}\frac{\partial}{\partial q_{i}}-\frac{\partial H}{\partial q_{i}}\frac{\partial }{\partial p_{i}}\right]=\{\cdot, H \}\]
In Classical and Statistical Mechanics the continuity equation in the context of the conservation of volume in phase space is also called Liouville Equation. With the Liouville Operator we can write the **Liouville Equation** as
\[\frac{\partial \rho }{\partial t} = -{L}\rho\]
If the Poisson Bracket is zero $\rho$ is conserved and $\frac{\partial \rho }{\partial t}=0$.

To prove that the density of states and the volume is conserved if $\nabla \cdot \mathbf{v}=0$, we calculate the rate of change in $\rho$ as the volume moves with time. To this end we plug in the continuity equation into the total time derivative.
\begin{align}
\frac{d \rho}{d t}&=-\nabla (\rho \cdot \mathbf{v}) +\sum_i \frac{\partial \rho}{\partial q_i} \dot{q}_i+\frac{\partial \rho}{\partial p_i} \dot{p}_i \\
\frac{d \rho}{d t}&=-\nabla (\rho \cdot \mathbf{v}) + \nabla \rho \cdot \mathbf{v}\\
\frac{d \rho}{d t}&=-\nabla \rho \cdot \mathbf{v}-\rho \cdot \nabla\mathbf{v} + \nabla \rho \cdot \mathbf{v}\\
\frac{d \rho}{d t}&=-\rho \cdot \nabla\mathbf{v} \\
\end{align}
If $\nabla \cdot \mathbf{v}=0$ the change in density is zero. The number of states in $V$ is $N=\rho \cdot V$, thus the change of states is
\begin{align}
\frac{dN}{dt}= \frac{d\rho}{dt} \cdot V+\rho \frac{dV}{dt}
\end{align}
No states are created or destroyed $\frac{dN}{dt}=0$, this argument together with conservation of density of states gives
\begin{align}
V \rho \cdot \nabla\mathbf{v} = \rho \frac{dV}{dt}
\end{align}

This equation is known as **Lie derivative**
\begin{align}
\frac{1}{V} \frac{dV}{dt}=\nabla\mathbf{v}
\end{align}

-For $\nabla\mathbf{v} =0$ volume in phase space is conserved

-For $\nabla\mathbf{v} <0$ volumes in phase space contract