Given,
Pressure of ideal gas (P)=2.5atm
Temperature of ideal gas (T)=27℃
No. of moles (n)=4 moles
Initial volume of gas ()=V=?
Now, from ideal gas equation,
PV=nRT
2.5×V=4×0.0821×300
⇒V=39.408L
Final volume (V2)=V2=39.4082=19.704L
ΔV=V2−V1=19.704−39.408=−19.704L
Pext.=3atm(Given)
Now, as we know that,
W=−Pext.ΔV
∴W=−3×(−19.704)=59.112L−atm
As thw process is isothermal,
⇒ΔU=0
Now from first law of thermodynamics, i.e.,
ΔU=q+W
∵ΔU=0
∴q=−W=−59.112L−atm.