Why do we need Legendre transformation for thermodynamic potentials?

I get the idea that thermodynamic potentials are introduced because it is not always easy to describe a system's energy as a function of variables like $$S,V,N$$ as we normally do with internal energy $$U=U(S,V,N)$$. For example, temperature is much easier to control. This is why Helmoltz free energy is introduced: $$F=F(T,V,N)$$ having in mind that $$T=\left(\frac{\partial U}{\partial S}(S,V,N)\right)_{V,N}$$. But now my question is: given that we are able to invert the latter relation and write $$S=f(T,V,N)$$, couldn't we get away with a function $$F=F(T,V,N)$$ defined simply as $$F=U(f(T,V,N),V,N)$$ without using the Legendre transform? Why do we even need the Legendre transform?

We do not use Legendre transformation in Thermodynamics. Due to the presence of first-order phase transitions, we must use the Legendre-Fenchel transform (LFT).

Legendre transforms are a special case of LFT. It is not a minor point, because, in the presence of a first-order phase transition, there is an interval of values of each extensive variable corresponding to the same value of the intensive conjugate variable, thus spoiling the possibility of inverting the functional relation. LFT overcomes this problem of non-invertibility. Moreover, it preserves the convexity properties of the Thermodynamic potentials.

The property cited in Salvatore Manfredi D's answer holds for the special case of the differentiable regions of the domain of a thermodynamic potential.

If we didn't use Legendre transform, we would waste precious information. Consider the case of a function of one variable for simplicity: $$y=g(x)$$. Now what you propose to do is to define $$t=\frac{dg}{dx}(x)$$ and obtain $$x=h(t)$$. So you would now have a $$y$$ expressed as a function of $$t$$, namely $$y=g(h(t))$$.
But what if you had $$y=g(x-c)$$ in the beginning ($$c$$ being some constant)? Your $$t$$ would be $$t=\frac{dg}{dx}(x-c)$$ and you could obtain $$x=c+h(t)$$. Then you would have again $$y=g(x(t)+c)=g(c+h(t)-c)=g(h(t))$$ and the information on c would be totally lost.
What happens instead if you use Legendre prescription? You obtain a function of $$t$$ defined as: $$q(t)=g(x(t)+c)-tx(t)=g(h(t))-t(c+h(t))$$ and you see that the information on $$c$$ is preserved.

• I saw this argument in Callen's thermodynamics textbook, but I felt the indeterminacy in $c$ can be eliminated by assume the system is macroscopic and homogeneous, so the state equation must be first-order homogenous in all extensive variables. So I feel this argument doesn't really work? Commented Oct 15, 2022 at 1:26
• @Macrophage Once you extend the argument to functions of multiple variables, you may have that the constant we called $c$ is in fact a function of the variables that are not coming into play in the Legendre transform. We can ask that it is 1st order homogeneous of course. But the problem for the variable we are transforming still remains. Commented Oct 16, 2022 at 17:47

Something that hopefully adds to Salvatore Manfredi D's answer: the goal isn't just to change variables, it's also to build a function that is minimized when equilibrium is reached after a specific process completes.

Start with $$U$$: $$dU=T\,dS-P\,dV$$ You can read two things in this equation:

• $$U$$ is a function of $$S$$ and $$V$$.
• When equilibrum is reached after a process with $$S$$ and $$V$$ constant, $$U$$ is minimized.

If you build $$F$$ with a Legendre transformation $$F=U-TS$$: $$dF=-S\,dT-P\,dV$$ Similarly, you deduce from this equation that:

• $$F$$ is a function of $$T$$ and $$V$$.
• $$F$$ is minimized after a process with $$T$$ and $$V$$ constant.

It's the latter that, I think, could answer your question. Not only did you build a state function with the variables you wanted, but this function has useful properties to study thermodynamic equilibrium.

• It is not clear to me from your argument why they are minimized: don't we just learn that keeping those variables constant we are in an extremum (without knowing if it is a maximum or a minimum)? Commented Jul 9, 2022 at 13:22
• I didn't give the whole proof, which requires playing with thermodynamics' second law. You can see, however, that when equilibrium is reached all state parameters are constant; for instance $S$ and $V$ are constant, so $dS=0$ and $dV=0$, so at least $U$ is stationary after a transformation with $S$ and $V$ constant. Commented Jul 9, 2022 at 15:31
• The fact that $dU=0$ if $dV=dS=0$ has nothing to do with the fact that, in a process at constant $S$ and $V$, $U$ is minimized. Actually, the minimum principle of thermodynamic potentials refers to their dependence on the constraint variables, not on the state variables. Commented Jul 17, 2022 at 14:14