## The simplest proof of the ideal gas law

Prerequisite: the section Entropy in statistical
physics (needed for the definition of temperature !)
*Let us keep natural physical units : amounts of substance **n* are counted in molecules (avogadro constant = 1) and entropy is counted in natural logarithms (k=R=1).

Between the phase spaces of a given system of *n* gas molecules in 2
volumes *V* and *V'*, the space of position
coordinates of each of the *n* gas molecules is expanded by a volume
factor (*V'*/*V*), while the rest of dimensions (momentum, internal
rotations and vibrations) with both energy functions in these dimensions
(kinetic energies and intra-molecular potential energies) remain
fixed. Thus, the condition of thermal equilibrium at the same temperature *T*
is preserved from one volume to the other just by diluting the phase space along
position coordinates, thus dividing the probability of each elementary state by
(*V'*/*V*)^{n}. This leads to a variation of entropy
*S'*−*S* = *n*.ln(*V'*/*V*).
For a small expansion (*V'*=*V*+d*V*), d*S* = *n*.d*V*/*V*
*V* = *n*.d*V*/d*S*.

As the energies are preserved in this isothermal expansion, the received heat
energy *T*d*S* balances the released work of pressure *P*d*V*:

*PV* = *n.P*d*V*/d*S* = *nT*
### When do gases depart from the ideal gas law, and how much ?

It happens when the dilution of the probability density of positions of each molecule
of gas does not follow proportionality to volume, because what the variation of volume
brings to the system (roughly an additional empty space
for each molecule), consists in positions with probabilities that may differ from the
average of probabilities in the space, as the latter includes the case of
positions near another molecule, which can differ. For example if each
molecule is occupying space in such a way that it forbids a volume *b* for
the positions of other molecules then in the first order of correction for almost
perfect gases, the formula becomes (*V/n*)−*b*= *T/P*.

On the other hand, some molecules such as water
(vapor), attract each other in some ways, presenting positions at intermediate
distances (between collision and separation) with a lower potential energy,
so that an excess amount of probability can be found concentrated at such distances,
which may exceed the amount which was missing by the previous effect (due to the volume forbidden at shorter distances, or rather partially forbidden by a higher potential energy, so that these effects are of the same nature with different signs).
The effect of these bounds can be expressed by the above formula with a negative value for *b*. This *b* is
independent of volume but depends on temperature, especially its negative terms are very sensitive to it (becoming important at low temperatures).

Another cause of deviation from the ideal gas law, also expressible by the same formula in the same approximation (when *V/n* is much
larger than |*b*|) but happening without interaction, is a quantum effect, for gases of light atoms or molecules at low temperature: the movement of each molecule occupies a "position" with volume *h*^{3} in phase space.
In each space dimension, molecules with mass *m* at temperature *T* have a thermal uncertainty (rough interval) of momentum of about 2√*mT*, giving
an interval of positions *h*/2√*mT* (this formula is approximative ! would need a difficult calculation for the precise coefficient), whose cube is a sort of space volume |*b*| occupied by each molecule. The sign of *b* depends on the type of the gas molecules, and has similar effects between the classical and quantum cases:
- It is positive for fermions, like with a repulsion or forbidden volume : 2 identical fermions cannot occupy the same place in phase space (Pauli exclusion principle).
- It is negative for bosons : 2 identical bosons can occupy the same place in phase space with double counting (because configurations with 2
identical bosons at the same position avoid the division by 2 otherwise applied
as part of the division of the volume of phase space by the group of permutations
between identical bosons). With this again, molecules are likely to gather (like water vapor can turn
into liquid, bosonic gases can turn into Bose-Einstein condensates).

Example of the dihydrogen molecule at 2 Kelvin: k*2K=2.761 . 10^{-23} J and pi*hbar/sqrt(2*(proton mass)*2.761*10^-23 J)= 1.09 nm.

Table of contents : Foundations
of physics