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 Q=qQ=q — but F2=qiPiF_2=q_iP_i 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, F2=qiPi+ϵ GF_2=q_iP_i+\epsilon\,G, and out comes an infinitesimal canonical transformation whose flow is steered by GG through Poisson brackets. Choose G=HG=H 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 p=∂F2/∂qp=\partial F_2/\partial q and Q=∂F2/∂PQ=\partial F_2/\partial P 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 F2F_2 the workhorse: point transformations (F2=f(q,t)PF_2=f(q,t)P 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 F2F_2 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.

Key takeaways
  • A type-2 generating function F2(q,P,t)F_2(q,P,t) depends on the old coordinates and the new momenta; its gradients give pi=∂F2/∂qip_i=\partial F_2/\partial q_i, Qi=∂F2/∂PiQ_i=\partial F_2/\partial P_i, and the Hamiltonian rule K=H+∂F2/∂tK=H+\partial F_2/\partial t.
  • It is the Legendre transform of type 1: F2=F1+QiPiF_2=F_1+Q_iP_i, trading dependence on QQ for dependence on PP — both defining relations end up with plus signs.
  • F2=qiPiF_2=q_iP_i is the identity; F2=fi(q,t)PiF_2=f_i(q,t)P_i lifts any point transformation Qi=fi(q,t)Q_i=f_i(q,t) into phase space with the momentum rule pj=Pi ∂fi/∂qjp_j=P_i\,\partial f_i/\partial q_j supplied free.
  • F2=qiPi+ϵGF_2=q_iP_i+\epsilon G generates infinitesimal canonical transformations, δqi=ϵ ∂G/∂Pi\delta q_i=\epsilon\,\partial G/\partial P_i, δpi=−ϵ ∂G/∂qi\delta p_i=-\epsilon\,\partial G/\partial q_i — equivalently δ(⋅)=ϵ{⋅,G}\delta(\cdot)=\epsilon\{\cdot,G\}; with G=HG=H, ϵ=dt\epsilon=\mathrm{d}t, this is Hamilton's equations.
  • Demanding K=0K=0 for F2=S(q,P,t)F_2=S(q,P,t) produces the Hamilton–Jacobi equation; the new chart's variables are constants of the motion.
  • Key idea: choose F2F_2 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.
The core insight

Choose F2F_2 to depend on the variables you control — old coordinates qq and new momenta PP — and the two gradient relations p=∂F2/∂qp=\partial F_2/\partial q, Q=∂F2/∂PQ=\partial F_2/\partial P produce a canonical transformation for free, with F2=qiPiF_2=q_iP_i 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 GG acting through Poisson-bracket flows, e:G:e^{:G:} 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 10910^9 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 F2=qP+Δt HsplitF_2=qP+\Delta t\,H_{\text{split}} 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 F2F_2 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 qq) and what you want the new momentum PP to be. It answers with the two things you did not specify: the old momentum pp that is consistent with your choice, and the new coordinate QQ that completes the chart. One scalar function, 2n2n partial derivatives, an entire canonical map.

Figure
The type-2 dispatcher — feed it old coordinates and new momenta, its two gradients return the rest of the map
F₂(q, P, t) one scalar function = the whole canonical map q — old coordinate what you know: where it is P — new momentum what you want the new chart to use p = ∂F₂/∂q old momentum, made consistent Q = ∂F₂/∂P new coordinate, completing the chart baseline: F₂ = qP → p = P, Q = q (the identity) the one map type-1 cannot make — and the scaffold for every flow

Why is (q,P)(q,P) 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 (q,Q)(q,Q) 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.

Figure
Near-identity flows — a small generator G paints a displacement field on phase space, and the flow follows it
q p level sets of G δq = ε ∂G/∂p, δp = −ε ∂G/∂q : the flow slides ALONG level sets of G who generates what G = p → translation in q G = L_z → rotation about z G = H → time evolution every conserved quantity is the generator of a symmetry flow — Noether's theorem, Hamiltonian style

The Legendre transform linking F1F_1 and F2F_2 should feel familiar: it is exactly the move that built HH from LL. There you swapped a velocity for a momentum by adding pq˙p\dot q; here you swap the new coordinate for the new momentum by adding QPQP. 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:

piq˙i−H=PiQ˙i−K+dFdt(1)p_i\dot q_i-H=P_i\dot Q_i-K+\frac{\mathrm{d}F}{\mathrm{d}t} \qquad (1)

where: piq˙i−Hp_i\dot q_i-H and PiQ˙i−KP_i\dot Q_i-K — the phase-space Lagrangians of the old and new charts; FF — the boundary-term freedom, whose choice of arguments defines the type. Choosing F=F1(q,Q,t)F=F_1(q,Q,t) gave the type-1 rules in Type-1 Generating Function F1(q,Q,t). To reach type 2, perform a Legendre transform in the QQ slot:

F2(q,P,t)=F1(q,Q,t)+QiPi(2)F_2(q,P,t)=F_1(q,Q,t)+Q_iP_i \qquad (2)

where: QiPiQ_iP_i — the transform term that trades the independent variable QQ for its conjugate PP; after the Legendre transform, QQ is no longer an independent variable, but is recovered from Q=∂F2/∂PQ=\partial F_2/\partial P. This is the identical maneuver that defines H=pq˙−LH=p\dot q-L — 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:

pi=∂F2∂qi,Qi=∂F2∂Pi(3)p_i=\frac{\partial F_2}{\partial q_i},\qquad Q_i=\frac{\partial F_2}{\partial P_i} \qquad (3)

where: both derivatives are taken with the other member of the pair (q,P)(q,P) held fixed. Notice what happened to the signs: type 1 carried P=−∂F1/∂QP=-\partial F_1/\partial Q, 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 (F3F_3, F4F_4; see Type-3 and Type-4 Generating Functions).

K=H+∂F2∂t(4)K=H+\frac{\partial F_2}{\partial t} \qquad (4)

where: KK — the new Hamiltonian, to be re-expressed entirely in (Q,P,t)(Q,P,t) before use; ∂F2/∂t\partial F_2/\partial t — explicit time dependence only. The rule is type-independent: Legendre transforms never touch the time slot.

Derivation AType-2 relations from the Legendre transform of F1

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 dF1\mathrm{d}F_1 with its known coefficients, add d(QiPi)\mathrm{d}(Q_iP_i), and watch the P dQP\,\mathrm{d}Q terms cancel, leaving a differential whose natural variables are (q,P,t)(q,P,t). 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 pi=∂F1/∂qip_i=\partial F_1/\partial q_i, Pi=−∂F1/∂QiP_i=-\partial F_1/\partial Q_i, K−H=∂F1/∂tK-H=\partial F_1/\partial t, and assemble the total differential:

dF1=pi dqi−Pi dQi+(K−H) dt\mathrm{d}F_1=p_i\,\mathrm{d}q_i-P_i\,\mathrm{d}Q_i+(K-H)\,\mathrm{d}t

Step 2. Define F2=F1+QiPiF_2=F_1+Q_iP_i and differentiate the product term: d(QiPi)=Pi dQi+Qi dPi\mathrm{d}(Q_iP_i)=P_i\,\mathrm{d}Q_i+Q_i\,\mathrm{d}P_i. Adding,

dF2=pi dqi+Qi dPi+(K−H) dt\mathrm{d}F_2=p_i\,\mathrm{d}q_i+Q_i\,\mathrm{d}P_i+(K-H)\,\mathrm{d}t

Why the cancellation matters: The −Pi dQi-P_i\,dQ_i and +Pi dQi+P_i\,dQ_i terms cancel exactly, leaving only the differentials of the new independent variables (q,P,t)(q,P,t) 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 dqi\mathrm{d}q_i, dPi\mathrm{d}P_i, dt\mathrm{d}t:

pi=∂F2∂qi,Qi=∂F2∂Pi,K=H+∂F2∂tp_i=\frac{\partial F_2}{\partial q_i},\qquad Q_i=\frac{\partial F_2}{\partial P_i},\qquad K=H+\frac{\partial F_2}{\partial t}

Step 4. Sanity-check on the identity: F2=qiPiF_2=q_iP_i gives pi=Pip_i=P_i and Qi=qiQ_i=q_i — the identity map, produced by the simplest possible generator, with K=HK=H untouched. The sign pattern traces to the F1F_1 conventions, and the mixed-partials identity ∂pi/∂Pj=∂Qj/∂qi\partial p_i/\partial P_j=\partial Q_j/\partial q_i holds automatically because both equal ∂2F2/∂qi∂Pj\partial^2F_2/\partial q_i\partial P_j.

The mixed-partials remark in the last line deserves its own display, because it is the type-2 face of the symplectic condition:

∂pi∂Pj∣q=∂Qj∂qi∣P=∂2F2∂qi ∂Pj(5)\frac{\partial p_i}{\partial P_j}\bigg|_{q}=\frac{\partial Q_j}{\partial q_i}\bigg|_{P}=\frac{\partial^2F_2}{\partial q_i\,\partial P_j} \qquad (5)

where: the equality holds identically for any C2C^2 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:

F2=qiPi+ϵ G(q,P,t)(6)F_2=q_iP_i+\epsilon\,G(q,P,t) \qquad (6)

where: ϵ\epsilon — an infinitesimal parameter; GG — the generator of the transformation. Running the type-2 relations to first order (Derivation B) gives the flow

δqi=ϵ∂G∂pi=ϵ{qi,G},δpi=−ϵ∂G∂qi=ϵ{pi,G}(7)\delta q_i=\epsilon\frac{\partial G}{\partial p_i}=\epsilon\{q_i,G\},\qquad \delta p_i=-\epsilon\frac{\partial G}{\partial q_i}=\epsilon\{p_i,G\} \qquad (7)

where: { ,}\{\,,\} — the Poisson bracket (see Poisson Brackets: Definition); to first order GG may be evaluated at (q,p)(q,p) since P=p+O(ϵ)P=p+O(\epsilon). Read it physically: the generator paints a displacement field on phase space, and the displacement is along level sets of GG — 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
Derivation BTime evolution is a canonical transformation generated by H

We are proving the statement that reorganizes all of Hamiltonian mechanics: the map "state now ↦\mapsto state dt\mathrm{d}t later" is an infinitesimal canonical transformation whose generator is the Hamiltonian itself. The strategy is to take the near-identity generator (6) with G=HG=H and ϵ=dt\epsilon=\mathrm{d}t, run the type-2 relations to first order, and recognize Hamilton's equations in the output. The care point is the argument swap P→pP\to p inside derivatives — legitimate at first order, and worth seeing exactly why.

Step 1. Set F2=qiPi+dt H(q,P,t)F_2=q_iP_i+\mathrm{d}t\,H(q,P,t). Apply the type-2 relations:

pi=∂F2∂qi=Pi+dt ∂H∂qi,Qi=∂F2∂Pi=qi+dt ∂H∂Pip_i=\frac{\partial F_2}{\partial q_i}=P_i+\mathrm{d}t\,\frac{\partial H}{\partial q_i},\qquad Q_i=\frac{\partial F_2}{\partial P_i}=q_i+\mathrm{d}t\,\frac{\partial H}{\partial P_i}

Step 2. Solve for the increments: δpi≡Pi−pi=−dt ∂H/∂qi\delta p_i\equiv P_i-p_i=-\mathrm{d}t\,\partial H/\partial q_i and δqi≡Qi−qi=+dt ∂H/∂Pi\delta q_i\equiv Q_i-q_i=+\mathrm{d}t\,\partial H/\partial P_i.

Step 3. Replace PP by pp inside the derivatives. Since Pi=pi+O(dt)P_i=p_i+O(\mathrm{d}t), replacing PiP_i by pip_i inside the derivatives changes the result only by terms of order dt2\mathrm{d}t^2, which are neglected in a first-order derivation. Why this is not sloppy: the derivative ∂H/∂Pi\partial H/\partial P_i is evaluated at a point displaced by O(dt)O(\mathrm{d}t) from (q,p)(q,p); Taylor-expanding costs a term dt×O(dt)\mathrm{d}t\times O(\mathrm{d}t). First-order flows are insensitive to it — the same logic that lets Euler integrators converge.

Step 4. Divide by dt\mathrm{d}t:

dqidt=∂H∂pi,dpidt=−∂H∂qi\frac{\mathrm{d}q_i}{\mathrm{d}t}=\frac{\partial H}{\partial p_i},\qquad \frac{\mathrm{d}p_i}{\mathrm{d}t}=-\frac{\partial H}{\partial q_i}

Hamilton's equations — recovered as the statement that HH generates the time flow. Composing infinitely many such infinitesimal maps builds the finite evolution map (q(0),p(0))↦(q(t),p(t))(q(0),p(0))\mapsto(q(t),p(t)), which is therefore canonical for every tt. 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 Qi=fi(q,t)Q_i=f_i(q,t): new coordinates from old coordinates only. Type 2 lifts each one to a full canonical transformation and tells you what the momenta must do:

F2=fi(q,t) Pi⟹Qi=fi(q,t),pj=Pi ∂fi∂qj(8)F_2=f_i(q,t)\,P_i\quad\Longrightarrow\quad Q_i=f_i(q,t),\qquad p_j=P_i\,\frac{\partial f_i}{\partial q_j} \qquad (8)

where: fif_i — the coordinate map; the second relation inverts to give PP in terms of pp via the inverse Jacobian. Read it physically: coordinates transform by ff, while momenta transform by the inverse transpose of the Jacobian so that the canonical one-form pi dqip_i\,dq_i (and hence the action) remains invariant under the change of coordinates. This is why "conjugate momentum to θ\theta" 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
Derivation CLifting 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 F2=fiPiF_2=f_iP_i 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 (q,P)(q,P) slots: old coordinates (x,y)(x,y), new chart (r,θ)(r,\theta) with r=x2+y2r=\sqrt{x^2+y^2}, θ=arctan⁡(y/x)\theta=\arctan(y/x). The generator is

F2(x,y;Pr,Pθ)=x2+y2  Pr+arctan⁡ ⁣(yx)PθF_2(x,y;P_r,P_\theta)=\sqrt{x^2+y^2}\;P_r+\arctan\!\left(\frac{y}{x}\right)P_\theta

Step 2. New coordinates from the PP-gradients: ∂F2/∂Pr=x2+y2=r\partial F_2/\partial P_r=\sqrt{x^2+y^2}=r ✓ and ∂F2/∂Pθ=arctan⁡(y/x)=θ\partial F_2/\partial P_\theta=\arctan(y/x)=\theta ✓ — the lift reproduces the coordinate map by construction.

Step 3. Old momenta from the qq-gradients:

px=∂F2∂x=xr Pr−yr2 Pθ,py=∂F2∂y=yr Pr+xr2 Pθp_x=\frac{\partial F_2}{\partial x}=\frac{x}{r}\,P_r-\frac{y}{r^2}\,P_\theta,\qquad p_y=\frac{\partial F_2}{\partial y}=\frac{y}{r}\,P_r+\frac{x}{r^2}\,P_\theta

Why these are believable: with x/r=cos⁡θx/r=\cos\theta, y/r=sin⁡θy/r=\sin\theta, the pair inverts to Pr=pxcos⁡θ+pysin⁡θP_r=p_x\cos\theta+p_y\sin\theta (the radial component of linear momentum) and Pθ=xpy−ypxP_\theta=xp_y-yp_x (the angular momentum LzL_z). The lift has derived that the momentum conjugate to the polar angle is angular momentum.

Step 4. Check one bracket in old variables: {θ,Pθ}=∂xθ ∂pxPθ+∂yθ ∂pyPθ−0=(−yr2)(−y)+(xr2)(x)=x2+y2r2=1\{ \theta, P_\theta\}=\partial_x\theta\,\partial_{p_x}P_\theta+\partial_y\theta\,\partial_{p_y}P_\theta-0=\left(-\frac{y}{r^2}\right)(-y)+\left(\frac{x}{r^2}\right)(x)=\frac{x^2+y^2}{r^2}=1 ✓. The result reproduces the standard induced momentum transformation pj=Pi ∂fi/∂qjp_j=P_i\,\partial f_i/\partial q_j and the identification Pθ=LzP_\theta=L_z 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 F2=S(q,P,t)F_2=S(q,P,t) and K=H+∂S/∂t=0K=H+\partial S/\partial t=0 with p=∂S/∂qp=\partial S/\partial q substituted gives

H ⁣(q,∂S∂q,t)+∂S∂t=0(9)H\!\left(q,\frac{\partial S}{\partial q},t\right)+\frac{\partial S}{\partial t}=0 \qquad (9)

where: SS — Hamilton's principal function, now the unknown of a partial differential equation. If K=0K=0 then Q˙=P˙=0\dot Q=\dot P=0: 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, SS. 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

CaseResultMeaning
IdentityF2=qiPiF_2=q_iP_ip=Pp=P, Q=qQ=q; the baseline type 1 cannot represent
Point transformationF2=fi(q,t)PiF_2=f_i(q,t)P_iQi=fi(q,t)Q_i=f_i(q,t), pj=Pi ∂fi/∂qjp_j=P_i\,\partial f_i/\partial q_j — Lagrangian coordinate changes, lifted with momenta included
InfinitesimalF2=qiPi+ϵGF_2=q_iP_i+\epsilon Gδq=ϵ{q,G}\delta q=\epsilon\{q,G\}, δp=ϵ{p,G}\delta p=\epsilon\{p,G\} — symmetry flows steered by Poisson brackets
Generator G=HG=H, ϵ=dt\epsilon=\mathrm{d}tHamilton's equationstime evolution itself is a canonical transformation
Hamilton–JacobiF2=S(q,P,t)F_2=S(q,P,t), demand K=0K=0new variables freeze into constants; dynamics becomes one PDE
Full swap Q=p, P=−qQ=p,\ P=-qno F2F_2 existsQQ ignores qq: the (q,P)(q,P) pair degenerates — type 2's blind spot, handled by F1=qQF_1=qQ

Worked examples

1 · A momentum-shear generator on the oscillator (confidence builder)

Take F2=qP+a2P2F_2=qP+\tfrac{a}{2}P^2 with a=0.10 s/kga=0.10\ \mathrm{s/kg}, acting on the oscillator H=p2/2m+12kq2H=p^2/2m+\tfrac12 kq^2 with m=0.50 kgm=0.50\ \mathrm{kg}, k=8.0 N/mk=8.0\ \mathrm{N/m}. At the phase point q=0.60 mq=0.60\ \mathrm{m}, p=2.0 kg m/sp=2.0\ \mathrm{kg\,m/s}, find the new variables, build KK, and verify both canonical equations numerically.

Step 1. Run the relations. p=∂F2/∂q=Pp=\partial F_2/\partial q=P, so P=2.0 kg m/sP=2.0\ \mathrm{kg\,m/s} — momenta unchanged. Q=∂F2/∂P=q+aP=0.60+0.10×2.0=0.80 mQ=\partial F_2/\partial P=q+aP=0.60+0.10\times2.0=0.80\ \mathrm{m}. 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: {Q,P}=∂qQ ∂pP−∂pQ ∂qP=(1)(1)−(a)(0)=1\{Q,P\}=\partial_qQ\,\partial_pP-\partial_pQ\,\partial_qP=(1)(1)-(a)(0)=1 ✓.

Step 2. Build the new Hamiltonian. No explicit time, so K=HK=H re-expressed via q=Q−aPq=Q-aP, p=Pp=P:

K(Q,P)=P22m+12k (Q−aP)2K(Q,P)=\frac{P^2}{2m}+\tfrac12 k\,(Q-aP)^2

Value check: K=4.01.0+12(8.0)(0.60)2=4.0+1.44=5.44 JK=\frac{4.0}{1.0}+\tfrac12(8.0)(0.60)^2=4.0+1.44=5.44\ \mathrm{J}, equal to H=4.0+1.44=5.44 JH=4.0+1.44=5.44\ \mathrm{J} ✓.

Step 3. First canonical equation. Q˙=∂K/∂P=P/m−ak(Q−aP)=2.0/0.50−0.10×8.0×0.60=4.0−0.48=3.52 m/s\dot Q=\partial K/\partial P=P/m-ak(Q-aP)=2.0/0.50-0.10\times8.0\times0.60=4.0-0.48=3.52\ \mathrm{m/s}. Directly: Q˙=q˙+ap˙=p/m+a(−kq)=4.0−0.10×8.0×0.60=3.52 m/s\dot Q=\dot q+a\dot p=p/m+a(-kq)=4.0-0.10\times8.0\times0.60=3.52\ \mathrm{m/s} ✓.

Step 4. Second canonical equation. P˙=−∂K/∂Q=−k(Q−aP)=−8.0×0.60=−4.8 N\dot P=-\partial K/\partial Q=-k(Q-aP)=-8.0\times0.60=-4.8\ \mathrm{N}. Directly: P˙=p˙=−kq=−4.8 N\dot P=\dot p=-kq=-4.8\ \mathrm{N} ✓. The sheared chart runs on genuine canonical equations with the substituted KK — 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, H=p2/2mH=p^2/2m with m=2.0 kgm=2.0\ \mathrm{kg}, is observed at t=3.0 st=3.0\ \mathrm{s} at q=8.5 mq=8.5\ \mathrm{m} with p=3.0 kg m/sp=3.0\ \mathrm{kg\,m/s}. (a) Show that F2=qP−P22m tF_2=qP-\dfrac{P^2}{2m}\,t makes K=0K=0. (b) Find the frozen new variables (Q,P)(Q,P) and interpret them. (c) Use the frozen chart to predict qq at t=5.0 st=5.0\ \mathrm{s}, and cross-check directly.

Step 1. Run the relations. p=∂F2/∂q=Pp=\partial F_2/\partial q=P: the new momentum is the (conserved) old momentum, P=3.0 kg m/sP=3.0\ \mathrm{kg\,m/s}. Q=∂F2/∂P=q−Pm tQ=\partial F_2/\partial P=q-\dfrac{P}{m}\,t.

Step 2. Build the new Hamiltonian: K=H+∂F2∂t=P22m−P22m=0K=H+\dfrac{\partial F_2}{\partial t}=\dfrac{P^2}{2m}-\dfrac{P^2}{2m}=\mathbf{0}. Both canonical equations reduce to Q˙=∂K/∂P=0\dot{Q}=\partial K/\partial P=0 and P˙=−∂K/∂Q=0\dot{P}=-\partial K/\partial Q=0, so every trajectory becomes a fixed point in the transformed phase space.

Step 3. Evaluate the constants from the observation: P=3.0 kg m/sP=3.0\ \mathrm{kg\,m/s} and Q=8.5−3.02.0×3.0=8.5−4.5=4.0 mQ=8.5-\dfrac{3.0}{2.0}\times3.0=8.5-4.5=4.0\ \mathrm{m}. Interpretation: QQ is the particle's position at t=0t=0 — the frozen chart is nothing but the initial conditions, and F2F_2 is (up to sign conventions) Hamilton's principal function for free motion.

Step 4. Predict. In the frozen chart nothing ever changes, so at t=5.0 st=5.0\ \mathrm{s} still Q=4.0Q=4.0, P=3.0P=3.0. Invert the map: q=Q+Pm t=4.0+1.5×5.0=11.5 mq=Q+\dfrac{P}{m}\,t=4.0+1.5\times5.0=\mathbf{11.5\ m}.

Step 5. Cross-check directly: constant velocity v=p/m=1.5 m/sv=p/m=1.5\ \mathrm{m/s}, so q(5.0)=q(3.0)+v Δt=8.5+1.5×2.0=11.5 mq(5.0)=q(3.0)+v\,\Delta t=8.5+1.5\times2.0=11.5\ \mathrm{m} ✓. 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
SL
Sophus Lie
1842–1899 · Christiania and Leipzig

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 ϵG\epsilon G 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 δ(⋅)=ϵ{⋅,G}\delta(\cdot)=\epsilon\{\cdot,G\} became, after quantization, the statement that observables generate unitary symmetries — the working grammar of particle physics.

History
1834
— Hamilton casts dynamics in canonical form; the phase-space action becomes available as a tool
1843
— Jacobi's Königsberg lectures make changing variables by generating functions the method of choice
1871
— Lie begins the theory of continuous transformation groups, built on infinitesimal generators
1888
— Theorie der Transformationsgruppen starts to appear: generators and their algebra classify the flows
1918
— Noether ties symmetry generators to conservation laws, the Lagrangian shadow of the G-flow correspondence
1926
— Schrödinger reaches wave mechanics guided by the Hamilton–Jacobi form of the type-2 generator

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 F1F_1 by direct differentiation. No empirical constants are used. The numeric examples on this page (shear with a=0.10 s/kga=0.10\ \mathrm{s/kg} at q=0.60q=0.60, p=2.0p=2.0; free-particle Hamilton–Jacobi chart with m=2.0m=2.0, observation q=8.5q=8.5 at t=3.0t=3.0) 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 (q,P)(q,P) 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 F1F_1: dF1=p dq−P dQ+…\mathrm{d}F_1=p\,\mathrm{d}q-P\,\mathrm{d}Q+\ldots — the new-pair term enters with a minus because the new chart sits on the opposite side of the integrand identity. The Legendre term +d(QP)+\mathrm{d}(QP) flips that slot: dF2=p dq+Q dP+…\mathrm{d}F_2=p\,\mathrm{d}q+Q\,\mathrm{d}P+\ldots, 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 GG lives in the type-2 slots (q,P)(q,P). But an infinitesimal transformation has P=p+O(ϵ)P=p+O(\epsilon), and GG is already multiplied by ϵ\epsilon, so evaluating GG at (q,p)(q,p) changes the transformation at O(ϵ2)O(\epsilon^2) — invisible at first order. That is why the working formulas are written δq=ϵ ∂G(q,p)/∂p\delta q=\epsilon\,\partial G(q,p)/\partial p, δp=−ϵ ∂G(q,p)/∂q\delta p=-\epsilon\,\partial G(q,p)/\partial q, i.e. δ(⋅)=ϵ{⋅,G}\delta(\cdot)=\epsilon\{\cdot,G\}, 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 tt; the rule "take the state at time 00, output the state at time tt" 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 dA/dt={A,H}\mathrm{d}A/\mathrm{d}t=\{A,H\} — the derivative of an observable along the flow generated by HH. 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 pi dqip_i\,\mathrm{d}q_i 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: pj=Pi ∂fi/∂qjp_j=P_i\,\partial f_i/\partial q_j says the old momentum is the new one pushed through the Jacobian transpose; inverting gives PP in terms of pp through the inverse. This covariant/contravariant pairing is the same reason PθP_\theta 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. KK 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 SS absorbs the energy bookkeeping into the map itself: watch worked example 2, where F2F_2 carries the term −(P2/2m)t-(P^2/2m)t — 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 (K=0K=0) and let that demand determine the generator: substituting p=∂S/∂qp=\partial S/\partial q into K=H+∂tS=0K=H+\partial_tS=0 turns the requirement into a PDE for SS. Solving the PDE is solving the mechanics — the complete integral's constants are the frozen (Q,P)(Q,P). 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 Q=pQ=p, P=−qP=-q has ∂Q/∂q=0\partial Q/\partial q=0, so (q,P)(q,P) fail to be independent coordinates on phase space and no F2(q,P)F_2(q,P) exists (that map is F1=qQF_1=qQ 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 F2F_2, that (q,P)(q,P) can serve as independent labels of a phase-space point.

Before this

Where this leads