# Classical Virial Theorem (canonical ensemble derivation)

Again, let $$x_i$$ and $$x_j$$ be specific components of the phase space vector $$x = (p_1,\cdots ,p_{3N},q_1,\cdots,q_{3N})$$. Consider the canonical average

$\langle x_i \frac {\partial H}{\partial x_j} \rangle$

given by

 $$\langle x_i \frac {\partial H}{\partial x_j} \rangle$$ $$\frac {1}{Q} C_N \int dx x_i \frac {\partial H}{\partial x_j}e^{-\beta H(x)}$$ $$\frac {1}{Q} C_N \int dx x_i \left(- \frac {1}{\beta} \frac {\partial}{\partial x_j} \right ) e^{-\beta H(x)}$$

But

 $$x_i \frac {\partial}{\partial x_j}e^{-\beta H(x)}$$ $$\frac {\partial}{\partial x_j} \left ( x_i e^{-\beta H(x)} \right ) - e^{-\beta H(x)} \frac {\partial x_i}{\partial x_j}$$ $$\frac {\partial}{\partial x_j} \left ( x_i e^{-\beta H(x)} \right ) - \delta_{ij}e^{-\beta H(x)}$$

Thus,

 $$\langle x_i \frac {\partial H}{\partial x_j} \rangle$$ $$- \frac {1}{\beta Q} C_N \int dx \frac {\partial}{\partial x_j} \left ( x_i e^{- \beta H (x)} \right ) + \frac {1}{\beta Q} \delta_{ij} C_N \int dx e^{-\beta H(x)}$$ $$- \frac {1}{\beta Q} C_N \int dx' \int dx_j \frac {\partial}{\partial x_j} \left ( x_i e^{-\beta H(x)}\right )+ kT\delta_{ij}$$ $$\int dx' \left.x_i e^{-\beta H(x)} \right \vert _{x_j=-\infty}^{\infty}+ kT\delta_{ij}$$

Several cases exist for the surface term $$x_i exp (-\beta H (x))$$:

1. $$x_i = p_i$$a momentum variable. Then, since $$H \sim p^2_i, exp (-\beta H)$$ evaluated at $$p_i = \pm \infty$$ clearly vanishes.
2. $$x_i = q_i$$and $$U \rightarrow \infty$$ as $$q_i \rightarrow \pm \infty$$, thus representing a bound system. Then, $$exp (- \beta H )$$ also vanishes at $$q_i = \pm \infty$$.
3. $$x_i = q_i$$and $$U \rightarrow 0$$ as $$q_i \rightarrow \pm \infty$$, representing an unbound system. Then the exponential tends to 1 both at $$q_i = \pm \infty$$, hence the surface term vanishes.
4. $$x_i = q_i$$and the system is periodic, as in a solid. Then, the system will be represented by some supercell to which periodic boundary conditions can be applied, and the coordinates will take on the same value at the boundaries. Thus, $$H$$ and $$exp (- \beta H)$$ will take on the same value at the boundaries and the surface term will vanish.
5. $$x_i = q_i$$ and the particles experience elastic collisions with the walls of the container. Then there is an infinite potential at the walls so that $$U \rightarrow \infty$$ at the boundary and $$exp (- \beta H ) \rightarrow 0$$ at the boundary.

Thus, we have the result

$\langle x_i \frac {\partial H}{\partial x_j} \rangle = kT\delta_{ij}$

The above cases cover many but not all situations, in particular, the case of a system confined within a volume $$V$$ with reflecting boundaries. Then, surface contributions actually give rise to an observable pressure (to be discussed in more detail in the next lecture).