# Equipartition of energy and degrees of freedom in Diatomic gas [duplicate]

Suppose we have a gas of $N$ diatomic molecules (ex $O_2$) with one-molecule hamiltonian being: $$\mathcal{H} = \frac{\vec{p}_1^2}{2m}+\frac{\vec{p}_2^2}{2m} + V(r_{rel})$$ Where $r_{rel}$ is the relative distance between the two atoms. Say the potential is something like $V= \frac12 m ω^2 r_{rel}^2 = \frac12 k r_{rel}^2$ Thus the one body partition function is going to be: $$Z_1 = \frac1{h^6} \int d^3r_1 \int d^3r_2 \int d^3p_1 \int d^3p_2 e^{-β\mathcal{H}}$$

or more conveniently-using center of mass coordinates : $$Z_1 = \frac1{h^6} \int d^3r_{cm} \int d^3r_{rel} \int d^3p_1 \int d^3p_2 e^{-β\mathcal{H}}$$

(something tells me I got something wrong here?)

It's easy to see the first integral gives us the volume $V$, while the last two are the same so we'll get a term $(\frac{2mπ}{β})^{3}$.

Now the point were I'm getting confused is the integral of the relative distance: I'm reading in notes/books that the relative distance is one extra quadratic term in the hamiltonian and will thus give us an extra term $\sim (\frac{1}{β})^{1/2}$. However I'm thinking of it as three extra terms, since $\vec{r}_{rel}= \vec{r}_1 - \vec{r}_2$ is a vector, same as $\vec{p}_{1,2}$, right? Indeed doing the integral I get : $$\int d^3r_{rel} exp(-\frac{βk}{2} r_{rel}^2) =4π \int dr r^2 exp(-\frac{βk}{2} r^2) \sim (\frac{1}{β})^{3/2}$$ So I'd get a heat capacity $9/2 k N$ instead of $7/2 k N$.

What am I getting wrong? Why are the momenta considered as 3 quadratic terms each, while the relative distance in the potential as 1 and how does this become apparent when integrating with respect to center of mass coordinates?

## marked as duplicate by Michael Seifert, Community♦Jul 25 '18 at 16:36

I think the problem is that your spring potential has its minimum at the origin, whereas it should be at the equilibrium bond length $r_0$. Apart from this, I think that your derivation is OK.
With $V=\frac{1}{2}k(r_\text{rel}-r_0)^2$, the integral becomes more complicated. One can shift the origin of coordinates out to $r_0$: set $x=r_\text{rel}-r_0$. If we make the approximation that the RMS amplitude is much less than $r_0$, the integration limits may be extended to $\pm\infty$ without changing the result significantly. Also, the $r^2$ prefactor becomes, to a good approximation, $r_0^2$, and your integral becomes proportional to $\beta^{-1/2}$ as expected.