Let’s apply the first law of thermodynamics, Equation 15-2, to the generic engine shown in Figure 15-14. In one cycle of the engine it takes in an amount of energy \(Q_{\mathrm{H}}\) from the hot reservoir in the form of heat and sends an amount of energy \(\vert Q_{\mathrm{C}}\lvert\)to the cold reservoir in the form of heat, so the net quantity of heat that goes into the engine is \(Q = Q_{\mathrm{H}} - \vert Q_{\mathrm{C}}\vert\). In that same cycle the engine does an amount of work \(W\). Because the engine goes through a cycle that returns it to its initial state at the beginning of the cycle, there is zero net change in its internal energy: \(\Delta{U} = 0\). So the first law of thermodynamics, \(\Delta{U} = Q - W\), becomes
\(0 = Q_{\mathrm{H}} - \vert Q_{\mathrm{C}}\vert - W\)
or