Visual walkthrough — Work in expansion - reversible isothermal w = −nRT ln(V₂ - V₁), irreversible w = −P_ext ΔV
This page rebuilds the parent result Work in Expansion one picture at a time. We assume you know nothing yet — not what "work" is, not what the squiggly means. By the last figure you will see why reversible expansion always beats irreversible expansion.
Step 1 — What is a gas pushing on a piston?
WHAT. Picture a cylinder of gas sealed by a piston that can slide. The gas molecules bang on the piston from below. That constant hammering, spread over the piston's area, is what we call pressure — force per unit area.
WHY start here. Every symbol later (, , ) lives on this one picture. If we don't anchor them to the piston now, they float free.
PICTURE. Below: gas pushing up on the piston with pressure ; something outside (weights, atmosphere) pushing down with pressure . If the gas wins, the piston rises and volume grows.

See also Ideal Gas Law for how is set by , , , .
Step 2 — What is "work" for one tiny push?
WHAT. When the piston rises by a tiny height, the volume grows by a tiny sliver . During that sliver, the gas pushes against . The little bit of work is
- — the tiny work for this one sliver of motion.
- — what the gas is pushing against right now.
- — the tiny volume added in this one step (a thin slab on the picture).
- the minus sign — IUPAC bookkeeping: when the gas expands () it loses energy, so its work is counted negative.
WHY and not ? Work is force distance. The force actually resisting the piston is set by the outside pressure. The gas only "feels" whatever wall it is pushing against. This distinction is the whole story of this chapter.
PICTURE. One thin orange slab of width under the pressure line — its area is .

Step 3 — Adding up all the slivers: the integral
WHAT. The piston doesn't move once — it moves from volume to through thousands of slivers. Adding every tiny is what the symbol (an elongated "S" for "Sum") means:
- — "sum every sliver as volume runs from the start to the end ."
- — the height of each sliver (may change as we go!).
- — the width of each sliver (shrunk to nothing so the sum is exact).
WHY an integral and not just ? Because can change while the piston moves. Multiplying one pressure by the whole volume change would be a lie unless the pressure stays flat. The integral honestly adds each sliver at its own height.
PICTURE. Many stacked slivers filling the whole region under the pressure curve.

Recall Why is work a "path" quantity?
Because the shape of the pressure line between and decides the area. Different paths, same endpoints, different area — so work is not a state function.
Step 4 — The reversible trick: make shadow
WHAT. Now we choose a special way to expand: let the outside pressure stay only an infinitesimal whisker below the gas pressure at every instant. Then, to any accuracy we care about,
WHY do this? Two payoffs. First, the gas is always in near-balance (Isothermal Process / equilibrium), so we can use the Ideal Gas Law for the height of every sliver. Second, because the two pressures never differ by a finite amount, nothing is wasted — you could reverse the whole thing with a feather's touch. This is the reversible path.
PICTURE. The red flat irreversible line lifts and bends until it lies on the smooth gas curve — the external pressure now tracks the gas at every point.

Step 5 — Substitute the gas law and pull out the constants
WHAT. Put into the integral: Because we chose an isothermal path, is fixed; and are always fixed. So they slide out front:
- — moles of gas (fixed, sealed cylinder).
- — the gas constant (a constant of nature).
- — temperature, held constant (that's what "isothermal" means).
- — the only thing still changing; the height of each sliver now shrinks as grows.
WHY does the height shrink? As the gas expands, its molecules spread out, so they hammer the piston more gently — pressure falls like . The curve slopes down to the right.
PICTURE. The isotherm with three sample slivers of decreasing height as increases.

Step 6 — The one integral you must know: area under is a logarithm
WHAT. What is the total area under the curve from to ? The answer is the natural logarithm:
WHY a logarithm? The natural log is defined as "the running area under the curve." That is literally what it is for. No other everyday function has the property that its slope is ; the log is the unique tool that answers "accumulate ." The last step uses the log law .
PICTURE. The shaded area under labelled as , with the log-law simplification called out.

Putting it together:
- for expansion () : gas does work.
- for compression : work done on gas.
- Only the ratio matters: L gives the same work as L.
Step 7 — The irreversible case: one flat slab
WHAT. Drop the reversible trick. Let be a constant finite value (say atmospheric) the whole way. Then it comes straight out of the integral:
- — one constant number, so it is not trapped inside the sum.
- — the whole volume change in one go.
WHY smaller? The gas pushes against a low, flat wall instead of the high gas-tracking curve. Lower resistance less energy handed over.
PICTURE. The blue curved area (reversible) with the red flat rectangle (irreversible) sitting underneath it — the gap is the "lost" work.

See Entropy and Irreversibility for where that lost work goes, and Free Expansion for the extreme case .
Step 8 — Every edge case on one axis
WHAT. Cover the corners so nothing surprises you:
| Case | Result | |
|---|---|---|
| Reversible expansion | tracks | , max magnitude |
| Irreversible, constant | flat, finite | , smaller magnitude |
| Free expansion | (nothing to push against!) | |
| No volume change | any | |
| Compression () | — | signs flip, |
| Multi-step irreversible | flat per step | between single-step and reversible |
WHY the free-expansion zero? If there is no external pressure, each sliver — the gas rushes into vacuum and does no work at all, no matter how big the volume change.
PICTURE. A ladder of paths from a single tiny rectangle (free expansion, area ) up through multi-step staircases to the full smooth curve (reversible, max area).

Recall Which case gives the most work out?
Reversible ::: it hugs the gas curve, so the area (work magnitude) is the largest possible. Which gives zero? ::: free expansion () or no volume change ().
The one-picture summary

Everything on one PV Diagram: the smooth isotherm whose area is , the single flat rectangle whose area is , a staircase in between, and the vacuum path pinned at zero. The more your external pressure hugs the gas pressure, the bigger the shaded area, the more work you extract — and only the reversible path reaches the maximum.
Recall Feynman retelling — say it in plain words
A gas in a cylinder pushes a piston. The work it does is the area under a graph of the pressure it pushes against, plotted against volume. If I let the outside pressure gently shadow the gas the whole way — pushing back almost as hard as the gas pushes out — the pressure line is the tall smooth curve, and its area is a logarithm: . That's the most work I can ever get. If instead I let the gas shove against a low, flat, constant pressure, the area is just a short rectangle — much less. And if I let it expand into empty space with nothing pushing back, the area is zero — no work at all. Same start, same end, wildly different work, because work is about the path, not the endpoints.