Generating Function to a Trivial Hamiltonian
Every formulation of mechanics before this one solves a problem by following it: Newton integrates forces step by step, Lagrange integrates the Euler-Lagrange equations, Hamilton integrates a first-order flow in phase space. Hamilton-Jacobi theory opens with a move so audacious it barely sounds legal — do not follow the motion at all. Instead, hunt for a change of phase-space coordinates so perfectly adapted to the dynamics that, in the new chart, nothing moves. The orbit that spirals and loops in becomes a single frozen point in ; every new coordinate and every new momentum is a constant of the motion, all of them at once. The instrument that makes this possible is a canonical transformation with a time-dependent type-2 generating function , chosen so that the transformed Hamiltonian vanishes identically. The demand , written out, is a single first-order partial differential equation for the generator — the Hamilton-Jacobi equation — and the generator that solves it turns out to be Hamilton's principal function, the classical action itself. This article is the strategic gateway to the whole Hamilton-Jacobi chapter: why one would want a trivial Hamiltonian, why the type-2 generator is the natural tool, what the trade costs (one nonlinear PDE in place of ordinary differential equations), and how the frozen constants are thawed back into a living trajectory by pure algebra. Master this one idea and the rest of the chapter — characteristic functions, separation of variables, action-angle variables — unfolds as variations on it.
- Hamilton-Jacobi theory solves dynamics by finding a canonical transformation to new variables that are all constants of the motion — the trajectory becomes a fixed point in the new chart.
- The tool is a type-2 generating function with transformed Hamiltonian ; demanding makes and automatic.
- The demand is the Hamilton-Jacobi equation — one nonlinear first-order PDE for the generator , bought at the price of abandoning ODEs.
- The new momenta are the integration constants of the complete integral; the new coordinates complete the constants a mechanics problem needs.
- Along the true motion : the generator that kills the Hamiltonian is the accumulated classical action — the explicit time dependence of supplies exactly the that cancels .
- Key idea: solving the Hamilton-Jacobi equation is equivalent to finding a canonical transformation whose generator kills the Hamiltonian — in the new coordinates , so all new variables are constant and the motion is reduced to algebra.
Where this lives today
The trivial-Hamiltonian idea did not retire with classical mechanics — it changed fields. In optimal control theory the exact same move (encode the whole solution family in one scalar function of state and time, then demand a PDE that makes the rest trivial) is the Hamilton-Jacobi-Bellman equation, the backbone of dynamic programming. Every time a quadrotor plans a minimum-energy path or a portfolio model prices a hedging strategy, a descendant of is being solved numerically. Modern reinforcement learning sits one step further down the same lineage: a value function is a principal function estimated by samples, and the Bellman backup is the discretized statement that a properly chosen scalar makes the remaining decision problem trivial. In 2026 the sharpest working edge is in robotics and autonomous systems, where Hamilton-Jacobi reachability analysis — solving the HJ PDE on a grid, or with neural PDE solvers for systems too high-dimensional for grids — certifies the safe operating envelope of drones and self-driving vehicles: the level sets of the computed are provable "cannot-crash" boundaries. The physicist's freeze-the-dynamics trick has become a safety certificate you can ship.
The physical picture
Watch a pendulum's phase point trace its oval in the plane. An observer using those coordinates has genuine work to do: the point moves, and predicting where it will be requires integrating Hamilton's equations. Now imagine an observer whose coordinate grid is itself carried along by the flow — a chart drawn on the moving fluid of phase space rather than on the container. To that observer the phase point never goes anywhere. It sits at the same grid intersection forever, because the grid deforms in perfect sympathy with the dynamics. All the motion has been absorbed into the dictionary between the two charts.
The Hamiltonian formulation makes this dream precise. In any canonical chart the motion is governed by some Hamiltonian; the question is only how simple that Hamiltonian can be made. There is a natural ladder here, and it is worth climbing consciously. One cyclic coordinate makes one momentum constant. If every coordinate were cyclic — only — every momentum would be constant and every coordinate would drift linearly in time; this is the destination of the action-angle construction. But there is one rung higher: make vanish identically. Then not even linear drift survives. Coordinates and momenta alike freeze, and the system's entire history is compressed into numbers.
Why does the top rung require a time-dependent generator? Because a time-independent canonical transformation can only reshuffle the energy surface, never flatten it: if , then takes the same values as before, and a nonzero Hamiltonian keeps generating motion. The extra term in the transformation law is the only lever that can cancel rather than merely disguise it. The generator must therefore change in time at exactly the rate the dynamics accumulates — and the quantity that does precisely that is the classical action. That the action would reappear here, as the demolition charge that levels the Hamiltonian, is the most elegant twist in classical mechanics. One more orientation point before the algebra. Freezing the motion does not destroy information — it relocates it. In the new chart the trajectory is a dead point, but the map back from to is time-dependent, and all the orbital richness lives in that map. Solving mechanics this way splits cleanly into two stages: a hard analytic stage (find the generator by solving one PDE) and a purely algebraic stage (differentiate , invert the relations). The Hamilton-Jacobi chapter is the study of when and how the hard stage can actually be carried out.
The demand that builds the theory
Everything rests on the type-2 transformation rules, established in Type-2 Generating Function and Generating Functions: the Four Types. A generator — old coordinates and new momenta as its arguments — defines the transformation implicitly and prescribes how the Hamiltonian changes:
where: — the type-2 generating function; — the old canonical pair; — the new pair; — the Hamiltonian that governs the new variables. The type-2 shape is the natural one for our program: we intend the new momenta to be constants, so a generator that takes those constants directly as arguments — and hands back the old momenta and new coordinates by differentiation — is exactly the right interface. (The near-identity structure of type-2 generators, giving the identity map, also means the construction deforms smoothly from "no transformation at all", which matters for perturbation theory later in the chapter.) Now impose the design goal. We want the new Hamiltonian to vanish for all values of the new variables and all times. Renaming the sought generator , equation (1) turns the demand into a closed condition on alone:
where: — Hamilton's principal function, the type-2 generator that achieves ; the constants label the family of solutions and play the role of the new momenta . Equation (2) is the Hamilton-Jacobi equation, treated in full as the flagship of this chapter (Hamilton-Jacobi Equation). Notice what happened structurally: the momenta in have been replaced by gradients of an unknown scalar. One function of variables now carries the entire dynamical problem. The counting deserves a hard look, because it is the honest price tag of the method. Hamilton's equations are first-order ODEs — hard work, but of a familiar kind. Equation (2) is a single first-order PDE, generally nonlinear because is typically quadratic in the momenta and hence quadratic in . Trading ODEs for one nonlinear PDE is not obviously progress; for a generic Hamiltonian it is a strictly worse deal. The trade pays off in exactly one circumstance: when the PDE separates into independent one-dimensional problems, each solvable by a single quadrature. When it does — and Separation of Variables in Hamilton-Jacobi Theory maps out when that happens — the method becomes the most powerful integration engine classical mechanics possesses. What must a useful solution of (2) look like? Not the general solution, which involves arbitrary functions, but a complete integral: a solution depending on independent, nonadditive constants — one constant per coordinate, with independence meaning . That determinant condition is what lets the serve as honest new momenta and makes the implicit relations in (1) solvable. (An additive constant changes nothing, since only derivatives of appear; that is why the count is and not .) With a complete integral in hand, the new variables are constants and the trajectory is recovered by differentiation and inversion:
where: — the frozen new coordinates. The middle set of relations is the heart of the payoff: algebraic equations connecting the , the time , and constants. Solve them for — algebra, not integration — then substitute into the last relation to read off . Together are exactly the integration constants that second-order equations of motion demand: the count closes perfectly, which is the formal sign that no information was lost in the freezing.
Which equation answers which question
| you want | use | notes |
|---|---|---|
| the transformation rules and how relates to | eq. (1) | the type-2 interface — see Type-2 Generating Function |
| the PDE the generator must solve | eq. (2) | demanding ; the Hamilton-Jacobi equation |
| the trajectory once is known | eq. (3) | , then invert |
| what is physically | eq. (5) below | : the accumulated action |
| the conservative-system shortcut | eq. (6) below | ; see Time-Independent Hamilton-Jacobi Equation |
We are deriving the central logical chain of the article: that the single demand , imposed on a type-2 generator, simultaneously (a) produces the Hamilton-Jacobi PDE as the condition on the generator, and (b) guarantees that every new coordinate and momentum is a constant of the motion. The strategy is to write the transformed Hamiltonian, eliminate the old momenta using the type-2 relations so the condition involves the generator alone, and then let Hamilton's equations in the new chart deliver the freeze. The step to watch is the substitution order: the momenta inside must be replaced by before the vanishing is imposed — the PDE is a condition at every point of space, not along a single trajectory.
Step 1. Write the transformation law for the Hamiltonian with the generator named :
Why: this is the type-2 rule from eq. (1) — the new Hamiltonian differs from the old by the explicit time derivative of the generator, the one term through which a time-dependent transformation can inject or remove energy bookkeeping.
Step 2. Eliminate the old momenta. The type-2 relations give , so
Why this matters: is now expressed entirely in terms of the unknown function and its derivatives — the momenta have been dissolved into gradients of a scalar, which is what converts a phase-space condition into a PDE on configuration space extended by time.
Step 3. Impose the design demand at every point:
Why "at every point": we need to vanish as a function, for all in the domain, so that its partial derivatives — not merely its value — are zero. A function that vanishes identically has identically vanishing gradients; that is the property the next step consumes.
Step 4. Run Hamilton's equations in the new chart. Since the transformation is canonical, the new variables obey Hamilton's equations with Hamiltonian :
so and are constants — the entire new phase space is frozen, and the frozen values are the integration constants of the motion. Note: the count of constants closes exactly — constants come from the complete integral and conjugate constants from the relations , giving the integration constants that second-order equations of motion require.
Why the cancellation is even possible
There is something suspicious about . The Hamiltonian is (often) the energy — how can a coordinate change abolish the energy? The resolution is that is not obtained from by substitution alone; the extra term is an honest reassignment of bookkeeping, and the function whose time derivative can pace the dynamics exactly is the action. Along the actual motion, the generator obeys a remarkable identity. Take the total time derivative of along a trajectory (the are constants, so only and vary):
where: the first equality is the chain rule, the second uses together with the Hamilton-Jacobi equation , and the third is the inverse Legendre transformation. Integrated,
where: the integral runs along the true trajectory. The generator that trivializes the Hamiltonian is Hamilton's principal function — the classical action accumulated along the motion, studied as an object in its own right in Hamilton's Principal Function. This is why the cancellation works: grows at rate , so its explicit time dependence contributes exactly after the part is accounted to the coordinate dependence. The action is the unique ledger whose columns balance the Hamiltonian to zero.
Go deeper · Derivation B · 1 minThe generator that kills the Hamiltonian is the classical action
The goal is the identity along the true motion — the statement that Hamilton's principal function is the accumulated action, which explains why a generator with the right explicit time dependence can cancel entirely. The strategy is a two-line chain-rule computation into which the two defining properties of (the momentum relation and the Hamilton-Jacobi equation itself) are inserted. Watch one subtlety: the derivative is taken along a trajectory of the frozen family — the constants do not vary, so no terms appear.
Step 1. Chain rule along the motion with fixed:
Why the -terms are absent: the trajectory being followed is one member of the complete-integral family, on which each is a constant of the motion by construction — kills those chain-rule contributions.
Step 2. Insert the two defining relations of : the type-2 momentum relation , and the Hamilton-Jacobi equation in the form :
Step 3. Recognize the inverse Legendre transformation: . Hence
Why this closes the conceptual loop: the Lagrangian is the rate at which action accumulates; a generator that accumulates action therefore carries explicit time dependence at rate , of which the part is precisely what the transformation law needs to produce zero. *This identification of the principal function with the accumulated action is also consistent with the boundary-derivative relations and that arise from varying the action functional with movable endpoints.*
For conservative systems there is a standard first simplification that the rest of the chapter leans on. When , the time dependence of can be split off additively:
where: — Hamilton's characteristic function, and — the conserved energy, which joins (or generates) the constant set . The reduced, time-free PDE on the right is the Time-Independent Hamilton-Jacobi Equation, and the object — which generates its own, subtly different canonical transformation with rather than — is the subject of Hamilton's Characteristic Function. Here it is enough to note the division of labor: freezes everything; freezes the momenta and lets one clock-like coordinate run. Both live inside the same trivial-Hamiltonian program.
Limiting cases
| Case | Result | Meaning |
|---|---|---|
| conserved | time separates off; the reduced problem is the time-independent HJ equation for | |
| explicitly time-dependent | full required | no energy constant exists, but still freezes — the method survives where energy methods fail |
| separable system | the PDE splits into quadratures; the regime where the ODE-for-PDE trade wins outright | |
| free particle | the frozen constants are the momentum and initial position; inversion returns | |
| identity limit | at | the principal function grows out of the identity transformation — the freeze is a continuous deformation of "do nothing", the seed of canonical perturbation theory |
Worked examples
1 · A thrown ball, frozen and thawed (confidence builder)
A ball of mass moves vertically in uniform gravity, with . Its energy is and its frozen coordinate is (the constants conjugate to carry units of time here). Find the trajectory, the apex height, and the position and momentum at .
Step 1. Solve the Hamilton-Jacobi equation. Since is conserved, use with , so (upward branch) and , taking as the one constant.
Step 2. Freeze and differentiate. The conjugate constant is , using .
Step 3. Thaw by algebra. Solving the Step 2 relation: , and substituting into gives — the parabola of projectile motion, recovered without integrating a single equation of motion. The apex sits at , height .
Step 4. Evaluate at : (moving upward, speed ) and .
Step 5. Check the freeze. Energy: ✓. The two constants encode the whole flight: fixes the shape (apex height), fixes the timetable (when the apex occurs).
2 · A time-dependent force, where energy methods fail (exam level)
A particle of mass feels a linearly growing force with , so . Energy is not conserved and no characteristic function exists — the full principal function is required. Solve by Hamilton-Jacobi with the ansatz , then find and at given and .
Step 1. Insert the ansatz into the HJ equation . With and :
Step 2. Match coefficients — the equation must hold for all (the PDE is a pointwise identity, not an on-shell statement). Thus giving , and giving . The constant is the single new momentum.
Step 3. Freeze and differentiate: .
Step 4. Thaw: and . Sanity check against Newton: ✓, and , — the frozen constants are the initial conditions.
Step 5. Numbers at : and .
Step 6. The moral: with explicitly time-dependent there is no conserved energy, no , no energy-surface picture at all — yet still froze the system into two constants and returned the exact cubic trajectory. The trivial-Hamiltonian program is strictly more general than energy conservation.
Origins · 1 minWilliam Rowan Hamilton and how this was discovered
Hamilton arrived at mechanics through light. As Ireland's Astronomer Royal — appointed at 22, while still an undergraduate — he had reduced all of geometrical optics to the study of a single "characteristic function" whose partial derivatives encode every ray. In 1834-35 he transplanted the idea into dynamics: the motion of any system could likewise be compressed into one scalar function of endpoints and time, from which trajectories follow by differentiation. His contemporaries admired the economy but doubted the utility — the function seemed as hard to find as the motion it encoded. It took Jacobi's reworking to turn Hamilton's vision into a working method: the equation demanding that the transformed Hamiltonian vanish. Hamilton spent his later decades on quaternions, convinced they were his greatest legacy; posterity disagreed, and chose instead the optical-mechanical analogy that, a century later, guided Schrödinger to the wave equation of quantum mechanics.
Going further
References. Goldstein, Poole & Safko, Classical Mechanics, 3rd ed., Ch. 10 · Landau & Lifshitz, Mechanics, 3rd ed., §47 · Morin, Introduction to Classical Mechanics, Ch. 15 (Hamiltonian methods) · Taylor, Classical Mechanics, Ch. 13 · Arnold, Mathematical Methods of Classical Mechanics, §47 All equations are standard results of Hamilton-Jacobi theory. The key relations are: the type-2 transformation rule with and ; the Hamilton-Jacobi PDE obtained by imposing ; the free-particle result ; and the identity . Worked-example numbers on this page (apex , , ; cubic trajectory , ) follow directly from the boxed formulas.
Builds on: Hamilton-Jacobi Equation · Hamilton's Principal Function · Time-Independent Hamilton-Jacobi Equation Leads to: Hamilton's Characteristic Function · Action-Angle Variables · Separation of Variables in Hamilton-Jacobi Theory · Liouville Integrable Systems
If K is identically zero, the new phase space has no dynamics at all. Where did the motion physically go?
Into the transformation itself. The map between and generated by is time-dependent: at each instant it is a different canonical map. The point never moves, but the dictionary that translates it back to the old chart changes continuously, and the image of the fixed point sweeps out exactly the orbit . Nothing is lost — the dynamical information that used to live in the flow now lives, in full, in the -dependence of the map. This is the extreme endpoint of a familiar idea: an interaction picture in which all of the evolution has been absorbed into the frame.
Isn't demanding K = 0 circular? It feels like we defined the problem away by decree.
The demand is a design specification, not a solution — and it must be paid for. Writing produces a nonlinear PDE for the generator, and every ounce of difficulty in the original equations of motion reappears, concentrated, in that PDE. For a generic Hamiltonian the PDE is no easier than the ODEs; the decree buys nothing. The construction earns its keep only when the PDE has exploitable structure — above all when it separates into one-dimensional quadratures. So the correct reading is: Hamilton-Jacobi theory converts the question "can I integrate this motion?" into the sharper question "does this PDE separate?", which turns out to be the deeper and more answerable one.
Why do we need a complete integral with n constants rather than just any solution of the PDE?
Because the constants are load-bearing: they are the new momenta. A solution without enough independent constants — say the general solution built from an arbitrary function — cannot serve as a generating function of the required type, because the relations need genuine momentum-like arguments to differentiate against. Independence is the condition , which is exactly what the implicit function theorem needs to invert for the trajectory. An additive constant doesn't count (only derivatives of appear anywhere), which is why , not , constants are demanded.
Are the α's required to be the energy and momenta, or can I pick any constants I like?
Any independent constants of the complete integral will do — the identification is a labeling convention, not physics. If is a complete integral, so is for any invertible relabeling , and different choices give different (equally valid) frozen charts related by a further trivial canonical transformation. In practice one takes whatever constants the separation hands over — the energy, angular momentum components, separation constants — because they arrive for free. The action-angle construction is precisely a canonical choice of this freedom: pick the constants to be the action integrals , and the conjugate variables become angles with clean frequencies.
The worked example gave β the units of time. Shouldn't a coordinate have units of length?
There is no such requirement — canonical coordinates need not carry any particular dimension; only the product of a conjugate pair is constrained, since must have units of action. In the projectile example the new momentum was chosen as (joules), so its conjugate necessarily carries seconds: energy × time = action ✓. This pairing is general and meaningful — the variable conjugate to energy is always a time-like quantity, just as the variable conjugate to angular momentum is an angle. Reading off the units of is a quick sanity check that your differentiation of was correct.
How is this different from just using conservation laws to solve the problem?
Conservation laws freeze some combinations of variables; the trivial-Hamiltonian construction freezes all of them, including the ones no symmetry protects. The are constants of the motion that are generally not conserved quantities in the Noether sense — they mix coordinates, momenta and time explicitly (in the projectile example, ). The method manufactures them wholesale from the complete integral. That is also why it works for explicitly time-dependent Hamiltonians (worked example 2), where energy conservation fails but is still achievable: the construction never needed a symmetry, only a solvable PDE.
Does the freeze contradict Liouville's theorem — a whole orbit collapsing to a point?
No collapse occurs. Liouville's theorem concerns volumes of ensembles: a blob of initial conditions must keep its phase volume under canonical maps, and it does — the transformation is canonical at each fixed , so a blob in maps to a blob of equal volume in . What freezes is each individual point's motion, not the distinction between points. Two different initial conditions land on two different frozen points ; the ensemble's volume is untouched, merely at rest. In fact the frozen chart makes Liouville trivial: a static distribution obviously preserves its volume.
Which do I actually compute in practice — the principal function S or the characteristic function W?
For a conservative system, always : split and solve the reduced, time-free PDE (see Time-Independent Hamilton-Jacobi Equation); the split is where every textbook solution of Kepler, the oscillator and the top actually begins. The full is needed only when depends explicitly on time — driven systems, ramped fields (worked example 2) — where no conserved exists to split off. Conceptually, though, is the primary object: generates a transformation to a constant Hamiltonian (momenta frozen, one clock coordinate running), a slightly weaker freeze than the identically-zero of the principal function. The two pictures are developed side by side in Hamilton's Characteristic Function.