Introduction
Let us define the density of particles of species $s$ in a volume element, $d\mathbf{x} \ d\mathbf{v}$, at a fixed time, $t$, centered at $(\mathbf{x}, \mathbf{v})$ as the quantity $f_{s}(\mathbf{x},\mathbf{v},t)$. I assume this function is non-negative, contains a finite amount of matter, and it exists in the space of positive times and $\mathbb{R}^{3}$ and $\mathbb{R}_{\mathbf{v}}^{3}$, where $\mathbb{R}_{\mathbf{v}}^{3}$ is the space of all possible 3-vector velocities. Then one can see that there are two ways to interpret $f$: (1) it can be an approximation of the true phase space density of a gas (large scale compared to inter-particle separations); or (2) it can reflect our ignorance of the true positions and velocities of the particles in the system. The first interpretation is deterministic while the second is probabilistic. The latter was used implicitly by Boltzmann. Let us assume that $f_{s}(\mathbf{x},\mathbf{v},t)$ $\rightarrow$ $\langle f \rangle + \delta f$, where $\langle f \rangle$ is an ensemble average of $f_{s}$ and I have dropped the subcript out of laziness.
Liouville's Equation
I know that $\langle f \rangle$ satisfies Liouville's equation, or more appropriately, $\partial \langle f \rangle$/$\partial t = 0$. In general, the equation of motion states:
$$
\begin{equation}
\frac{ \partial f }{ \partial t } = f \left[ \left( \frac{ \partial }{ \partial \textbf{q} } \frac{ d\textbf{q} }{ dt } \right) + \left( \frac{ \partial }{ \partial \textbf{p} } \frac{ d\textbf{p} }{ dt } \right) \right] + \left[ \frac{ d\textbf{q} }{ dt } \cdot \frac{ \partial f }{ \partial \textbf{q} } + \frac{ d\textbf{p} }{ dt } \cdot \frac{ \partial f }{ \partial \textbf{p} } \right] \tag{1}
\end{equation}
$$
where I have defined the canonical phase space of $(\mathbf{q}, \mathbf{p})$. If I simplify the terms dA/dt to $\dot{A}$ and let $\boldsymbol{\Gamma} = (\mathbf{q}, \mathbf{p})$, then I find:
$$
\begin{align}
\frac{ \partial f }{ \partial t } & = - f \frac{ \partial }{ \partial \boldsymbol{\Gamma} } \cdot \dot{\boldsymbol{\Gamma}} - \dot{\boldsymbol{\Gamma}} \cdot \frac{ \partial f }{ \partial \boldsymbol{\Gamma} } \tag{2a} \\
& = - \frac{ \partial }{ \partial \boldsymbol{\Gamma} } \cdot \left( \dot{\boldsymbol{\Gamma}} f \right) \tag{2b}
\end{align}
$$
where one can see that the last form looks like the continuity equation. If I define the total time derivative as:
$$
\begin{equation}
\frac{ d }{ dt } = \frac{ \partial }{ \partial t } + \dot{\boldsymbol{\Gamma}} \cdot \frac{ \partial }{ \partial \boldsymbol{\Gamma} } \tag{3}
\end{equation}
$$
then I can show that the time rate of change of the distribution function is given by:
$$
\begin{align}
\frac{ d f }{ dt } & = \frac{ \partial f }{ \partial t } + \dot{\boldsymbol{\Gamma}} \cdot \frac{ \partial f }{ \partial \boldsymbol{\Gamma} } \tag{4a} \\
& = - \left[ f \frac{ \partial }{ \partial \boldsymbol{\Gamma} } \cdot \dot{\boldsymbol{\Gamma}} + \dot{\boldsymbol{\Gamma}} \cdot \frac{ \partial f }{ \partial \boldsymbol{\Gamma} } \right] + \dot{\boldsymbol{\Gamma}} \cdot \frac{ \partial f }{ \partial \boldsymbol{\Gamma} } \tag{4b} \\
& = - f \frac{ \partial }{ \partial \boldsymbol{\Gamma} } \cdot \dot{\boldsymbol{\Gamma}} \tag{4c} \\
& \equiv - f \Lambda\left( \boldsymbol{\Gamma} \right) \tag{4d}
\end{align}
$$
where $\Lambda \left( \boldsymbol{\Gamma} \right)$ is called the phase space compression factor. Note that Equations 4a through 4d are different forms of Liouville's equation, which have been obtained without reference to the equations of motion and they do not require the existence of a Hamiltonian. I can rewrite Equation 4d in the following form:
$$
\begin{equation}
\frac{ d }{ dt } \ln \lvert f \rvert = - \Lambda\left( \boldsymbol{\Gamma} \right) \tag{5}
\end{equation}
$$
Relation to Hamiltonian
Most readers might not recognize Equations 4d and 5 as Liouville's equation because one usually derives it from a Hamiltonian. If the equations of motion can be generated from a Hamiltonian, then $\Lambda \left( \boldsymbol{\Gamma} \right) = 0$, even in the presence of external fields that act to drive the system away from equilibrium. Note that the existence of a Hamiltonian is a sufficient, but not necessary condition for $\Lambda \left( \boldsymbol{\Gamma} \right) = 0$. For incompressible phase space, I recover the simple form of Liouville's equation:
$$
\begin{equation}
\frac{ d f }{ dt } = 0
\end{equation}
$$
However, Liouville's theorem can be violated by any of the following:
- sources or sinks of particles;
- existence of collisional, dissipative, or other forces causing $\nabla{\scriptstyle_{ \mathbf{v} }} \cdot \mathbf{F} \neq 0$;
- boundaries which lead to particle trapping or exclusion, so that only parts of a distribution can be mapped from one point to another;
- spatial inhomogeneities that lead to velocity filtering (e.g., $\mathbf{E} \times \mathbf{B}$-drifts that prevent particles with smaller velocities from reaching the location they would have reached had they not drifted); and
- temporal variability at source or elsewhere which leads to non-simultaneous observation of oppositely-directed trajectories.
Source of Irreversibility
Irreversibility is somewhat of a conundrum because it arises largely due to our choice of boundary conditions, smoothing assumptions (e.g., coarse graining or mean field theory), and limits. For instance, if I assume a velocity distribution of particles can be represented by a continuous model function, the use of a continuous distribution function inserts irreversibility into the equation. One can argue that this is splitting hairs because it is obvious that irreversibility exists in nature. However, I think it is important because your question points at a deeper issue.
If I assumed perfectly elastic binary particle collisions and ignore quantum uncertainties, one could, in principle, follow the trajectories of all particles in a system forward and backward in time. There would be no irreversibility in this model, if I had strong enough computers. However, binary particle collisions are not truly elastic, so our assumption of elasticity has created a loss of information.
Another subtle point is that Boltzmann a priori defined his, now famous, H-theorem such that time would increase in the correct direction (i.e., positive time). He did not originally relate the H-theorem to entropy, that interpretation came later (I believe with Gibbs, but someone correct me if I am wrong here).
The point is that the concepts of irreversibility and entropy are coupled, but not necessarily through direct means. I am inclined to think that the irreversibility to which you refer arises from our methods of solving the math necessary for modeling dynamical statistical systems.
References
- Evans, D.J. "On the entropy of nonequilibrium states," J. Statistical Phys. 57, pp. 745-758, doi:10.1007/BF01022830, 1989.
- Evans, D.J., and G. Morriss Statistical Mechanics of Nonequilibrium Liquids, 1st edition, Academic Press, London, 1990.
- Evans, D.J., E.G.D. Cohen, and G.P. Morriss "Viscosity of a simple fluid from its maximal Lyapunov exponents," Phys. Rev. A 42, pp. 5990–5997, doi:10.1103/PhysRevA.42.5990, 1990.
- Evans, D.J., and D.J. Searles "Equilibrium microstates which generate second law violating steady states," Phys. Rev. E 50, pp. 1645–1648, doi:10.1103/PhysRevE.50.1645, 1994.
- Gressman, P.T., and R.M. Strain "Global classical solutions of the Boltzmann equation with long-range interactions," Proc. Nat. Acad. Sci. USA 107, pp. 5744–5749, doi:10.1073/pnas.1001185107, 2010.
- Hoover, W. (Ed.) Molecular Dynamics, Lecture Notes in Physics, Berlin Springer Verlag, Vol. 258, 1986.
- Paschmann, G., and P.W. Daly "Analysis Methods for Multi-Spacecraft Data," ISSI Sci. Rep. Ser. 1, ESA/ISSI, Vol. 1. ISBN:1608-280X, 1998.
- Villani, C., Chapter 2 A review of mathematical topics in collisional kinetic theory, pp. 71–74, North-Holland, Washington, D.C., doi:10.1016/S1874-5792(02)80004-0, 2002.
- Villani, C. "Entropy production and convergence to equilibrium for the Boltzmann equation," in XIVTH International Congress on Mathematical Physics, Edited by J.-C. Zambrini, pp. 130–144, doi:10.1142/9789812704016_0011, 2006.