Skip to main content

Thermal unit · institution-dependent · Interactive lesson

Gas work, p-V paths, and path dependence

A gas pushing a piston hands over energy as the integral of p dV. Learn to read that integral as a signed area, evaluate it along an isotherm, and ask the question first year skipped: does the gas have a pressure to integrate at all? Two routes between the same states give two answers; that is not sloppy bookkeeping, it is what work is.

UPIII-07.02 · Lesson 2 of 9 in this unit. Position is not a completion score.
Starting model: Gas work, p-V paths, and path dependencep-V diagram, V₁ = 1.0 L. States 1 and 2 share one isotherm (solid). Upper arrows, route A: isobaric at p₁ then isochoric at V₂, W = 200 J. Lower arrows, route B: isochoric at V₁ then isobaric at p₂, W = 100 J. Isotherm: W = 139 J. Dashed level: a sudden expansion against constant p_ext = 0.60 × 10⁵ Pa has no curve; W = 60 J.12ABp / 10⁵ Pa p₁ = 2.0, p₂ = 1.00isotherm W = 139 Jpₑₓₜ = 0.60 → W = 60 JV / L V₁ = 1.0, V₂ = 2.0
Start with a picture. Change the model in the lab below.

Thermal unit · institution-dependent. Many departments teach thermal physics separately or within Physics II. Check whether your university includes this numbered unit in Physics III.

1

Build the model

Work is a line integral in the p-V plane, and the line is the physics.

The key idea

The work done by a gas in a quasi-static process is W = ∫p dV along its path in the p-V plane: the signed area under the curve, positive for expansion, negative for compression, and different for different paths between the same two states.

Example. One mole of ideal gas held at 300 K and allowed to double its volume slowly does W = nRT ln 2 = 8.314 × 300 × 0.693 = 1.73 kJ of work; the same end state reached by free expansion into a vacuum does no work at all.

The complete physical model and assumptions

Let a gas at pressure p push a piston of area A outward by dx: it does work F dx = pA dx = p dV on the piston. Integrate along the process and W = ∫p dV, so on a p-V diagram the work done by the gas is the area under the path, positive when V grows and negative when it shrinks. Two things about that integral carry the whole topic. First, the integrand is the pressure of the gas, and a gas has one pressure only when it is in internal equilibrium; the integral therefore exists only for a quasi-static process, slow enough that every intermediate state is an equilibrium state and can be drawn as a point. Second, the value depends on the route: p dV is not the differential of any function of state, so ∮p dV around a loop is the enclosed area rather than zero, and W between two states is undefined until a path is named. For an ideal gas held at constant T the route is p = nRT/V and the area is nRT ln(V₂/V₁). When a piston is released suddenly, or a gas rushes into a vacuum, there is no path to draw: the gas has a pressure gradient, not a pressure, and the work the surroundings receive is set by whatever external pressure resists the boundary, ∫pₑₓₜ dV, which for a free expansion is zero. Everything downstream in this section, from heat capacities to the Carnot bound, rests on knowing which integral applies and when.

1From the piston face to the area under a curve

Let the gas fill a cylinder closed by a piston of area A. When the piston moves out by dx, the gas pushes it with force pA and does work dW = pA dx = p dV, because A dx is the volume swept. Sum the steps and W = ∫p dV from V₁ to V₂. The dimensions check at once: Pa × m³ = (N m⁻²)(m³) = N m = J. The sign is carried by dV alone. An expansion has dV > 0 and W > 0, the gas doing work on its surroundings; a compression has dV < 0 and W < 0, meaning work is done on the gas, and in the convention ΔU = Q − W that negative W raises U. On a p-V diagram the integral is the area between the path and the V axis, counted positive when the path runs to the right and negative when it runs to the left. Nothing in the derivation used an ideal gas or a particular process. It used only that the gas had a pressure p at the piston face, and that is the assumption to watch.

2Two routes between the same states, two areas

Take a gas from state 1, p₁ = 2.0 × 10⁵ Pa and V₁ = 1.0 × 10⁻³ m³, to state 2, p₂ = 1.0 × 10⁵ Pa and V₂ = 2.0 × 10⁻³ m³. Route A: expand at constant p₁ to V₂, then drop the pressure at fixed volume. The isochoric leg has dV = 0 and contributes nothing, so WA = p₁(V₂ − V₁) = 2.0 × 10⁵ × 1.0 × 10⁻³ = 200 J. Route B: drop the pressure first at V₁, then expand at p₂: WB = 1.0 × 10⁵ × 1.0 × 10⁻³ = 100 J. Same end states, and the gas hands over twice as much energy along A as along B. The difference, 100 J, is the area of the rectangle the two routes enclose, (p₁ − p₂)(V₂ − V₁), and it is what a cycle running out along A and back along B would deliver per loop. Since p₁V₁ = p₂V₂, the two states also share an isotherm, and for an ideal gas the curved route p = p₁V₁/V gives a third answer between the other two: 200 J × ln 2 = 139 J.

3The isothermal integral and its limiting cases

For an ideal gas at fixed T, substitute p = nRT/V into the integral: W = nRT ∫dV/V = nRT ln(V₂/V₁), and since nRT = p₁V₁ = p₂V₂ on the isotherm, W = p₁V₁ ln(V₂/V₁) as well. The argument is a ratio, dimensionless as a logarithm's must be. Now check the limits. For a tiny change V₂ = V₁(1 + ε), ln(1 + ε) ≈ ε and W ≈ p₁V₁ε = p₁ΔV: every quasi-static path looks isobaric over a short enough step, which is why the rectangle is the building block of all of them. For a large expansion the logarithm is slow. One mole at 300 K doubling its volume does nRT ln 2 = 8.314 × 300 × 0.6931 = 1729 J, and doubling again adds another 1729 J rather than 3458 J, because the pressure has halved and each further litre is bought at a lower price. The result sits between the rectangles, p₁ΔV above and p₂ΔV below, which for the first doubling are 2494 J and 1247 J. For a compression V₂ < V₁ the logarithm is negative and the same formula returns the work done on the gas with the sign already right.

4Work is not a state function: đW is an inexact differential

Internal energy has a value at every state, so its change between two states is fixed before any path is named: dU is an exact differential and ∮dU = 0. Work is different, and the calculus says so directly. A differential M dV + N dp on the p-V plane is exact only if ∂M/∂p = ∂N/∂V. For work M = p and N = 0, so ∂M/∂p = 1 while ∂N/∂V = 0. The test fails, there is no function W(p, V) whose differences give the work, and the loop integral ∮p dV is the enclosed area rather than zero. That is why the increment is written đW or δW rather than dW: it is a small quantity of work transferred, not a small change in something the gas possesses. The practical consequence is a rule of grammar. 'The work done by the gas between states 1 and 2' is not a complete sentence until the path is stated, whereas 'the change in internal energy between states 1 and 2' is. Heat inherits the same status through the first law, Q = ΔU + W: a fixed ΔU plus a path-dependent W is path-dependent.

5Quasi-static means one pressure for the whole gas

The integrand in ∫p dV is the pressure of the gas, which is defined only when the gas is in internal equilibrium. Move the piston and the molecules next to it are compressed first; the news travels through the gas at the speed of sound, cₛ ≈ 340 m s⁻¹ in air near room temperature, and only after several crossings of the cylinder length L is the pressure uniform again. So 'slow' has a number: the process time must be long compared with L/cₛ. For L = 0.20 m that is 0.6 ms. A stroke of that full length lasting 1 s spans some 1700 crossing times; the piston moves at 0.2 m s⁻¹, the pressure across the cylinder differs by roughly that speed over the sound speed, under one part in a thousand, and the process can be drawn as a curve of equilibrium points. The same stroke completed in 1 ms cannot. Two more conditions travel with the word: the piston must be frictionless, or part of the force at the face is spent on the wall instead of the gas, and any heat exchange must be slow enough that T is defined too. Meet them and the path is reversible in the sense the section uses later: run backwards, it retraces the same curve.

6When the path cannot be drawn: sudden and free expansion

Release a latched piston and the gas rushes out; the pressure at the piston face collapses below the pressure deep in the cylinder, and there is no single p to integrate. The end points are still equilibrium states and can be marked on the diagram, but no curve joins them. What the surroundings receive is set on their side of the boundary: W = ∫pₑₓₜ dV, with pₑₓₜ the external pressure the piston pushes against. Hold 1 mol at 300 K in contact with a bath and let it double its volume from V₁ = nRT/p₁ = 0.02494 m³ (p₁ = 1.00 × 10⁵ Pa) against a constant pₑₓₜ equal to the final pressure of 0.50 × 10⁵ Pa: W = 0.50 × 10⁵ × 0.02494 = 1247 J, against 1729 J for the quasi-static isotherm between the same states. Push it back suddenly against pₑₓₜ = p₁ = 1.00 × 10⁵ Pa and the work done on the gas is 1.00 × 10⁵ × 0.02494 = 2494 J, against 1729 J the slow way. Expand into a vacuum and pₑₓₜ = 0: the gas doubles its volume, its temperature is unchanged, and W = 0. The pattern is general and is the seed of the Carnot bound: of all routes between two states that exchange heat only with the one bath at T, the quasi-static one extracts the most work on expansion and costs the least on compression. The qualifier matters, since routes that trade heat at other temperatures, like the isobaric-then-isochoric rectangle of the worked comparison, can exceed the isotherm.

2

Key equations

Read the units, assumptions and limits before substituting.

Work done by a gas along a quasi-static path

W = ∫ p dV, taken from V₁ to V₂ along the path

Turns force-times-distance at the piston face into an area under a curve; the sign arrives free with dV, positive for expansion and negative for compression.

p is the gas pressure in Pa, V its volume in m³, W in J (1 Pa m³ = 1 J); W is the work done by the gas, so ΔU = Q − W

Constant pressure

W = p (V₂ − V₁)

The one case where W = pΔV is exact; every other path needs the integral, or the average pressure the integral defines.

p in Pa, V in m³; the rectangle under a horizontal path, and the small-step limit of every quasi-static path

Isothermal ideal gas

W = nRT ln(V₂/V₁) = p₁V₁ ln(V₂/V₁)

Positive for expansion, negative for compression, and only logarithmic in V: doubling the volume again adds the same nRT ln 2, not twice as much.

n in mol, R = 8.314 J mol⁻¹ K⁻¹, T in K; the logarithm takes a ratio, so V may be in any unit

Path dependence and loops

WA − WB = ∮ p dV = area enclosed by A out and B back

For a state function the loop integral would vanish; for work it does not unless the paths coincide, which is exactly what path dependence means.

A, B: two quasi-static paths between the same end states, W in J; the loop integral is positive for a clockwise circuit

Irreversible expansion against a set pressure

W = ∫ pₑₓₜ dV = pₑₓₜ (V₂ − V₁) for constant pₑₓₜ

The only work integral left when the path cannot be drawn; a free expansion has pₑₓₜ = 0 and does no work however far the gas spreads.

pₑₓₜ is the pressure on the outer face of the piston, in Pa; the gas itself has no single p during the process

Quasi-static criterion

τprocess ≫ L / cₛ

Gives 'slow' a number: a pressure disturbance must cross the cylinder many times during the change, so the gas keeps one pressure throughout.

L: size of the gas in m; cₛ: speed of sound in it, about 340 m s⁻¹ in air near room temperature; τprocess: the time V takes to change, in s
3

Interactive lab

Predict first. Explore the model. Compare the result.

Explore the model

2.0 × 10⁵ Pa
1 to 3 × 10⁵ Pa; steps of 0.1.
2.0 L
1.5 to 4 L; steps of 0.1.
0.6
0 to 1; steps of 0.1.

Try this. Drag V₂ from 2.0 to 4.0 L at p₁ = 2.0: route A climbs from 200 to 600 J, the isotherm from 139 to 277 J and route B only from 100 to 150 J, though all three join the same two states. Then slide pₑₓₜ to zero: the dashed level drops onto the axis and the free expansion does no work at all.

Live results

W ROUTE A (p₁ THEN V₂)
200 J
W ISOTHERM nRT ln(V₂/V₁)
139 J
W ROUTE B (V₁ THEN p₂)
100 J
W SUDDEN, AGAINST pₑₓₜ
60 J

Results follow this lesson’s model and assumptions. Displayed values are rounded.

Interactive Physics III modelp-V diagram, V₁ = 1.0 L. States 1 and 2 share one isotherm (solid). Upper arrows, route A: isobaric at p₁ then isochoric at V₂, W = 200 J. Lower arrows, route B: isochoric at V₁ then isobaric at p₂, W = 100 J. Isotherm: W = 139 J. Dashed level: a sudden expansion against constant p_ext = 0.60 × 10⁵ Pa has no curve; W = 60 J.12ABp / 10⁵ Pa p₁ = 2.0, p₂ = 1.00isotherm W = 139 Jpₑₓₜ = 0.60 → W = 60 JV / L V₁ = 1.0, V₂ = 2.0
p-V diagram, V₁ = 1.0 L. States 1 and 2 share one isotherm (solid). Upper arrows, route A: isobaric at p₁ then isochoric at V₂, W = 200 J. Lower arrows, route B: isochoric at V₁ then isobaric at p₂, W = 100 J. Isotherm: W = 139 J. Dashed level: a sudden expansion against constant pₑₓₜ = 0.60 × 10⁵ Pa has no curve; W = 60 J.

Predict → change one variable → check

Plan a change before running it. Every other input stays at the saved baseline.

Saved baseline. Initial pressure p₁: 2.0 × 10⁵ Pa; Final volume V₂ (V₁ = 1.0 L): 2.0 L; External pressure pₑₓₜ / p₂: 0.6

Baseline 2.0; choose 1 to 3, in steps of 0.1.
4. Compared with the saved baseline, this result will…

This experiment is kept only while this page is open. It does not change saved course progress.

4

Catch the common trap

The first-year habit reads W = ∫p dV with p = nRT/V as the gas's own property, so any expansion from V₁ to V₂ 'does nRT ln(V₂/V₁) of work', including one into a vacuum, and 'the work from state 1 to state 2' sounds like a quantity the two states fix. Both fail for the same reason. The integral needs the pressure of the gas at the piston face at every instant, which exists only along a quasi-static path; a gas rushing into a vacuum has a pressure gradient, pushes on nothing, and does zero work while reaching exactly the same end state. And even among quasi-static routes the answer is the area under the particular curve drawn: 200 J along one rectangular route and 100 J along the other in the worked comparison. Work is a property of the process, never of the pair of states; only U has that privilege.

5

Practice & worked examples

3 authored examples. Make an attempt, then reveal the reasoning one step at a time.

EasyExample 1

A cylinder is closed by a frictionless piston of area 2.0 × 10⁻³ m². The gas inside is held at a constant 1.5 × 10⁵ Pa while the piston is pushed in by 0.60 m. Find the work done by the gas, first from force and displacement and then from p dV, and state the work done on the gas.

Sketch your answer or reasoning, then compare it with the authored solution. Your writing is not automatically graded or saved.

0 of 4 steps revealed.

MediumExample 2

0.250 mol of an ideal gas at 320 K expands isothermally and quasi-statically from 2.00 L to 5.00 L. Find the work it does, and show that it lies between the work along the two rectangular routes joining the same states: constant p₁ then constant V₂, and constant V₁ then constant p₂.

Sketch your answer or reasoning, then compare it with the authored solution. Your writing is not automatically graded or saved.

0 of 5 steps revealed.

HardExample 3

0.040 mol of argon (ideal) is held at 300 K by a bath and starts at V₁ = 0.50 L. (a) It expands quasi-statically to 1.50 L. (b) Instead, a latch is released and it expands against a constant external pressure equal to its final pressure, to the same end state. (c) It is then pushed back suddenly to 0.50 L against a constant external pressure equal to p₁. Find the work done by the gas in each case and the net work of the sudden round trip.

Sketch your answer or reasoning, then compare it with the authored solution. Your writing is not automatically graded or saved.

0 of 5 steps revealed.

6

Quick check

Select an answer and explain it before checking.

An ideal gas is taken from state (p₁, V₁) to state (p₁/2, 2V₁). Along which route does the gas do the most work?
7

Review & continue

The work done by a gas in a quasi-static process is W = ∫p dV along its path in the p-V plane: the signed area under the curve, positive for expansion, negative for compression, and different for different paths between the same two states.

  • Explain the relationship without looking at the equation.
  • Check a sign, a unit and a model assumption in your working.
  • Return to the lab or worked example if a step is still unclear.

Optional supporting lessons

These chapter resources can help with earlier ideas; they are not additional required Physics III completion tasks.

Extra challenging questions

Connect several ideas, explore supplied data, and compare your reasoning with a worked solution.