Skip to main content

Optional extension · Interactive lesson

Work by gases and p-V diagrams

Work is not something a gas has; it is something a gas hands over while its volume changes, and how much it hands over depends on the route it takes. Learn to read that work as an area on a p-V diagram, to integrate it when the pressure refuses to sit still, and to get its sign right every time.

UPII-E3.02 · Lesson 2 of 9 in this extension. Position is not a completion score.
Starting model: Work by gases and p-V diagramsA pressure-volume diagram. The gas starts at state 1, 2.0 L and 300 kPa, and finishes at state 2, 6.0 L and 100 kPa, by sweeping at 300 kPa out to the corner volume 4.0 L, dropping to 100 kPa at fixed volume, then sweeping on. The two shaded rectangles are the two parts of the work: 600 J and 200 J, totalling 800 J.work by the gas = shaded area = 800 Jstate 1 2.0 L, 300 kPa state 2 6.0 L, 100 kPap / kPaV / L12ΔV = 4.0 L corner at 4.0 L
Start with a picture. Change the model in the lab below.

Optional extension. Use this unnumbered support sequence where your university’s syllabus or prerequisite needs require it. It is not an additional numbered unit. Optional work is not a required completion gate.

1

Build the model

The work is the area under the path — and the path is a choice, not a consequence.

The key idea

The work done by a gas is the integral of its own pressure over its change in volume, W = ∫ p dV, which on a pressure-volume diagram is the signed area between the path and the volume axis.

Example. A gas held at 1.80 × 10⁵ Pa while its volume grows by 5.40 × 10⁻⁴ m³ does W = 1.80 × 10⁵ × 5.40 × 10⁻⁴ = 97.2 J of work on its surroundings — the area of a rectangle on the diagram.

The complete physical model and assumptions

When a gas pushes a piston through a distance, the force on the piston is the gas's own pressure times the piston area, so the mechanical work F dx becomes p A dx — and A dx is just the volume the gas gained. That one substitution turns work into W = ∫ p dV, written entirely in the gas's own state variables, with the piston's size and shape gone from the answer. Two conditions make it legitimate: the change must be slow enough that the gas holds a single well-defined pressure throughout, and that p must be the pressure at the moving boundary rather than the pressure of whatever sits outside. Granted those, the integral has an immediate picture. Plot the process on a pressure-volume diagram and W is the signed area between the path and the volume axis, positive where the path sweeps right and negative where it sweeps left. And because the integrand depends on the whole curve p(V) rather than on its two ends, work is a property of the route, not of the pair of states: two processes joining the same states can deliver different work, and a closed loop returns the gas to where it began while still handing over the area it encloses. The model stops where the pressure stops being defined — a free expansion into vacuum, a burst diaphragm, a shock — because there is then no curve to integrate along.

1From the force on a piston to p dV

Put a gas in a cylinder closed by a piston of area A and let the piston slide out by dx. The gas presses on the piston with force F = pA, so it does work δW = F dx = pA dx. But A dx is exactly the extra volume the gas now occupies, dV, so δW = p dV and the apparatus has dropped out of the statement. Integrating along the process gives W = ∫ p dV from V₁ to V₂. A number makes the equivalence concrete: a piston of area 8.0 × 10⁻³ m², with the gas held at 1.5 × 10⁵ Pa, carries a force of 1.2 × 10³ N, and moving it 0.020 m costs 24 J of work; the same 24 J follows from p ΔV = 1.5 × 10⁵ Pa × 1.6 × 10⁻⁴ m³. The second route never mentions the piston, which is why it works just as well for a balloon, a bubble or a cylinder of any cross-section.

2Which pressure belongs in the integral

The p in ∫ p dV is the gas's own pressure at the moving boundary, and giving the whole gas one pressure assumes the change is quasi-static: slow enough for the pressure to even out, so every intermediate state is a point on the diagram rather than a smear. Ram the piston in fast and the gas piles up against it, so the boundary pressure runs above the bulk value and the compression costs more than the drawn curve suggests. The sharpest case is free expansion. Open a valve between a gas at 1.5 × 10⁵ Pa and an evacuated flask and the volume may double, but the gas pushes on nothing that moves, so W = 0 even though ΔV is large and the pressure is nowhere zero. Free expansion has no p-V curve at all, only two dots, because in between the gas is not in a single equilibrium state to plot.

3The area under the path, and which way it is swept

Once a change is quasi-static it draws a curve on a p-V diagram, and ∫ p dV is the area between that curve and the volume axis. Two consequences follow. Geometry can replace calculus whenever the curve is simple: a straight line from (2.0 × 10⁻³ m³, 300 kPa) to (6.0 × 10⁻³ m³, 100 kPa) is a trapezium of mean height ½(300 + 100) kPa = 200 kPa across a width of 4.0 × 10⁻³ m³, so W = 2.00 × 10⁵ Pa × 4.0 × 10⁻³ m³ = 8.0 × 10² J. And the sign lives in dV, never in p: gas pressure is always positive, so each slice p dV takes the sign of dV. Sweep to the right and the gas does positive work on its surroundings; sweep to the left and the integral is negative, meaning the surroundings did the work. A vertical leg has dV = 0 at every point and contributes exactly nothing, however violently the pressure changes along it.

4When the pressure will not sit still, integrate

A rectangle is only available while p is constant. Otherwise you need p as a function of V along the actual path, and then you integrate. Take a cylinder whose loading makes the measured curve fit pV² = C. At V₁ = 1.50 × 10⁻³ m³ the pressure is 2.40 × 10⁵ Pa, so C = p₁V₁² = 0.540 Pa m⁶. Let it expand to V₂ = 4.50 × 10⁻³ m³, where the pressure has fallen to C/V₂² = 2.67 × 10⁴ Pa. Then W = ∫ C V⁻² dV = C(1/V₁ − 1/V₂) = 0.540 Pa m⁶ × (666.7 − 222.2) m⁻³ = 240 J. Set that against what the shortcuts would have claimed. Using the starting pressure throughout gives p₁ ΔV = 720 J, three times too large; the straight chord joining the two end states gives 400 J. The curve p = C/V² sags below its own chord, and only the integral knows by how much.

5Two routes between the same states, two different answers

Take a gas from state A (1.0 × 10⁻³ m³, 300 kPa) to state C (4.0 × 10⁻³ m³, 100 kPa) by two routes. Route 1 expands it at a steady 300 kPa out to 4.0 × 10⁻³ m³, then cools it at fixed volume down to 100 kPa: W = 3.00 × 10⁵ Pa × 3.0 × 10⁻³ m³ + 0 = 900 J. Route 2 cools it first at fixed 1.0 × 10⁻³ m³ down to 100 kPa, then expands at that pressure: W = 0 + 1.00 × 10⁵ Pa × 3.0 × 10⁻³ m³ = 300 J. Same two states, three times the work. Now add the first law. ΔU is fixed by the end states alone, and for an ideal gas U follows pV, which is 300 J at A and 400 J at C, so a monatomic sample has ΔU = 1.5 × 100 J = 150 J on either route. Then Q = ΔU + W is 1050 J on route 1 and 450 J on route 2. Heat is path-dependent for precisely the reason work is: the 600 J of extra work route 1 delivers is 600 J of extra heat it must first absorb.

6A closed cycle encloses its own work

Run route 1 outwards and route 2 back and the gas returns to A, having drawn a closed rectangle. Every leg still contributes its own ∫ p dV, but the two horizontal legs are now swept in opposite directions, so their areas subtract and what survives is the area enclosed: (300 − 100) kPa × 3.0 × 10⁻³ m³ = 6.0 × 10² J. Direction sets the sign. Go round clockwise — expand along the high-pressure leg, return along the low — and Wₙₑₜ = ∮ p dV is positive, so the gas delivers net work each time round; go anticlockwise and Wₙₑₜ is negative, so the surroundings pay. Because U comes back to its starting value, ΔU = 0 over any cycle, and the first law then forces Qₙₑₜ = Wₙₑₜ exactly. The enclosed area is therefore both the net work per cycle and the net heat absorbed per cycle — and a loop that encloses no area does nothing at all.

2

Key equations

Read the units, assumptions and limits before substituting.

Work at a moving boundary

δW = p A dx = p dV

The piston's area cancels, leaving the work in the gas's own variables.

p in Pa, A in m², dx in m, dV = A dx in m³, δW in J

The work integral

W = ∫ p dV, from V₁ to V₂

Reads off a p-V diagram as the signed area between the path and the V axis.

p is the gas's own pressure in Pa, V in m³, W in J; 1 L = 10⁻³ m³

Constant pressure: a rectangle

W = p (V₂ − V₁)

The one case where the area is a plain product — and the shortcut most over-used.

holds only while p never changes; p in Pa, V in m³, W in J

Sign of the sweep

Wₒₙ = −Wby = −∫ p dV

Expansion makes Wby positive; compression makes it negative and Wₒₙ positive.

p > 0 always, so each slice p dV takes the sign of dV

Net work round a cycle

Wₙₑₜ = ∮ p dV = the area enclosed

ΔU = 0 over a cycle, so this same area is the net heat absorbed, Qₙₑₜ.

positive for a clockwise loop on a p-V diagram, negative anticlockwise

Path dependence of heat

QA − QB = WA − WB

ΔU is fixed by the endpoints, so a difference in work reappears as heat.

routes A and B join the same two states; all four terms in J
3

Interactive lab

Predict first. Explore the model. Compare the result.

Explore the model

6.0 L
1 to 8 L; steps of 0.5.
100 kPa
40 to 280 kPa; steps of 10.
0.50
0 to 1; steps of 0.05.

Try this. Leave the end states at 6.0 L and 100 kPa and drag the corner slider from 0 to 1: the work climbs from 400 J to 1200 J although neither end state has moved — then pull the final volume below 2.0 L and watch the arrows reverse and the work go negative.

Live results

WORK BY THE GAS
800 J
HIGH-PRESSURE LEG
600 J
LOW-PRESSURE LEG
200 J
WORK ON THE GAS
-800 J

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

Interactive Physics II modelA pressure-volume diagram. The gas starts at state 1, 2.0 L and 300 kPa, and finishes at state 2, 6.0 L and 100 kPa, by sweeping at 300 kPa out to the corner volume 4.0 L, dropping to 100 kPa at fixed volume, then sweeping on. The two shaded rectangles are the two parts of the work: 600 J and 200 J, totalling 800 J.work by the gas = shaded area = 800 Jstate 1 2.0 L, 300 kPa state 2 6.0 L, 100 kPap / kPaV / L12ΔV = 4.0 L corner at 4.0 L
A pressure-volume diagram. The gas starts at state 1, 2.0 L and 300 kPa, and finishes at state 2, 6.0 L and 100 kPa, by sweeping at 300 kPa out to the corner volume 4.0 L, dropping to 100 kPa at fixed volume, then sweeping on. The two shaded rectangles are the two parts of the work: 600 J and 200 J, totalling 800 J.

Predict → change one variable → check

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

Saved baseline. Final volume V₂: 6.0 L; Final pressure p₂: 100 kPa; Corner fraction s: 0.50

Baseline 6.0; choose 1 to 8, in steps of 0.5.
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 shortcut W = p ΔV is a special case, not a definition, and it is the first thing to go wrong. It holds only while the pressure never moves. Apply it to the pV² = C expansion above, multiplying the starting 2.40 × 10⁵ Pa by the 3.00 × 10⁻³ m³ of volume gained, and it returns 720 J for a process that really does 240 J — a factor of three out, because by the end the pressure has fallen to a ninth of its starting value and the shortcut never noticed. The deeper form of the same error is to speak of the work done in going from state A to state B as though the two states fixed it. They do not. Work is an integral along a curve, so it belongs to the route: name the path, or the number means nothing.

5

Practice & worked examples

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

EasyExample 1

A cylinder of cross-sectional area 45 cm² is closed by a frictionless piston. The gas inside is held at a steady 1.80 × 10⁵ Pa while it pushes the piston outwards by 12.0 cm. Find the volume change, the work done by the gas, and 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 5 steps revealed.

MediumExample 2

A gas is taken round a three-leg cycle. Leg 1 runs along a straight line on the p-V diagram from (2.00 × 10⁻³ m³, 1.20 × 10⁵ Pa) to (6.00 × 10⁻³ m³, 3.00 × 10⁵ Pa). Leg 2 cools it at fixed volume back to 1.20 × 10⁵ Pa. Leg 3 compresses it at that constant pressure to the starting state. Find the work on each leg and the net work per cycle, then check the total geometrically.

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

0 of 6 steps revealed.

HardExample 3

A horizontal cylinder is closed by a piston of area 2.50 × 10⁻³ m² that is pressed inwards by a spring of stiffness 3.20 × 10³ N m⁻¹, with air at 1.00 × 10⁵ Pa on the outer face. The gas starts at 1.40 × 10⁵ Pa in a volume of 8.00 × 10⁻⁴ m³ and is heated slowly until the piston has moved out 6.00 cm, compressing the spring by the same 6.00 cm. Find the final pressure, the work done by the gas, and how much of that work ends up stored in the spring.

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

0 of 6 steps revealed.

6

Quick check

Select an answer and explain it before checking.

A gas is compressed from 6.0 L to 2.0 L while its pressure climbs from 100 kPa to 400 kPa. At every intermediate volume the measured p-V curve lies above the straight chord joining the two end states. What is the work done by the gas?
7

Review & continue

The work done by a gas is the integral of its own pressure over its change in volume, W = ∫ p dV, which on a pressure-volume diagram is the signed area between the path and the volume axis.

  • 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 II completion tasks.

Extra challenging questions

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