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 S
T 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 S
E at T. By definition of T,
dS
E/dU
E= 1/T,
where U
E is the bath's energy.
The total entropy is S
T = S +S
E. For any two objects trading heat, like the gas and the environment, equilibrium requires that they have the same T. Otherwise S
T 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 dU
E/dh = -W. Then dS
E/dh=-W/T. But we know dS
T/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)