The first law for closed systems
The first law is a single line of arithmetic that nobody disputes and almost everybody misapplies. The difficulty is never the algebra. It is that the equation refuses to work until you have said, out loud and in writing, exactly what the system is and which way you are calling positive.
A closed system is one that no mass crosses. Energy may cross it freely, as heat or as work, but the same molecules are inside at the end as at the beginning. A sealed cylinder of gas under a piston is the standard example, and it is the object every problem in this topic reduces to, whether the question is about a pressure cooker, a rigid storage tank or the compression stroke of an engine.
The energy balance
The first law is the statement that energy is conserved, written in a form that can be audited. Energy in, less energy out, equals the change in the energy held by the system:
It is a bank statement. The left-hand side is the transactions across the boundary, the right-hand side is the change in the balance, and the equality is not a physical law so much as a definition of what it means to keep honest accounts. What makes it a physical law is the claim that there is no other entry. Energy does not appear in the system without having crossed the boundary, and it does not vanish from it either.
For a closed system there are exactly two ways across, heat and work, and the accounting of those two settles the form the law takes. With heat added to the system counted positive and work done by the system counted positive, the balance collapses to
and that minus sign is the entire content of the sign convention. It is there because the two positive directions were chosen to point opposite ways, heat inwards and work outwards, which suits an engine and suits nothing else particularly well. A large part of the chemistry literature counts work done on the system as positive and writes \(Q + W = \Delta E\) instead, and both books are right. Neither is right for a problem in which the convention was never stated. Write it down at the top of the page, every time, before the first number.
The energy of the system itself splits into three, and here the notation earns attention:
Internal energy is the energy of the molecules as seen from a frame riding along with the system; kinetic and potential energy are the energy of the system as a whole, moving and lifted, as seen from outside. A cylinder bolted to a bench does not move and does not rise, so the last two terms are zero and the law is usually met in the form \(Q - W = \Delta U\). That is a consequence of the apparatus being stationary, not a feature of the first law, and a problem about a gas cylinder falling off a lorry would need all three terms. Dropping them is a decision, and it should be a decision you notice yourself making.
The one habit worth building now is that the sign is an output, not an input. Assume heat goes in, draw the arrow pointing in, write \(Q\) with no sign attached, and let the arithmetic come back negative if the system was in fact being cooled. A negative \(Q\) at the end of a correct calculation is a finding. A sign inserted by hand at the start, because the answer felt like it ought to be a cooling, is how a correct method produces a wrong number.
Draw the boundary first. Everything inside it is the system.
Over a cycle
A cycle is a process, or a sequence of processes, that returns the system to the state it started in. Not to a similar state, not to the same temperature — to the same state, with every property back at the value it held. And a property is a property precisely because its value belongs to the state, so if the state has returned, every property has returned with it. The internal energy has changed by nothing at all:
Put that into the balance and the first law for a cycle is one term shorter than the first law for a process:
Whatever net heat crossed the boundary over the whole loop came back out as net work. Nothing was stored, because there was nowhere left to store it. This is the sentence every engine in the course rests on, and it is worth reading twice, because it is doing more work than its length suggests. It says that an engine is not a device that contains energy and dispenses it. It is a device that passes energy through, converting the form on the way, and its output is limited by its input for reasons that have nothing to do with how well it is built.
The geometry is the part that sticks. Net work round a cycle is the area enclosed by the loop on a \(P\)–\(V\) diagram, because the outbound legs sweep out area to the right and the return legs take area back to the left. Run the loop clockwise, expanding while the pressure is high and compressing while it is low, and more area is swept than returned, so net work comes out and by the equality above net heat must have gone in. Run the same loop anticlockwise and every sign flips: work in, heat out, which is a refrigerator. The hardware differs; the diagram is the same diagram traversed the other way.
The negative consequence is the more famous one. A machine that delivers work round a cycle while taking in no heat would need \(W_{\text{net}} > 0\) with \(Q_{\text{net}} = 0\), and the equality forbids it outright. That is a perpetual motion machine of the first kind, and the first law rules it out without any appeal to friction, to practicality or to the second law. It is not that such a machine would work badly. There is no arrangement of parts for which the books balance.
One caution about the word. A process that ends at the same temperature as it began is not thereby a cycle, and a system that has been round three quarters of a loop has not closed anything. The cancellation depends on every property returning, which is a claim about the state and not about any one coordinate of it.
Expand at the high pressure. The area underneath is work out.
Constant volume and constant pressure
Two processes account for most of the closed-system problems that will be set, and both are worth reducing to a single line so that the general balance does not have to be rebuilt each time.
The first is a rigid vessel. Boundary work is \(\int P\,dV\), and if the walls cannot move then \(dV\) is zero everywhere along the path, so the integral is zero however violently the pressure climbs. The first law loses a term:
Every joule of heat that crosses the boundary is still inside at the end. Two warnings attach to this. The first is that \(W = 0\) here means boundary work is zero, and a paddle wheel or an electrical resistor inside a rigid tank does work on the contents perfectly happily; the volume being fixed says nothing about a shaft coming through the wall. The second is that heating a sealed vessel raises the pressure with no relief whatever, which is why rigid tanks have burst discs and why this idealisation has a limit that is measured in fragments.
The second is a piston held down by a weight that does not change. The pressure is then fixed by a force balance on the piston and stays fixed however far it travels, so the work integral is trivial to evaluate:
Substituting that into \(Q - W = \Delta U\) and gathering the terms is where enthalpy earns its keep for a closed system. Since \(P\) is the same at both ends, \(P(V_2 - V_1) = P_2V_2 - P_1V_1\), and
The heat added at constant pressure is the change in enthalpy, and no separate work calculation is needed at all — the \(Pv\) term that looked like an arbitrary addition when enthalpy was first defined turns out to be exactly the boundary work, pre-computed and tabulated. Two lookups in the enthalpy column replace an integral. That is the whole reason the property exists in a closed-system context, and it is why the tables carry \(h\) beside \(u\) rather than leaving you to assemble it.
The trap is using \(Q = \Delta H\) where the pressure did not stay constant. It is not a general truth about heat; it is the constant-pressure special case, and applying it to a rigid tank gives an answer too large by exactly the work that was never done. The companion trap is subtler: \(\Delta H\) itself is perfectly well defined for any process, because enthalpy is a property, so the expression \(\Delta H\) being computable is no evidence that \(Q\) equals it.
A rigid vessel: the boundary cannot move, so it cannot do work.
Specific heats in use
Both of those results end in a change of internal energy or of enthalpy, and for water near the dome those come straight from the tables. For a gas well away from condensation there is a shortcut, and the specific heats are it. They are slopes: \(c_v\) is how steeply internal energy rises with temperature, \(c_p\) is how steeply enthalpy does, and both are properties in their own right rather than descriptions of a process.
For an ideal gas, \(u\) and \(h\) depend on temperature and on nothing else, so those slopes are ordinary derivatives and integrate to
Say plainly what the conditions on these are, because they are routinely misremembered in both directions. They require the gas to be ideal, and they require the specific heat used to be a fair average over the temperature span, since \(c_v\) and \(c_p\) both climb slowly with temperature. They do not require the volume to be constant in the first case or the pressure in the second. That \(\Delta U = mc_v\Delta T\) holds during an expansion is not a licence being stretched; it follows directly from \(u\) being a function of temperature alone, and the ideal gas model is where that comes from. The subscripts name the experiment that measures each one, not the process each may be used in.
Where the span is wide, an average taken at the mean temperature is the usual compromise, and it is honest to say how good it is: for air over a couple of hundred kelvin it is right to about one per cent, which is smaller than the error in most of the data the problem supplies. Where the span is very wide, or the gas is one whose molecules have a lot of vibrational modes to wake up, the tabulated \(u(T)\) and \(h(T)\) should be used instead and the specific heat abandoned.
Solids and liquids are the easier case, and they are easier for a physical reason. They barely change volume when warmed, so there is essentially no boundary work to pay for and no distinction between heating at fixed volume and heating at fixed pressure. The two specific heats collapse into one:
Writing \(c_v\) for a liquid is not wrong, merely redundant, and a problem that quotes two different specific heats for a solid is quoting a distinction that does not survive measurement. Enthalpy still needs care, though: for an incompressible substance \(\Delta h = c\,\Delta T + v\,\Delta P\), and the pressure term is small only while the pressure change is small. Pumping water to eight megapascals is the standard case where it is not.
Internal energy against temperature. Its slope is the specific heat.
Working a problem
The method matters more than any of the formulae, because the formulae are short and the opportunities to apply them to the wrong thing are many. It is the same five moves every time, and they are worth performing in order even when the answer looks obvious.
Draw the system and its boundary first, on paper, before any equation. Decide what is inside and mark every arrow that crosses. This is not a formality; whether the paddle wheel is inside or outside changes the work term, and whether the cylinder wall is inside changes whether its thermal mass is part of \(\Delta U\). Then fix state 1 and state 2, each with two independent properties, from the tables or from the ideal gas equation, and record \(P\), \(T\), \(v\) and \(u\) for both. Then name the process, because the endpoints alone do not determine the work. Then evaluate the work on its own, as a separate calculation with its own answer. Only then use the balance, which now has one unknown left in it.
Take a concrete case. A piston-cylinder holds \(0.1\) kg of air at \(200\) kPa and \(300\) K, under a weight that fixes the pressure, and it is heated to \(500\) K. The system is the air, the boundary is the cylinder wall and the piston face, and heat crosses inwards while work crosses outwards. The states come from \(V = mRT/P\) with \(R = 0.287\) kJ/(kg·K), giving \(V_1 = 0.04305\) and \(V_2 = 0.07175\) m³. The process is constant pressure, so the work is
and with \(c_v = 0.718\) kJ/(kg·K) the internal energy change is \(0.1 \times 0.718 \times 200 = 14.36\) kJ. The balance then hands over the heat without further physics:
Two checks are available and both should be made. The pressure was constant, so \(Q\) ought to equal \(\Delta H = m c_p \Delta T\), which is \(0.1 \times 1.005 \times 200 = 20.10\) kJ, to the last digit. And the work ought to equal \(mR\,\Delta T\), which is \(0.1 \times 0.287 \times 200 = 5.74\) kJ. The two routes agreeing is not a coincidence; it is \(c_p = c_v + R\) being the same fact seen from a different side.
Now the trap that this method exists to catch. Suppose instead a rigid insulated-looking tank whose contents are stirred by a paddle wheel that delivers \(15\) kJ, and suppose the tables put the rise in internal energy at \(10\) kJ. The tank is rigid, so there is no boundary work; the paddle does work on the system, so under the convention in use \(W = -15\) kJ. The balance gives \(Q = \Delta U + W = 10 - 15 = -5\) kJ. Heat left the system, and the gas got hotter anyway. Anybody who decided in advance that a warming gas must be absorbing heat, and wrote \(Q\) as a positive quantity to match, gets \(+5\) and never finds out.
That is the whole discipline. State the convention, draw the boundary, fix the states, name the process, compute the work, and let the balance report the sign. It generalises directly: allow mass to cross the boundary as well, and the same accounting becomes the energy balance for a control volume, with two more terms carried in and out by the streams and not one new idea.