Partition function for continuous energy

The partition function has usually two definitions: the first is for discrete microstates with energies $E_i$. In this case it is defined as

$$Z = \sum_{i} e^{-\beta E_i},$$

where $i$ ranges over all microstates. The second definition takes place on the phase space $M$ with hamiltonian $H : M\to \mathbb{R}$, being defined as

$$Z=\int_M e^{-\beta H(p,q)} dpdq.$$

Now what if we have a continuous set of microstates, so a continuum of energies $E$, can we generalize the first definition to

$$Z =\int_{E_1}^{E_2} e^{-\beta E}dE,$$

where $E$ ranges over $[E_1,E_2]$? This is different from the integral on phase space: there we sum over the phase space, here we sum over energies.

What lead me to consider this was the case of one electric dipole exposed to an electric field $\mathbf{E} = E_0 \hat{\mathbf{z}}$. In that case the energy is

$$U = -\mathbf{p}\cdot \mathbf{E} = -pE_0\cos \theta.$$

If we could use this form I proposed, we would have

$$Z = \int_{-pE_0}^{pE_0}e^{-\beta E}dE=-\dfrac{1}{\beta} (e^{-\beta pE_0}-e^{\beta pE_0})=2k_BT \sinh \dfrac{pE_0}{k_B T}.$$

But I can't justify it. This is just one example of what lead me to that. The question is the general case.

So my question here is: in the general case where we have a continuous set of microstates and hence a continuous set of energies, can we generalize the first sum directly to an integral? If so, how can we justify it rigorously and how this relates to the phase space version?

• Remember that Hamiltonian represents the energy of the microstate. Then there is obviously a connection between the partition function in phase space and in a continuum – UKH Sep 19 '16 at 3:02

You can't use $$Z = \int e^{-\beta E} dE$$ because that integral weights every energy equally, when you really want to be weighting each energy by the number of microstates at tha energy - the "density of states'' $\rho(E)$. You can think of $\rho(E)$ as being like $dN/dE$, where $dN$ is the number of states in the window $[E, E + dE]$, so $$Z = \int e^{-\beta E} \rho(E)\, dE \equiv \int e^{-\beta E}\, dN$$ is clearly the continuum limit of the discrete case.

$$Z = \sum_{i} e^{-\beta E_i}=\sum_i e^{-\beta H(p_i,q_i)}\Delta x \Delta p .$$ We go througth every posible energy state to every posible state in the p-q space. Of course p and q can be limited to certain restrictions. This last sumatory can be directly transformed into an integral for small enoguth $\Delta x$ as it is usually consider in statisticall physics. Be carefull because equation (3) is not always true. Is better to start from equation (2) For the dipole case, you could find the solution here, the solution to the exercise: