Consider a cylinder with an ideal gas of volume Vo at a pressure of po fitted with a frictionless piston attached to a mass. The piston remains stationary while the pressure is in equilibrium.
If the mass reduces by half, the external pressure on the piston reduces proportionally. The higher internal pressure of the gas pushes the piston forward until a new equilibrium is reached.
The gas volume increases. The system reaches a new thermodynamic state by performing work.
Suppose the same final state is achieved by reducing the mass in two stages. Initially, the pressure decreases to 0.75po, and the work done is represented by the area under the second curve.
Reducing the mass further in the second stage, the work done by the gas equals the area under the third curve. Therefore, the total work done by the gas in the second process is the sum of the areas under the two curves.
Thus, the work done by the gas is different for different processes, and, hence, it is a path-dependent function.
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 to C, the gas is kept at constant temperature T. It undergoes an expansion from volume V1 to 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 to B, the ideal gas is first expanded from volume V1 to V2 at constant pressure p1 by applying heat. The gas is then cooled at constant volume V2 along path B to C, such that its pressure drops to p2.
For path A to B, work is done under constant pressure, therefore
For path B to 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 to B.
In both processes, the gas expands from volume V1 to volume V2, such that its pressure changes from p1 to p2. However, the work done in both processes is different. This proves that work done by a system is path-dependent.
Suggested Reading
Young, H.D., Freedman, R.A. University Physics with Modern Physics. San Francisco, CA: Pearson. 628 (2012).