Question
Derive an expression for the work done by a gas undergoing expansion from volume V1 to V2.
Solution
Consider an ideal gas enclosed in a cylinder fitted with a massless and frictionless piston.
Let A be area of the cross-section of piston.
Let V be the volume and P be the pressure exerted by gas on the piston.
The piston is kept in equilibrium by applying pressure P from outside.

Let the applied pressure be decreased by infinitesimally small amount, so that the piston moves by infinitesimal distance dx.
The amount of work done by the gas in infinitesimal expansion is,
where,
dV = Adx, the infinitesimal increase in volume.
Total work done by gas in expanding it from volume V1 to V2 can be obtained by integrating equation (1) from V1 to V2.
i.e.,
, is the amount of work done.
Let A be area of the cross-section of piston.
Let V be the volume and P be the pressure exerted by gas on the piston.
The piston is kept in equilibrium by applying pressure P from outside.

Let the applied pressure be decreased by infinitesimally small amount, so that the piston moves by infinitesimal distance dx.
The amount of work done by the gas in infinitesimal expansion is,

where,
dV = Adx, the infinitesimal increase in volume.
Total work done by gas in expanding it from volume V1 to V2 can be obtained by integrating equation (1) from V1 to V2.
i.e.,
