A gas is trapped in a cylinder that has a frictionless piston fitted to it. At the start, the gas occupies a volume $V_1$ and is in equilibrium with an outside pressure $p$. The gas is then heated gradually so that it expands, driving the piston backwards until the gas volume becomes $V_2$. How much work is done by the gas in this expansion?
- A$p(V_2 - V_1)$
- B$\frac{1}{2}p(V_2 - V_1)$
- C$p(V_2 + V_1)$
- D$\frac{1}{2}p(V_2 + V_1)$