Work Depends on How You Get There
For a fluid the elementary work done on the system is , so a finite process gives
and the integral needs the whole path, not just the endpoints. Different systems have their own forms, for a surface, for a cell, for a magnetic moment, but all share the pattern intensive variable times change in extensive variable.
Comparing two paths between the same endpoints makes the path dependence concrete:
| Path | Work done by the gas |
|---|---|
| Isobaric at , then isochoric | |
| Isochoric, then isobaric at | |
| Isothermal | |
| Free expansion into vacuum | Zero |
Same start, same finish, different answers. That is why is written with a rather than a , it is an inexact differential with no function behind it.
Joule's experiment is what rescues energy from this. He performed adiabatic work on water in three different ways — a falling weight turning a paddle, electrical heating, mechanical compression — and found that the work needed to move between two given states was always the same, regardless of method. If adiabatic work is path-independent, it defines a state function:
Once exists, heat is defined as the difference for a non-adiabatic path: . Heat is not a separate substance but a residual, whatever energy crossed the boundary that the work terms do not account for.
Common pitfall: reading free expansion into a vacuum as "the gas did work by expanding". There is nothing to push against, so and exactly. The gas expands, but does no work and, for an ideal gas, does not cool either.