Legendre Transformation
From biophysics wiki
The Legendre transformation aims to replace the dependence of a function e.g. $f(x)$ on $x$ by another variable e.g. $u$. To introduce the concept of Legendre transformation we start with the simple case for functions of one independent variable. We call the derivative of $f(x)$ $u$ and the derivative of $g(u)$ we call $x$. \begin{align} \frac{df}{dx}=u\\ \frac{dg}{du}=x\\ \end{align} Notice, the variables $u,x$ play a somewhat complementary role. The change of $df$ and $dg$ is \begin{align} df=\frac{\partial f}{\partial x} \, dx=u \, dx\\ dg=\frac{\partial g}{\partial u} \, du=x \, du\\ \end{align} We need one further building block to make the argument. The change in $ux$ is \begin{align} d(ux)=u \, dx + x \, du = df + dg \end{align}
Integratition of this equation give the Legendre transformation in one variable $f(x) \rightarrow g(u)$ \begin{align} g(u)=u \cdot x(u) - f[x(u)] \end{align}
This transformation has a geometric interpretation. The function $f(x)=x^2$ characterises the blue curve below

instead of characterising this curve by the variable $x$ we can also use the slope $u(x)=df/dx$. The Legendre transformation of $f(x)$ describes the same curve as a function of the slope. Let's plug in $f'=2x=u$ \begin{align} g(u)=u \cdot \frac{u}{2} - \left( \frac{u}{2} \right)^2=\frac{u^2}{4} \end{align}