# Why is it valid to always use the particle in a box model in density of states calculations?

Suppose we would like to calculate the density of states of some 3-D system given the dispersion relation $$\omega = f(k)$$. In every such example I have come across (for instance, with phonon dispersion), we use the fact that the k-space density of states is $$D(k) = \frac{\pi^3}{V}$$, where V is the volume of the system. From this, we can find $$D(\omega)$$ as usual. My question is why the expression $$D(k) = \frac{\pi^3}{V}$$ is always valid, since this expression comes from assuming that the system behaves like a particle in a box with hard wall boundary conditions and applying the associated quantisation on $$k$$. I have read that the density of states does not depend on the shape of the system and so such an assumption is valid, but I do not see why this is true, or why the constant $$k$$-space DOS should hold for more complicated systems.

Next, on averaging. The statement $$D(k) = \pi^3 / V$$ is a statement about the average density (in the hard wall box model) after averaging over a region in $$k$$ space large enough to contain many states. Really the density of states is sharply peaked at certain $$k$$ values, and zero in between. The details of exactly where the states lie does depend on the shape of the box. But if the box is large and one is averaging over many states, then these details do not affect the average.