Appearance
3.3 — The First Law: Energy Bookkeeping for Gases
In 1845 James Prescott Joule took a barrel of water, put a paddle wheel in it, and turned the paddle by letting weights fall on a string. He measured how far the weights fell and how much the water's temperature rose. No flame, no heat source of any kind — only mechanical work stirring water.
The water got warmer. And the ratio came out the same every time, no matter how he arranged the experiment: 4186 joules of work per kilogram per degree, which is exactly the specific heat capacity of water from Chapter 3.1.

Look at what that measurement kills. Before Joule, heat was widely believed to be a substance — a weightless fluid called caloric that flowed from hot bodies to cold ones and was conserved. Caloric explains a great deal: it explains why heat flows one way, why mixing hot and cold water gives a temperature in between, why a hot object cools its surroundings. It is a good theory.
It cannot explain Joule's paddle. There was no source of caloric anywhere in the apparatus. The heat was manufactured out of falling weights. Heat is therefore not a substance; it is energy, and it can be created from mechanical work at a fixed exchange rate. The Count Rumford had already noticed the same thing in 1798 while boring cannon barrels in Munich, where the friction of a dull boring tool produced apparently unlimited heat from a fixed lump of metal, but Joule was the one who put a number on it.
The law itself
Give a system some heat Q. Let it do some work W on its surroundings. Whatever is left over must still be in there:
\boxed{\Delta U = Q - W}
Read aloud: delta U equals Q minus W — the change in internal energy equals the heat added to the system minus the work done by the system.
Every symbol needs pinning down, because sign errors here are the single most common mistake in thermodynamics.
- \Delta U is the change in internal energy: the total energy of the molecules inside — their translational, rotational and vibrational kinetic energy, plus whatever potential energy their mutual attractions carry. For an ideal gas the attractions are zero by assumption, so U is purely kinetic, and from Chapter 3.2, U = \frac{f}{2}Nk_BT. For an ideal gas, U depends on temperature and nothing else. Not on pressure, not on volume. Remember that; it does most of the work below.
- Q is positive when heat goes into the system.
- W is positive when the system does work on the outside — when the gas pushes a piston outwards.
The minus sign is there because work done by the gas is energy leaving. Some books define W as work done on the system and write \Delta U = Q + W; both are correct and they mean the same thing. This book uses \Delta U = Q - W throughout.
The first law is a statement of conservation of energy, extended to include heat. That is all it is. What makes it powerful is the word internal: U is a property of the state the gas is in right now, so if you take a gas around any loop and bring it back to the same pressure and temperature, \Delta U = 0 exactly, no matter what path you took. Q and W individually depend on the path. Their difference does not.
What work looks like for a gas
Put gas in a cylinder with a piston of area A. The gas pushes on the piston with force F = PA. Let the piston move out a small distance dx. The work done, using W = Fd from Chapter 1.6, is:
dW = F\,dx = PA\,dx = P\,dV
because A\,dx is exactly the extra volume the gas now occupies. Adding up all the small pushes as the volume goes from V_1 to V_2:
\boxed{W = \int_{V_1}^{V_2} P\,dV}
Read aloud: W equals the integral from V-one to V-two of P dee V. The work is the area under the curve when you plot pressure against volume.
That geometric reading is worth holding onto, because it makes the next four sections almost visual. Draw the process on a graph with volume across and pressure up — a PV diagram — and the work is the area beneath the path. Expansion moves right, so the area is positive and the gas does work. Compression moves left and the area counts negative, meaning work was done on the gas.
The four standard processes, each worked through
There are four ways to change a gas that are simple enough to compute exactly, and between them they cover most of what engines actually do.
The figure shows all four leaving the same starting point so their shapes can be compared directly. Blue holds pressure fixed, green holds volume fixed, amber holds temperature fixed, purple lets no heat in or out. Notice the purple curve falls away faster than the amber one — that single visual fact is what makes engines and weather work, and the derivation of it comes at the end of this section.
① Isobaric — constant pressure
A gas heated in a cylinder with a freely sliding piston, with the atmosphere pushing back at a fixed pressure. This is the most common process in ordinary life; it is what happens whenever anything open to the air is heated.
P is constant, so it slides out of the integral:
W = \int_{V_1}^{V_2}P\,dV = P(V_2 - V_1) = P\Delta V
Using PV = nRT at both ends, P\Delta V = nR\Delta T, so:
W = nR\Delta T
The heat needed is Q = nC_P\Delta T, using the constant-pressure molar heat capacity. And the first law then gives:
\Delta U = Q - W = nC_P\Delta T - nR\Delta T
But we already know \Delta U = nC_V\Delta T (from Chapter 3.2, since U depends only on T). So:
nC_V\Delta T = nC_P\Delta T - nR\Delta T \quad\Longrightarrow\quad \boxed{C_P - C_V = R}
This is Mayer's relation, and the derivation just answered the question people usually ask about it: why is more heat needed to raise a gas by one degree at constant pressure than at constant volume? Because at constant volume, all the heat goes into internal energy. At constant pressure, the gas expands as it warms, and expanding means pushing the atmosphere back, which costs work. That extra cost is exactly R per mole per kelvin.
For a monatomic gas, C_V = \frac{3}{2}R = 12.5 and C_P = \frac{5}{2}R = 20.8 J mol⁻¹ K⁻¹. For a diatomic gas at room temperature, C_V = \frac{5}{2}R = 20.8 and C_P = \frac{7}{2}R = 29.1.
The ratio of the two gets its own symbol because it turns up everywhere:
\gamma = \frac{C_P}{C_V}
which is 5/3 = 1.67 for monatomic gases and 7/5 = 1.40 for diatomic gases such as air. That 1.40 is the same \gamma that appeared in the speed of sound in Chapter 2.3, and the next section explains why a sound wave cares about it.
② Isochoric — constant volume
A sealed rigid container heated on a stove. The volume cannot change, so dV = 0 everywhere, so:
W = 0, \qquad \Delta U = Q = nC_V\Delta T
Every joule of heat goes into internal energy and the temperature rise is as large as it can be for that much heat. This is the simplest case and it is also the definition that makes C_V measurable.
③ Isothermal — constant temperature
Compress a gas very slowly while it sits in a large water bath, so that any heat produced leaks away and the temperature never actually changes. "Very slowly" is doing real work in that sentence: the process must be slow compared to the time heat takes to flow out, or the gas warms up and the process is not isothermal at all.
For an ideal gas at constant T, P = nRT/V, so:
W = \int_{V_1}^{V_2}\frac{nRT}{V}\,dV = nRT\int_{V_1}^{V_2}\frac{dV}{V} = nRT\left[\ln V\right]_{V_1}^{V_2}
\boxed{W = nRT\ln\!\left(\frac{V_2}{V_1}\right)}
The logarithm comes from integrating 1/V, which is the one integral in calculus that produces a log (Chapter 5.4 of Volume II). Read it: the work depends on the ratio of the volumes, not their difference. Doubling from 1 to 2 litres does the same work as doubling from 10 to 20 litres at the same temperature.
Since T never changes and U depends only on T:
\Delta U = 0 \quad\Longrightarrow\quad Q = W
Every joule of heat that comes in leaves immediately as work. The gas is a pure conduit. This process is the backbone of the Carnot cycle in Chapter 3.4.
④ Adiabatic — no heat exchanged
Now the opposite extreme: change the gas so fast that heat has no time to flow, or wrap it in perfect insulation. Q = 0, so:
\Delta U = -W
If the gas expands it does work, and with no heat coming in, that work must be paid for out of internal energy — so the gas cools. Compress it and work is done on it, internal energy rises, it heats up. Nothing was added or removed; the temperature changed because energy moved between the piston and the molecules.
Deriving the shape of the curve takes a few lines. Start with the first law in small steps, using dU = nC_V\,dT and dW = P\,dV:
nC_V\,dT = -P\,dV
Replace P using the ideal gas law, P = nRT/V:
nC_V\,dT = -\frac{nRT}{V}dV
Cancel n and divide both sides by T to get all the $T$s on the left and all the $V$s on the right — this move is called separating the variables:
C_V\frac{dT}{T} = -R\frac{dV}{V}
Integrate both sides:
C_V\ln T = -R\ln V + \text{constant}
Divide through by C_V and use R = C_P - C_V from Mayer's relation, so R/C_V = (C_P - C_V)/C_V = \gamma - 1:
\ln T = -(\gamma-1)\ln V + \text{constant}
Exponentiate both sides, which turns sums of logs into products:
\boxed{TV^{\gamma-1} = \text{constant}}
And substituting T = PV/nR into that gives the more familiar form:
\boxed{PV^{\gamma} = \text{constant}}
Now compare with the isothermal curve, which is PV = \text{constant}. Since \gamma > 1 always, the adiabatic curve falls off faster — exactly the purple-versus-amber difference in the figure. The reason in words: when an ideal gas expands isothermally, the pressure drops only because the molecules are more spread out. When it expands adiabatically, the pressure drops for that reason and because the molecules have slowed down. Two effects instead of one, so a steeper fall.
Worked example: the fire piston
A fire piston is a sealed tube with a plunger, used for thousands of years in Southeast Asia to start fires. Air starts at 300 K and 1 atm and is compressed to one twentieth of its volume in a fraction of a second — far too fast for heat to escape, so it is adiabatic. Air is diatomic, \gamma = 1.4. What temperature does it reach?
Use TV^{\gamma-1} = constant, so T_1V_1^{\gamma-1} = T_2V_2^{\gamma-1}:
T_2 = T_1\left(\frac{V_1}{V_2}\right)^{\gamma-1} = 300\times(20)^{0.4}
Work out 20^{0.4}: \ln 20 = 2.996, times 0.4 is 1.198, and e^{1.198} = 3.314.
T_2 = 300 \times 3.314 = 994\ \text{K} = 721\ ^\circ\text{C}
Well above the ignition point of tinder, which is around 250 °C. A diesel engine is the same device. It compresses air by about 18:1 with no spark plug anywhere, injects fuel into air that is now hot enough to ignite it on contact, and that is the entire difference between a diesel and a petrol engine. Rudolf Diesel patented it in 1892 having reasoned it out from exactly this equation.
The same physics runs in reverse when you use a can of compressed air and the can goes cold in your hand, and when a bicycle pump barrel gets hot as you pump. It also runs on a planetary scale: air rising over a mountain range expands adiabatically as the pressure around it falls, cooling roughly 10 °C per kilometre of altitude, which is why mountain tops are cold and why cloud forms at a definite height rather than gradually.
Worked example: a complete cycle
One mole of a monatomic ideal gas (C_V = \frac{3}{2}R, \gamma = 5/3) starts at P_1 = 1.0\times10^5 Pa and V_1 = 0.025 m³. It is taken through three steps:
- A → B: heated at constant volume until the pressure doubles.
- B → C: expanded isothermally back to the original pressure.
- C → A: compressed at constant pressure back to the start.
Find the work, heat and internal energy change for each leg, and confirm the cycle closes.
Starting temperature. From PV = nRT:
T_1 = \frac{P_1V_1}{nR} = \frac{(1.0\times10^5)(0.025)}{(1)(8.314)} = \frac{2500}{8.314} = 300.7\ \text{K}
Leg A → B (isochoric). Pressure doubles at fixed volume, so temperature doubles: T_B = 601.4 K.
W_{AB} = 0
\Delta U_{AB} = nC_V\Delta T = (1)(1.5\times8.314)(300.7) = 3750\ \text{J}
Q_{AB} = \Delta U_{AB} = 3750\ \text{J} \quad\text{(in)}
Leg B → C (isothermal at 601.4 K). Pressure goes from 2\times10^5 back to 1\times10^5 Pa. At constant temperature PV is constant, so halving the pressure doubles the volume: V_C = 0.050 m³.
W_{BC} = nRT\ln\frac{V_C}{V_B} = (1)(8.314)(601.4)\ln 2 = 5000\times0.693 = 3466\ \text{J}
\Delta U_{BC} = 0, \qquad Q_{BC} = 3466\ \text{J} \quad\text{(in)}
Leg C → A (isobaric at 1\times10^5 Pa). Volume goes from 0.050 back to 0.025 m³.
W_{CA} = P\Delta V = (1.0\times10^5)(0.025 - 0.050) = -2500\ \text{J}
Negative, because the gas is being compressed — work is done on it. The temperature drops from 601.4 K back to 300.7 K, so:
\Delta U_{CA} = nC_V\Delta T = (1.5\times8.314)(-300.7) = -3750\ \text{J}
Q_{CA} = \Delta U_{CA} + W_{CA} = -3750 - 2500 = -6250\ \text{J} \quad\text{(out)}
Check the cycle. Add the internal energy changes:
\Delta U_{\text{total}} = 3750 + 0 - 3750 = 0\ \checkmark
It has to be zero, because the gas is back where it started and U depends only on the state. Now add the work and the heat:
W_{\text{net}} = 0 + 3466 - 2500 = 966\ \text{J}
Q_{\text{net}} = 3750 + 3466 - 6250 = 966\ \text{J}\ \checkmark
They match, as the first law demands when \Delta U = 0. The cycle produced 966 J of net work by taking in 7216 J of heat and rejecting 6250 J. Its efficiency is 966/7216 = 13.4 %.
That number is the whole subject of the next chapter. The gas has been returned exactly to its starting state, so nothing has been used up, and yet only 13 % of the heat came out as work while 87 % was dumped as waste. There is no obvious reason in the first law why that should be. The first law would be perfectly happy with 100 %.
Where this shows up in your life
Your refrigerator runs on the adiabatic result and the latent heat of Chapter 3.1 together. A compressor squeezes refrigerant vapour, which heats it (adiabatic compression). It gives up that heat to your kitchen through the coils at the back — that is why they are warm. Then it is forced through a narrow valve and expands, which cools it far below room temperature, and in the freezer compartment it absorbs heat by evaporating. Chapter 3.4 works out the limits on how well this can possibly be done.
Cloud formation has an exact altitude because of TV^{\gamma-1}. Warm moist air rises, expands adiabatically, cools at a predictable rate, and at the height where it hits the dew point the water condenses. That is why the flat bottoms of fair-weather cumulus clouds all sit at the same level across the whole sky — every parcel of air started at the same ground temperature and humidity, so they all reach saturation at the same height.
The bang of a bursting balloon is adiabatic too. The compressed air inside expands into the room faster than heat can flow, driving a pressure wave that your ear hears as a crack.
A sound wave is adiabatic, not isothermal, and this is the resolution of a mistake Newton made. Newton calculated the speed of sound assuming the compressions in a sound wave stayed at constant temperature, and got 280 m/s against a measured 343 m/s — a 20 % error he never resolved. Laplace fixed it in 1816: the compressions and rarefactions in a sound wave happen thousands of times a second, far too fast for heat to move between them, so they are adiabatic. That inserts a factor of \sqrt{\gamma} = \sqrt{1.4} = 1.18 into the answer, and 280\times1.18 = 331 m/s, which is right. A century-old 20 % discrepancy, closed by noticing which of these four processes was actually happening.
What the next chapter fixes
The first law says energy is conserved and never says which way anything goes. It permits a cup of tea to spontaneously boil while the kitchen cools by a fraction of a degree, because energy would balance perfectly. It permits an engine that turns heat into work with no waste at all. Neither happens. Chapter 3.4 introduces the law that forbids them, works out the exact best efficiency any engine can have — a limit that depends on nothing but two temperatures — and shows that a refrigerator and an engine are the same machine run in opposite directions.