Work Done in Reversible and Irreversible Compression of an Ideal Gas
This Demonstration compares the thermodynamic processes of reversible and irreversible isothermal compression of an ideal gas. The graph and image of a piston at the top represent the slow compression of a gas from some initial volume to some final volume . Reversible work is given by the integral , which equals the area shown in darker blue. By the usual thermodynamic convention, positive work means work done by the surroundings on the system. Since the process is isothermal, this equals the negative of the heat produced.[more]
The graph and image of a piston at the bottom represent a sudden compression from some initial volume to a final volume, an irreversible process. The work done is now equal to the pink area, . By the minimum work principle, the work done by a system is minimized in a reversible process, consistent with . The difference between these quantities represents potential work lost by carrying out the compression irreversibly.[less]
 P. Atkins and L. Jones, Chemical Principles: The Quest for Insight, New York: W.H. Freeman, 1999.