Any thermodynamic system in equilibrium has a state variable called
 internal energy (E). The change in internal energy equals the difference
 of the heat transfer into the system and the work done by the system.