Statistical Mechanics - Distribution of Energies Consider a state space $\mathbb{X}$. The probability density function under a canonical ensemble is given by the Boltzmann distribution
$$\pi_{\mathbb{X}}(x)=\frac{e^{-\beta E(x)}}{\mathbb{Z}(\beta)}$$
where $E(x)$ is the energy of state $x\in\mathbb{X}$, and $\mathbb{Z}(\beta)$ the partition function or Zustandsumme. I see the marginal density of energy given as
$$\pi_{U}(E)=\frac{\Omega(E)e^{-\beta E}}{\mathbb{Z}(\beta)}$$
where $\Omega(E)$ is the density of states. My question is how do you derive the marginal density for energies from the density over the state space $\mathbb{X}$?.  $E:\mathbb{X}\rightarrow\mathbb{R}_{+}$ is not a one-to-one function so one cannot apply the change of variables theorem.
 A: I am not quite sure I understand your question. In your second equation, $E$ is treated as a variable and not as function anymore, so why do you want to find $E$ function?
The density of states is basically a function counting the number of state in $x\in\mathbb{X}$ that give the same energy: $\Omega(E_0)=|\{x:E(x)=E_0\mbox{ and } x\in\mathbb{X}\}|$

Edit: As a simple example, considering a simple Maxwell-Boltzmann distribution, then $\mathbb{X} = \mathbb{R}^3$. The mapping is $\pi_{\mathbb{X}}(x)\sim e^{-\beta E(x)} = e^{-\beta m \mathbf{v}\cdot \mathbf{v}/2}$. The density of state is something like $\Omega\sim v^2 dv$ and $\pi_{U}(E)dE=v^2 dv e^{-\beta m v^2/2}$. So the method for this problem is simple.
However, if you are looking for generic method to obtain density over the energy space. I don't think it is possible. The problem of finding $\Omega$ is usually harder than finding entropy $S$. Provided that there are infinitely many strongly interacting system that we can't calculate their entropy, I wouldn't expect that there is any general method. In the discrete case, it is a combinatorial and counting problem, which you would expect there is any simple answer.
A: I am not sure I understand your question either but will try something else. When you write a probability distribution $\mathbb{\pi}: \: \mathbb{R}^3 \rightarrow \mathbb{R}_+$ for the cartesian variables $x,y,z$, you can also look at the induced probability measure for the function $r^2 = x^2 + y^2 + z^2$. To figure out what is the corresponding probability measure, you indeed need to change coordinates. Although the map that goes from $(x,y,z$ to $r^2$ is non bijective, there still exists a bijective map from $(x,y,z)$ to $(r,\theta,\phi)$ with which you can apply the change of variables theorems without any problem.
The same will apply to the kinetic energy contribution to the hamiltonian and to the potential contribution if it is quadratic is $r$.
Even though it might not be so simple, you can always find a bijective map that goes from some coordinate system to another with the same dimension where the energy will appear as a variable. Once this is done, you can carry out the integration over the remaining $2dN-1$ ($d$ being the dimension of the real space and $N$ the number of particles) non relevant variables. 
A: In classical physics, the canonical ensemble is defined over six-dimensional phase space $(\mathbf{x},\mathbf{p})$ only, i.e. three dimensions for coordinates and three dimensions for momentum. To answer your question of finding marginal energy density from full phase (state) space, it is sufficient to convert momentum density distribution $f(p)dp$ to the corresponding energy density distribution $f(E)dE$ because Maxwell-Boltzmann distribution has no dependence on $\textbf{x}$ space. Note that momentum density distribution is derived first, followed by energy density derivation.
Changing momemtum vector integral to scalar integral is similar to conversion from Cartesian coordinate integral to spherical coordinate integral:
$$
f(\textbf{p})dp_xdp_ydp_z = 4\pi p^2f(p)dp
$$
 where the three-dimensional integral is reduced to one dimension integral by integrating away the two angular dimensions. The remaining work is just a change of variable using $E = p^2/2m$ (c.f. wikipedia for full expression).
In quantum mechanics, the continuous $\textbf{p}$ space is replaced by discretized momentum vector $\textbf{k}$ space. In one dimension, $k_x = 2\pi n/L_x$ as a consequence of periodic boundary condition. So, $\textbf{k}$-density in one dimension $$\rho(k)_x dk_x=\frac{n}{k_x}dk_x=\frac{L_x}{2\pi}dk_x$$. In three dimension,$$\rho(k)dk_xdk_ydk_z=\frac{L_xL_yL_z}{(2\pi)^3}dk_xdk_ydk_z=\frac{V}{(2\pi)^3}dk_xdk_ydk_z$$.
We can convert the "Cartesian" k-space into "spherical" form. Integrating over all angles, the magnitude of $\textbf{k}$-density becomes
$$\rho(k)dk_xdk_ydk_z=\frac{V}{(2\pi)^3}4\pi k^2dk$$
The last equation above gives the momentum vector $\textbf{k}$-density in quantum mechanical form. Finally, conversion to energy density can be obtained if you have the equation that relates $E$ and $k$:
$$\rho(E) = \frac{V}{(2\pi)^3}4\pi k^2\left(\frac{dk}{dE}\right)dE$$
