Reversible Expansion

Let an ideal gas expand isothermally - i.e. with appropriate input of heat - against a (slowly diminishing!) weight.

This process may be reversed: by slowly increasing the weight load on the piston and removing any excess heat to a thermostatted heat bath we may recompress the gas isothermally, to reach the initial state again.