(Original on SE https://physics.stackexchange.com/questions/459086/continuous-transition-of-degrees-of-freedom-in-thermodynamics-with-simple-exampl, though I usually get better answers here.)
In thermodynamics books I have read, I have often come across statements about how certain degrees of freedom are relevant only at certain temperatures (such as the vibration degrees of freedom of some molecules only being relevant in certain ranges), but I can't recall a convincing quantitative analysis of this. I tried to set up a simple example to explore this issue, but I'm unsure what goes wrong (though I haven't thought TOO much about it).
We know that for a free particle in one dimension at finite temperature, the partition function is given by:
$$Z(\beta)=\frac{L}{h}\int \text{d}p e^{-\beta p^2/2m}=\frac{L}{h}\sqrt{\frac{2 \pi m}{\beta}}$$
And then our expected energy is just:
$$\langle E \rangle =\frac{1}{2}k_B T$$
Which we'd expect for a particle with one degree of freedom.
On the other hand, the partition function for a particle in a 1-D harmonic potential is:
$$Z(\beta)=\frac{1}{h}\int \text{d}x \int \text{d}p e^{-\beta(kx^2+p^2/m)/2}=\frac{2\pi}{\beta h\omega}$$
Which gives the expected energy:
$$\langle E \rangle = k_BT$$
Here's my problem. If we take a limit of the spring constant to zero ($k \rightarrow 0$), doesn't that just correspond to a free particle? The average energies depend ONLY on temperature, so where exactly does this limit come in?
Even though this is a relatively simple example, I encounter similar problems when I try to work out when and how degree of freedom fails to be "relevant" in the examples alluded to in textbooks.