The density of states g(ϵ) for a spin-S gas with spin degeneracy gS in a D-dimensional box with energy relation ϵ(p) is g(ϵ)=gs(L2πℏ)D∫dDpδ(ϵ−ϵ(p))=gs(L2πℏ)D∫dΩDp(ϵ)D−1|∂ϵ∂p(p(ϵ))|