Sub topic 9
Work Done by a Gas as the Area Under the P-V Curve
Prerequisites
This chapter assumes you know the following:
- Pressure is force per unit area, and work is force times displacement.
- The ideal gas equation PV = nRT.
- How to integrate simple functions such as 1/V and V^k.
From force on a piston to PdV
Take a gas in a cylinder closed by a frictionless piston of area A. The gas pushes on the piston with force F = PA. If the piston moves outward by a small distance dx, the work done by the gas is
dW = F dx = P A dx = P dV
Here dV = A dx is the small increase in volume. Adding up these small pieces from the initial volume V₁ to the final volume V₂ gives
W = ∫ P dV (from V₁ to V₂)
This formula holds for any shape of container, not only a cylinder. It requires that the pressure P is the same throughout the gas at each instant, so the process must be slow enough for the gas to stay close to equilibrium. Such a slow process is called quasi-static.
On a P-V diagram, with V on the horizontal axis and P on the vertical axis, ∫ P dV is the area between the curve and the V axis. That is why work is often described as "the area under the curve".
Sign and direction
- If the gas expands (dV > 0), the work done by the gas is positive.
- If the gas is compressed (dV < 0), the work done by the gas is negative. Work is done on the gas.
- If the volume does not change, the work is zero, whatever the pressure does.
The work depends on the path, not only on the end states. Two processes can join the same initial and final states and still enclose different areas under their curves. This is why work is not a state function, and it is the reason the first law is stated in terms of heat and work along a specific process.
Work in the standard processes
The table gives the work done by the gas for each standard process, going from V₁ to V₂ (or P₁ to P₂ where relevant).
| Process | Condition | Work done by gas |
|---|---|---|
| Isochoric | V constant | 0 |
| Isobaric | P constant | P(V₂ − V₁) = nR(T₂ − T₁) |
| Isothermal | T constant | nRT ln(V₂/V₁) = nRT ln(P₁/P₂) |
| Adiabatic | Q = 0 | (P₁V₁ − P₂V₂)/(γ − 1) = nR(T₁ − T₂)/(γ − 1) |
| Polytropic | PVⁿ = constant | (P₁V₁ − P₂V₂)/(n − 1) |
Isobaric
With P constant, the integral is P times the change in volume. The area is a rectangle. Using PV = nRT at the two ends gives the equivalent form nRΔT.
Isothermal
For an ideal gas at constant T, P = nRT/V. Then
W = ∫ (nRT/V) dV = nRT ln(V₂/V₁)
Because P₁V₁ = P₂V₂, the ratio V₂/V₁ equals P₁/P₂, so the pressure form is also correct. In JEE problems the logarithm is usually natural, and ln 2 ≈ 0.693 is often given.
Adiabatic
For PV^γ = K, we have P = K V^(−γ). Integrating,
W = K (V₂^(1−γ) − V₁^(1−γ))/(1 − γ) = (P₁V₁ − P₂V₂)/(γ − 1)
The polytropic result has the same form with n in place of γ. It is also the reason polytropic work formulas look alike: set n = γ for adiabatic. Setting n = 1 reproduces the isothermal case, but the formula is singular there and you must use the logarithmic result instead.
Comparing areas
On a P-V diagram, start from the same state and expand to the same final volume. The isobaric curve is flat, so it lies highest and has the most work. The isothermal curve falls as 1/V. The adiabatic curve falls faster, as 1/V^γ, because the gas also cools as it expands. So for equal volume expansion,
Wisobaric > Wisothermal > W_adiabatic
The code below checks the last two for one mole of a monatomic gas doubling its volume at 300 K.
import math
R = 8.314
n, T1, f = 1.0, 300.0, 3 # 1 mol of a monatomic ideal gas at 300 K
Cv = f / 2 * R
gamma = 1 + 2 / f
ratio = 2.0 # V2 / V1 (expansion to double the volume)
# Isothermal expansion: W = nRT ln(V2/V1), and Q = W because dU = 0
W_iso = n * R * T1 * math.log(ratio)
# Adiabatic expansion: T V^(gamma-1) = constant, Q = 0, so W = -dU = n Cv (T1 - T2)
T2 = T1 * ratio ** (1 - gamma)
W_adi = n * Cv * (T1 - T2)
print(f"Isothermal work: {W_iso:.0f} J")
print(f"Adiabatic final T: {T2:.1f} K, work: {W_adi:.0f} J")The isothermal work is about 1729 J. The adiabatic work is about 1403 J, and the gas ends near 189 K. The gas does less work adiabatically because the energy comes only from its internal energy, which falls as it cools.
Reading work from a diagram
For a straight-line segment, or any shape made of simple pieces, you can find the area geometrically instead of integrating.
- Identify the start and end points and the direction of travel.
- Split the region under the path into rectangles and triangles.
- Add the areas. Use a positive sign if V increases along the path and a negative sign if V decreases.
For a trapezoid under a straight line from (V₁, P₁) to (V₂, P₂), the work is
W = ½ (P₁ + P₂)(V₂ − V₁)
For a closed loop, the net work is the area enclosed. It is positive when the loop is traversed clockwise on the P-V diagram and negative when it is traversed anticlockwise. This idea is developed fully in the chapter on cyclic processes.
Common errors
- Using nRT ln(V₂/V₁) for a non-isothermal process. The formula assumes T is constant. In an adiabatic process, T changes, so it fails.
- Forgetting the sign when volume decreases. Compression gives negative work by the gas. Check the direction before you substitute.
- Mixing units. With P in pascals and V in cubic metres, W is in joules. If P is in atmospheres and V in litres, convert using 1 atm·L ≈ 101.3 J.
- Using P ΔV for a process where P changes. This applies only to the isobaric case. For a straight line, use the average pressure.
- Assuming the work is fixed by the end states. Work depends on the path. Always identify the process first.
Worked example
One mole of an ideal gas goes from state A (P = 4 × 10⁵ Pa, V = 2 × 10⁻³ m³) to state B (P = 2 × 10⁵ Pa, V = 6 × 10⁻³ m³) along a straight line on the P-V diagram. Find the work done by the gas.
The path is a straight line, so the area under it is a trapezoid:
W = ½ (4 × 10⁵ + 2 × 10⁵)(6 × 10⁻³ − 2 × 10⁻³) = ½ (6 × 10⁵)(4 × 10⁻³) = 1200 J
The volume increases, so the work is positive: the gas does 1200 J of work.
Exercise
Two moles of an ideal gas expand isothermally at 300 K to three times their initial volume. Take R = 8.31 J/(mol K) and ln 3 = 1.10. Find the work done by the gas. Then state whether an adiabatic expansion to the same final volume, starting from the same state, would give more or less work, and why.
Show answer
W = nRT ln(V₂/V₁) = 2 × 8.31 × 300 × 1.10 ≈ 5.5 × 10³ J (about 5485 J). An adiabatic expansion would give less work. The adiabatic curve falls more steeply than the isothermal curve, because the gas cools as it expands and its pressure drops faster. The area under it is therefore smaller.
Exercise
A gas is compressed at a constant pressure of 2 × 10⁵ Pa from 5 × 10⁻³ m³ to 2 × 10⁻³ m³. What is the work done by the gas, and what is its sign?
Show answer
W = P(V₂ − V₁) = 2 × 10⁵ × (2 × 10⁻³ − 5 × 10⁻³) = −600 J. The sign is negative because the volume decreases, so work is done on the gas.