For a mass of gas consisting of n= moles at a pressure
the expansion from
involves an amount of work
In order to accomplish this work, energy must be added, and to calculate this energy, the temperatures must be determined. They can be calculated from the pressure and volumes using the ideal gas law:
the amount of heat required is given by