Suppose you do 100j of work in compressing a gas, if 80j of heat escapes in the process, what is the change in internal energy of the gas?

1 answer

100 - 80= 20 J.
Any work done on the gas that does not escape as heat becomes internal energy.

Qin = Wout + delta U

In this case both Wout and Qin are negative