(Hypothetical data.) A sealed, rigid, thermally insulated box holds a gas and a small resistor of negligible heat capacity. Wires from the resistor pass through the wall of the box to a battery outside, as shown.

The battery drives a current through the resistor and delivers of electrical energy to it. Write the first law as , with the work done by the system. Which entry is correct, first taking the system to be the gas alone, and then taking it to be the gas together with the resistor?
