Suppose we have a system of particles confined to a potential given by
$U(x) = \alpha x^{2n}$
for integer n and $\alpha$ a real valued constant of appropriate units. If the system contains N particles at temperature T, we would like to calculate the heat capacity and the entropy.
Let's start by calculating the partition function. By definition,
$Z = \Sigma e^{-\beta E}$
Where $\beta = \frac{1}{k_b T}$ as usual, and we are summing over all energy states E. Since our potential function is continuous, the energy states take the form:
$Z = \int e^{-\beta ax^{2n} dx$
Now let $x = u (\beta a)^{\frac{-1}{2n}}$. Then $dx = du (\beta a)^{\frac{-1}{2n}$ and $x^{2n} = u^{2n} (\beta a)}$. This gives us
$Z = \int e^{-u^{2n}}(\beta a)^{\frac{-1}{2n}} du$
This integral looks pretty hard, particularly because we don't know anything specific about the value of n. If n is one, we can come up with an answer. For anything else, we're in some trouble. But what we do know is that, whatever the answer is, it is some number. So let's just call that number $\lambda$ and not worry about it. Thus
$Z = \lambda (\beta a)^{\frac{-1}{2n}}$
The heat capacity is given by
$C_v = \frac{1}{k_b T^2}\frac{\partial^2 \ln Z}{\partial \beta^2}$
This is very convenient, because the factors a and $\lambda$ will drop out in this step:
$C_v = \frac{1}{k_b T^2}\frac{\partial^2}{\partial \beta^2} \big( \ln \lambda + \frac{-1}{2n}\ln a + \frac{-1}{2n}\ln \beta \big)$
$C_v = \frac{1}{k_b T^2}\frac{1}{2n}\frac{1}{\beta^2} = \frac{k_b}{2n}$
$C_v = \frac{1}{k_b T^2}\frac{1}{2n}\frac{1}{\beta^2} = \frac{k_b}{2n}$
The entropy is
$S = \frac{\partial}{\partial T}(k_b T \ln Z)$
$S = \frac{k_b}{2n}\big(\ln\beta + 1 \big)$
$S = \frac{k_b}{2n}\big(\ln\beta + 1 \big)$
I skipped a few steps on the last line, but it's just calculating some derivatives. The limiting case here is $n = 1$, which is just a harmonic oscillator. You can see that as the potential gets more anharmonic, we decrease the entropy and the heat capacity. This should not be that surprising--these anharmonic oscillators require far more energy for a displacement, and hence the number of available states is confined for increasing n.