Work done in an isothermal process: Consider an ideal gas which is allowed to expand quasistatically at constant temperature from initial state (Pi,Vi) to the final state (Pf,Vf). We can calculate the work done by the gas during this process. The work done by the gas,
As the process occurs quasi-statically, at every stage the gas is at equilibrium with the surroundings. Since it is in equilibrium at every stage the ideal gas law is valid. Writing pressure in terms of volume and temperature,
Substituting equation (2) in (1) we get
In equation (3), we take uRT out of the integral, since it is constant throughout the isothermal process.
By performing the integration in equation (3), we get
since we have an isothermal expansion, \(\frac{V_f}{V_i}\)>1, so (\(\frac{V_f}{V_i}\)) As a result the work done by the gas during an isothermal expansion is positive.
The above result in equation (4) is true for isothermal compression also. But in an isothermal compression \(\frac{V_f}{V_i}\)>1, so in (\(\frac{V_f}{V_i}\))<0.
As a result the work done on the gas in an isothermal compression is negative. in the PV diagram the work done during the isothermal expansion is equal to the area under the graph.
Similarly for an isothermal compression, the area under the PV graph is equal to the work done on the gas which turns out to be the area with a negative sign.