Work done by a gas during a quasi-static volume change
A volume change, i.e. the contraction or expansion of a container, is a mechanical change — and therefore any energy transferred due to this process will be work. The amount of work due to an infinitesimal quasistatic volume change is
where
Derivation
Consider a container of an ideal gas expanding in one direction. The gas therefore exerts a force
due to pressure, resulting in a displacement in that one direction. The total volume change will be , where is the normal area vector:
