Moving-boundary work

A gas pushing a piston does work $W_b = \int P\,dV$, the area under its path on a P-V diagram, so two paths between the same two states do different amounts of work.

From Thermodynamics.