From the search term phrases that show up on this blog’s stats, CarnotCycle detects that a significant segment of visitors are studying foundation level thermodynamics at colleges and universities around the world. So what better than a post that tackles that favorite test topic – *exact and inexact differentials*.

When I was an undergraduate, back in the time of Noah, we were first taught the visual approach to these things. Later we dispensed with diagrams and got our answers purely through the operations of calculus, but either approach is equally instructive. CarnotCycle herewith presents them both.

**– – – –**

**The visual approach**

Ok, let’s start off down the visual track by contemplating the following pair of pressure-volume diagrams:

The points A and B have identical coordinates on both diagrams, with A and B respectively representing the initial and final states of a closed PVT system, such as an ideal gas, whose state can be defined in terms of any two of the three variables p,v,t, since the third will be determined by the equation of state. In this case, the pressure P and the volume V have been selected as the independent variables.

The paths taken between A and B are visibly different. In path I on the left, the volume first increases at constant pressure (ΔV>0, external work done), then the pressure decreases at constant volume (ΔV=0, no work done). In path II on the right, these operations are performed in reverse order.

Now the PV diagram has the property that the area under the curve represents the work done during the transition from initial state to final state. This is represented by the shaded area in the diagrams; it is evident that the work done in passing from A to B is greater for path I than it is for path II.

The conclusion can thus be drawn that * unless the path is specified*, the work done in the process A→B cannot be determined.

Now let’s apply the first law of thermodynamics to the process A→B. For an appreciable (i.e. measurable) change

where q is the heat supplied to the system and w is the work done by the system. The internal energy U is a state function – this is an axiom of thermodynamics – and for a closed system it means that ΔU has the same value for all paths between state A and state B. Since the above equation does not specify a path, and we know that under these circumstances w is indeterminate, q must also be indeterminate.

For a PVT system undergoing a reversible process, we can write the differential equation which expresses the first law as follows:

The same considerations applying to appreciable differences also apply to infinitesimals on integration. For the process A→B, the values of the integrals ∫_{A}^{B}dq_{rev} and ∫_{A}^{B}dw_{rev} are path-dependent.

Now the mathematics of multivariate functions teaches us that if the differential of a function Y, where Y = Y(X_{1}, X_{2},…, X_{n}), can be set equal to a differential expression ΣC_{i}dX_{i} where X_{i} are independent variables and the coefficients C_{i} are functions of the X_{i}, then dY is said to be an ** exact differential**.

Importantly for thermodynamics, dY then also has the characteristic that the value of the integral ∫_{A}^{B}dY = ΔY is independent of the path followed from state A to state B. As we have seen, dU comes into this category.

If a differential does not have this characteristic, i.e. if the value of the integral is path-dependent, then it is said to be an ** inexact differential**. And as we have seen, dq

_{rev}and dw

_{rev}come into this category.

**– – – –**

**The math approach**

Right then, let’s see how we can set about supplying the answer as to why dq_{rev} is inexact by taking the purely mathematical route. We can write the differential equation which expresses the first law for a PVT system undergoing a reversible process in the following way:

Actually, when you look at this equation it does seem reasonable to think that dq_{rev} is exact, since both the variables on the right are exact. But appearances can be deceptive.

Now since P,V and T are the thermodynamic variables which determine the state of a PVT system, and U is a state function, we can consider U a function of any two of them – the third will be determined by the equation of state. So let’s choose V and T (makes the calculus a bit easier) and write the partial differential equation:

Substituting for dU in the first law equation gives:

At this point, it is convenient to recall the property of exact differentials that if Y and its derivatives are continuous, then for any pair of independent variables X_{1} and X_{2} there is the mathematical requirement that

We can use this to test the exactness of the property relation we have just derived for dq_{rev}. Differentiating M wrt T and N wrt V gives:

Since we know that U is a function of T and V, it follows that (∂^{2}U/∂T∂V) and (∂^{2}U/∂V∂T) must be equal. (∂M/∂T)_{V} and (∂N/∂V)_{T} are therefore not equal, and since (∂P/∂T)_{V} is generally non-zero (i.e. not a horizontal line on a PT plot), we must conclude that the test fails to establish exactness, and that dq_{rev} – and therefore dw_{rev} – are ** inexact differentials**.