# Rigorous definition of density of states for continuous spectrum

For operators with pure point spectra it is clear how to count number of states corresponding to a given eigenvalue - one can just calculate the dimension of eigenspaces. I am wondering how to do it for continuous spectra. What I usually saw in my undergrad classes is the classical trick of putting the system into an artificial box to quantize the momenta. In a way it is an ingenious idea, but it is not very elegant and looks dirty. But what's the worst it gives wrong answer in some cases. I am wondering if there is more rigorus way to do it.

For the absolutely continuous part of the spectrum of a self-adjoint operator $H$, the "density of states" is provided by the Radon-Nikódym derivative of the spectral measure of $HP_{ac}$ with respect to Lebesgue measure, where $P_{ac}$ is the orthogonal projection onto the absolutely continuous subspace of the domain of $H$. This formula is well defined precisely because of the definition of absolutely continuous spectrum.
I am not sure I understand perfectly you question but formally in the canonical ensemble we can write the partition function $Q(\beta)$ as being:
$$Q(\beta) = \int\cdot \cdot \int d\mu(x)\: e^{-\beta H(x)} = \int_0^{+\infty} dE \: \rho(E)e^{-\beta E}$$ where $d\mu(x)$ is the volume measure for the micro states in the system, $H(x)$ the hamiltonian, $E$ energy values of the hamiltonian and $\rho(E)$ is the density of states. It is not difficult to see that it is in fact the Laplace transform of the the density of state so that $Q(\beta) = \mathcal{L}[\rho(E)]$.
$$\rho(E) = \mathcal{L}^{-1}[Q(\beta)]$$