Type-2 Generating Function F2(q,P,t)
Of the four generating-function types, the second is the one working physicists actually reach for. The reason is a single degenerate case: the identity. Type-1 functions cannot represent it at all — their mixed plane collapses when — but produces it effortlessly. And the identity is not a boring map; it is the scaffold on which every continuous transformation is built. Add a whisper to it, , and out comes an infinitesimal canonical transformation whose flow is steered by through Poisson brackets. Choose and the flow is time evolution itself: dynamics is a canonical transformation, unrolling one instant at a time. This page owns the type-2 machinery in full. You will see where the relations and come from — a two-line Legendre transform of the type-1 differential, the same move that built the Hamiltonian out of the Lagrangian in Legendre Transformation — and why, unlike type 1, both come with plus signs. You will run the two constructions that make the workhorse: point transformations ( lifts any Lagrangian coordinate change into phase space, momenta transforming automatically), and near-identity flows. And you will meet the supreme application in miniature: choose so well that the new Hamiltonian vanishes, and the new variables freeze into the initial conditions — the idea that becomes the Hamilton–Jacobi equation. The taxonomy lives in Generating Functions and the Four Types; the worked transformations here are type 2's own.
- A type-2 generating function depends on the old coordinates and the new momenta; its gradients give , , and the Hamiltonian rule .
- It is the Legendre transform of type 1: , trading dependence on for dependence on — both defining relations end up with plus signs.
- is the identity; lifts any point transformation into phase space with the momentum rule supplied free.
- generates infinitesimal canonical transformations, , — equivalently ; with , , this is Hamilton's equations.
- Demanding for produces the Hamilton–Jacobi equation; the new chart's variables are constants of the motion.
- Key idea: choose to depend on the variables you control — old coordinates and new momenta — and the two gradient relations hand you a canonical transformation for free, with the identity, all point transformations, and all near-identity flows in its native range.
Choose to depend on the variables you control — old coordinates and new momenta — and the two gradient relations , produce a canonical transformation for free, with giving the identity.
Where this lives today
Open the source of any accelerator-design code — MAD-X at CERN, or the tracking engines behind light sources — and you find type-2 machinery running under the alias Lie maps and transfer maps. Each magnet in a storage ring implements a canonical transformation of the beam's phase-space coordinates; the code stores it as a generator (a polynomial acting through Poisson-bracket flows, in accelerator notation) rather than as raw coordinate functions, because generators compose cleanly and canonicity is then exact by construction, not by numerical accident. A particle circulating turns must not leak phase-space area to rounding error. The same architecture drives symplectic integrators in planetary-ephemeris work and molecular dynamics: the popular leapfrog/Verlet steps are exactly the flows of for the kinetic and potential pieces alternately — a fact routinely used to prove their long-time energy stability. When JPL propagates an asteroid for a century, the long-time evolution is computed by composing a sequence of near-identity canonical transformations, naturally described by type-2 generating functions.
The physical picture
Think of as a dispatcher with two input slots. You feed it the things you typically know or want: where the system is now (the old coordinate ) and what you want the new momentum to be. It answers with the two things you did not specify: the old momentum that is consistent with your choice, and the new coordinate that completes the chart. One scalar function, partial derivatives, an entire canonical map.
Why is such a natural pair? Because at and near the identity these two really are independent knobs: the new momentum can be dialed while the old position stays put. The type-1 pair fails exactly there — under the identity they are the same variable. So every transformation that is continuously connected to doing nothing — rotations grown from rest, time evolution grown instant by instant, symmetry flows grown from a conserved charge — lives naturally in the type-2 chart. That is most of the transformations physics cares about.
The Legendre transform linking and should feel familiar: it is exactly the move that built from . There you swapped a velocity for a momentum by adding ; here you swap the new coordinate for the new momentum by adding . Same machine, different slot.
The type-2 relations, built by Legendre transform
Every generating function starts from the same identity — the old and new phase-space integrands describe one motion, so they differ by a total time derivative:
where: and — the phase-space Lagrangians of the old and new charts; — the boundary-term freedom, whose choice of arguments defines the type. Choosing gave the type-1 rules in Type-1 Generating Function F1(q,Q,t). To reach type 2, perform a Legendre transform in the slot:
where: — the transform term that trades the independent variable for its conjugate ; after the Legendre transform, is no longer an independent variable, but is recovered from . This is the identical maneuver that defines — compare Legendre Transformation — with the sign arranged so the exchange runs on the new pair. The differential bookkeeping (Derivation A) then delivers the working relations:
where: both derivatives are taken with the other member of the pair held fixed. Notice what happened to the signs: type 1 carried , but the Legendre term flips the orientation of the new slot, and type 2 comes out all-plus. A useful mnemonic: differentiating in an old variable returns its own conjugate; differentiating in a new variable returns its conjugate too — the minus signs live only in types where a momentum is an independent argument on the old side (, ; see Type-3 and Type-4 Generating Functions).
where: — the new Hamiltonian, to be re-expressed entirely in before use; — explicit time dependence only. The rule is type-independent: Legendre transforms never touch the time slot.
We are deriving the complete type-2 machinery — both gradient relations and the Hamiltonian rule — by Legendre-transforming the established type-1 differential. The strategy: write with its known coefficients, add , and watch the terms cancel, leaving a differential whose natural variables are . The point to watch is which differentials survive: a generating function's type is defined by which differentials appear on the right-hand side of its total differential.
Step 1. Start from the type-1 relations , , , and assemble the total differential:
Step 2. Define and differentiate the product term: . Adding,
Why the cancellation matters: The and terms cancel exactly, leaving only the differentials of the new independent variables and nothing else. That is what "Legendre transform" means: not a formula but a change of natural variables.
Step 3. Read off the coefficients of the independent differentials , , :
Step 4. Sanity-check on the identity: gives and — the identity map, produced by the simplest possible generator, with untouched. The sign pattern traces to the conventions, and the mixed-partials identity holds automatically because both equal .
The mixed-partials remark in the last line deserves its own display, because it is the type-2 face of the symplectic condition:
where: the equality holds identically for any generator. As with type 1, canonicity never needs to be checked for a generated map — it is inherited from the single-function structure. The matrix version of this statement is assembled in Symplectic Condition.
The identity scaffold: infinitesimal transformations and time evolution
Here is where type 2 earns its keep. Perturb the identity:
where: — an infinitesimal parameter; — the generator of the transformation. Running the type-2 relations to first order (Derivation B) gives the flow
where: — the Poisson bracket (see Poisson Brackets: Definition); to first order may be evaluated at since . Read it physically: the generator paints a displacement field on phase space, and the displacement is along level sets of — the flow conserves its own generator. Momentum generates translations, angular momentum generates rotations, and — the profound case — the Hamiltonian generates time.
Go deeper · Derivation B · 1 minTime evolution is a canonical transformation generated by H
We are proving the statement that reorganizes all of Hamiltonian mechanics: the map "state now state later" is an infinitesimal canonical transformation whose generator is the Hamiltonian itself. The strategy is to take the near-identity generator (6) with and , run the type-2 relations to first order, and recognize Hamilton's equations in the output. The care point is the argument swap inside derivatives — legitimate at first order, and worth seeing exactly why.
Step 1. Set . Apply the type-2 relations:
Step 2. Solve for the increments: and .
Step 3. Replace by inside the derivatives. Since , replacing by inside the derivatives changes the result only by terms of order , which are neglected in a first-order derivation. Why this is not sloppy: the derivative is evaluated at a point displaced by from ; Taylor-expanding costs a term . First-order flows are insensitive to it — the same logic that lets Euler integrators converge.
Step 4. Divide by :
Hamilton's equations — recovered as the statement that generates the time flow. Composing infinitely many such infinitesimal maps builds the finite evolution map , which is therefore canonical for every . Consistency check: the finite flow preserves phase-space volume (Liouville's theorem) exactly because each infinitesimal step is canonical with unit Jacobian.
This is the payoff of the whole chapter stated in one sentence: the solution of a mechanics problem is itself a canonical transformation — from variables-now to variables-then — and the various solution methods (action-angle charts, Hamilton–Jacobi) are just different ways of writing that transformation's generator.
Point transformations, lifted for free
Every coordinate change you ever made in Lagrangian mechanics — Cartesian to polar, lab to center-of-mass — is a point transformation : new coordinates from old coordinates only. Type 2 lifts each one to a full canonical transformation and tells you what the momenta must do:
where: — the coordinate map; the second relation inverts to give in terms of via the inverse Jacobian. Read it physically: coordinates transform by , while momenta transform by the inverse transpose of the Jacobian so that the canonical one-form (and hence the action) remains invariant under the change of coordinates. This is why "conjugate momentum to " automatically came out as angular momentum when you switched to polar coordinates: the lift did it for you.
Go deeper · Derivation C · 1 minLifting a coordinate change: the polar-coordinates momentum rule
We apply the point-transformation lift to the familiar example of plane polar coordinates to show that the momentum transformation follows automatically from the generating function, without requiring an independent guess. Strategy: write the two new coordinates as functions of the old Cartesian pair, form with the inverse map (old coordinates as arguments), and differentiate. Watch how the momenta arrive as linear combinations of the new momenta weighted by geometry.
Step 1. Take the transformation the other way for convenience of the slots: old coordinates , new chart with , . The generator is
Step 2. New coordinates from the -gradients: ✓ and ✓ — the lift reproduces the coordinate map by construction.
Step 3. Old momenta from the -gradients:
Why these are believable: with , , the pair inverts to (the radial component of linear momentum) and (the angular momentum ). The lift has derived that the momentum conjugate to the polar angle is angular momentum.
Step 4. Check one bracket in old variables: ✓. The result reproduces the standard induced momentum transformation and the identification used throughout central-force theory.
The Hamilton–Jacobi idea in one paragraph
The most powerful application of the type-2 generating function is to choose it so that the transformed Hamiltonian vanishes. Setting and with substituted gives
where: — Hamilton's principal function, now the unknown of a partial differential equation. If then : the transformed canonical variables are constants of motion (equal to the integration constants), so the entire dynamical problem is reduced to determining a single function, . Worked example 2 below runs this program end to end for the free particle; the full theory is the Hamilton–Jacobi chapter this article leads into.
Limiting cases
| Case | Result | Meaning |
|---|---|---|
| Identity | , ; the baseline type 1 cannot represent | |
| Point transformation | , — Lagrangian coordinate changes, lifted with momenta included | |
| Infinitesimal | , — symmetry flows steered by Poisson brackets | |
| Generator , | Hamilton's equations | time evolution itself is a canonical transformation |
| Hamilton–Jacobi | , demand | new variables freeze into constants; dynamics becomes one PDE |
| Full swap | no exists | ignores : the pair degenerates — type 2's blind spot, handled by |
Worked examples
1 · A momentum-shear generator on the oscillator (confidence builder)
Take with , acting on the oscillator with , . At the phase point , , find the new variables, build , and verify both canonical equations numerically.
Step 1. Run the relations. , so — momenta unchanged. . The map is a shear: each phase-space point is displaced in the coordinate direction by an amount proportional to its momentum, while the momentum itself remains unchanged. Bracket check: ✓.
Step 2. Build the new Hamiltonian. No explicit time, so re-expressed via , :
Value check: , equal to ✓.
Step 3. First canonical equation. . Directly: ✓.
Step 4. Second canonical equation. . Directly: ✓. The sheared chart runs on genuine canonical equations with the substituted — no re-derivation needed, exactly as the generating-function theorem promises.
2 · Freezing the free particle: a first Hamilton–Jacobi generator (exam level)
A free particle, with , is observed at at with . (a) Show that makes . (b) Find the frozen new variables and interpret them. (c) Use the frozen chart to predict at , and cross-check directly.
Step 1. Run the relations. : the new momentum is the (conserved) old momentum, . .
Step 2. Build the new Hamiltonian: . Both canonical equations reduce to and , so every trajectory becomes a fixed point in the transformed phase space.
Step 3. Evaluate the constants from the observation: and . Interpretation: is the particle's position at — the frozen chart is nothing but the initial conditions, and is (up to sign conventions) Hamilton's principal function for free motion.
Step 4. Predict. In the frozen chart nothing ever changes, so at still , . Invert the map: .
Step 5. Cross-check directly: constant velocity , so ✓. This is the Hamilton–Jacobi program in miniature: a suitably chosen generating function transfers all of the dynamics from the canonical variables into the generating function itself.
Origins · 1 minSophus Lie and how this was discovered
The infinitesimal transformations on this page are Lie's monument. A Norwegian who came to mathematics late — he was twenty-six before committing to it — Lie asked the question this article's equation (7) answers: what do continuous families of transformations look like near the identity, and how much does the whisper know about the finite map it exponentiates into? His answer — study the generators; their brackets close into an algebra that encodes the whole group — created Lie groups and Lie algebras, and canonical transformations were his laboratory: the "contact transformations" of his 1870s work with Felix Klein are the geometers' version of the maps in this chapter. The year 1870 supplied the legend: caught in France when the Franco-Prussian war broke out, Lie hiked toward Italy with his mathematical notes and was arrested as a suspected German spy, his formulas taken for coded dispatches; Gaston Darboux intervened to free him. The three-volume Theorie der Transformationsgruppen (1888–1893) systematized the theory. Physics repaid the debt in the twentieth century: the generator-flow correspondence became, after quantization, the statement that observables generate unitary symmetries — the working grammar of particle physics.
Going further
References. Goldstein, Poole & Safko, Classical Mechanics, 3rd ed., §9.1–9.2 (Eqs. 9.11–9.20) · Morin, Introduction to Classical Mechanics, Ch. 15 (canonical transformations) · Landau & Lifshitz, Mechanics, 3rd ed., §45 · Taylor, Classical Mechanics, Ch. 13 All relations follow from the Legendre transform of by direct differentiation. No empirical constants are used. The numeric examples on this page (shear with at , ; free-particle Hamilton–Jacobi chart with , observation at ) each carry an internal cross-check.
Builds on: Definition of Canonical Transformations · Generating Functions and the Four Types · Type-1 Generating Function F1(q,Q,t) Leads to: Type-3 and Type-4 Generating Functions · Fundamental Poisson Brackets · Poisson Brackets as a Test for Canonicity · Symplectic Condition
Why is F2 called the workhorse when all four types are equivalent in principle?
Because of where its blind spots are. Each type fails where its argument pair degenerates, and type 2's pair stays independent precisely at the transformations physics uses constantly: the identity, everything continuously connected to it (flows, symmetries, time evolution), and all point transformations. Type 1 fails at the identity; types 3 and 4 fail at ordinary coordinate changes. So the type-2 chart covers the everyday territory, and the others get pulled out for the exotic maps — full swaps, momentum-side coordinate changes — that type 2 cannot see.
Why do both F2 relations come with plus signs when F1 had that minus on P?
Track the differential. For : — the new-pair term enters with a minus because the new chart sits on the opposite side of the integrand identity. The Legendre term flips that slot: , all positive coefficients. The mnemonic that survives all four types: write the total differential; the coefficient of each surviving differential is what the corresponding derivative returns, sign included. Never memorize the eight rules — regenerate them from the differentials in ten seconds.
Is the G in an infinitesimal transformation a function of (q,P) or (q,p)? Textbooks seem to switch freely.
Formally lives in the type-2 slots . But an infinitesimal transformation has , and is already multiplied by , so evaluating at changes the transformation at — invisible at first order. That is why the working formulas are written , , i.e. , with everything in ordinary phase-space variables. For finite transformations the distinction matters and you must integrate the flow (exponentiate the generator).
How literally should I take "time evolution is a canonical transformation"? What is it transforming?
Completely literally. Fix a time interval ; the rule "take the state at time , output the state at time " is a map of phase space to itself, and Derivation B shows it is canonical (it is built by composing infinitesimal canonical steps). Two consequences you already know are corollaries: Liouville's theorem — canonical maps preserve phase-space volume, so flows do; and the Poisson-bracket evolution equation — the derivative of an observable along the flow generated by . The solution of a mechanics problem is not described by a canonical transformation; it is one.
In the point-transformation lift, why do momenta transform with the inverse Jacobian rather than the Jacobian?
Because the pairing must be chart-independent — it is the integrand of the action. If coordinates stretch by a factor, their conjugate momenta must shrink by the same factor to keep the product (and phase-space area) fixed. Formally: says the old momentum is the new one pushed through the Jacobian transpose; inverting gives in terms of through the inverse. This covariant/contravariant pairing is the same reason came out as angular momentum in the polar lift — a length-times-momentum object conjugate to a dimensionless angle.
Does making K = 0 violate energy conservation? The particle still has kinetic energy.
No — it exposes the difference between the Hamiltonian's two jobs. is the generator of evolution in the new chart, and in the frozen chart nothing evolves, so the generator is zero. The particle's energy is a different question, answered in a chart whose Hamiltonian is the energy (the original one). The time-dependent generator absorbs the energy bookkeeping into the map itself: watch worked example 2, where carries the term — the energy, exported from the variables into the transformation.
Where exactly does the F2 for Hamilton–Jacobi come from? We assumed generators; now S is an unknown?
That is the conceptual pivot of the chapter. Until Hamilton–Jacobi, you choose a generator and inspect what it does. In Hamilton–Jacobi you impose the outcome () and let that demand determine the generator: substituting into turns the requirement into a PDE for . Solving the PDE is solving the mechanics — the complete integral's constants are the frozen . So the generating function graduates from bookkeeping device to the central unknown of dynamics; that story continues in the Hamilton–Jacobi articles.
Can every canonical transformation be written as some F2?
No — and the counterexample is instructive: the full swap , has , so fail to be independent coordinates on phase space and no exists (that map is territory). Every canonical transformation admits at least one of the four types locally, but none of the types covers everything — which is precisely why there are four. Existence of a given type is a non-degeneracy condition: for , that can serve as independent labels of a phase-space point.