# Change of variables in canonical probability density

In K. Huang's book Statistical Mechanics, par. 7.2, the author writes the canonical partition function in a different way:

$$Q = \frac{1}{N! h^{3N}} \int dp dq \ e^{-\beta H(p,q)} = \int_0^{\infty} dE \ \omega (E) e^{-\beta E}$$

where $\omega(E)$ is the microcaninical density of states,

$$\omega(E)=e^{S(E)/k}$$

So that we have

$$Q=\int_0^{\infty} dE e^{\beta(TS(E)-E)} = \int_0^{\infty} dE e^{-\beta F(E)}$$

where I have just used the fact that $E-TS=F$ (Helmoltz free energy).

So basically we have performed a change of variables: from the canonical $(p,q)$ variables to the energy variable $E$:

$$\rho(p,q) = \frac{e^{-\beta H(p,q)}}{ N! h^{3N}Q} \rightarrow \rho_E(E) = \frac{e^{-\beta E}}{Q} \omega(E)$$

My question is: How can we do this in general? We have seen what form the canonical probability density takes if expressed as a function of energy: what form will it take if we express it as a function of a set of variables (continuous or discrete), $\{\alpha\}$, different from the canonical variables $(p,q)$?

My guess is that we will obtain something in the form

$$\rho_{\{\alpha\}}(\{\alpha\}) = \frac{e^{-\beta H_\text{eff}(\{\alpha\})}}{Q} \Omega(\{\alpha\})$$

where $H_\text{eff} (\{\alpha\})$ is some kind of effective hamiltonian, but I can't figure out how to determine $H_\text{eff}$ and $\Omega$.

• OK clarification question version 2. Are you asking for the probability density for a single state in the new variables, in which case the answer is that the Boltzmann distribution is defined over the set of states of the system and does not care about the variables used to describe them, so it is unchanged. Or asking for the probability density of a subset of the set of all states (such as the set of all states with a given energy), in which case it is in general impossible to write in the form you have given without making $H_{eff}$ temperature dependent – By Symmetry Jun 16 '16 at 0:39
• @BySymmetry I was just looking for a formula to express the canonical probability density as a function of a set of variables which are not the canonical variables. I realized that the answer may just be using the usual formula for the change of variable in a probability density (see my answer). Of course any further observation is welcome. – valerio Jun 17 '16 at 6:34

Writing the partition function in terms of the density of states boils down to simply ordering our summations to count up all the states with the same energy first, and then summing over the different possible energies. This procedure can be done regardless of the coordinates being used to describe the states; there is no need to introduce an effective Hamiltonian.

Explicitly, lets say that the states of our system are specified by some coordinates $\alpha$, which for definiteness we will say are continuous (the discrete case is the same with the integrals replaced with sums) Our partition function is then $$Q(\beta) = \int \mathrm{d}\alpha \;e^{-\beta H(\alpha)}$$

We may divide our coordinate space into surfaces, $S_E$, of constant energy, i.e. $$H(\alpha_E) = E\qquad \forall \alpha_E\in S_E$$ We can then change coordinates to to an energy coordinate $E$ and some parameterisation of $S_E$, $\alpha_E$. The partition function is the $$Q = \int\mathrm{d}E\int_{S_E} \mathrm{d}\alpha_E \; e^{-\beta E}$$ We then simply define the density of states $$\omega(E) = \int_{S_E} \mathrm{d}\alpha_E$$ This gives the final form of the partition function as $$Q = \int \mathrm{d}E\; \omega(E)e^{-\beta E}$$

In a similar way we can obtain the probability density for a given energy by summing up the probability density of all states with that energy. \begin{align} \rho(E) &= \int_{S_E}\mathrm{d}\alpha_E\;\rho(E,\alpha_E)\\ &= \int_{S_E}\mathrm{d}\alpha_E\;\frac{e^{-\beta E}}{Q}\\ &= \frac{e^{-\beta E}}{Q}\omega(E) \end{align}

• Thanks for your answer, but this not exactly what I wanted to know. Maybe my question was not clear enough: I would like to know what form would the canonical probability density take if expressed as a function of a set of variables $\alpha$ different from the canonical variables. – valerio Jun 15 '16 at 21:43
• I have tried to reformulate my question to make it more clear! – valerio Jun 15 '16 at 21:50

After quite some thought, I have come to the conclusion that my question is more a mathematical question than a physical one.

What I am looking for is actually a formula for a change of variables for a probability density function.

For example, if we have the random variable $X$ with probability density $\rho_X(x)$ and another random variable $Y=f(X)$, the probability density of $Y$ will be given by the following formula:

$$\rho_Y(y) = \int \rho_X(x) \ \delta(y-f(x)) \ dx$$

So in our case, when we consider the energy, we should have

$$\rho_E(E) = \int \rho(p,q)\ \delta(E-H(p,q)) \ dp dq = \frac{e^{-\beta E}}{Q} \omega(E)$$

And indeed, even if the integral is not trivial to evaluate, we see that this makes sense, because

$$\int \delta(E-H(p,q)) \ dp dq \sim \omega(E)$$

(see for example M. Tuckerman, Statistical Mechanics: Theory and Molecular Simulation, par 4.3)

So if we consider a single variable

$$\alpha=f(p,q)$$

we obtain

$$\rho_\alpha (\alpha) = \int \rho(p,q) \ \delta(\alpha-f(p,q)) \ dp dq$$

If we consider a discrete set of variables $\{\alpha_i = f_i(p,q)\}$, I think we will obtain something like

$$\rho_{\{\alpha\}} (\{\alpha\}) = \int \rho(p,q) \ \prod_i \delta(\alpha_i-f_i(p,q)) \ dp dq$$

But I still haven't been to come out with a formula for the case in which we consider a continuous set of variables.

We could also define an effective hamiltonian in the following way (let's take the simple case of a single variable):

$$e^{-\beta H_\text{eff}(\alpha)} = \int e^{-\beta H(p,q)} \ \delta(\alpha-f(p,q)) \ dp dq$$

The exact same relation in the case of $\alpha=$magnetization vector can be found in G. Parisi's Statistical Field Theory, par. 3.1, and I find this very encouraging.