Suppose a gas is confined by a piston and that the external pressure, pex, is set equal
to the pressure, p, of the confined gas. Such a system is in mechanical equilibrium with
its surroundings because an infinitesimal change in the external pressure in either
direction causes changes in volume in opposite directions.