The ideal gas law from Maxwell's velocity distribution

Posted in math on Monday, April 14 2014

Recently I've been playing around with finding the relations between the microscopic particulars of an ideal gas and the macroscopic observables we all know and love -- in particular the relation between temperature and the average kinetic energy (velocity) of the particles in the gas. We can take the idea further by showing that the ideal gas law itself is a consequence of the Maxwell velocity distribution (Transport Phenomena, problem 1C.3).

So, first suppose a surface with surface area S. A particular molecule bounces off it during a small time interval Δt. Suppose we choose a coordinate system such that the surface falls along the y-z plane. We do this so that any molecules bouncing off it undergo the transformation: $$ \vec{u}_{in} = \left \langle u_x, u_y, u_z \right \rangle \longrightarrow \vec{u}_{out} = \left \langle -u_x, u_y, u_z \right \rangle $$

The Maxwell distribution gives us the number of molecules per unit volume with a given velocity, or more precisely with velocity within some differential volume around u, is given by: $$ f \left( u_x, u_y, u_z \right) du_x du_y du_z $$

To undergo a particular collision the particle must be close enough to the surface to actually collide within the instant Δt, that is the particle must be within the box S ux Δt. So, how many particles are in that box? Well.. $$ S \cdot u_x \cdot \Delta t \cdot f \left( u_x, u_y, u_z \right) du_x du_y du_z $$

I assume the surface forms a boundary for the system, thus particles can only come in from the negative x-direction (i.e. have positive ux). This is summarized in some chicken scratch below (though the drawing is backwards, showing the particle arriving with -ux and leaving with +ux, oops).

pressure page 1

That get's us somewhere, for each particle impacting the wall the force transferred is given by Newton's 2nd law: $$ \vec{F} \Delta t = \Delta momentum = m \Delta \vec{u} $$ $$ F = {{ 2 m u_x} \over {\Delta t} }$$

So, for a given velocity u, the force imparted by particles impacting the surface with that velocity is: $$ \left({{ 2 m u_x} \over {\Delta t} } \right) \cdot \left( S u_x \Delta t \right) \cdot f \left( u_x, u_y, u_z \right) du_x du_y du_z $$

Summing up all possible velocities gives us the total force imparted by particles impacting the surface: $$ F = \int \limits_{-\infty}^{\infty} \int \limits_{-\infty}^{\infty} \int \limits_{0}^{\infty} \left({{ 2 m u_x} \over {\Delta t} } \right) \cdot \left( S u_x \Delta t \right) \cdot f \left( u_x, u_y, u_z \right) du_x du_y du_z $$

The pressure exerted on a surface with area S is simply F/S:

$$ p = \frac{1}{S} \cdot \int \limits_{-\infty}^{\infty} \int \limits_{-\infty}^{\infty} \int \limits_{0}^{\infty} \left({{ 2 m u_x} \over {\Delta t} } \right) \cdot \left( S u_x \Delta t \right) \cdot f \left( u_x, u_y, u_z \right) du_x du_y du_z $$

Simplifying

$$ p = \int \limits_{-\infty}^{\infty} \int \limits_{-\infty}^{\infty} \int \limits_{0}^{\infty} { 2 m u_x^2} \cdot f \left( u_x, u_y, u_z \right) du_x du_y du_z $$

Maxwell's velocity distribution is: $$ f \left( u_x, u_y, u_z \right) = n \cdot f\left( u_x \right) \cdot f\left( u_y \right) \cdot f\left( u_z \right)$$ $$ f \left( u_i \right) = \sqrt{ m \over {2 \pi \kappa T}} \exp \left({ -m \over {2 \kappa T}} u_i^2 \right) $$

Plugging it and separating integrals we get: $$ p = 2 m n \left[ \int \limits_{0}^{\infty} \left( u_x^2 \cdot \sqrt{ m \over {2 \pi \kappa T}} \exp \left({ -m \over {2 \kappa T}} u_x^2 \right) \right) du_x \right] \times $$ $$ \times \left[ \int \limits_{-\infty}^{\infty} \left( \sqrt{ m \over {2 \pi \kappa T}} \exp \left({ -m \over {2 \kappa T}} u_y^2 \right) \right) du_y \right] \times $$ $$ \times \left[ \int \limits_{\infty}^{\infty} \left( \sqrt{ m \over {2 \pi \kappa T}} \exp \left({ -m \over {2 \kappa T}} u_z^2 \right) \right) du_z \right] $$

As a refresher of sorts, the following are known identities for Gaussian integrals

$$ \int \limits_0^\infty s^2 e^{-s^2} ds = \frac{\sqrt{\pi}}{4} $$

and

$$ \int \limits_{-\infty}^\infty e^{-s^2} ds = \sqrt{\pi} $$

In a similar way to what I did in previous posts, for each integral make the following substitution: $$ s^2 = {m \over {2 \kappa T}} u^2, du = \sqrt{\frac{2 \kappa T}{m}} ds $$

Then we end up with: $$ p = 2 m n \left[ \sqrt{ m \over {2 \pi \kappa T}} \cdot \left( \frac{2 \kappa T}{m} \right)^{\frac{3}{2}} \cdot \frac{\sqrt{\pi}}{4} \right] \cdot \left[ \sqrt{ m \over {2 \pi \kappa T}} \cdot \sqrt{\frac{2 \kappa T}{m}} \cdot \sqrt{\pi} \right] \cdot \left[ \sqrt{ m \over {2 \pi \kappa T}} \cdot \sqrt{\frac{2 \kappa T}{m}} \cdot \sqrt{\pi} \right] $$

Cancelling out what's within the square brackets: $$ p = 2 m n \left[ \frac{\kappa T}{2 m} \right] \cdot \left[ 1 \right] \cdot \left[ 1 \right] $$

Finally: $$ p = n \kappa T $$

Which is the ideal gas law. It may not look like it depending on what you are used to for notation: p is the pressure, n is number density, i.e number of molecules per unit volume, κ is the Boltzmann constant, and T is the temperature in absolute units (e.g. Kelvin).