# How do we find the phase space density from the Hamiltonian?

How do we find the phase space density from the Hamiltonian?

For example: Consider a classical gas made of N identical non-interacting particles in 1d. Each molecule is characterised by centre mass variables $Q_i,P_i$ and relative variables $q_i,p_i$. The Hamiltonian is given by $$\mathcal{H}_N=\sum_{i=1}^N \frac{P_i^2}{2M}+\frac{p_i^2}{2m}+\frac{m\omega^2}{2}q_i^2$$

I think that the definition of phase space density is $p(\Gamma)d\Gamma$. The $d\Gamma$ is usually easily obtainable as $d\Gamma=\prod d^3q_id^3p_i$. So think you just have to find the probability but I cannot see how.

I thought of another direction which is $p(\Gamma)d\Gamma=\lim_{\mathcal{N}\rightarrow \infty}\frac{d\mathcal{N}(\Gamma)}{d\Gamma}$ where $\mathcal{N}(\Gamma)$ is the number of microsystems whose state is in volume element $d\Gamma$. This approach does not seem like it lends itself to computation

Normally we do NOT calculate the phase space density of a system. In the phase space formulation of classical statistical mechanics, the phase space density $\rho(p,q;t)$ has its specified form for different ensembles. Normally for systems at equilibrium the density $\rho$ has no explicit time dependence and thus we work with $\rho(p,q)$.
(1) For microcanonical ensemble, the energy of the system is fixed and according to the 'equal a priori probability', each microstate is equally likely, therefore, $\rho=constant$ throughout the relevant region in the phase space. The exactly value for this constant is not important since in statistical mechanics all we care about the relative chance or probabilities, you can always normalize it in the end. More precisely, for the average value of some physical quantity $f(p,q)$, we have $$<f>=\frac{\int dqdp f(p,q)\rho}{\int dqdp \rho}=\frac{\int dqdp f(p,q)}{\int dqdp},$$ since $\rho$ is constant in this case.
(2) For canonical ensemble, which you might be more interested in, the density $\rho(p,q)$ is no longer uniform, instead we have $$\rho(p,q)\propto exp(-H(p,q)/kT),$$ which simply means the higher the energy, the less likely the level will be occupied. This is just the usual Boltzmann factor to be consistent with the standard thermodynamic results. Then for different systems you just need to put in their respective Hamiltonians. Again, the proportionality constant in front is not important, it will be cancelled out anyway when we do the average calculation.
To summarize, the phase space density simply characterizes the relative probability density for the classical states labelled by $(p,q)$ with Hamiltonian $H(p,q)$ to be occupied. But we already have the probability density from standard thermodynamics, which can be directly used in the phase space approach.