The Physics Travel Guide

Legendre Transformation

Prerequisites: Calculus.

Best explanations

Intuitive

A convex curve, one that bends upward everywhere like a parabola, can be described in two ways. The usual way lists its points: for each position we give the height of the curve. The other way lists its tangent lines: for each possible slope there is exactly one tangent line to the curve with that slope, and we record where that line crosses the vertical axis. The curve is then recovered as the envelope of all these tangent lines. Both descriptions contain the same information. The Legendre transform is the rule that converts the first description into the second, using the slope as the new variable.

Physics needs this because the natural variables of a problem are not always the ones we can control. In mechanics, the Lagrangian is a function of positions and velocities, while the Hamiltonian uses positions and momenta, and the momentum is the slope of the Lagrangian with respect to the velocity. In thermodynamics, the internal energy is a function of entropy and volume, but in the lab we usually fix the temperature, which is the slope of the energy with respect to the entropy. The Legendre transform swaps a variable for the corresponding slope without losing information, so we can go back and forth.

Concrete

Let f(x)f(x) be a function with f′′(x)>0f''(x)>0, so that its slope p=f′(x)p=f'(x) is strictly increasing and can be solved for x=x(p)x=x(p). The Legendre transform of ff is g(p)=p x(p)−f(x(p)).g(p) = p\,x(p) - f(x(p)). Geometrically, the tangent line of ff with slope pp is y=px−g(p)y=px-g(p), so −g(p)-g(p) is its intercept with the yy-axis. Differentiating, and using f′(x(p))=pf'(x(p))=p, g′(p)=x(p)+p x′(p)−f′(x(p)) x′(p)=x(p).g'(p) = x(p) + p\,x'(p) - f'(x(p))\,x'(p) = x(p). So the slope of gg gives back the old variable, and applying the transform to gg gives x p−g(p)=f(x)x\,p - g(p) = f(x): the transform is its own inverse. In terms of differentials, df=p dxdf = p\,dx becomes dg=x dpdg = x\,dp. With several variables one transforms only some of them, and the others are passive parameters with ∂g/∂y=−∂f/∂y\partial g/\partial y = -\partial f/\partial y.

Example: mechanics. For L(q,q˙)=12mq˙2−V(q)L(q,\dot q)=\frac12 m\dot q^2 - V(q) the momentum is p=∂L/∂q˙=mq˙p=\partial L/\partial\dot q = m\dot q, so q˙=p/m\dot q = p/m and H(q,p)=pq˙−L=p2m−p22m+V(q)=p22m+V(q).H(q,p) = p\dot q - L = \frac{p^2}{m} - \frac{p^2}{2m} + V(q) = \frac{p^2}{2m}+V(q). The relation ∂H/∂p=q˙\partial H/\partial p = \dot q is the property g′(p)=xg'(p)=x from above, and ∂H/∂q=−∂L/∂q\partial H/\partial q = -\partial L/\partial q is the rule for passive variables. Together with the Euler-Lagrange equation p˙=∂L/∂q\dot p = \partial L/\partial q this gives Hamilton's equations.

Example: thermodynamics. The internal energy U(S,V)U(S,V) satisfies dU=T dS−P dVdU = T\,dS - P\,dV, so T=∂U/∂ST=\partial U/\partial S. The Helmholtz free energy is F(T,V)=U−TS,dF=−S dT−P dV,F(T,V) = U - TS,\qquad dF = -S\,dT - P\,dV, a function of temperature instead of entropy. Thermodynamics traditionally uses the opposite overall sign, U−TSU-TS instead of TS−UTS-U, which does not change the content. In the same way the enthalpy H=U+PVH=U+PV trades VV for PP, and the Gibbs free energy G=U−TS+PVG=U-TS+PV trades both.

When ff is not differentiable or not strictly convex, the general definition is f∗(p)=sup⁡x(px−f(x)),f^*(p)=\sup_x\big(px-f(x)\big), which is always convex. Then f∗∗f^{**} is the convex envelope of ff (for lower semicontinuous ff), which is why non-convex thermodynamic potentials are replaced by their convex hulls, as in the Maxwell construction for phase coexistence.

Abstract

The Fourier transform and the Legendre transform may be interpreted as the same thing, just over different semirings.A Neighborhood of Infinity: Quantum Mechanics and the Fourier-Legendre Transform over a Semiring

Why is it interesting?

The Legendre transform shows up whenever we minimize or maximize something subject to constraints. That happens a lot.

https://johncarlosbaez.wordpress.com/2012/01/19/classical-mechanics-versus-thermodynamics-part-1/

The Legendre transformation is a useful mathematical tool that is used in thermodynamics, classical mechanics and quantum field theory.

Maybe the most famous application is that in classical mechanics, quantum mechanics and quantum field theory the Hamiltonian and the Lagrangian are connected by a Legendre transformation.

Moreover, the Legendre transformation is used in thermodynamics to motivate the connection between the internal energy, enthalpy, and Gibbs and Helmholtz free energies.

Both uses can be compactly motivated if the Legendre transform is properly understood. Unfortunately, that transform is often relegated to a footnote in a textbook, or worse is presented as a complicated mathematical procedure. […] In a nutshell, a Legendre transform simply changes the independent variables in a function of two variables by application of the product rule.

https://www.aapt.org/docdirectory/meetingpresentations/SM14/Mungan-Poster.pdf

Leads to: Hamiltonian Formalism.