Energy is conserved, and for a gas there are two ways for it to cross the boundary: heat $Q$, which flows because of a temperature difference, and work $W$, a force acting through a distance, which you met in Work Done on a Gas. What arrives is stored as internal energy $U$, the energy of the molecules' motion, which for a monatomic gas is $\tfrac{3}{2}nRT$ from Temperature and Molecular Energy.
Why it works
Key idea
| This course (and AP Physics 2) | Science Lab and OpenStax College Physics | |
|---|---|---|
| First law | $\Delta U = Q + W$ | $\Delta U = Q - W_{\text{by}}$ |
| The work in it | $W$ = work done on the gas $= -P\Delta V$ | $W_{\text{by}}$ = work done by the gas $= +P\Delta V$ |
| Gas expands | $W < 0$ | $W_{\text{by}} > 0$ |
| Heat $Q$ | positive into the gas | positive into the gas |
Try the Energy and the First Law chapter of the Science Lab, which keeps its ledger as $\Delta U = Q - W$ with $W$ done by the gas. Same physics, opposite sign for the work.
Worked examples
Worked example: Heat in, work out
- Signs: $Q = +500\,\text{J}$. The gas does work, so the work done on it is $W = -200\,\text{J}$.
- $\Delta U = 500 + (-200) = +300\,\text{J}$. The gas warms.
Answer: $+300\,\text{J}$
Worked example: Squeezed and cooled
- $W = +300\,\text{J}$ (done on the gas), $Q = -100\,\text{J}$ (heat out).
- $\Delta U = -100 + 300 = +200\,\text{J}$. It got warmer even though heat left.
Answer: $+200\,\text{J}$
Worked example: Heat without warming
- Constant temperature means $\Delta U = 0$ for an ideal gas.
- $0 = Q + W$, so $W = -400\,\text{J}$: the gas does $400\,\text{J}$ of work.
Answer: $400\,\text{J}$ of work by the gas
Common mistake