Inexact differentials show up explicitly in the first law of thermodynamics,
where  is the energy,  is the differential change in heat and  is the differential change in work. Based on the constants of the thermodynamic system, we are able to parameterize the average energy in several different ways. E.g., in the first stage of the Carnot cycle (which is isentropic) a gas is heated by a reservoir, giving us an isothermal expansion of that gas. During this stage, the volume is constant while some differential amount of heat  enters the gas. During the second stage, the gas is allowed to freely expand, outputting some differential amount of work . The third stage is similar to the first stage, except the heat is lost by contact with a cold reservoir, while the fourth cycle is like the second except work is done onto the system by the surroundings to compress the gas. Because the overall changes in heat and work are different over different parts of the cycle, there is a nonzero net change in the heat and work, indicating that the differentials  and  must be inexact differentials.
Internal energy  is a state function, meaning its change can be inferred just by comparing two different states of the system (independently of its transition path), which we can therefore indicate with  and .
Since we can go from state  to state  either by providing heat  or work , such a change of state does not uniquely identify the amount of work  done to the system or heat  transferred, but only the change in internal energy .