I was reading a Wiki article on the relationships between heat capacities

And during the derivation I came across this formula (and others like it):


This equation was used as a tool in a derivation, and came about independently.

  1. Where does this come from (rigorously)? I see how it makes sense that we can get this formula by saying $S=S(V,T)$, given that this functions is an exact differential. But why are there only two natural variables chosen? Isn't it also true to say $S=S(P,V,T)$?

  2. This is only true if $S=S(V,T)$ is an exact differential. How do we know it's an exact differential?

  3. The article has a similar equation for $P=P(S,T)$. How do we know $P(S,T)$ is an exact differential? Is $P$ a state function?

I feel like this is an underlying simple answer to this, since these equations seem to be used as standalone identities themselves.


2 Answers 2


For any function of multiple variables, say, $f(x, y, z, \ldots)$ you can always write the following:

$df = \big( \frac{\partial f}{\partial x} \big)_{y, z, \ldots} dx + \big( \frac{\partial f}{\partial y} \big)_{x, z, \ldots} dy + \big( \frac{\partial f}{\partial z} \big)_{x, y, \ldots} dz + \ldots$

In fact, the constancy of the other variables is implicit in the partial differential notation ($\partial/\partial x$) but it is customary to write the variables that are constant under the derivative when discussing thermodynamics, just to keep track of what other variables we were considering in that particular case.

The really confusing thing when discussing thermodynamics is the fact that your variables ($P, V, T$) are not independent. For instance, when considering $S$, the entropy, there are three variables, but they are also constrained by an additional equation, which is the equilibrium condition for the gas, which happens to be $PV = NkT$ for an ideal gas. So, you can pick any two to be independent variables, but the third will be dictated by the equilibrium condition.

Mathematically, of course, you can say $S = S(P, V, T)$. Let us see what happens then:

$dS = \big(\frac{\partial S}{\partial T} \big)_{P, V} dT + \cdots$

I just wrote the first term. It says, derivative of $S$ with respect to $T$, keep $P$ and $V$ constant. The question is, how can you change $T$ in the first place when keeping $P$ and $V$ constant? You can not, because the gas is (supposed to be) in equilibrium. So, what keeps you from doing this is the fact of the existence of the additional equation, hence you can not pick all three as independent variables. It's not the math, it's the physics.

If any quantity $X$ is a state function of a set of variables, then its differential will be an exact differential. Looks like a circular definition; so let me try to elaborate:

Think about this: You know that a friend just traveled from New York City to Boston, and now he is in Boston. Can you know the amount of gas he spent? The answer is no. The amount of gas he spent depends not only where he is now (well, that dependence is indirect, it sort of gives a minimum) but also what route he took and how aggressive he drove, how much traffic there was, air pressure, and whatnot. So if you call the amount of gas $G$, $G$ can not be known by looking at where he is right now (without investigating history) it is not a state variable. Therefore, $dG$ is not an exact differential.

But what about his distance to New York City? You know he is in Boston, and that is all you need to know. By just looking at his final state, you can tell what the distance is (I can not because I am too lazy to look at a map). So, his distance-to-New-York-City function $D$ is a state variable. Therefore $dD$ is an exact differential. It really does not matter how he traveled there; even if he teleported by magic, we still know $D$.

Now the third part. Darn thermodynamics, everything jumps around.

Let us say we picked $V$ and $T$ as our two independent variables. Which we can.

Then, we can say $S = S(V, T)$ and also $P = P(V, T)$. Now $P$ is not an independent variable, but once you know $V$ and $T$, it is known. So, since there is an equation $PV = NkT$, if you know what $V$ and $T$ are (your state variables - the independent ones - which you had a choice in picking) you do know what $P$ is, without having to know about the history of the gas.

This is not the answer to your question, of course. Here comes additional complication.

Look at the case more broadly. What you know is the existence of two relations among four variables $P, V, T, S$:

$F(P, V, T) = 0$ (this is the equilibrium condition)

$G(S, P, V, T) = 0$ (This is relation of $S$)

Just to be clear, in the ideal gas case, these two equations are:

$PV = NkT$ (which makes $F(P, V, T) = PV - NkT$ )


$S = Nk \ln \frac{VT^{c_v}}{N \Phi}$ ($c_v$ is the specific heat of the gas at constant volume, and $\Phi$ is a gas-dependent constant. This is as far as you can deduce using thermodynamics of an ideal gas only.)

For a non-ideal gas, the equations deviate from these forms, but a gas in equilibrium always has a state equation like $PV = NkT$, and there is always a "proper" expression for $S$.

Since I have two equations and four "unknown"s, it means I can choose any two of them as independent variables, and the other two will be specified by the equations.

So yeah... Now I exercise my freedom, and pick $S$ and $T$ as my independent variables. This makes $P = P(S, T)$ and also $V = V(S, T)$. And, since they are specified exactly by my state variables $V$ and $T$, $dP$ and $dV$ are exact differentials.

What are not exact differentials then? The work done by a system is not an exact differential. You can increase the temperature of a gas by compressing it, or by giving it heat. By looking at the final volume and temperature, I can not possibly say by which way the internal energy arrived. So, work $W$ and heat exchanged $Q$ are not state variables. It does not even make sense to talk about what the "heat" or "work" of a system is, precisely because they are not state variables. You can talk about work done in a process, or heat exchanged in a process since they are process-dependent.

Final re-iteration: If a value of a variable depends on the end points only, and not the path taken, then it is a state variable. If it does depend on the path, then it is not a state variable.

Thermodynamics is difficult like this, because (as Feynman has said) we can not decide once and for all what our independent variables are. This is not because physicists are evil, but because every problem requires a different approach, and we use whatever is more useful for that case.

  • 1
    $\begingroup$ Enjoyable to read whilst also being informative. $\endgroup$
    – Farcher
    Commented Jan 27, 2016 at 9:58
  • $\begingroup$ So much knowledge and intuition in this answer, thank you. I was really confused about why we can choose any two independent variables as our "state variables", thus allowing us to write P=P(S,T), P=P(V,T), P=P(S,V), etc.. I think you answered this by explaining that we know two relations among four variables, but what exactly are those two relations? You showed F(P,V,T) = 0 as an equilibrium condition and G(S,P,V,T) = 0. Are these thermodynamic potentials or just conditions for equilibrium? $\endgroup$ Commented Jan 27, 2016 at 16:58
  • $\begingroup$ This is hard to answer in a comment -- I will edit the answer to clarify. $\endgroup$
    – safkan
    Commented Jan 27, 2016 at 21:49
  • $\begingroup$ @safkan maybe you can answer my question here as well? $\endgroup$
    – Foad
    Commented Mar 1, 2018 at 14:38
  • $\begingroup$ @safkan How can we prove that these two relations about the four variables are the only that exist? Also does it matter if the relation between the variables are linear? Because if we could solve a system of nonlinear equations it is possible to find for example a relation like the following: $$V=cP^2$$ which means that there are two values of pressure for one value of volume. $\endgroup$ Commented Aug 19, 2020 at 17:41

The equilibrium thermodynamic state of a single phase substance of constant composition is determined by specifying two intensive properties. Note that, from the equation of state, V and T uniquely determine P (where V is the specific volume).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.