A mole of gas undergoes an expansion through two different processes. The gas satisfies the equation of state pV = NR T where R is a constant, N the number of moles, p the pressure, T the temperature and V the volume of the gas. The initial and final temperatures are T_0. The walls of the gas container are diathermal. However, if a process takes place extremely fast, the walls can be considered as adiabatic. The initial pressure of the gas is p_1, the final pressure is p_2. Express the work performed on the gas in terms of p_1, p_2 and T_0 for the following processes:
a) a reversible isothermal process,
b) an extremely fast pressure variation, such that the external pressure on the gas is p_2 during the expansion, then an isochoric process during which the temperature again reaches the equilibrium temperature T_0,