physics2u
Tier
⌕ Search ⌘K
Derivation

The Hamilton-Jacobi Equation

Statement

For a system with Hamiltonian H(q, p, t), there exists a canonical transformation to new coordinates that are all constants of motion, generated by Hamilton's principal function S(q1,…,qn, α1,…,αn, t). Requiring the transformed Hamiltonian to vanish yields the first-order partial differential equation H(q, ∂S/∂q, t) + ∂S/∂t = 0, whose complete integral reduces the dynamics to the algebraic inversion of 2n constants.

Why it matters

The Hamilton-Jacobi equation (HJE) is the deepest classical formulation of mechanics: instead of solving 2n coupled first-order ordinary differential equations, one seeks a single scalar field S over configuration space whose gradient is the momentum. When a complete integral can be found, the entire motion follows by differentiation and algebra, with no further integration. This is the natural home of separation of variables, action-angle coordinates, and adiabatic invariants.

It is also the bridge between particle and wave. The surfaces S = const behave exactly as wavefronts, with trajectories running orthogonal to them, and the substitution ψ ~ exp(iS/ℏ) turns the Schrödinger equation into the HJE at leading order in ℏ. Hamilton discovered this optical-mechanical analogy a century before it became the semiclassical (WKB) limit of quantum mechanics.

Assumptions
The Hamiltonian exists and is a well-defined function obtained from the Lagrangian by a Legendre transform; if the transform is singular (constrained systems) the momenta are not independent and one must use Dirac's constrained formalism before an HJE can be written. Phase space is smooth and simply connected on the region of interest so that a single-valued generating function can exist; on a non-trivial topology or across caustics S becomes multivalued. A canonical transformation of the F2(q, P, t) type is admissible i.e. the old and new coordinates q, P form an independent set (the Jacobian ∂(q,P)/∂(q,p) is non-degenerate); if not, a different generating-function type must be chosen. A complete integral is sought, not merely a general solution a complete integral carries n non-trivial constants αi; without completeness the constants βi = ∂S/∂αi cannot be inverted to give the trajectory.
Derivation
1
pi = ∂F2/∂qi,   Qi = ∂F2/∂Pi,   K = H + ∂F2/∂t
Standard relations for a type-2 generating function F2(q, P, t); K is the new Hamiltonian. Imported from canonical transformations. A
2
demand  K(Q, P, t) ≡ 0
A choice, not a theorem: we look for the particular transformation that makes the new Hamiltonian identically zero. This is the defining requirement of the method. B
3
i = ∂K/∂Pi = 0,   i = −∂K/∂Qi = 0
Hamilton's equations in the new variables. With K ≡ 0 every new coordinate and momentum is a constant: Qi = βi, Pi = αi. A
4
H(q, p, t) + ∂S/∂t = 0
Insert K = 0 into the third relation of Step 1 and rename the generator F2S, Hamilton's principal function. A
5
pi = ∂S/∂qi
The first relation of Step 1 with F2 = S. This eliminates the momenta as independent variables: they are now gradients of the single field S(q, t). A
6
H(q1,…,qn, ∂S/∂q1,…,∂S/∂qn, t) + ∂S/∂t = 0
Substitute Step 5 into Step 4. Every occurrence of pi is replaced by ∂S/∂qi, converting the 2n Hamilton ODEs into one first-order PDE in the n+1 variables (q, t) for the scalar S. C
7
S = S(q1,…,qn; α1,…,αn; t),   βi = ∂S/∂αi
A complete integral of the PDE depends on n independent constants αi (identified with the new momenta Pi) plus a trivial additive constant. The equations βi = ∂S/∂αi are algebraic in q and t; inverting them gives qi(t; α, β) — the full solution, obtained without further integration. C
Result
H(q1,…,qn,  ∂S/∂q1,…,∂S/∂qnt) + ∂S/∂t = 0

Reading. A single first-order, generally non-linear PDE for Hamilton's principal function S replaces the whole set of equations of motion. Its complete integral generates the trajectories by pure differentiation: pi = ∂S/∂qi gives the momenta, and βi = ∂S/∂αi gives the orbits. S is a field over configuration space, not a number; its level surfaces are the wavefronts of the motion.

Units check. S is an action, [S] = J·s. Then ∂S/∂t has units J·s / s = J, matching [H] = J; and ∂S/∂q has units J·s / m = kg·m/s, matching [p]. Every term in the equation carries units of energy. Consistent.

Limiting cases
  • Conservative system (∂H/∂t = 0): S separates as S = W(q, α) − E t, giving the time-independent HJE H(q, ∂W/∂q) = E = α1, with W Hamilton's characteristic function.
  • Fully separable system: S = Σi Si(qi, α) collapses the PDE into n decoupled ODEs — the route to action-angle variables and Liouville-integrable tori.
  • Free particle: S is linear in q, S = p·q − (p2/2m)t; the wavefronts are planes moving at the phase speed.
  • Semiclassical (ℏ → 0) limit: writing ψ = A exp(iS/ℏ), the leading order of the Schrödinger equation is exactly the HJE; the wave collapses onto classical rays.
Breaks when
  • Caustics and focal points. Where neighbouring trajectories cross, the map from initial conditions to (q, t) becomes singular: ∂2S/∂q2 diverges and S becomes multivalued. A single-valued smooth solution ceases to exist and one must patch branches (Maslov index) or add diffraction corrections.
  • Non-integrable / chaotic systems. A complete integral with n global single-valued constants requires n independent commuting invariants (Liouville integrability). Generic non-integrable Hamiltonians have no such global S; invariant tori are destroyed (KAM) and the method fails globally.
  • Deep quantum regime. The HJE is only the ℏ0 term of the WKB series. When the action varies on the scale of ℏ — near classical turning points, in tunneling, or for short de Broglie wavelength gradients — the neglected ℏ22-type terms dominate and the classical HJE is invalid.
  • Singular Legendre transform. If the Hamiltonian cannot be built (velocity-independent Lagrangian directions, gauge/constrained systems), pi = ∂S/∂qi over-determines the momenta and the plain HJE does not apply.
Failure modes
  • Confusing S the field with the action number. Hamilton's principal function S(q, t) is a field over configuration space; the action functional evaluated on one path is a number equal to S along the actual trajectory. They coincide only on-shell.
  • Keeping p independent after substitution. Once pi = ∂S/∂qi is inserted, the equation is a PDE for S(q, t) alone; treating p and q as separate variables double-counts degrees of freedom.
  • Dropping the ∂S/∂t term. Writing H = 0 instead of H + ∂S/∂t = 0; the whole method rests on K = 0, i.e. on that explicit time derivative.
  • Putting explicit t into W. In the conservative case W(q, α) carries no time dependence; all time sits in the −Et piece. Writing H(q, ∂W/∂q, t) is wrong.
  • Sign error in S = WEt. The energy term is subtracted (so that ∂S/∂t = −E cancels H = E). Writing +Et flips the sign of the momentum and the direction of motion.
  • Miscounting constants. A complete integral needs n non-trivial constants; the extra additive constant in S is physically irrelevant. Using n+1 "essential" constants over-parametrises the solution.
Discussion

The power of the HJE is that it trades a system of equations for one equation whose complete integral already contains every trajectory. The generating function S pushes all the dynamics into a canonical transformation to coordinates that simply stand still. In this frame "solving the motion" means differentiating a known function and inverting algebraic relations βi = ∂S/∂αi. This is why separable problems — the Kepler problem, the symmetric top, a charge in crossed fields — are solved so cleanly here: separability of S is exactly the existence of enough conserved αi, and it delivers action-angle variables directly.

The geometric content is the optical-mechanical analogy. Because p = ∇S, the momentum is everywhere normal to the surfaces S = const, so those surfaces act as wavefronts and the trajectories as rays orthogonal to them. The propagation of an S = const surface in time is governed by H + ∂S/∂t = 0, structurally identical to the eikonal equation (∇Φ)2 = n2ω2/c2 of geometrical optics. Hamilton built this correspondence for optics and mechanics alike; the constant-S fronts move at a phase velocity that is generally different from the particle (group) velocity, foreshadowing the two velocities of a quantum wave packet.

The deepest connection is to quantum mechanics. Substituting ψ = A(q, t) exp(iS(q, t)/ℏ) into the Schrödinger equation and grouping by powers of ℏ gives, at order ℏ0, exactly the Hamilton-Jacobi equation (1/2m)(∇S)2 + V + ∂S/∂t = 0, and at order ℏ1 the continuity equation ∂(A2)/∂t + ∇·(A2S/m) = 0 for the probability density. The classical action S is therefore the phase of the quantum wavefunction in the ℏ → 0 limit, and the neglected −(ℏ2/2m)∇2A/A term is precisely Bohm's quantum potential. WKB quantization, the Bohr-Sommerfeld rule ∮ p dq = (n + ½)2πℏ, and instanton tunneling rates all descend from this expansion.

Common misconceptions. Hamilton's principal function is not "the action of the true path" as a mere number — it is a field whose derivatives generate momenta and orbits; its value at a point equals the accumulated action only along the actual trajectory reaching that point. Nor is K = 0 a physical statement that energy vanishes: it is a bookkeeping choice for the transformed frame, in which the real energy still appears as the constant α1 = E. And separability is a property of a chosen coordinate system, not of the physics: the same problem may separate in one set of coordinates and not another.

Worked examples
1
Free particle in one dimension.  H = p2/2m
Set up the time-dependent HJE with p = ∂S/∂q. A
2
(1/2m)(∂S/∂q)2 + ∂S/∂t = 0
The Hamiltonian is time-independent, so separate S = W(q) − Et. A
3
(1/2m)(dW/dq)2 = E ⇒  dW/dq = √(2mE),  W = √(2mEq
Time-independent HJE; the identification α1 = E is the single constant. A
4
S = √(2mEqEt,   β = ∂S/∂E = q√(m/2E) − t
Differentiate the complete integral with respect to the constant E to get the orbit equation. B
5
q = √(2E/m) (t + β).  Take m = 2 kg, E = 4 J ⇒ √(2E/m) = √4 = 2 m/s
Invert for q(t); the prefactor is the speed v = √(2E/m). With q = 0 at t = 0, β = 0. A
q(t) = 2t  m ⇒  q(3 s) = 6 m

Reading. The HJE reproduces uniform straight-line motion at 2 m/s. The wavefronts S = const are planes advancing along q; the particle rides normal to them. Units: √(2E/m) = √(J/kg) = √(m2/s2) = m/s. Consistent.

1
One-dimensional harmonic oscillator.  H = p2/2m + ½2q2
Conservative, so use the time-independent HJE with S = W(q) − Et and α1 = E. A
2
(1/2m)(dW/dq)2 + ½2q2 = E
Solve for the momentum field. A
3
dW/dq = √(2mEm2ω2q2),   W = ∫ √(2mEm2ω2q2) dq
This is p(q) on the energy shell; positive root for the outgoing branch. B
4
β = ∂S/∂E = ∫ m dq / √(2mEm2ω2q2) − t = (1/ω) arcsin(ωq√(m/2E))t
Differentiate under the integral with respect to E; the standard integral gives an arcsine. Set β = const. C
5
q(t) = √(2E/2) sin(ω(t + β)).  Take m = 1 kg, ω = 2 rad/s, E = 8 J
Invert the arcsine for q(t); amplitude A = √(2E/2) = √(16/4) = 2 m. A
q(t) = 2 sin(2(t + β)) m ⇒ at β = 0, t = π/4 s: q = 2 sin(π/2) = 2 m

Reading. The HJE yields simple harmonic motion of amplitude 2 m and angular frequency 2 rad/s, reaching the turning point q = A where p = √(2mEm2ω2A2) = 0. Units: √(2E/2) = √(J·s2/kg) = √(m2) = m. Consistent.

Problems
  1. Write the time-dependent HJE for a particle of mass m in uniform gravity, H = p2/2m + mgz, and find z(t) by separation. Evaluate for m = 1 kg, g = 9.8 m/s2, E = 49 J, released from rest at the top.
    Solution HJE: (1/2m)(∂S/∂z)2 + mgz + ∂S/∂t = 0. Separate S = W(z) − Et: (1/2m)(dW/dz)2 = Emgz, so p = dW/dz = √(2m(Emgz)). Then β = ∂S/∂E = ∫ m dz/√(2m(Emgz)) − t = −(1/g)√(2(Emgz)/m) − t. Solving: Emgz = ½mg2(t + β)2, i.e. z(t) = E/mg − ½g(t + β)2. Released from rest means the turning point (top) is at t + β = 0, so β = 0 and z(t) = E/mg − ½gt2. Numerically E/mg = 49/(1·9.8) = 5 m, so z(t) = 5 − 4.9t2 m — free fall from a 5 m peak, reaching z = 0 at t = √(10/9.8) ≈ 1.01 s.
  2. For a free particle in three dimensions, H = (px2 + py2 + pz2)/2m, show that S separates additively and find W. Interpret the surfaces S = const.
    Solution Try S = Wx(x) + Wy(y) + Wz(z) − Et. The HJE becomes (1/2m)[(dWx/dx)2 + (dWy/dy)2 + (dWz/dz)2] = E. Each term depends on its own variable, so each derivative is a separation constant: dWx/dx = αx, etc., with αx2 + αy2 + αz2 = 2mE. Hence W = αxx + αyy + αzz = p·r, and S = p·rEt. The surfaces S = const are planes normal to p (the momentum p = ∇S is constant and orthogonal to them); as t advances they translate along p — plane wavefronts, exactly the free-particle de Broglie wave phase.
  3. Starting from H(q, p) with no explicit time dependence, prove that S = W(q, α) − Et solves the full HJE and reduces it to H(q, ∂W/∂q) = E.
    Solution With S = W(q) − Et we have ∂S/∂qi = ∂W/∂qi (independent of t) and ∂S/∂t = −E. Substituting into H(q, ∂S/∂q) + ∂S/∂t = 0 gives H(q, ∂W/∂q) − E = 0, i.e. H(q, ∂W/∂q) = E. This is consistent because the left side is time-independent while the only t-dependence sat in the −Et term, whose derivative supplied exactly the constant −E. The separation constant E is identified as α1, the conserved energy, confirming that time-translation symmetry is what makes the reduction possible (energy thread).
  4. Verify dimensionally that every term of the time-independent HJE for the oscillator, (1/2m)(dW/dq)2 + ½2q2 = E, carries units of energy, and confirm [W] = [S].
    Solution [W] = [S] = J·s (action), since W differs from S only by the term Et which has units J·s. Then [dW/dq] = J·s/m = kg·m/s = [p]; squaring and dividing by mass: (kg·m/s)2/kg = kg·m2/s2 = J. Second term: [2q2] = kg·(1/s)2·m2 = kg·m2/s2 = J. Right side [E] = J. All three terms are energies, and [W] = J·s matches the action dimension of Hamilton's principal function.
  5. A particle experiences a constant force, V(x) = −Fx (so H = p2/2mFx). Using the HJE, find x(t). Take m = 2 kg, F = 4 N, E = 0, starting at x = 0 with p = 0.
    Solution HJE (conservative): (1/2m)(dW/dx)2Fx = E, so p = dW/dx = √(2m(E + Fx)). Then β = ∂S/∂E = ∫ m dx/√(2m(E + Fx)) − t = (1/F)√(2m(E + Fx)) − t. Invert: E + Fx = F2(t + β)2/2m, i.e. x(t) = −E/F + (F/2m)(t + β)2. With E = 0 and p = 0 at x = 0 the turning point is t + β = 0, so β = 0 and x(t) = (F/2m)t2 = (4/4)t2 = t2 m. This is uniform acceleration a = F/m = 2 m/s2 (since x = ½a t2 = ½·2·t2), recovering Newton's second law. At t = 3 s, x = 9 m.