Exercises — Legendre transforms connecting them
Everything here builds on the parent note. If a symbol feels unfamiliar, that note builds it from zero.
Level 1 — Recognition
These test whether you can read a differential and name the machinery. No heavy algebra.
Exercise 1.1 — Read the natural variables
Problem. You are handed the differential (a) What are the natural (independent) variables of ? (b) Write down the three slope formulas that come straight out of this line.
Recall Solution
WHAT we do: in a differential , the variables being differentiated (, , …) are the natural variables, and the coefficient in front of each is the corresponding slope.
(a) The differentials appearing are , , . So the natural variables are (b) Each coefficient is a partial derivative holding the other natural variables fixed: Why this works: a differential is just a bookkeeping of "how much moves when each independent variable nudges." The coefficient of is by definition the partial with respect to . (Recall is enthalpy — energy plus the room-making term.)
Exercise 1.2 — Spot the conjugate pairs
Problem. From , list the conjugate variable pairs and, for each, state which member is extensive (scales with system size) and which is intensive (independent of size).
Recall Solution
A conjugate pair is (variable being differentiated, its coefficient). Reading off (the internal energy):
| Pair | Extensive | Intensive |
|---|---|---|
Why the split matters: you cannot dial an extensive knob directly (there is no "entropy dial"), but you can set an intensive one with a reservoir (a thermostat sets , a piston/atmosphere sets ). The Legendre transform exists precisely to swap the awkward extensive member for its convenient intensive partner. See Internal Energy and the First Law.
Exercise 1.3 — Which potential for which lab?
Problem. Match each experimental setup to the potential whose natural variables are the ones you control: (a) sealed rigid box in a thermostat; (b) open beaker on a bench at room temperature; (c) an adiabatic, insulated cylinder sealed by a movable but gas-tight piston, its outside face open to atmosphere.
Recall Solution
Identify the controlled variables, then pick the potential whose natural variables match.
- (a) Fixed volume () + thermostat () + sealed () controls Helmholtz , (usable work at fixed ).
- (b) Atmosphere sets , bench sets , matter conserved controls Gibbs , .
- (c) Insulated means no heat exchange, so entropy is the conserved natural slot; the piston is open to atmosphere, so it transmits pressure and fixes . Why is still fixed: a piston is a solid, gas-tight wall — it slides to equalize pressure but no molecules cross it, so the gas count inside the cylinder cannot change. (Contrast this with a permeable membrane, which would let particles through and instead fix the chemical potential — that is the grand-potential setup of Exercise 5.3.) So we control Enthalpy , .
Why: equilibrium is a minimum of the potential whose natural variables you hold fixed. Choosing the right potential makes the lab conditions the independent variables, so the minimization is clean.
Level 2 — Application
Now you run the machine on concrete functions. In every step, when you see , remember the picture: it is the height where the tangent (slope ) hits the vertical axis.
Exercise 2.1 — Legendre transform of a cubic
Problem. Let for . Compute its Legendre transform and verify the slope relation .
Recall Solution
Step 1 (WHAT & WHY): the slope becomes the new variable, so Why this is legal: for the slope is strictly increasing, so each names exactly one — the transform is well-defined (see the existence note in Exercise 3.2). Step 2 — invert (we need in terms of only; here so we take the positive root): Step 3 — build the transform (geometrically: drop the tangent line down to the axis): Step 4 — check the defining slope relation: The check confirms no information was lost — knows through its own slope.
Exercise 2.2 — Build and extract its slopes
Problem. A system has internal energy given implicitly through (fixed ). Its Helmholtz free energy (, the usable work at fixed temperature) turns out to be with constant. Find the pressure and the entropy .
Recall Solution
First, WHY does ? We derive it, so nothing is assumed. Start from the definition and take the differential of each side, using the product rule on the term: Now substitute the first law : The two terms cancel — that cancellation is the whole point of the Legendre subtraction : it kills the awkward and installs as the driver. Which slopes? From we read off the two rules: Entropy (differentiate in , holding ): Pressure (differentiate in , holding ): The ideal-gas law appears — recovered as a slope of , exactly as the parent note promised. See Maxwell Relations for how these two derivatives are secretly linked.
Exercise 2.3 — Enthalpy sign, done right
Problem. Starting from , construct the potential whose natural variable in the second slot is instead of . Show the sign carefully.
Recall Solution
Step 1 — read the slope's sign (this is the whole game): the coefficient of in is , so Step 2 — Legendre subtract (slope variable): the transform subtracts (again: this is the tangent-line intercept, now in the direction): Step 3 — check the differential: The terms cancel, leaving as the new driver. Natural variables: . ✓ ( is the enthalpy.)
Level 3 — Analysis
Take the structure apart and see why it holds.
Exercise 3.1 — Derive a Maxwell relation from
Problem. From derive the Maxwell relation connecting to a volume derivative. State which quantity is measurable and which is not.
Recall Solution
Key fact: is an exact differential, so its mixed second partials are equal regardless of the order of differentiation: Now substitute the first-order slopes read from ( is the Gibbs energy): Differentiating each: Measurability: is directly measurable (thermal expansion — heat a fluid at constant pressure and watch it expand). is not directly measurable (no entropy meter). Maxwell trades the unmeasurable for the measurable — for free. See Maxwell Relations.
Exercise 3.2 — Convexity flips to concavity (and why the transform exists at all)
Problem. The transform of the convex parabola (with ) is , which is concave. (a) Confirm the concavity by computing . (b) Explain geometrically why a Legendre transform of a convex function is concave. (c) State the condition on that guarantees the transform even exists.
Recall Solution
(a) , so Since , is concave. Compare (convex). In fact : the curvatures are reciprocal-and-negated. (b) Geometric reason: the transform variable is the slope . For a convex , as increases the slope increases (that's what convex means). The transform's own slope is , which decreases as (hence ) increases. A quantity whose slope decreases is concave. So convex concave under the transform. This is why (convex in ) becomes (concave in ) — see Thermodynamic Stability and Convexity. (c) Existence condition (the point often skipped). To build we must invert to get a single for each . That inversion is guaranteed exactly when is strictly monotonic, i.e. when is strictly convex () or strictly concave () — never flat, never wiggling. If turned around (some hit by two different 's), "which ?" would be ambiguous and ill-defined. This is why thermodynamics insists potentials be convex/concave: stability (, etc.) is exactly the condition that makes every Legendre transform between well-defined. The figure below shows the two curvatures side by side.
Figure (above). Blue is the convex parent ("curves up", ); red is its Legendre transform ("curves down", ). Read it as the visual statement of parts (a)–(b): the transform reflects a bowl into a dome. The reason it can be drawn at all is part (c) — the convex bowl has a strictly increasing slope, so every slope value names one unique point, and the red dome is unambiguous.
Exercise 3.3 — The involution, one clean convention
Problem. Show that transforming a second time returns the original . Use one convention throughout: the Legendre transform of a function is with .
Recall Solution
We apply the same rule we always use — no new sign convention — treating as the function to be transformed. Its own slope variable, call it , is .
Step 1 — new slope. Step 2 — invert (solve for in terms of ): Step 3 — apply the transform : Substitute term by term: Step 4 — add the two pieces: Step 5 — read the result and match variables. We have , which is exactly the original with in the role of . To confirm the variable really is : the first transform obeyed , and here , so . Substituting into : Takeaway: with a single consistent rule, the double transform lands back on ; the only subtlety is that the intermediate slope variable equals , which is precisely what the relation has been tracking all along. Two applications = identity: the Legendre transform is an involution.
Level 4 — Synthesis
Combine transform + physics into a single argument.
Exercise 4.1 — Gibbs energy of an ideal gas from
Problem. For a gas with satisfying and , construct by Legendre transforming the -slot, and confirm depends on (not ).
Recall Solution
Recall (Helmholtz) and we are heading to (Gibbs). Step 1 — which slope to swap. We want to trade for its conjugate. The slope of in is Step 2 — Legendre transform on the -slot (subtract slope var , i.e. the tangent intercept in ): Step 3 — check the differential: The cancels; the driver is now . So . ✓ Step 4 — sanity with the ideal gas: , so the added term is finite and well-defined; substituting removes every trace of from . The transform did exactly its job: convert into losslessly.
Exercise 4.2 — Equilibrium criterion at fixed
Problem. A beaker holds a reaction at fixed and . Using (the Gibbs differential with several species , each with chemical potential ), explain why equilibrium is , and why no other potential gives this as cleanly.
Recall Solution
Recall is the Gibbs energy, and is the energy cost of adding one particle of species . Step 1 — impose the fixed conditions. Fixed and mean and . Then Step 2 — spontaneity and equilibrium. The second law, specialized to fixed , says a spontaneous change can only lower , i.e. . The system slides downhill in until it can go no lower — that resting point is the minimum, where every allowed change gives . Combining with Step 1: In words: at equilibrium the chemical potentials are balanced so that shuffling particles among species (allowed 's tied by the reaction's stoichiometry) changes not at all. Step 3 — why specifically. Only for are the controlled lab variables the natural variables. For , , or , at least one held-fixed lab variable is not natural, so the differential does not collapse to the clean form — you'd carry leftover or terms that are not zero under these lab conditions, muddying the criterion. That is precisely why the constant- chemist reaches for . See Chemical Potential and Phase Equilibrium.
Level 5 — Mastery
Prove or create.
Exercise 5.1 — Legendre in mechanics matches thermodynamics
Problem. In mechanics the Hamiltonian is , where is the Lagrangian and . This is a Legendre transform swapping velocity for momentum . (a) Show it has the same structure as . (b) Verify the analogue of the slope relation.
Recall Solution
(a) Match the structures. The thermodynamic transform swapping is The mechanical transform is Identify , (the variable being traded away), (its conjugate slope). Apart from an overall sign convention (mechanics writes ; thermo writes ), it is the same operation: subtract slope variable to change independent variable from to . See Lagrangian to Hamiltonian (Legendre in Mechanics). (b) Slope relation. Differentiate : So — the exact analogue of (here the sign convention gives ). Just as in thermodynamics, the awkward variable () is eliminated and its conjugate () becomes the driver.
Exercise 5.2 — Non-convex breaks the transform
Problem. Consider with over . (a) Compute and show that the naive substitution "eliminate " produces . (b) Explain what physical pathology (in thermodynamic language) a concave-where-it-should-be-convex function corresponds to, and why real stable systems avoid it.
Recall Solution
(a) , invert . Then The algebra runs, and the inverse is single-valued here because is strictly monotonic (this is strictly concave). The danger appears only when is non-monotonic (a bump): then some is hit by two different 's and the transform is ambiguous — exactly the existence condition from Exercise 3.2(c). (b) Physical meaning. If were concave, then would force negative heat capacity — a system that gets colder as you add heat. That's a runaway instability: any hot spot grows hotter, any cold spot colder, until the phase separates. Real stable equilibria require convex in (and in ), which is precisely why the Legendre transform is always well-defined for them. See Thermodynamic Stability and Convexity.
Figure (above). Green is a stable : it curves up (convex), so its slope steadily increases and . Red-dashed is an unstable concave stretch, where adding entropy would lower the slope — negative heat capacity, the runaway of part (b). The yellow line is one tangent, whose slope is the temperature at that point: convexity is exactly "every such tangent lies below the curve," which is what keeps the Legendre transform single-valued.
Exercise 5.3 — Design a potential
Problem. Invent a "grand potential" for a system that exchanges particles with a reservoir (so is controlled, not ). Starting from with , Legendre-transform the -slot and give , its differential, and its natural variables.
Recall Solution
Recall is Helmholtz and is the chemical potential (energy to add one particle). Step 1 — the slope to swap. We want (intensive, reservoir-controlled) as the independent variable instead of . The slope of in is Step 2 — transform on the -slot (subtract slope var ): Step 3 — differential: Step 4 — natural variables: the drivers are , , , so the grand potential — the natural object for the grand canonical ensemble. This is exactly the potential that pairs with the grand partition function via .
Quick self-check
Recall Which potential is minimized at fixed
? The Gibbs free energy , because are its natural variables — see Exercise 4.2.
Recall Sign of the Legendre term for enthalpy vs grand potential?
Enthalp