Reference: Daniel V. Schroeder, An Introduction to Thermal Physics, (Addison-Wesley, 2000) – Problem 3.28.
The thermodynamic identity for an infinitesimal process is
This relation bears a resemblance to heat plus work relation for the change in internal energy:
In a quasistatic process, where a gas is being compressed slowly enough that the pressure has a chance to equalize throughout the volume of the gas at each stage, the work done in compressing the gas is (this is positive, as the volume decreases in compression so ). In that case, then
and the change in entropy can be calculated as
which agrees with the original definition of entropy.
As an example, suppose we have a litre of air at room temperature (300 K) and atmospheric pressure (), and we heat it at constant pressure until it doubles in volume. From the ideal gas law, if is constant and doubles, then must also double. The entropy change is therefore
where is the heat capacity at constant pressure. From the appendix to Schroeder’s book, for one mole of air (the values for nitrogen and oxygen are both around 29). The number of moles of air in one litre is
The change in entropy is therefore