# Virial Theorem for Gas Particles

My statistical mechanics professor stated the Virial Theorem as $$$$\langle K \rangle = -\frac12 \sum_{i=1}^N \langle \mathbf{F}_i\cdot \mathbf{r}_i\rangle$$$$ For an ideal gas in a container, the only force applied to the gas particles is by the wall of the container and it applies a force $$d\mathbf{F}=-\hat{\mathbf{n}}PdA$$ that points inwards from the wall. From this, it is relatively simple to recover the ideal gas law from the Virial Theorem.

I am wondering about the situation of non-interacting particles that are moving around but do not interact with any container. In this case, there are no forces applied on the point particles so that the right hand side of the Virial Theorem expression is $$0$$. This seems to imply that $$\langle K\rangle = 0$$, which does not make sense since the particles are still moving around and thus have nonzero kinetic energy. I was hoping someone could explain the correct way to think about the Virial Theorem as it relates to gases.

• IIRC the proof of the virial theorem requires that the motion of the particles be bounded in time. Commented Jan 13 at 4:07

The comment from Michael Serfert is mostly correct. To be precise, it is true for periods bounded in time or motion bounded in space. Your proposed counterexample fails both cases.

From Goldstein, Poole, and Safko, 3rd edition, the authors define a quantity

$$G = \sum_{i}\vec{p}_{i}\cdot\vec{r}_{i}$$

and conclude that, in your notation using $$K$$ (they use $$T$$)

$$2\overline{K} + \overline{\sum_{i}\vec{F}_{i}\cdot\vec{r}_{i}} = \frac{1}{\tau}[G(\tau)-G(0)]$$

Then, from GPS:

If the motion is periodic, i.e., all coordinates repeat after a certain time, and if $$\tau$$ is chosen to be the period, then the right-hand side of [the prior equation] vanishes. A similar conclusion can be reached even if the motion is not periodic, provided that the coordinates and velocities for all particles remain finite so that there is an upper bound to $$G$$. By choosing $$\tau$$ sufficiently long, the right-hand side of Eq. [the prior equation] can be made as small as desired. In both cases, it then follows that $$\overline{K} = -\frac{1}{2}\overline{\sum_{i}\vec{F}_{i}\cdot\vec{r}_{i}}$$

It should be clear why the theorem fails using your example.