Consider the two thermodynamic processes involving an ideal gas that are represented by paths AC and ABC in Figure 1:
In the first process for path A 到 C, the gas is kept at constant temperature T. It undergoes an expansion from volume V1 到 V2.
The work done by an ideal gas is expressed as
Substituting for pressure as nRT/V from the ideal gas equation and integrating the terms, the work done by an ideal gas at constant temperature is obtained as
In the second process, for path A 到 B, the ideal gas is first expanded from volume V1 到 V2 at constant pressure p1 by applying heat. The gas is then cooled at constant volume V2 along path B 到 C, such that its pressure drops to p2.
For path A 到 B, work is done under constant pressure, therefore
For path B 到 C, since the volume remains constant, no work is done by the gas or on the gas by the surroundings. Therefore the total work done by the gas in this process is the same as the work done for path A 到 B.
In both processes, the gas expands from volume V1 to volume V2, such that its pressure changes from p1 到 p2. However, the work done in both processes is different. This proves that work done by a system is path-dependent.