2.4.2Thermodynamics & Statistical Mechanics (Advanced)

Legendre transforms connecting them

2,186 words10 min readdifficulty · medium1 backlinks

1. WHAT problem are we solving?

Start with internal energy. Its fundamental relation is U=U(S,V,N).U = U(S,V,N).

The trouble: SS is not a lab variable. You cannot turn an "entropy knob." You can set TT with a heat bath. So we want a new function whose independent variable is TT instead of SS, yet which still contains all the same physics.

A naive idea — "just write SS in terms of TT and plug back into UU" — loses information (steel-manned below). The Legendre transform is the fix.


2. Derivation from scratch: what IS a Legendre transform?

HOW — derive the intercept. A tangent line at point xx has equation y=f(x)+p(Xx),p=f(x).y = f(x) + p\,(X - x),\qquad p = f'(x). Its YY-intercept (set X=0X=0) is g=f(x)px.g = f(x) - p\,x.

We want gg as a function of the slope pp, so define

Check it is information-preserving. Differentiate g=fpxg = f - px: dg=dfpdxxdp=(fp)=0dxxdp=xdp.dg = df - p\,dx - x\,dp = \underbrace{(f' - p)}_{=0}\,dx - x\,dp = -x\,dp.


3. Building the four potentials

We apply the transform to U(S,V,N)U(S,V,N), swapping one conjugate pair at a time. Conjugate pairs are (S,T)(S,T) and (V,P)(V,-P).

(a) Swap STS \to T (conjugate slope T=U/ST = \partial U/\partial S). Transform on the SS-slot: F=UTS.F = U - T S. Differentiate, using dU=TdSPdV+μdNdU = T\,dS - P\,dV + \mu\,dN: dF=dUTdSSdT=SdTPdV+μdN.dF = dU - T\,dS - S\,dT = -S\,dT - P\,dV + \mu\,dN. The TdST\,dS cancelled — FF now lives on (T,V,N)(T,V,N). This is the Helmholtz free energy.

(b) Swap VPV \to -P (slope P=U/V-P = \partial U/\partial V). Transform on the VV-slot. The Legendre subtract is (slope)×(var)=(P)V(\text{slope})\times(\text{var}) = (-P)V, so we subtract PV-PV, i.e. add PVPV: H=U+PV,dH=TdS+VdP+μdN.H = U + P V,\qquad dH = T\,dS + V\,dP + \mu\,dN. HH lives on (S,P,N)(S,P,N) — the enthalpy.

(c) Swap both STS\to T and VPV\to -P: G=UTS+PV,dG=SdT+VdP+μdN.G = U - TS + PV,\qquad dG = -S\,dT + V\,dP + \mu\,dN. GG lives on (T,P,N)(T,P,N) — the Gibbs free energy (the lab's favourite: TT and PP are both controllable).

Figure — Legendre transforms connecting them

4. WHY this powers everything: Maxwell relations

Because each dΦd\Phi is an exact differential, mixed second partials commute. From dF=SdTPdVdF=-S\,dT-P\,dV: (VFT)=(TFV)    (SV)T=(PT)V.\left(\frac{\partial}{\partial V}\frac{\partial F}{\partial T}\right)=\left(\frac{\partial}{\partial T}\frac{\partial F}{\partial V}\right)\implies \boxed{\left(\frac{\partial S}{\partial V}\right)_T=\left(\frac{\partial P}{\partial T}\right)_V.}


5. Worked examples


6. Steel-manned mistakes


7. Flashcards

What does a Legendre transform swap, geometrically?
A description by (point, value) for one by (slope, intercept) — encoding the curve as its tangent-line envelope, losing no info.
Definition of the Legendre transform of f(x)f(x)?
g(p)=fpxg(p)=f-px where p=f(x)p=f'(x), inverted to eliminate xx.
Key slope relation of g(p)=fpxg(p)=f-px?
dg/dp=xdg/dp=-x (and the transform is an involution).
Why can't we just substitute S(T)S(T) into UU?
It loses information; only F=UTSF=U-TS keeps it via the TS-TS term, letting S=(F/T)VS=-(\partial F/\partial T)_V recover it.
Natural variables and definition of FF?
F=UTSF=U-TS, F(T,V,N)F(T,V,N), dF=SdTPdV+μdNdF=-S\,dT-P\,dV+\mu\,dN.
Natural variables and definition of HH?
H=U+PVH=U+PV, H(S,P,N)H(S,P,N), dH=TdS+VdP+μdNdH=T\,dS+V\,dP+\mu\,dN.
Natural variables and definition of GG?
G=UTS+PVG=U-TS+PV, G(T,P,N)G(T,P,N), dG=SdT+VdP+μdNdG=-S\,dT+V\,dP+\mu\,dN.
Why is H=U+PVH=U+PV (plus, not minus)?
Because the slope U/V=P\partial U/\partial V=-P; subtracting slope×V gives (P)V=+PV-(-P)V=+PV.
Where do Maxwell relations come from?
Equality of mixed second partials of each potential (exact differentials).
Maxwell relation from FF?
(S/V)T=(P/T)V(\partial S/\partial V)_T=(\partial P/\partial T)_V.
Why does chemistry use GG?
Its natural variables (T,P)(T,P) are exactly what's controlled in a lab; equilibrium = GG minimized.

Recall Feynman: explain to a 12-year-old

Imagine a hill drawn on paper. You can describe the hill by listing every point's height, OR by listing how steep it is everywhere plus where each slope-line crosses the ground — both descriptions tell you the same hill. In physics, "height" is energy. Sometimes the thing we'd normally use (like hidden disorder, entropy) is impossible to grab with our hands, but the steepness of energy with respect to it (temperature!) is something a thermostat controls easily. The Legendre transform is the trick of re-describing the energy hill using the steepness we can control, never throwing away any information — so we can do real lab calculations.

Concept Map

gives natural vars of

contains S which is

not controllable so swap for

requires new function via

motivates

defines

differentiate to get

implies

proves no info lost in

connects the four

re-package same info as

U internal energy

First law dU = TdS - PdV

Entropy S awkward variable

Temperature T lab variable

Legendre transform

Tangent-line envelope idea

Intercept g = f - p x

Slope relation dg/dp = -x

Involution transform twice

Potentials U H F G

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Dekho, idea simple hai: hamare paas internal energy UU hai jiske natural variables hain S,V,NS,V,N — yaani entropy, volume, particle number. Problem ye hai ki entropy SS ko lab me directly control nahi kar sakte; uski jagah hum temperature TT set karte hain (thermostat se). Toh hume chahiye ek nayi energy-jaisi quantity jiska independent variable TT ho, par information bilkul lose na ho. Yeh kaam karta hai Legendre transform.

Geometrically samjho: koi curve ko aap do tareeke se describe kar sakte ho — ya toh har point ki height batao, ya har jagah ka slope aur tangent line ka intercept batao. Dono me poori curve ki info hoti hai. Legendre transform g=fpxg=f-px exactly yahi karta hai: variable xx ko uske slope p=f(x)p=f'(x) se badal deta hai. Iski key property: dg/dp=xdg/dp=-x, aur do baar karne par wapas original aa jata hai (involution) — isiliye koi info nahi khoti.

Thermo me jab STS\to T swap karte hain to milta hai F=UTSF=U-TS (Helmholtz), jab VPV\to -P swap karte hain to H=U+PVH=U+PV (enthalpy), aur dono swap karne se G=UTS+PVG=U-TS+PV (Gibbs). Sign ka dhyan rakhna: UU ka VV wala slope P-P hai, isliye PVPV add hota hai, minus nahi. Chemists GG use karte hain kyunki unke lab conditions (T,P)(T,P) exactly GG ke natural variables hain.

Bonus: kyunki har dΦd\Phi exact differential hai, mixed partial derivatives equal hote hain — isse Maxwell relations free me mil jaate hain, jaise (S/V)T=(P/T)V(\partial S/\partial V)_T=(\partial P/\partial T)_V. Yeh unmeasurable cheez (entropy ka volume ke saath change) ko measurable cheez (pressure ka temperature ke saath change) se jod deta hai. Isiliye Legendre transform thermodynamics ka asli engine hai.

Go deeper — visual, from zero

Test yourself — Thermodynamics & Statistical Mechanics (Advanced)

Connections