If the external pressure is
reduced infinitesimally, the gas expands slightly. If the external pressure is increased
infinitesimally, the gas contracts slightly. In either case the change is reversible in the
thermodynamic sense. If, on the other hand, the external pressure differs measurably
from the internal pressure, then changing pex infinitesimally will not decrease it below
the pressure of the gas, so will not change the direction of the process. Such a system
is not in mechanical equilibrium with its surroundings and the expansion is thermodynamically
irreversible.