where "U" is internal energy, "Q" is the heat added to the system, "W" is the work done by the system, and since no mass is transferred in or out of the system, both expressions involving mass flow are zero and the first law of thermodynamics for a closed system is derived. The first law of thermodynamics for a closed system states that the increase of internal energy of the system equals the amount of heat added to the system minus the work done by the system. For infinitesimal changes the first law for closed systems is stated by: