# Question about ergodicity and the evolution of the probability distribution under Liouville's theorem

According to Liouville's theorem, the probability distribution function $$\rho$$ evolve in phase space with $$\frac{d \rho}{d t} = \frac{\partial \rho}{\partial t}+\left\{\rho,H\right\}_{P.B} =0$$ when the system is steady, $$\frac{\partial \rho}{\partial t}=0$$, we have $$\left\{\rho,H\right\}_{P.B} =0$$ this holds for two condition, the first one is $$\rho$$ is uniform through out the whole phase space, the second one is $$\rho$$ is a function of the Hamiltonian $$H(q,p)$$, as the case of canonical ensemble, $$\rho=exp(\frac{-H(q,p)}{k_Bt}).$$

Here is my question, if the system is in equilibrium, then the system is ergodic. In this case, the trajectory formed by the evolution of the system under Hamilton Equation will visit every point of the phase space. Then $$\rho$$ should be uniform through out the whole phase space. This seems to violate the second case mentioned above as $$\frac{d \rho}{d t}=0$$, then the canonical ensemble should be non-ergodic. I dont know where I am wrong.

## 1 Answer

Motion governed by a time-independent hamiltonian $$H(q,p)$$ conserves energy. Therefore, only the microstates with the same energy are visited under such hamiltonian motion, not whole phase space. That's what happens with the microcanonical ensemble.

On the other hand, when you put your system in contact with a thermal bath (canonical ensemble), the effect of the thermal bath will not be described correctly by the hamiltonian. You could view the thermal bath as collisions at the systems boundary that change the energy of the system (keeping the energy of the system+heat bath constant) ; any such collision will put the system on a trajectory with a new energy.

Finally, you should remember that for the canonical ensemble, microstates of the whole system (including the heat bath) are equiprobable; this does not mean that all microstates of the considered system have the same probability (that's the core of the canonical probability function)