For the popcorn shown in Figure 15-2, heat flows into the popcorn (\(Q > 0\)), the internal energy of the popcorn increases (\(\Delta{U} > 0\)), and the popcorn does work on its surroundings (\(W > 0\)). Careful measurement shows that the heat flow into the system is exactly equal to the sum of the change in internal energy plus the work done. In other words, the energy that enters the popcorn in the form of heat goes either into changing the popcorn’s internal energy or into doing work. None of the energy is lost. We can write this statement as an equation:
(15-1) \(\ \ \ \ Q = \Delta{U} + W\)
It’s conventional to rearrange this equation with \(\Delta{U}\) on one side and \(Q\) and \(W\) on the other side:
Equation 15-2 is a mathematical statement of the first law of thermodynamics. It’s a generalization of the law of conservation of energy. It says that the internal energy of a system can change only if the system gains energy from its surroundings (if heat flows in from the surroundings, or its surroundings do positive work on the system) or if the system loses energy to its surroundings (if heat flows out to the surroundings, or the system does positive work on its surroundings). No exception to this rule has ever been found.