# Q & A: derivation of pV=NkT

Q:
Could you please derive the ideal gas law using calculus?
- Reubin George (age 16)
Cupertino, CA
A:
With any derivation, it's crucial to specify what you're assuming.
By "ideal gas" we mean a collection of particles for which
1. The gas energy does not depend on volume, V,  when the temperature, T,  and number of particles, N, are fixed.
2. The number of states available to each particle is proportional to V, at fixed T. I.e. the gas entropy S depends on V as kNln(V) + constant.
"k" is a constant used to express entropy in convenient units.

The fundamental principle of thermodynamics is that in equilibrium, the total entropy of some system plus all the things that it interacts with becomes as large as possible. That means that the derivative of the total ST with respect to anything that can change must become zero in equilibrium.

Let our system be the gas in a container supporting a movable piston of area A supporting weight W, exchanging energy with big heat bath environment with entropy SE at T.   By definition of T,
dSE/dUE= 1/T,
where UE is the bath's energy.

The total entropy is ST =  S +SE. For any two objects trading heat, like the gas and the environment, equilibrium requires that they have the same T. Otherwise ST could go up if heat flowed to the one with lower T.

The height h of the piston can change. As the piston goes up height h, the weight's energy goes up by Wh. The gas' energy doesn't change, by assumption (1), so long as T is fixed. So this just takes energy Wh from the environment. Thus  dUE/dh = -W. Then dSE/dh=-W/T. But we know dST/dh=0, so dS/dh= +W/T. Since dV=Adh,  dS/dV= +W/AT. However, force per area is defined as pressure p, so dS/dV=p/T. (Remember all this is at constant T.)

Using assumption (2), dS/dV=Nk/V. So Nk/V=p/T.
Then NkT=pV.

QED.

Mike W.

(published on 09/29/2009)