If the working substance is a perfect gas, U is only a function of T for a closed system since its internal pressure vanishes. Therefore, the internal energy changes of a perfect gas undergoing various processes connecting initial state a to final state b are always given by the formula