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 auf C, the gas is kept at constant temperature T. It undergoes an expansion from volume V1 auf 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 auf B, the ideal gas is first expanded from volume V1 auf V2 at constant pressure p1 by applying heat. The gas is then cooled at constant volume V2 along path B auf C, such that its pressure drops to p2.
For path A auf B, work is done under constant pressure, therefore
For path B auf 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 auf B.
In both processes, the gas expands from volume V1 to volume V2, such that its pressure changes from p1 auf p2. However, the work done in both processes is different. This proves that work done by a system is path-dependent.