Worked examples — Hamilton-Jacobi equation
Before symbols fly, four plain-word reminders (every symbol used below is one of these):
- = the energy expressed in coordinates and momenta (the Hamiltonian).
- = Hamilton's principal function; its slope in a coordinate is the momentum there: . Physically is the action .
- = the time-independent part of when energy is conserved: .
- = a new canonical momentum produced by the canonical transformation. The whole point of HJ is that these 's are constants of the motion. In every 1-DOF example below we let the conserved energy itself play that role, writing : energy is a constant, so it is the most natural "new momentum" to hand the machine.
The one recipe we repeat every single time:
- Write .
- If has no explicit : put , giving .
- Solve for each , integrate to get .
- Choose the constant energy as the new momentum , then set the new coordinate — this constant equation is the trajectory.
- Invert to get ; check.
The scenario matrix
Every problem the HJ method can throw belongs to one of these cells. The examples below are chosen so that together they hit all of them.
| Cell | What makes it different | Example |
|---|---|---|
| A. Separable, unbounded 1-DOF | motion runs off to infinity; any sign of momentum | Ex 1 (free particle, both directions) |
| B. Separable, bounded 1-DOF | turning points, oscillation; sign of flips | Ex 2 (oscillator, full period + both branches) |
| C. Degenerate / zero input | or vanishing force — the limiting case | Ex 3 ( free particle; constant-force limit) |
| D. Constant force (linear potential) | non-quadratic, unbounded one way, bounded other | Ex 4 (particle under gravity) |
| E. Multi-DOF additive separation | ; each coordinate its own constant | Ex 5 (2-D free particle) |
| F. Non-Cartesian / central force | separation in ; angular momentum as a constant | Ex 6 (central force, radial equation) |
| G. Real-world word problem | you must build from a story | Ex 7 (skier down a frictionless slope) |
| H. Exam twist — time-dependent | forbidden; must keep the term | Ex 8 (particle with a time-varying push) |
Ex 1 — Free particle, both directions (Cell A)
Forecast: guess before reading — a free particle should give a straight line with . Which sign does the method deliver?

The figure plots both solutions: the red line is the right-going particle () and the black line the left-going one (). Same energy, opposite slope — that is the story of this cell, and steps 1–4 build it.
- Write HJ, separate time. , so . Why this step? Energy is conserved (no explicit ), so and the PDE collapses to an algebraic equation for the slope . The is the whole point of this cell: can be either sign at the same energy — momentum squared loses direction, we restore it here.
- Integrate. , hence . Why? Integrating the slope rebuilds the function; the sign carries which way the particle goes.
- Constant new coordinate. Take (energy is the conserved new momentum). Then . Why? We demanded , so by Hamilton's equations : literally cannot change in time. A quantity frozen in time equals a constant, which we name — and that equation is the trajectory in disguise.
- Invert. Rearranging for gives . Why? We want position as a function of time, , so we isolate . The bracket shows is just the instant the particle passes the origin.
Verify: velocity , so ✅. Take : . Units: ✅. The two signs are the two lines in the figure (right-going in red, left-going in black).
Ex 2 — Harmonic oscillator, full period, both branches (Cell B)
Forecast: bounded means can only live where . Guess the turning points and the period before computing.

The figure shows the potential (black parabola) cut by the energy line ; the red band on the axis is the allowed region , and the two red dots where are the turning points. Watch that band as we compute — it is exactly the range the algebra permits.
- Solve for the slope. . Why? Solving for . The square-root is real only when , i.e. . Those two equalities are the turning points — the edges of the red allowed region in the figure.
- Sign of names the branch. Moving right ( increasing) uses ; after hitting the particle turns and uses . This is the bounded-case subtlety cell B exists to show.
- Constant coordinate. With , Why? Same logic; acts under the integral.
- Do the integral. Substituting gives . Why the ? Because the integrand is exactly the derivative of an arcsine — the geometry of a circle in phase space. In Action-Angle Variables this same integral becomes the angle variable.
- Invert. , amplitude . Why? We solved the previous line for by taking the sine of both sides (sine undoes arcsine); the leftover constant becomes the phase . This gives position as an explicit function of time.
- Period. One full loop (right branch and left branch) covers phase : . Why? The sine repeats when its argument advances by ; the elapsed time for that is . Both branches (out and back) together make exactly one such repeat.
Verify: at , — the particle stops at the turning point ✅. Energy: ✅. Numbers : , ✅.
Ex 3 — Degenerate input: and the vanishing case (Cell C)
Forecast: zero energy usually means "sitting still," but does the method agree for both systems?
- (a) Free particle, . , so : the particle is at rest anywhere. Why? with only kinetic energy forces . This is the degenerate edge of Cell A — velocity collapses to zero.
- (b) Oscillator, . , so the only allowed point is . Why? The allowed region shrinks to a single point — the oscillator sits at the bottom of its well, .
Verify: (a) constant gives , ✅. (b) , and ✅. Both degenerate limits are consistent with of Ex 1–2 (amplitude and speed both ).
Ex 4 — Constant force / linear potential (Cell D)
Forecast: this is projectile motion in 1-D — expect quadratic, a parabola in time. Unbounded downward-in-energy but with a top turning point when thrown up.

The figure plots the resulting height as a red downward parabola in time, with the black dot marking the peak where the particle momentarily stops. Steps 1–4 derive exactly that curve; glance back at the peak as we reach step 1's turning point.
- Slope. . Why? Solve for (isolate the momentum, since is always our first target). Real only for — the highest reachable height , the single turning point (bounded above, unbounded below): the signature of a linear potential, and the peak in the figure.
- Constant coordinate. With , Why? Because forces , so is frozen and equals a constant. Differentiating by the new momentum pulls the under the integral and drops a from the term.
- Integrate. . Why? Direct substitution ; the antiderivative appears.
- Set constant, solve. . Square and rearrange: Why? We want as a function of , so we isolate the square-root, square to remove it, then solve the linear-in- equation. The subtracted term is what bends the trajectory into the parabola of the figure.
Verify: , — constant downward acceleration ✅ (Newton's ). At , and : the peak ✅. Numbers : ✅.
Ex 5 — Multi-DOF additive separation (Cell E)
Forecast: each direction is an independent free particle, so guess splits into an -part plus a -part, each carrying its own constant.
- Assume the split. . Why? Because is a sum of independent pieces, the ansatz "one per coordinate" makes the PDE fall apart into separate equations — the core trick of multi-DOF HJ. Here and .
- Separate. . Set (a constant). Then . Why introduce ? An -only term equals a (+const) term for all only if each side is constant. Those constants are the new momenta — exactly the " constants" the parent note warned you not to forget.
- Integrate. , .
- Trajectory. gives ; likewise . Why? Each is a new momentum, so each is frozen () and equals a constant; isolating (and ) from those two constant equations gives the two uniform-motion lines.
Verify: speeds , give ✅. Numbers : , total ✅.
Ex 6 — Central force, separation in (Cell F)
Forecast: never appears in (only ), so guess its momentum is conserved — that constant should be angular momentum.
- Ansatz. , with , . Why? Same additive-separation idea as Ex 5, now in polar coordinates.
- Isolate . The -dependence enters only through . Since has no itself, must be constant; call it (angular momentum). So . Why this step? A coordinate absent from is cyclic; its momentum is automatically conserved — HJ makes this fall out as a separation constant.
- Radial equation. Substitute : Why? With handled, only remains — a 1-DOF problem with an effective potential . The matters here: the root is a particle moving outward ( increasing), the root a particle moving inward ( decreasing); a bound orbit uses both in turn, flipping sign at each radial turning point where the root vanishes.
- Result. ; the two constants are the new momenta.
Verify (special case , closest-approach turning point). For the turning point () sits at . Numbers : ✅. At that radius all energy is angular: ✅.
Ex 7 — Real-world word problem: the frictionless slope (Cell G)
Forecast: energy conservation says , independent of the angle. Will HJ reproduce that?

The figure sets the scene: the red dot is the skier partway down the black slope of angle , with the vertical height marked. The single coordinate we use, , runs along the slope from the start — step 1 turns this picture into a Hamiltonian.
- Build . Along the slope the drop per distance is , so height and potential . Thus . Why this step? The hardest part of a word problem is writing : pick the natural coordinate ( along the incline, as drawn) and express energy in it.
- Start conditions fix . At rest at the top: . Why? is a number set by the initial state.
- Slope of . (using ). Why? Solve for ; the cancels beautifully, leaving only the drop .
- Speed. . The vertical drop is , so .
Verify: at the bottom of a slope whose foot is at height , total vertical drop , giving — angle cancels, matching energy conservation ✅. Numbers : ✅. Units ✅.
Ex 8 — Exam twist: explicitly time-dependent (Cell H)
Forecast: because energy is not conserved (the force does time-dependent work), the trick from Ex 1–7 is forbidden. Expect to grow like .
- Why the shortcut fails. contains explicitly, so : the split assumes constant energy and is not allowed here. This is exactly the trap an exam sets.
- Full HJ. . Why? Keep the honest time term — with no conserved energy we must work with the full time-dependent PDE.
- Ansatz linear in . Try so . Why this shape? The force is uniform in (same everywhere), so the momentum should depend on time alone; a function first-degree in is the simplest whose -slope is -independent.
- Match. Substitute: . Collect the -term: . The rest: . Why? The equation must hold for all , so the coefficient of and the -free part must each vanish separately — one equation for , one for . Here is the integration constant (the momentum at ).
- Momentum and velocity. From and : Why? The type-2 relation gives directly; dividing by turns momentum into velocity, since for this kinetic term.
- Integrate to position. Integrating once in time: Why? We wanted , and velocity is ; integrating produces the cubic, with the starting position. The growing term is the fingerprint of a force that itself grows with time.
Verify: Newton says , so . From our : ✅. Numbers : , so and , matching ✅.
Wrap-up: every cell filled
Recall Which example covered which scenario?
Unbounded 1-DOF, both signs of ::: Ex 1 (Cell A) Bounded oscillation, turning points, period ::: Ex 2 (Cell B) Degenerate zero-energy limit ::: Ex 3 (Cell C) Linear potential (constant force) ::: Ex 4 (Cell D) Multi-DOF additive separation ::: Ex 5 (Cell E) Central force, cyclic angle, angular momentum constant ::: Ex 6 (Cell F) Real-world story where you must build H ::: Ex 7 (Cell G) Explicitly time-dependent H — no S=W−Et ::: Ex 8 (Cell H)