(Equations valid only for reversible processes are labelled with a subscript rev.)
Although the pressure inside the system appears in this expression for the work, it
does so only because pex has been set equal to p to ensure reversibility. The total work
of reversible expansion from an initial volume Vi to a final volume Vf is therefore