Lessons · thermo

Work by an expanding gas: area under the P–V curve

Regime 3 — an algebra-only domain, but the calculus underpinning is clean and worth seeing: the work is the area under the curve, ∫P dV. SymPy proves that area is exactly the memorized result — and that the constant-pressure case collapses to the rectangle.

Regime 3 · algebra-only Math machine-derived & checked by SymPy 3 modeling assumptions (author-asserted)

One mole of an ideal gas at T=300T = 300 K expands isothermally from V1=0.025V_1 = 0.025 m³ to V2=0.075V_2 = 0.075 m³. How much work does it do — and why is the answer a logarithm, not simply pressure times volume change? Watch the work accumulate as the area under the P–V curve.

Isothermal work W=nRTln(V2/V1)W = nRT\ln(V_2/V_1) (the shaded area)
2740 J
Initial pressure P1=nRT/V1P_1 = nRT/V_1
99770 Pa
Final pressure P2=nRT/V2P_2 = nRT/V_2
33260 Pa
If pressure stayed at P1P_1: W=P1ΔVW = P_1\,\Delta V (the rectangle)
4989 J
Work is the area under the pressure–volume curve
W=V1V2PdVW = \int_{V_1}^{V_2} P\,dV

Work done by the gas is the integral of pressure over volume — the area under the PPVV curve. At constant pressure the area is a rectangle (PΔVP\,\Delta V); when the pressure varies, it is the area under a curve.

check dWdV=P\tfrac{dW}{dV} = P; check W=V1VPdVW = \int_{V_1}^{V} P\,dV'; recover W=nRTln(V2/V1)W = nRT\ln(V_2/V_1); collapse the constant-pressure case to PΔVP\,\Delta V

  • The work's slope is the pressure: dWdV=P\tfrac{dW}{dV} = P — the area's rate of growth is the curve's height. [structural]
  • The accumulated work is the area: W(V)=V1VPdVW(V) = \int_{V_1}^{V} P\,dV'. [structural]
  • The memorized isothermal result W=nRTln(V2/V1)W = nRT\ln(V_2/V_1) is exactly the area at V2V_2. [structural]
  • At constant pressure the integral collapses to W=PΔVW = P\,\Delta V — the area is a rectangle (the quadrature). [structural]

Dimensional homogeneity: checked by SymPy (holds).

Common misconception: “The work done by an expanding gas is just pressure times the change in volume, W=PΔVW = P\,\Delta V.

That is only true at constant pressure (a rectangle). In an isothermal expansion the pressure falls as the gas expands — P=nRT/VP = nRT/V — so the work is the area under a curved hyperbola, nRTln(V2/V1)nRT\ln(V_2/V_1), which is less than P1ΔVP_1\,\Delta V. Drag the cursor: the shaded area under the curve, not a rectangle, is the work.

Modeling assumptions — author-asserted, disclosed not discharged
  • Ideal gas: PV=nRTPV = nRT holds exactly (no intermolecular forces, point particles).
  • Isothermal, reversible, quasi-static expansion — the temperature is held constant by a reservoir.
  • Work is the area under the P–V curve, W=PdVW = \int P\,dV, with no friction or dissipation.

The P–V graph, fully annotated

A static rendering (Matplotlib): the shaded area under P is the accumulated integral W, and the slope of W is P. The interactive version with a draggable cursor is in the Graph tab above.

2026-06-26T15:38:26.459976 image/svg+xml Matplotlib v3.11.0, https://matplotlib.org/