Respuesta :

We can solve the problem by using the first law of thermodynamics:
[tex]\Delta U= Q-W[/tex]
where
[tex]\Delta U[/tex] is the variation of internal energy of the gas
Q is the heat absorbed by the gas (positive if the heat is absorbed, negative if it is released by the gas)
W is the work done by the gas (positive if the work is done by the gas on the surrounding, negative if it is done by the surrounding on the gas)

In this problem, the work done by the gas is [tex]W=-100 J[/tex] (negative because the piston compresses the gas, so the work is done by the surrounding), and the amount of heat is [tex]Q=-70 J[/tex] (negative because it is heat lost by the gas), therefore the variation of internal energy of the gas is
[tex]\Delta U=Q-W=-70 J-(-100 J)=-70 J+100 J=+30 J[/tex]

Therefore, the gas has gained 30 J of internal energy in the process.