For a mass of gas consisting of n= moles at a pressure
the increase in pressure to
requires input heat
All of this heat contributes to the increase in the internal energy of the gas since no work is done. The initial and final temperatures can be calculated from the pressure and volumes using the ideal gas law: