# Proving the Virial theorem

Consider the expectation in the canonical ensemble defined by $$\left\langle x_i\frac{\partial \mathcal{H}}{\partial x_j} \right\rangle=\frac{1}{Z}\int d\Gamma x_i\frac{\partial \mathcal{H}}{\partial x_j}e^{-\beta\mathcal{H}},$$ where $$d\Gamma=\prod_{i}^Nd\Gamma_i=\prod_{i}^N d^3p_id^3q_i.$$ Integrating the numerator over $x_j$ by parts we obtain $$\left\langle x_i\frac{\partial \mathcal{H}}{\partial x_j} \right\rangle=\frac{1}{Z\beta}\int \prod_{i \neq j} d\Gamma_i \left(-[x_ie^{-\beta\mathcal{H}}]_{x_j^-}^{x_j^+} +\left(\frac{\partial x_i}{\partial x_j}\right) e^{-\beta \mathcal{H}}\right).$$ From here apparently we get $$\left\langle x_i\frac{\partial \mathcal{H}}{\partial x_j} \right\rangle=\delta_{ij}k_BT.$$

I cannot see how this holds. So I tried to explain myself as follows. The first term must go to zero so, $$\left\langle x_i\frac{\partial \mathcal{H}}{\partial x_j} \right\rangle=\frac{1}{Z\beta}\int \prod_{i \neq j} d\Gamma_i \left(\frac{\partial x_i}{\partial x_j} e^{-\beta \mathcal{H}}\right)$$ and so $$\left\langle x_i\frac{\partial \mathcal{H}}{\partial x_j} \right\rangle=\delta_{ij}k_BT \frac{1}{Z}\int \prod_{i \neq j} d\Gamma_i e^{-\beta \mathcal{H}}$$ but in classical statistical mechanics we have that $$Z=\frac{1}{h_0^{3N}N!}\int d^{3N}qd^{3N}p \exp(-\beta\mathcal{H}(\mathbf{q},\mathbf{p}))$$ so I doubt that $$\frac{1}{Z}\int \prod_{i \neq j} d\Gamma_i e^{-\beta \mathcal{H}}=1$$ Moreover I cannot see why we did not include $\frac{1}{h_0^{3N}N!}$ earlier as I thought that it always has to be included in classical statistical mechanics.

• You are mixing up indices, because you use the index $i$ twice: both in $\mathrm{d}\Gamma=\prod_i\mathrm{d}\Gamma_i$ and to denote one of the coordinates you're interested in ($x_i$). If you, e.g., write $\mathrm{d}\Gamma=\prod_k\mathrm{d}\Gamma_k$, you will get the correct result. – Simeon Carstens Apr 20 '15 at 16:54
• @SimeonCarstens Surely there is still a factor missing? – Permian Apr 21 '15 at 9:54
• You are correct; imho the factor $\frac{1}{h_0^{3N} N!}$ is already missing in your very first equation in the probability densitiy function for the canonical ensemble, see, e.g., "canonical ensemble" on Wikipedia. That your first equation is wrong if you include this factor in $Z$ can be seen by checking dimensions: $[\mathrm J]$ on the l.h.s as opposed to $[\mathrm (J\times \mathrm s)^{3N} \times \mathrm J]$ on the r.h.s. The $(\mathrm {J}\times \mathrm s)^{3N}$ is because of the integration measure $\mathrm d \Gamma$. – Simeon Carstens Apr 21 '15 at 19:29

Integrating the numerator over $$x_j$$ by parts we obtain $$\left\langle x_i\frac{\partial \mathcal{H}}{\partial x_j} \right\rangle=\frac{1}{Z\beta}\int \prod_{i \neq j} d\Gamma_i \left(-[x_ie^{-\beta\mathcal{H}}]_{x_j^-}^{x_j^+} +\left(\frac{\partial x_i}{\partial x_j}\right) e^{-\beta \mathcal{H}}\right).$$
In the rhs there is a double mistake. The variable $$x_j$$ is either $$q_j$$ or $$p_j$$, thus there is not an integration on all coordinates but $$\Gamma_j$$ which should appear on the rhs. Instead one should see integration over al coordinate but $$x_j$$. Moreover, integration by parts does not give a formula with an integral over all coordinates but one. It gives two terms, one without one integration, and the second which is again an integral over the whole phase space, although of a different function.
The correct formula should be written as follows: $$\left\langle x_i\frac{\partial \mathcal{H}}{\partial x_j} \right\rangle=\frac{1}{Z\beta}\int \prod_{i,without~x_j} d\Gamma_i \left(-[x_ie^{-\beta\mathcal{H}}]_{x_j^-}^{x_j^+} \right) + \frac{1}{Z\beta}\int \prod_{i} d\Gamma_i \left(\frac{\partial x_i}{\partial x_j} e^{-\beta \mathcal{H}}\right).$$ From which the result follows.
As far as the $$\frac{1}{h_0^{3N}N!}$$ factor, it is just matter of taste to write it or not, since it should appear both at numerator and denominator of the formula for the average.