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?
 A: 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.
A: 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.
A: 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.
