# Partition function in classical thermodynamics

Where does the factor of $V/(2\pi\hbar)^{\text{dim}}$ come from in the classical partition function, e.g. $$Z_1 = \frac{V}{(2\pi\hbar)^3} \int d^3p \; e^{-\beta p^2/(2m)}$$

I know the hand-waiving arguments that a 'unit cell' in classical phase space should be a) on the order $\Delta x \Delta p \geq \hbar/2$ (Heisenberg) or b) the smallest increment of a plane wave with periodic boundary conditions ($\psi(0) = \psi(L) = 0$, ansatz $e^{ikx}$. Hence $2 \pi n = kL$ ($n \in \mathbb{Z}$) and $\Delta k = 2\pi/L$ or $\Delta p = 2 \pi \hbar /L$).

But why, really?

The factor of $V$ comes from integration over $\mathrm d\vec x$ (as we assume that the Hamiltonian is position independent). On the other hand the factors of $2\pi$ and $\hbar$ are essentially irrelevant: you only care about the derivatives of the logarithm of the partition function, and therefore any global factor always drops out: you can multiply the partition function with any (non-zero, temperature independent) factor and the physics stay the same.
In the end you are calculating $Z$ in classical mechanics, and so the measurable predictions should not depend on $\hbar$. Back in the days of Boltzmann, Gibbs, etc., they used an arbitrary constant with units of action to make $Z$ dimensionless. The value of such a constant is irrelevant (predictions did not depend on it back then; they still don't today). We now identify their arbitrary constant with Planck's constant because it has the right dimensions, and this is the factor you get from counting microstates in QM (again, you can use any multiple of $\hbar$, because global coefficients always cancel upon taking derivatives).