3 moles of an ideal gas in an initial state T1 = 300 K and P1 = 0.5 bar undergo an isothermal compression until the pressure of the system is four times the original pressure. The process may occur in two ways:
A) Reversibly.
B) Against a constant external pressure Pext equal to the final pressure P2 of the gas.
For both cases, calculate Delta G in the process.