# Understanding "natural variables" of the thermodynamic potentials using the example of the ideal gas

I'm struggling with the concept of "natural variables" in thermodynamics. Textbooks say that the internal energy is "naturally" expressed as $$U = U(S,V,N)$$

For an ideal gas, I could take the Sackur–Tetrode equation - which gives me $S(U,V,N)$ - and solve for $U$ to get $$U = \frac{3Nh^2}{4 \pi m} \left( \frac{N}{V} \left( \exp \left( \frac{S}{Nk} \right) - \frac{5}{2} \right) \right) ^{2/3} = U(S,V,N)$$

However, I have never seen this expression before. Usually, people invoke the equipartition theorem to get $$U = \frac{3}{2}N k_B T = U(T,N)$$ Or they use the ideal gas law to get $$U = \frac{3}{2}N k_B T = \frac{3}{2}pV = U(p,V)$$

So sticking with the example of the ideal gas, this motivates the following questions:

• What is "natural" about $U(S,V,N)$ compared to $U(T,N)$ and $U(p,V)$?
• Can I derive the expressions for $U(T,N)$ and $U(p,V)$ from $U(S,V,N)$?
• Can I derive $U(S,V,N)$ from $U(T,N)$ and $U(p,V)$?

Note that this question is not about the Legendre transformation between different thermodynamic potentials but about expressing the same thermodynamic potential $U$ in terms of different variables.

• You can actually derive the equipartion theorem from the fundamental relation that you posted. Simply take the partial derivative of $U$ to $S$ and you get the temperature which exactly the same as the equipartition theorem that you posted. So the expressions are equivalent. Jun 2, 2022 at 4:25

1. About what makes $$U(S,V,N)$$ natural:

Keep in mind that thermodynamics started out as an experimental science, with people looking to use it for practical purposes (such as Carnot, etc.). Now as energy has always had center stage in physics, since it is conserved in many systems, so it made for a good starting point. One observation people made about energy is that it $$\textbf{scales with the system}$$. What that means is that by increasing the size of the system (all its parameters), the energy also increased in proportion. This means that when looking for an equation for the energy, we need to look for parameters which also scale with the system, or mathematically speaking, we need an equation that is $$\textbf{first order homogeneous}$$, i.e. $$U(\lambda X_1, \lambda X_2 ...) = \lambda U(X_1, X_2...)$$ Where $$\lambda \in \mathbb{R}$$ and $$X_1,X_2...$$ are the parameters. The parameters for which the above is true are known as $$\textbf{extensive parameters}$$. Intuitively, these are the volume, $$V$$ and the number of particles, $$N$$. Less intuitively, the entropy, $$S$$ is also extensive. There are other extensive parameters which are used to calculate $$U$$, such as magnetic moment. But for most simple systems, $$S,V,N$$ are enough.

1. About deriving $$U(T,p,N)$$

Given $$U(S,V,N)$$, you can find $$T$$ and $$-p$$ as taking the partial derivative of $$U$$ with respect to $$S$$ and $$V$$ respectively. Note that $$T$$ and $$-p$$ are $$\textbf{intensive parameters}$$, wherein they are NOT homogeneous first order. The equation would look something like: $$T(\lambda X_1, \lambda X_2 ...) = T(X_1, X_2...)$$ Now since we have partial derivatives, you could write down functions $$U$$ as a function of $$T$$ and $$p$$, but in doing so, you would be losing information. Suppose you gave your new function $$U(T,p,N)$$ to a friend and he wanted to find $$U(S,V,N)$$, he would have to conduct 2 integrals, which would leave him wanting 2 constants of integration to nail down the function. So you see you can 'derive' $$U(S,V,N)$$ from $$U(T,p,N)$$ only upto a constant. This is why the Legendre transformations are helpful. They are a way to change coordinates without losing information.

$$\textbf{When I say he has to conduct 2 integrals, I mean the following:}$$

Suppose you expressed $$U$$ as a function of $$T,p,N$$, and using the following relations: $$T=\left(\frac{\partial U}{\partial S}\right)_{V,N} , -p=\left(\frac{\partial U}{\partial V}\right)_{S,N} ,$$ Then, you'll have the following type of equation $$U=f\left(\frac{\partial U}{\partial S},\frac{\partial U}{\partial V},N\right)$$ Which is a partial differential equation ($$f$$ is some function of the variables). In the best case scenario that this is separable, 2 integrals would have to be conducted and hence 2 integration constants would be needed to obtain the exact function $$U(S,V,N)$$.

$$\textbf{About Ideal Gases:}$$ There are many ways to work out fundamental relations for ideal gases. The one you referenced in your question actually comes from Statistical Mechanics after considering phase space volumes. Thermodynamics alone is incomplete and requires many manipulations to get the results we want. In most cases, we only have expressions for $$T$$ and/or $$p$$, known as $$\textbf{equations of state}$$. What is really important to understand is the difference between the $$\textbf{energy representation}$$ and $$\textbf{entropy representation}$$. When the fundamental relation takes the form $$U(S,V,N)$$, we are working in the energy representation. If it is of the form $$S(U,V,N)$$, we have the entropy representation. Now the equation of state (relating to T) for the entropy representation is $$\frac{1}{T}=\left(\frac{\partial S}{\partial U}\right)_{V,N}$$ In the above it is clear that the right hand side must be a function of $$U,V,N$$. So the equipartition equation you wrote down is not a fundamental equation, but an equation of state in the entropy representation!

• I like your answer! I understand what you write about $U(T,p,N)$ but I can't immediately connect it to the ideal gas. There, I have the function $U(T,N)$. Also could you elaborate on the "2 integrals"part?
– Marc
Jan 24, 2017 at 23:24
• I added to the answer to elaborate :) Jan 25, 2017 at 0:41
• Thank you, this answers my question :-) [little latex-tip in case you don't know: if you write \left( instead of ( the size of your bracket is matched to your expression]
– Marc
Jan 25, 2017 at 13:53
• Glad your question is answered. Thanks for the latex tip as well, I always found that small bracket size annoying! Jan 27, 2017 at 0:39
• I don't think point (1) is correct at all. While the natural variables for $U$ happen to all be extensive, this is not true for the other thermodynamic potentials. For example, the natural variables for $G$ are $p$ and $T$, which are both intensive. I think the real answer is given by By Symmetry below. Jun 18, 2018 at 10:59

The first law of thermodynamics states that we can write the change in internal energy as the heat applied plus the work done on the system $$\mathrm{d}U = \delta Q + \delta W\,.$$

In order to make some use of this expression we need to find some expression for $\delta Q$ and $\delta W$. In general this is difficult, not least because work and heat are path dependent quantities. In the special case of a reversible path, however we make some progress. In particular the reversible work $\mathrm{d} W_\mathrm{rev} = -p \mathrm{d}V + \mu \mathrm{d}N$ and from the definition of entropy we have $\mathrm{d} Q_\mathrm{rev} = T\mathrm{d}S$. Pluggin gthis into the fist law gives us $$\mathrm{d}U = T\mathrm{d}S - p\mathrm{d}V+\mu \mathrm{d}N\,.$$ Moreover because all the variables in this expression are functions of state, this expression must be path independent, and so holds on all paths and not just reversible ones.

Notice that this differential is exceptionally simple. It only contains the thermodynamic variables or their differentials, not complicated functions of them. It also allows us to write expressions like $p = -\left(\frac{\partial U}{\partial V}\right)_S$, giving us an easy way to calculate the pressure or temperature.

This is what is meant when we say that $U$ is naturally a function of $S$, $V$ and $N$. If $U=U(S,V,N)$ it has an exceptionally simple differential that allows us to relate the different thermodynamic variables. We could write $U$ as a function of say $T$ and $P$ $$\mathrm{d}U = \left(\frac{\mathrm{d}U}{\mathrm{d} T}\right)_p\mathrm{d} T + \left(\frac{\mathrm{d}U}{\mathrm{d} P}\right)_T\mathrm{p}$$ but $\left(\frac{\mathrm{d}U}{\mathrm{d} T}\right)_p$ would generally be some complicated function of the different thermodynamic variables.

Notice as well that this derivation used only generally properties of any thermodynamic system, it did not depend on the exact details of the system being considered. If we tied to define "natural" variables based on the explicit form of $U$ as a function of the variables, rather than using the differentials we would not find much general behaviour.

Similarly when we look at quantities such as the enthalpy or the Gibbs free energy we can derive similar simple differentials, allowing us to relate the other thermodynamic variables through the derivatives of the potentials.

• Thanks. What I understood from your answer is that for my function $U(T,N)$, i is difficult to calculate a partial derivative where I keep $p$ fixed. This makes sense to me.
– Marc
Jan 24, 2017 at 23:20

There are already some good answers here, but I just wanted to add an approach to thinking about natural variables using the notion of Availability- which I think makes the whole thing more intuitive.

# Derivation of the Availability as extractible work

We start from the entropy of a system, and the principle that entropy must always increase:

$$dS \ge 0$$

For an isolated system this expression is useful enough by itself, and we can just rearrange the first law to get:

$$dS = \frac{dU + pdV - \mu dN}{T}$$

The equation of state can then be subbed into this equation, which can then be solved when the various constraints are applied.

When there is a system in contact with a reservoir, which is often how systems are thought of in thermodynamics, it is much more convenient to consider the change of entropy of the system and the reservoir simultaneously. To do this we can define the Availability of a system, using the second law, that entropy must always increase as stated above, as:

$$dS_{tot} = dS_{sys} + dS_{reservoir} \ge 0$$ $$dS_{tot} = dS_{sys} + \frac{dU_{R} + p_{R}dV_{R} - \mu_{R} dN_{R}}{T_{R}} \ge 0$$ $$dS_{tot} = \frac{dS_{sys}T_{R} + dU_{R} + p_{R}dV_{R} - \mu_{R} dN_{R}}{T_{R}} \ge 0$$

Using the fact that the system and reservoir are isolated from any outside systems, we have $$dV_{R} = - dV_{sys}$$, $$dN_{R} = - dN_{sys}$$ and $$dU_{R} = - dU_{sys}$$. Subbing these in then simplifies the above expression to:

$$dS_{tot} = \frac{dS_{sys}T_{R} - dU_{sys} - p_{R}dV_{sys} - \mu_{R} dN_{sys}}{T_{R}} \ge 0$$

Now, dropping the subscript for the 'system' variables, the availability can be written as:

$$dA = - T_{R}dS_{tot} = dU + p_{R}dV + \mu_{R} dN - T_{R}{dS}$$ $$dA = (T -T_{R})dS - (p -p_{R})dV + (\mu -\mu_{R})dN$$

Where all the changes on the right hand side are with respect to the system variables.

The second law still applies to the availability, but in this new form it is written as:

$$dA \le 0$$

Now all this might seem superfluous to an explanation of the natural variables so far, but if we consider what the availability actually means then we can distill the intuition behind this reconstruction of the entropy.

Consider the amount of work which can be extracted from a system and reservoir ensemble. The amount of extractable work is clearly just the sum of internal energy in the system and reservoir:

$$dW_{extractable} = -dU - dU_{R}$$

i.e. an amount of work done by the ensemble must be equal to the change in internal energy in the system and the reservoir- just conservation of energy. Now if we sub in the availability expression derived above we have:

$$dW_{extractable} = p_{R}dV + \mu_{R} dN - T_{R}{dS} - dA - dU_{R}$$

Subbing in $$dV_{R} = - dV$$, $$dN_{R} = - dN$$, and the definition of dU from the first law, and rearranging gives:

$$dW_{extractable} = -dA - T_{R}d(S + S_{R})$$

In the reversible case the second term on the right handside is equal to zero, and so we have:

$$- dA = dW_{extractable, max}$$

The availability gives the maximum amount of extractable work from a system.

# Connection to Natural Variables

The amount of extractable work is of primary importance in many situations, though it often not explicitly stated in terms of the Availability. This is because historically, thinking about the change in free energy of an experimental system is much more convenient, e.g. Gibbs Free Energy is often used in chemistry, and the Hemholtz Free Energy in Physics. When these terms are introduced to students they are often just defined without reference to their derivations- at least in my experience of school and university Physics and Chemistry. But what is the difference between all these different uses of the term 'Free Energy'?

Essentially, these terms, as well as the Enthalpy and Grand Potential all express the same thing as the Availability, i.e. the amount of extractible work, but with respect to different constraints on the system. And these constraints are what define the natural variables of a state variable. Or more precisely, the natural variables will define the magnitude of a state variable, while the non-natural variables will define the magnitude of a change in the state variable.

E.g. for the Hemholtz free energy we can consider the amount of extractable work at constant T, V and N:

$$dA = (dU + p_{R}dV + \mu_{R} dN - T_{R}{dS})_{const T, V, N}$$ $$dA = d(U -TS)$$ $$A_{const T, V, N} = F = U - TS$$

Where the constant terms are dropped between the first and second line. Thus we have $$F(T, V, N) = U - TS$$ and $$dF = -SdT - pdV + \mu dN$$

Similarly for the Gibbs free energy, which is the extractable work at constant T, p, N:

$$dA = (dU + p_{R}dV + \mu_{R} dN - T_{R}{dS})_{const T, p, N}$$ $$dA = d(U -TS +pV)$$ $$A_{const T, p, N} = G = U - TS + pV$$

Which gives us $$dG(T, p, N) = \mu dN - SdT + Vdp$$.

Finally, the internal energy is the amount of extractable work at constant V, N and S:

$$dA = (dU + p_{R}dV + \mu_{R} dN - T_{R}{dS})_{const V, S, N}$$ $$dA = d(U)$$ $$A_{const V, S, N} = U$$

Which gives us $$dU = TdS -pdV +\mu dN$$, which comes from the first law.

Having read Callen's Thermodynamics I take $S(U,V,N)$ to be the fundamental equation and $U,V,N,$ to be the natural quantities. I think this is appropriate because $U,V,N,$ may be assigned to any system, whether in equilibrium or not; this implies that they may be unambiguously defined under arbitrary conditions. Also they are additive over sub-systems comprising the main system. That one can invert the roles of $S$ and $U$ is a consequence of the postulate that relation between them is one-to-one.

• Both are considered fundamental equations in Callen, only the representation differs, i.e. in the Energy Representation, the fundamental equation is U(S,V,N) and in the Entropy representation, S(U,V,N) is. Jan 24, 2017 at 5:38
• Yes but he begins with $S(U,V,N)$, which beginning seems more natural to me. In fact any of its Legendre transformations may be considered fundamental because they are all equivalent.
– Deep
Jan 24, 2017 at 7:31

Probably not the most satisfying answer, but with my experience I guess that this are physics books. It is "natural" because that is what you have control over in a physics thought experiment. You put a fixed amount of particles in a fixed volume where you have a defined amount of accessible states. Physicists, hence, like to work with internal energy. In contrast, in chemistry you'll find the free energy, free enthalpy, etc, because the way they "cook" provides other "natural" variables. In an open test tube you control temperature and pressure and the numbers of particles is most likely not constant. So I would call "natural" as most convenient to control. Problem is that most of the time you cant control $S$,$N$,$V$ in real life. For $N$ vs $\mu$ and $P$ vs $V$ this is somewhat easy to see, and I understand that due to the difficulties with entropy it is harder to understand, why this is the case for $S$ vs $T$. But from a pure physics point of view $S$ is probably more convenient and, therefore "natural".