Reversible and Irreversible Isothermal Expansion of an Ideal Gas
This Demonstration compares the thermodynamic processes of reversible and irreversible isothermal expansion of an ideal gas. The graph and the image of a piston at the top represent the slow expansion of a gas from an initial volume to a final volume (you can vary these volumes with the sliders). Reversible work is given by the integral , which equals the lightly shaded area below the top curve. By the usual thermodynamic convention, negative work means work done by the system on the surroundings.[more]
The graph and image of a piston at the bottom represent a sudden expansion from some initial volume to a final volume ; this is an irreversible process. The work done in this case is equal to the dark-blue rectangular area. The area shaded above the rectangle represents energy (or potential work) lost by the system, such as energy lost as friction. Note that irreversible expansion can also occur in multiple s. In the case of multiple step expansion, multiple rectangular regions with widths that depend on the volume of the gas before and after each step could be drawn under the curve to represent work done by the system.[less]
 P. Atkins and L. Jones, Chemical Principles: The Quest for Insight, New York: W. H. Freeman, 1999.