Type-1 Generating Function F1(q,Q,t)
Here is a magic trick, performed by a single scalar function. Take the harmonic oscillator — the problem you have solved five different ways — and hand it to . Turn the crank (, ) and the Hamiltonian collapses from a quadratic form into : one momentum, conserved by inspection, one coordinate advancing uniformly like the hand of a clock. No differential equation was solved. The change of variables did all the work, and the change of variables cost one function of two arguments. That is the type-1 generating function in action. You met the taxonomy in Generating Functions and the Four Types — four ways to store a canonical transformation in one scalar, related by Legendre transforms. This page owns the first member of the family in full working detail: where the defining relations come from (a two-line coefficient match inside Hamilton's modified principle), why the new momentum carries its famous minus sign, when the representation exists and when it degenerates, and how the oscillator computation actually goes, digit by digit, from initial conditions to a predicted position. is the type that mixes coordinates and momenta most aggressively — it cannot even represent the identity map, but it swaps position and momentum effortlessly and it manufactures the action–angle variables on which perturbation theory, adiabatic invariants, and the old quantum theory were built. If you learn to run one generating function fluently, make it this one.
- A type-1 generating function depends on the old and new coordinates; its two gradients deliver the momenta: and .
- The relations drop out of Hamilton's modified principle: old and new integrands describe the same motion, so they differ by a total time derivative, ; matching coefficients of the independent and does the rest.
- The new Hamiltonian is — equal in value to whenever the generator carries no explicit time.
- Existence requires and to be functionally independent: . The identity transformation fails this test — no generates it; switch to type 2.
- The flagship computation: turns the oscillator into , with the action and the angle.
- Key idea: a single scalar function of the old and new coordinates generates the entire canonical transformation; differentiating with respect to its two arguments yields the conjugate momenta with opposite signs, automatically preserving the canonical structure.
Treat one scalar function of mixed old/new coordinates as a generator; differentiating it with respect to its two arguments gives the conjugate momenta with opposite signs, guaranteeing canonicity through the variational principle.
Where this lives today
The type-1 idea — store a canonical map in a scalar of mixed old/new variables — is the backbone of symplectic integrators, the numerical methods that made long-horizon celestial mechanics trustworthy. A naive Runge–Kutta step slowly leaks phase-space area, and a billion-step Solar System integration spirals planets outward; a symplectic method instead defines each timestep as the canonical transformation of a mixed-variable generator (- or -type with approximating ), so area preservation is exact by construction and energy errors stay bounded for gigayears. Every modern long-term Solar System stability study, and the molecular-dynamics engines behind protein simulation (velocity Verlet is a generating-function method in disguise), runs on this machinery. The same construction, rebranded as variational integrators, now drives trajectory optimization in robotics and physically stable animation in graphics — twenty-first-century engineering steering by a scalar function Jacobi would recognize at a glance.
The physical picture
Think of as a potential on a hybrid space — not the phase space and not the new chart , but the mixed plane whose axes are the old coordinate and the new one. A single surface lives over this plane. Its slope in the direction is the old momentum; its slope in the direction is minus the new momentum. Just as a conservative force field is fully stored in one scalar , an entire canonical transformation — functions' worth of map — is stored in one scalar . The compression is possible because canonicity is a brutally strong constraint: of the free functions in a general map , preserving Hamilton's equations eliminates half, and what survives is exactly one function's worth of freedom.
Why must the two slopes come with opposite signs? Because the surface straddles the old and new descriptions symmetrically, and the phase-space action treats "incoming" and "outgoing" charts with opposite orientation — the same antisymmetry that puts the minus sign into Hamilton's equations themselves. A gradient map ( and both with signs) would be the wrong geometry: flows built from it would compress phase-space area. The pair is precisely what preserves it. The payoff picture is the harmonic oscillator. In the chart the trajectory is an energy ellipse traced endlessly; the energy is constant even though neither nor is. The map unrolls that ellipse into a horizontal line in the chart: all the dynamics is straightened into uniform drift of an angle. Solving the system has been traded for rectifying it.
Keep one caution from the picture: the surface analogy is over the mixed plane, so is useful only when and can genuinely serve as independent axes. For maps in which the new coordinate shadows the old one — the identity above all — the mixed plane collapses and the type-1 representation dies. This is not a defect but the reason four different types of generating functions are needed: when one choice of independent variables becomes singular, another remains well defined.
From the variational principle to the type-1 rules
Everything follows from one requirement: the old chart and the new chart must tell the same dynamical story. In the old variables the trajectory extremizes the phase-space action with integrand ; in the new variables, . Two integrands force identical equations of motion when they differ by a total time derivative — a boundary term that fixed-endpoint variations never see. That freedom is where the generator enters:
where: — the old phase-space Lagrangian; — the new one; — an as-yet arbitrary function of the old and new coordinates. Read it physically: the two descriptions may disagree pointwise along the path, but only by bookkeeping that integrates to endpoint values. Choosing which variables depends on is choosing the type; taking makes and the only velocities in the equation, and they are independent — which is exactly what lets us match their coefficients. Carrying out that match (Derivation A below) yields the two transformation equations and the Hamiltonian rule:
where: — old conjugate pair; — new conjugate pair; both relations hold at each instant. These are implicit equations for the map: the first is solved for — possible precisely when the mixed Hessian is invertible — and the second then hands you . The minus sign on is structural, not conventional: flip it and the map stops preserving phase-space area.
where: — the new Hamiltonian ("Kamiltonian"), with re-expressed in the new variables; — the generator's explicit time derivative only. A time-independent generator gives in value — same energy function wearing new clothes. A time-dependent one shifts the energy bookkeeping, which is how moving charts and, eventually, the Hamilton–Jacobi equation () become possible.
We are deriving the complete type-1 machinery — both transformation equations and the new-Hamiltonian rule — from nothing but the statement that old and new charts describe one physical motion. The strategy is the cleanest in this chapter: write both phase-space integrands, let them differ by the total derivative of a function chosen to depend on , expand that derivative by the chain rule, and then exploit the functional independence of and to match coefficients term by term. The one subtlety to watch is why the velocities may be treated as independent: on the mixed plane, and are independent coordinates, so a variation may wiggle one while freezing the other.
Step 1. Write the two variational statements. Old chart: . New chart: . Both are the modified Hamilton principle of Hamilton's Canonical Equations, whose independent variations of coordinates and momenta reproduce the canonical equations in each chart. Why both at once? Because "the transformation is canonical" means exactly this: whatever trajectory extremizes the old action must, seen through the map, extremize the new one.
Step 2. Let the integrands differ by a total derivative, , with . A total derivative contributes to the action, and because the endpoint variations vanish, this boundary term does not affect the Euler–Lagrange equations.
Step 3. Expand by the chain rule:
and substitute into Step 2, collecting everything on one side:
Step 4. Match the coefficient of . Since and can be varied independently at a point of the mixed plane, each bracket must vanish separately. The first gives .
Step 5. Match the coefficient of : . The minus sign arrives because sits on the opposite side of the identity from — the new chart is the "outgoing" description, and the generator straddles the two with opposite orientation. Why is this not a convention? Try with any concrete generator, say : the resulting map has Jacobian determinant and reverses phase-space orientation — Hamilton's equations in the new chart pick up a wrong overall sign. Only the opposite-sign pairing preserves the canonical structure and the phase-space orientation.
Step 6. The velocity-free remainder fixes the new Hamiltonian: . Every type in the family obeys this same rule, because the Legendre transforms connecting the types never touch the explicit time slot. The coefficient matching is unambiguous because and are independent; as a concrete check, setting reproduces the known swap map with .
One structural identity is worth extracting before the applications, because it is the germ of the symplectic condition. The two relations in (2) come from a single function, so their cross-derivatives are locked together:
where: the outer derivatives are taken on the mixed plane. This is an integrability condition the map satisfies identically — no Poisson bracket needs computing. It is one block of the full symplectic condition that Symplectic Condition assembles in matrix form; a generating function satisfies this integrability condition automatically, which is precisely why the construction guarantees a canonical transformation.
Go deeper · Derivation B · 1 minCanonicity is automatic — the mixed-partials check
We are showing that any transformation produced by the type-1 rules is canonical without ever computing a Poisson bracket: the equality of mixed second derivatives of the single scalar is the symplectic integrability condition in the representation. The strategy is two one-line differentiations and a comparison. What to watch: which variable is held fixed in each derivative — the whole content lives in that bookkeeping.
Step 1. Differentiate with respect to at fixed :
Step 2. Differentiate with respect to at fixed :
Step 3. For any twice continuously differentiable , the mixed partials are equal (Clairaut–Schwarz), so
Why this settles canonicity: the condition is exactly what the symplectic condition reduces to when written in mixed variables — the antisymmetric structure of phase space re-expressed as "one potential, two slopes." A map that cannot be so derived generically fails it; a map that can, passes identically. For example, with the relation reads (since ) — both sides equal 1, confirming that generating-function maps are canonical by construction.
The flagship computation: the oscillator rectified
Now run the machine on a real Hamiltonian. The oscillator is quadratic in both arguments — an ellipse in phase space — and the following generator is engineered to trade for an angle and an action:
where: — mass; — angular frequency; — the would-be angle variable; the is what will convert the phase-space ellipse into sine and cosine. This form is motivated by the known action–angle parametrization of the harmonic oscillator, and it can be verified directly by differentiation; the motivating route runs as follows. Work backwards: if and are to hold, then , and integrating in lands on (5). Generators are usually reverse-engineered this way, then verified forwards.
Go deeper · Derivation C · 1 minSolving the harmonic oscillator with a type-1 generator
We are transforming the oscillator to variables in which its dynamics is trivial, using — the single most instructive generating-function computation in mechanics, and the doorway to Action-Angle Variables. The route: extract both momenta from the generator, invert to get the explicit map , substitute into , and integrate the new — trivial — canonical equations. Watch two things: the derivative of , which produces the required factor, and the identity , which eliminates the angle from the Hamiltonian.
Step 1. Old momentum from the -slope:
Step 2. New momentum from the -slope, using :
Why the sign works out: the derivative of is negative, and the defining relation carries its own minus sign; the two cancel, leaving — an action should be positive.
Step 3. Invert Step 2 for the old coordinate:
Step 4. Substitute into Step 1 to express the old momentum in new variables:
Step 5. Transform the Hamiltonian. has no explicit time dependence, so re-expressed:
Why this is the victory: is absent from — the new coordinate is cyclic (see Cyclic Coordinates and Conserved Momenta), so its conjugate momentum froze the moment we finished transforming.
Step 6. Integrate the new canonical equations:
Since the transformed Hamiltonian is and, for a time-independent generator, , it follows immediately that . Mapping back through Steps 3–4 delivers and as sines and cosines — the familiar solution, produced without solving a single differential equation in the old chart. As a check: substituting and back into returns identically, and dimensionally , confirming is an action.
The lesson generalizes: for every integrable system there exist charts in which the Hamiltonian depends on momenta alone, and generating functions are the vehicle that takes you there. That program — run systematically rather than by inspired guessing — is Hamilton–Jacobi theory, where the generator itself becomes the unknown of a partial differential equation (the type-2 route; see Type-2 Generating Function F2(q,P,t)).
Limiting cases
| Case | Result | Meaning |
|---|---|---|
| Non-degenerate mixed Hessian | can be inverted for ; the type-1 representation exists | |
| Identity map | no exists | dependent — the mixed plane collapses; use (type 2) |
| Swap generator | coordinates and momenta trade places — impossible to express in Lagrangian mechanics | |
| Time-independent | (in value) | the transformation reshuffles phase space at fixed energy function |
| Oscillator generator | dynamics rectified: action frozen, angle drifts at | |
| or in the oscillator map | diverges | chart singular where -axis is crossed: the angle chart, like all charts, has coordinate singularities |
Worked examples
1 · The swap generator on a free particle (confidence builder)
Take acting on a free particle, with . At the phase point , , find the new variables and the new Hamiltonian, and verify both canonical equations numerically.
Step 1. Run the type-1 rules. , so ; and . Coordinates and momenta have swapped (with the orientation-preserving minus sign), units and all — the new "coordinate" is measured in momentum units, which canonical mechanics happily permits.
Step 2. Build . No explicit time in , so re-expressed: gives . Value check: , equal to ✓.
Step 3. First canonical equation: . Directly: for a free particle ✓ — the new coordinate is frozen because it is the conserved momentum.
Step 4. Second canonical equation: . Directly: ✓. Bracket check in old variables: ✓. The transformation is canonical: the physics is unchanged, but the canonical variables have exchanged their dynamical roles.
2 · Predicting an oscillator's position through the angle chart (exam level)
An oscillator has , , and at : , . Using the generator , find the action , the initial angle , and predict at . Cross-check against the direct solution.
Step 1. Energy first: . The action is — frozen for all time.
Step 2. Determine the initial angle directly from the generating-function relations. Dividing by gives , so — a 3–4–5 triangle, , , .
Step 3. Consistency check on using the new-momentum relation directly: ✓, and ✓. Amplitude for later: .
Step 4. March the angle forward — the only dynamics left: . Then
Step 5. Cross-check by brute force in the old chart: ✓. Identical to the millimeter. The generating-function method avoids integrating the equations of motion: it transforms the dynamics to a chart where the motion is uniform, advances the system by one step, and transforms back.
Origins · 1 minArnold Sommerfeld and how this was discovered
Sommerfeld is the physicist who made the action variable famous beyond mechanics. In 1915–16, extending Bohr's atom, he and William Wilson promoted exactly the quantity a type-1 generator hands you — the phase integral , which for the oscillator equals — to a quantization rule: . Applied with elliptic orbits and relativistic corrections, it produced the fine-structure constant and split hydrogen's spectral lines before wave mechanics existed. The deeper reason the recipe worked at all is generating-function mechanics: action variables are the adiabatically invariant, canonically privileged momenta of an integrable system, so "quantize the action" was the only chart-independent rule available. Sommerfeld's Munich seminar — Heisenberg, Pauli, Debye, Bethe among its students — treated canonical transformations as the working language of atomic theory, and his Atombau und Spektrallinien carried that language to a generation. Nominated for the Nobel Prize a record 84 times without winning, he remains the field's great teacher: the old quantum theory died in 1925, but the action variables it ran on are still how accelerator physicists and planetary dynamicists label orbits today.
Going further
References. Goldstein, Classical Mechanics, 3rd ed., §9.1 · Morin, Introduction to Classical Mechanics, Ch. 15 · Landau & Lifshitz, Mechanics, Vol. 1, §45 · Taylor, Classical Mechanics, Ch. 13 The identity can be confirmed by substituting and into ; all signs and the derivative of are standard. The numeric examples on this page (swap map at , ; oscillator with , , , ) each carry an internal cross-check.
Builds on: Definition of Canonical Transformations · Generating Functions and the Four Types Leads to: Type-2 Generating Function F2(q,P,t) · Type-3 and Type-4 Generating Functions · Symplectic Condition · Poisson Brackets as a Test for Canonicity
How would I ever guess a generator like (1/2) m ω q² cot Q on my own?
You reverse-engineer it. Decide what you want the new variables to do — for the oscillator, so that the energy becomes a function of alone — then form the ratio , which eliminates and leaves as a function of and only: . Since type-1 demands , integrate in at fixed and you land on the generator. In practice nobody guesses generators forwards; Hamilton–Jacobi theory (the type-2 route) turns the reverse-engineering into a systematic PDE.
Is F1 itself a physical quantity? Does its value mean anything?
Along an actual trajectory, yes and beautifully: the identity integrates to show that accumulates the difference of the two phase-space actions between endpoints. That is why Hamilton's principal function — the action integral itself — turns out to be a generating function of exactly this mixed-variable kind. Off-trajectory, though, is scaffolding: only its derivatives (the map) are physics, and adding a constant changes nothing.
Why can't F1 generate the identity? The identity is the most harmless map there is.
Because 's two arguments must be usable as independent axes of a plane, and under the identity they are the same variable — the mixed plane degenerates to a line. Algebraically, must be solvable for , which needs ; but any candidate would have to give independent of at , a contradiction. The family exists precisely for this reason: generates the identity with no drama. Near-identity maps — the infinitesimal canonical transformations that build flows — are type-2 territory too.
Do the four types generate different sets of transformations? Is type 1 more powerful?
No type is more powerful; they are four coordinate charts on the same space of canonical transformations, related by Legendre transforms (e.g. ). Most transformations admit several representations; some sit in a blind spot of one type — the identity for , the full swap for . For a given map, existence of type is a non-degeneracy condition on the corresponding pair of variables. See Generating Functions and the Four Types for the full taxonomy and the master table.
When F1 depends on time, K is not the energy. What is it then?
is the generator of time evolution in the new chart — the function whose partial derivatives produce and . That role does not require it to equal the kinetic-plus-potential energy, and after a time-dependent transformation it generally will not (a chart co-rotating with the dynamics can reach : nothing moves in that chart, though the particle certainly carries energy). Energy bookkeeping and evolution bookkeeping coincide only when the chart itself is time-independent.
In the oscillator example the new coordinate Q is an angle and P has units of action, not momentum. Is that allowed?
Entirely. Canonical mechanics constrains only the pair: the product of each conjugate pair must carry dimensions of action (), because terms build the action integral. dimensionless (radians) with satisfies this exactly as well as meters times . Freeing the variables from their metric meaning is much of the formalism's power — the swap generator even gives a "coordinate" measured in momentum units.
Equation (4) looks like only part of a symplectic condition. Where is the rest?
Sharp eye. For one degree of freedom, (4) is the whole content — it is equivalent to . For degrees of freedom, the mixed-partials argument applied to all index pairs generates the full set of conditions packaged in : symmetry of -type blocks plus the cross-block relation. The matrix formulation in Symplectic Condition is the tidy way to carry all of them at once; the generating-function origin is why they hold identically rather than needing to be checked.
Is Hamilton's principal function from the action principle literally one of these generators?
Yes — that is the deepest fact in this corner of mechanics. The action evaluated along the true trajectory, viewed as a function of the endpoints, satisfies and : exactly the type-1 relations with as the "new" chart. Time evolution itself is a canonical transformation, generated by the accumulating action. Quantum mechanics inherits this wholesale: is the propagator's phase, which is why canonical transformations become unitary ones.