Hamiltonian Mechanics

a generating function

A generating function is the compact recipe that produces a canonical transformation. Rather than write out the new coordinates and momenta directly and then check the (many) conditions that make the map canonical, you write down a single cleverly chosen function; differentiating it hands you the whole transformation, guaranteed canonical for free. It is the bookkeeping device that makes the enormous freedom of canonical transformations practical to use.

The trick rests on the fact that a canonical transformation preserves the action up to endpoint terms: p dq - H dt and P dQ - K dt differ by the total differential of some function F. Choosing F to depend on one old and one new variable gives four standard types. The most-used, the type-2 generating function F_2(q, P, t), yields p_i = partial F_2 / partial q_i, Q_i = partial F_2 / partial P_i, and K = H + partial F_2 / partial t. (The type-1 F_1(q, Q) gives p = partial F_1 / partial q, P = - partial F_1 / partial Q; types 3 and 4 use F_3(p, Q) and F_4(p, P), related by Legendre transforms.) Any F generates a valid canonical transformation, so building transformations reduces to choosing a function.

Generating functions are the practical engine behind the deepest results of the subject. The identity transformation is F_2 = sum q_i P_i; adding a small piece epsilon G to it generates an infinitesimal canonical transformation whose 'generator' G is exactly a conserved quantity acting as a symmetry -- the Hamiltonian bridge to Noether's theorem. And solving for the one generating function that makes the new Hamiltonian vanish is the Hamilton-Jacobi equation, with Hamilton's principal function S playing the role of F_2.

The type-2 function F_2 = q P generates the identity (p = partial F_2 / partial q = P, Q = partial F_2 / partial P = q). The function F_1 = (1/2) m omega q^2 cot(Q) generates the transformation that solves the harmonic oscillator, turning (q, p) into action-angle-like variables in which the Hamiltonian is simply proportional to the new momentum.

Different generating functions build different canonical transformations, from the trivial identity to the one that solves the oscillator.

Each of the four types is a Legendre transform of the others, and not every transformation is representable by every type -- a given canonical map may be singular for one choice (e.g. F_1 fails for the identity) yet perfectly regular for another. Pick the type whose 'mixed' variables (old-and-new) are independent for your transformation.

Also called
generating function of a canonical transformation母函數