Commonly seen in textbooks: the heat capacity (at constant volume, say) is defined as
\[C_V=\left(\frac{\partial Q}{\partial T}\right)_V.\]This may look like an innocuous definition, but strictly speaking, it does not make sense. The heat $Q$ is not a state function; only the 1-form $\delta Q$ is well-defined, and it is not exact: there is no function $\tilde Q$ such that $\delta Q = d\tilde Q$ globally.
However, this doesn’t seem to hinder thermodynamics. For example, in the case above, standard textbooks suggest the following procedure: since
\[dU = \delta Q - p dV\](at constant particle number), then at constant volume one finds $(\delta Q)_V = (dU)_V$: an exact differential. Hence, the heat capacity is found to be
\[C_V = \left(\frac{\partial U}{\partial T}\right)_V\]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 $X$, will we always find
\[(\delta Q)_X=(d F)_X\]for some function $F$? If we do, then we heat capacity at constant $X$ is easily found to be
\[C_X=\left( \frac{\partial F}{\partial T}\right)_X.\]Consider the equation defining a 1-form in 1D,
\[\omega = f(T) dT\]for an independent variable $T$. This form is closed, since
\[d\omega = f'(T)dT \wedge dT = 0.\]By the Poincaré lemma, it is also exact: there exists a function $g$ such that $\omega = dg$. In fact, it is a pretty obvious one:
\[\omega = dg(T) = f(T) dT \implies g(T)=\int^T f(T') dT.\]As long as $f$ 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
\[\omega = f(T, V) dT + g(T, V) dV.\]Then, its exterior derivative is
\[\begin{align*} d\omega &=\left(\frac{\partial f}{\partial V}\right)_T dV \wedge dT + \left(\frac{\partial g}{\partial T}\right)_V dT \wedge dV\\ &= \left[-\left(\frac{\partial f}{\partial V}\right)_T + \left(\frac{\partial g}{\partial T}\right)_V\right] dT \wedge dV \end{align*}\]which, in general, will not be zero. This shows the expected result: in 2D (and higher), 1-forms are in general not closed.
From the discussion in the previous section, we conclude the following: for an equation of the form $C = \partial Q/\partial T$ 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 $T$.
Let us show two examples. For a general system with $M$ particle species, the first law of thermodynamics is
\[dU=\delta Q-p dV+\sum_{i=1}^M \mu_i dN_i.\]Let us again consider the case of constant volume. Then, $\delta Q$ is a combination of $dU$ and $M$ other terms; we still cannot make $\delta Q$ closed. Hence we need to fix more variables: fixing all the particle numbers, we finally get $\delta Q = dU$ and hence
\[C_{V,N_1,\ldots, N_M}= \left(\frac{\partial U}{\partial T} \right)_{V,N_1,\ldots, N_M}.\]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 $N_i = N_i(T)$.
For constant pressure, the procedure is similar, except one naturally starts with enthalpy $H = U +pV$:
\[\begin{align*} dH &= dU + p dV + V dp\\ &=\delta Q+Vdp + \sum_{i=1}^M \mu_i dN_i. \end{align*}\]By fixing, now, pressure and particle numbers, we find the usual expression
\[C_{p,N_1,\ldots, N_M}=\left(\frac{\partial H}{\partial T}\right)_{p,N_1,\ldots, N_M}.\]We started by asking whether it is always the case that, by fixing a variable, we can make $\delta Q$ 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.
Written on March 8th, 2026 by Alessandro Morita