🦖 Bellaziraptor

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

  1. The law itself
  2. Signs — the part that costs points
  3. Where W = −PΔV comes from
  4. “On the gas” vs. “by the gas”
  5. State functions vs. path functions
  6. The four processes
  7. Worked examples

The law itself

ΔU = Q + W ΔU = change in internal energy of the gas; Q = heat added to the gas; W = work done on the gas.

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.

gas ΔU +Q heat added +W work done on it Reverse either arrow and that term goes negative.
Two doors into the box, and only two. Energy leaving the gas simply makes the corresponding term negative.

Signs — the part that costs points

Memorize this line

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.

QuantityPositive when…Negative when…
Q Heat flows into the gas (gas is colder than surroundings) Heat flows out of the gas
W Gas is compressedV < 0) — surroundings push in Gas expandsV > 0) — gas pushes out
ΔU Temperature rises Temperature falls
For an ideal gas, ΔU and ΔT always carry the same sign — U depends on nothing but temperature.

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.

F = PA d P, V area A
The dashed line is where the piston ends up. Volume decreases by ΔV = −Ad.

The work done by the external force on the gas is force times displacement:

W = F d = (PA)d = P(Ad) = −PΔV The last step is the whole trick: compressing means Ad is the volume lost, so ΔV = −Ad, and substituting gives the minus sign.

The minus sign is not a convention someone invented to annoy you. It is there because volume goes down when you do positive work.

P must be constant

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:

Wby gas = −Won gas
What happensWon gasWby gasEnergy flow
Gas expandsV > 0) negativepositive Gas spends energy pushing the world outward
Gas compressedV < 0) positivenegative The world spends energy pushing inward; gas gains it
Volume constant 00 Nothing moves, so no work either way
If a textbook writes ΔU = QW

Chemistry and engineering courses often define W as the work done by the system, which flips the sign in the law: ΔU = QWby. 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.

Two immediate payoffs, both heavily tested:

  1. Any complete cycle has ΔU = 0, because the gas returns to the same state. So for a cycle, Qnet = −Wnet,on = Wnet,by.
  2. Δ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.

ProcessHeld constantW (on gas)QΔULooks like
Isobaric P PΔV ΔUW 32nRΔT Horizontal line
Isochoric
(isovolumetric)
V 0 = ΔU 32nRΔ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
The 32nRΔT entries assume a monatomic ideal gas. The bold zeros are what make each process easy — find the zero first, then use the first law to get the rest.
Problem-solving order

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³.

W = −PΔV = −(2.0×105)(−2.0×10−3) = +400 J Positive, as it must be — the gas was compressed.

Heat. Leaving the gas, so Q = −250 J.

ΔU = Q + W = −250 + 400 = +150 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.

W = −nRT ln(Vf/Vi) = −(0.50)(8.31)(300) ln(3.0) = −1.4×103 J Negative because the gas expanded — it did work on its surroundings.

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.

ΔU = 0 + 500 = +500 J

Now convert to a temperature change using the monatomic internal-energy formula:

ΔT = U3nR = 2(500)3(0.20)(8.31) = +201 K

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:

W1 = −(1.0×105)(2.0×10−3) = −200 J

Path 2. Only the isobaric leg does work, at the low pressure:

W2 = −(0.50×105)(2.0×10−3) = −100 J

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

Previous← Specific heat NextPV diagrams →