Topic 3
The first law & work done on or by a gas
The first law is conservation of energy with the microscopic bookkeeping made explicit. There are only two ways to change a gas’s internal energy: heat it, or push on it. That is the whole law — the difficulty is entirely in the signs.
On this page
The law itself
In words: the energy inside goes up by whatever you put in. Energy can enter as disorganized molecular collisions (heat) or as organized macroscopic pushing (work), and once inside, the gas cannot tell the difference.
Signs — the part that costs points
W is the work done on the gas. Squeezing the gas is positive work. Letting it expand is negative work. If you can hold that one sentence, every sign on this page follows.
| Quantity | Positive when… | Negative when… |
|---|---|---|
| Q | Heat flows into the gas (gas is colder than surroundings) | Heat flows out of the gas |
| W | Gas is compressed (ΔV < 0) — surroundings push in | Gas expands (ΔV > 0) — gas pushes out |
| ΔU | Temperature rises | Temperature falls |
The intuition for W: compressing a gas warms it. A bike pump gets hot at the barrel. You did work on the gas, energy went in, temperature rose. Conversely a can of compressed air gets cold as it sprays — the gas expands, does work on the outside world, loses energy, cools.
Where W = −PΔV comes from
Take a cylinder of cross-sectional area A sealed by a frictionless piston, gas at pressure P. Push the piston in a distance d, slowly enough that the pressure stays essentially uniform.
The work done by the external force on the gas is force times displacement:
The minus sign is not a convention someone invented to annoy you. It is there because volume goes down when you do positive work.
W = −PΔV is valid only for an isobaric process. If pressure changes during the process, you need the area under the PV curve instead — that is the whole point of the next page. In calculus form: W = −∫ViVf P dV.
“On the gas” vs. “by the gas”
Exam questions switch between these two phrasings constantly, sometimes inside a single problem. They are the same number with opposite signs:
| What happens | Won gas | Wby gas | Energy flow |
|---|---|---|---|
| Gas expands (ΔV > 0) | negative | positive | Gas spends energy pushing the world outward |
| Gas compressed (ΔV < 0) | positive | negative | The world spends energy pushing inward; gas gains it |
| Volume constant | 0 | 0 | Nothing moves, so no work either way |
Chemistry and engineering courses often define W as the work done by the system, which flips the sign in the law: ΔU = Q − Wby. It is the same physics. AP Physics uses ΔU = Q + W with W on the gas — use that one here, and when you read another source, check which convention it means before trusting a sign.
State functions vs. path functions
This distinction quietly runs the entire unit.
- U, P, V, T are state functions. They depend only on where the gas is, not how it got there. Two different processes ending at the same point produce the same ΔU.
- Q and W are path functions. They describe what happened along the way. Different routes between the same two states give different Q and different W — but their sum always comes out the same, because that sum is ΔU.
Two immediate payoffs, both heavily tested:
- Any complete cycle has ΔU = 0, because the gas returns to the same state. So for a cycle, Qnet = −Wnet,on = Wnet,by.
- ΔT = 0 ⇒ ΔU = 0 for an ideal gas, no matter what route was taken.
The four processes
Every AP thermodynamics problem is one of these four, or a sequence of them. This table is worth reproducing from memory.
| Process | Held constant | W (on gas) | Q | ΔU | Looks like |
|---|---|---|---|---|---|
| Isobaric | P | −PΔV | ΔU − W | 3⁄2nRΔT | Horizontal line |
| Isochoric (isovolumetric) |
V | 0 | = ΔU | 3⁄2nRΔT | Vertical line |
| Isothermal | T | −nRT ln(Vf/Vi) | = −W | 0 | Hyperbola (PV = const) |
| Adiabatic | — (no heat flow) | = ΔU | 0 | = W | Steeper hyperbola |
| Cyclic | returns to start | −(enclosed area) | = −Wnet | 0 | Closed loop |
For any process: (1) identify which quantity is zero, (2) compute the one you have a direct formula for, (3) let ΔU = Q + W hand you the third. You almost never need to compute all three independently.
Adiabatic is the one worth a second look. Q = 0 happens either because the container is insulated or because the process is fast enough that no appreciable heat has time to flow. So an adiabatic compression puts all of the work straight into internal energy — the gas heats up sharply. That is a diesel engine: compress air fast enough and it ignites fuel with no spark plug.
Worked examples
1. Isobaric compression with heat leaving
A gas is compressed at a constant pressure of 2.0×105 Pa from 3.0×10−3 m³ to 1.0×10−3 m³. During the process 250 J of heat leaves the gas. Find ΔU, and say whether the gas warmed or cooled.
Work. ΔV = 1.0×10−3 − 3.0×10−3 = −2.0×10−3 m³.
Heat. Leaving the gas, so Q = −250 J.
ΔU > 0, so the temperature rose. Even though heat was flowing out, the compression put in more energy than the heat carried away.
2. Isothermal expansion
0.50 mol of ideal gas expands isothermally at 300 K from 0.010 m³ to 0.030 m³. Find W, Q, and ΔU.
Start with the zero. Isothermal ⇒ ΔT = 0 ⇒ ΔU = 0.
Then from ΔU = Q + W = 0: Q = −W = +1.4×103 J.
Physically: to hold the temperature fixed while the gas does 1.4 kJ of work, the reservoir must feed in exactly 1.4 kJ of heat. Energy passes straight through the gas without accumulating.
3. Adiabatic compression
0.20 mol of a monatomic ideal gas is compressed adiabatically; 500 J of work is done on it. Find ΔU and the temperature change.
Start with the zero. Adiabatic ⇒ Q = 0.
Now convert to a temperature change using the monatomic internal-energy formula:
A 200-kelvin jump from half a kilojoule. Adiabatic compressions heat gases dramatically, which is exactly why diesel engines work and why a fire piston can ignite tinder.
4. Path dependence — same endpoints, different work
A gas goes from state A (1.0×105 Pa, 2.0×10−3 m³) to state B (0.50×105 Pa, 4.0×10−3 m³) two ways:
- Path 1: expand at constant pressure to 4.0×10−3 m³, then drop the pressure at constant volume.
- Path 2: drop the pressure at constant volume first, then expand at constant pressure.
Path 1. Only the isobaric leg does work, at the high pressure:
Path 2. Only the isobaric leg does work, at the low pressure:
Different work for the same start and end. But ΔU is identical for both (same endpoints, and PAVA = PBVB, so in fact ΔU = 0 here). The heat must therefore differ too — by exactly 100 J — so that Q + W comes out the same both times.
That is path dependence in one problem. It is drawn out on the PV diagrams page.
Checklist
- I can state the first law and say what each symbol means, including which direction W counts.
- I can derive W = −PΔV from F = PA in two lines.
- Given “work done by the gas,” I know to flip the sign before using the law.
- I know which quantity is zero for each of the four processes without looking.
- I know ΔU = 0 for any complete cycle and for any isothermal process.