Canonical partition function for an ultrarelativistic gas in a power-law trap
= Canonical partition function for an ultrarelativistic gas in a power-law trap
For energy $pc+U(x)$,
$$
Z_1=\frac{(k_BT)^3}{\pi^2(\hbar c)^3}
\int e^{-U(x)/(k_BT)}d^3x.
$$
If $U(r)=r^{2n}/V^{2n/3}$, then
$$
Z_1=\frac4{\pi(\hbar c)^3}
V(k_BT)^{3+3/(2n)}I_n,
\qquad
I_n=\int_0^\infty u^2e^{-u^{2n}}du.
$$
Consequently $pV=Nk_BT$, while the mean energy and variance are $NAk_BT$ and $NA(k_BT)^2$ with $A=3+3/(2n)$.