Opening the book…
We now broaden conservation of energy to include heat. Describe a gas by its state variables: pressure \(P\), volume \(V\), temperature \(T\), and internal energy \(E_{\rm int}\), each a property of the system’s current state. We can change that state by two kinds of energy transfer, the transfer variables heat \(Q\) and work \(W\). Imagine a gas in a cylinder fitted with a piston: piling sand on the piston does work that compresses the gas, while a flame beneath supplies heat that can expand it. Both change the gas’s internal energy, and the accounting is the first law of thermodynamics:
Key Equation: First law of thermodynamics
\[\Delta E_{\rm int} = Q + W. \tag{37.4}\]
This is conservation of energy, nothing more: the change in a system’s internal energy equals the heat added to it plus the work done on it. The sign convention matters. Here \(Q > 0\) means heat flows into the system, and \(W > 0\) means work is done on the system (for example, compressing it). When a gas instead expands and pushes on its surroundings, it does work on them, so the work done on the gas is negative.
Note: Two sign conventions
Some books, especially in engineering, write the first law as \(\Delta E_{\rm int} = Q - W\), where \(W\) is the work done by the system. That \(W\) is the negative of ours, so the physics is identical; only the bookkeeping differs. We write the work done by a gas as \(W_{\rm by} = -W\) whenever we need it, so you will see both quantities, clearly labeled.
Checkpoint 37.2
(a) A gas absorbs \(500\,\mathrm{J}\) of heat while doing \(200\,\mathrm{J}\) of work on its surroundings. What is \(\Delta E_{\rm int}\)? (b) A gas is compressed, with \(300\,\mathrm{J}\) of work done on it, while it loses \(100\,\mathrm{J}\) of heat. What is \(\Delta E_{\rm int}\) now?
Work done by a gas. How much work does a gas do as it expands? Picture it in a cylinder, pushing on a piston of area \(A\) with a force \(F = PA\) (Figure 37.2a). If the piston moves out a small distance \(dx\), slowly enough that the pressure stays uniform, the gas does work \(dW_{\rm by} = F\,dx = PA\,dx\). But \(A\,dx\) is the increase in the gas’s volume, \(dV\), so \(dW_{\rm by} = P\,dV\). For a finite change of volume,
Key Equation: Work done by a gas
\[W_{\rm by} = -W = \int_{V_i}^{V_f} P\,dV. \tag{37.5}\]
This integral has a simple picture: it is the area under the path on a \(P\)–\(V\) diagram (Figure 37.2b). An expanding gas (\(V_f > V_i\)) does positive work; a compressed gas does negative work, meaning work is done on it.
Because the work is an area under the path, it depends on the path, not just on where the gas starts and ends. Figure 37.3 shows two ways to take a gas from state \(i\) to state \(f\). Along path A the gas expands first, at high pressure, and then cools at constant volume; along path B it cools first and then expands at low pressure. The gas does more work along path A. Its internal energy, though, is a state variable: \(\Delta E_{\rm int}\) depends only on the two end states, so it is the same along both paths. By the first law, \(Q = \Delta E_{\rm int} + W_{\rm by}\), so the heat must also differ: along path A, the gas absorbs more heat to pay for the extra work. Heat and work depend on the path; their combination \(Q + W\) does not. That is why it makes sense to talk about the internal energy a system has but not about the heat or work it has.
Example 37.7: Two paths, one change
A sample of monatomic ideal gas is taken from state \(i\) (\(V_i = 1.0\,\mathrm{L}\), \(P_i = 4.0\times 10^{5}\,\mathrm{Pa}\)) to state \(f\) (\(V_f = 4.0\,\mathrm{L}\), \(P_f = 2.0\times 10^{5}\,\mathrm{Pa}\)) along each path of Figure 37.3. For each path find the work done by the gas, the change in internal energy, and the heat absorbed.
Solution
Internal energy. For a monatomic ideal gas \(E_{\rm int} = \tfrac32 nRT = \tfrac32 PV\) (Chapter 36), so we never need \(n\) or \(T\) separately. With volumes in \(\,\mathrm{m^3}\),
\[\begin{aligned}\Delta E_{\rm int} &= \tfrac32(P_fV_f - P_iV_i) \\ &= \tfrac32\big[(2.0\times10^5)(4.0\times10^{-3}) - (4.0\times10^5)(1.0\times10^{-3})\big] \\ &= \tfrac32(800 - 400) = 600\,\mathrm{J},\end{aligned}\]
the same for both paths.
Path A. Only the horizontal leg, at \(4.0\times 10^{5}\,\mathrm{Pa}\), does work (the vertical leg has no volume change):
\[W_{\rm by,A} = P\,\Delta V = (4.0\times10^5)(3.0\times10^{-3}) = \boxed{1200\,\mathrm{J}},\]
\[Q_A = \Delta E_{\rm int} + W_{\rm by,A} = 600 + 1200 = \boxed{1800\,\mathrm{J}}.\]
Path B. Now the expansion happens at \(2.0\times 10^{5}\,\mathrm{Pa}\):
\[W_{\rm by,B} = (2.0\times10^5)(3.0\times10^{-3}) = \boxed{600\,\mathrm{J}}, \qquad Q_B = 600 + 600 = \boxed{1200\,\mathrm{J}}.\]
Both paths raise the internal energy by \(600\,\mathrm{J}\). Path A takes in \(600\,\mathrm{J}\) more heat and does exactly \(600\,\mathrm{J}\) more work. Note that we used \(W_{\rm by} = Q - \Delta E_{\rm int}\), the first law rearranged with the work done by the gas; with our sign convention, the work done on the gas is \(W = -W_{\rm by}\).
Two special cases follow directly from the first law. In a cyclic process, the system returns to its starting state, so \(\Delta E_{\rm int} = 0\) and \(Q = W_{\rm by}\): over a full cycle, the net heat absorbed equals the net work done. This is the principle of every heat engine (Chapter 38). And for an isolated system, which exchanges neither heat nor work with anything, \(Q = W = 0\) and the internal energy cannot change at all.
Answers to Checkpoints
Checkpoint 37.2. (a) Here \(Q = +500\,\mathrm{J}\) (heat in), and the work done on the gas is \(W = -200\,\mathrm{J}\), since the gas does work on its surroundings. So \(\Delta E_{\rm int} = Q + W = 500 - 200 = +300\,\mathrm{J}\). (b) Now \(W = +300\,\mathrm{J}\) and \(Q = -100\,\mathrm{J}\) (heat out), so \(\Delta E_{\rm int} = 300 - 100 = +200\,\mathrm{J}\). Keeping the signs straight is the whole problem: heat in and work done on the system both count as positive.
This page titled 37.2: The First Law of Thermodynamics was last modified on Thu, 12 Nov 2026 04:26:55 GMT and is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by Michael Ragsdale.
The book could not be loaded just now.