Recap
As commonly seen in textbooks, the heat capacity (at constant volume, say) is defined as
This may look like an innocuous definition, but strictly speaking, it does not make sense. The heat is not a state function; only the 1-form is well-defined, and it is not exact: there is no function such that globally.
However, this doesn’t seem to hinder thermodynamics. For example, in the case above, standard textbooks suggest the following procedure: since
(at constant particle number), then at constant volume one finds : an exact differential. Hence, the heat capacity is found to be
and all is well - the right-hand side only involves proper state functions.
The question is then: can we always make this happen? When we fix a variable, say , will we always find
for some function ? If we do, then we heat capacity at constant is easily found to be
The issue in more than 1 dimension
Consider the equation defining a 1-form in 1D,
for an independent variable . This form is closed, since
By the Poincaré lemma, it is also exact: there exists a function such that . In fact, it is a pretty obvious one:
As long as is well-behaved (locally integrable), then the integral on the RHS is always well-defined. In other words: in 1D, all one-forms are exact.
Now, if we go to two dimensions, this is not the case anymore. Consider a 1-form
Then, its exterior derivative is
which, in general, will not be zero. This shows the expected result: in 2D (and higher), 1-forms are in general not closed.
What this means for heat capacity
From the discussion in the previous section, we conclude the following: for an equation of the form to be well-defined, it must be defined on a one-dimensional submanifold. In terms of thermodynamics, this means: impose constraints so that the thermodynamic process is restricted to a 1-dimensional submanifold, parameterized by .
Let us show two examples. For a general system with particle species, the first law of thermodynamics is
Let us again consider the case of constant volume. Then, is a combination of and other terms; we still cannot make closed. Hence we need to fix more variables: fixing all the particle numbers, we finally get and hence
This is a proper definition. We could not have defined, say, heat capacity at constant volume alone, and let the particle numbers vary, unless they were somehow constrained by temperature; for example, if there was a deterministic procedure to set .
For constant pressure, the procedure is similar, except one naturally starts with enthalpy :
By fixing, now, pressure and particle numbers, we find the usual expression
Conclusion
We started by asking whether it is always the case that, by fixing a variable, we can make into an exact differential. The answer is: not one variable. We need to constraint enough variables so that we can fix the process to live on a 1-dimensional submanifold. When that happens, we can properly define the heat capacity.