Now according to the first law of thermodynamics, in the absence of heat exchange with the
surroundings, the internal energy U of the gas decreases as it does work on the piston. Noting
that U = ncT for an ideal gas, where c is the molar specific heat at constant volume (equal
for example to 3R/2 for a monatomic and to 5R/2 for a diatomic gas near room temperature),
and that the infinitesimal work done on the piston is F dx = p dV = (nRT /x) dx, the balance
between the rates of energy lost and work done implies