2.1.17Analytical Mechanics

Hamilton-Jacobi equation

1,938 words9 min readdifficulty · medium4 backlinks

1. The setup: canonical transformations (WHAT we lean on)

We use the type-2 generating function F2(q,P,t)S(q,P,t)F_2(q,P,t) \equiv S(q,P,t), which depends on old coordinates qq and new momenta PP. Its defining relations are pi=Sqi,Qi=SPi,K=H+St,p_i = \frac{\partial S}{\partial q_i}, \qquad Q_i = \frac{\partial S}{\partial P_i}, \qquad K = H + \frac{\partial S}{\partial t}, where K(Q,P,t)K(Q,P,t) is the new Hamiltonian (the "Kamiltonian").


2. Deriving the HJ equation from scratch (HOW)

Goal: choose SS so that the new Hamiltonian vanishes: K0K \equiv 0.

Why does K=0K=0 help? Hamilton's equations in the new variables are Q˙i=KPi,P˙i=KQi.\dot Q_i = \frac{\partial K}{\partial P_i}, \qquad \dot P_i = -\frac{\partial K}{\partial Q_i}. If K=0K=0 everywhere, then Q˙i=0\dot Q_i = 0 and P˙i=0\dot P_i = 0: all new coordinates and momenta are constants. Motion solved.

Why this step? We are deliberately "buying" trivial dynamics by demanding the strongest possible condition on KK.

Now impose K=0K=0 in K=H+S/tK = H + \partial S/\partial t: H ⁣(q1,,qn, Sq1,,Sqn, t)+St=0.H\!\left(q_1,\dots,q_n,\ \frac{\partial S}{\partial q_1},\dots,\frac{\partial S}{\partial q_n},\ t\right) + \frac{\partial S}{\partial t} = 0.

Why this step? We substituted pi=S/qip_i = \partial S/\partial q_i (the type-2 relation) into HH, turning every momentum into a derivative of SS. The result is the celebrated equation:

Figure — Hamilton-Jacobi equation

3. What is SS, physically?

Why this step? We used S/qi=pi\partial S/\partial q_i = p_i and S/t=H\partial S/\partial t = -H, then recognized piq˙iH=L\sum p_i\dot q_i - H = L (Legendre transform). This is the deep payoff: HJ unifies action, canonical transformations, and PDEs.


4. Time-independent case: separation of tt

If HH has no explicit time dependence, energy is conserved. Try the separation S(q,P,t)=W(q,P)Et.S(q,P,t) = W(q,P) - E\,t.

Why this step? Plugging in, S/t=E\partial S/\partial t = -E, so the HJ equation becomes H ⁣(q,Wq)=E.H\!\left(q,\frac{\partial W}{\partial q}\right) = E.


5. Worked Example A — Free particle (1D)

Hamiltonian: H=p22mH = \dfrac{p^2}{2m}.

Step 1. Write HJ: 12m(Sx)2+St=0.\dfrac{1}{2m}\left(\dfrac{\partial S}{\partial x}\right)^2 + \dfrac{\partial S}{\partial t} = 0. Why? Replace pS/xp\to \partial S/\partial x.

Step 2. Separate S=W(x)EtS = W(x) - E t: 12m(W)2=EW=2mE.\dfrac{1}{2m}(W')^2 = E \Rightarrow W' = \sqrt{2mE}. Why? Energy conserved, so peel off the time part.

Step 3. Integrate: W=2mExW = \sqrt{2mE}\,x, so S=2mExEt.S = \sqrt{2mE}\,x - Et.

Step 4. New coordinate is constant: take EE as the new momentum P=EP=E. Then Q=SE=m2Ext=constt0.Q = \frac{\partial S}{\partial E} = \sqrt{\frac{m}{2E}}\,x - t = \text{const} \equiv -t_0. Why? QQ is constant by construction (K=0K=0).

Step 5. Solve for xx: x=2Em(tt0)x = \sqrt{\dfrac{2E}{m}}\,(t - t_0) — uniform velocity v=2E/mv=\sqrt{2E/m}. ✅ Exactly the free particle.


6. Worked Example B — Harmonic oscillator (1D)

H=p22m+12mω2x2=E.H = \dfrac{p^2}{2m} + \dfrac12 m\omega^2 x^2 = E.

Step 1. W=2m(E12mω2x2)W' = \sqrt{2m\big(E - \tfrac12 m\omega^2 x^2\big)}. Why? Solve H(x,W)=EH(x,W')=E for W=W/xW'=\partial W/\partial x.

Step 2. S=2m(E12mω2x2)dxEtS = \int \sqrt{2m\big(E-\tfrac12 m\omega^2 x^2\big)}\,dx - Et.

Step 3. The conserved new coordinate: with P=EP=E, Q=SE=mdx2m(E12mω2x2)t=const.Q = \frac{\partial S}{\partial E} = \int \frac{m\,dx}{\sqrt{2m(E-\tfrac12 m\omega^2 x^2)}} - t = \text{const}. Why? Differentiate under the integral; /E\partial/\partial E pulls down mm.

Step 4. The integral evaluates (sub x=2E/mω2sinθx=\sqrt{2E/m\omega^2}\sin\theta) to 1ωarcsin ⁣(xmω22E)=t+const.\frac{1}{\omega}\arcsin\!\left(x\sqrt{\frac{m\omega^2}{2E}}\right) = t + \text{const}.

Step 5. Invert: x(t)=2Emω2sin(ωt+ϕ)x(t) = \sqrt{\dfrac{2E}{m\omega^2}}\,\sin(\omega t + \phi). ✅ The familiar oscillation with amplitude set by EE.


7. Common mistakes


8. Active recall

Recall Quick self-test (hide and answer)
  • What condition on the new Hamiltonian KK produces the HJ equation? → K=0K=0.
  • What is SS physically? → the action Ldt\int L\,dt.
  • How many constants in a complete integral for nn DOF? → nn (plus one trivial additive constant).
  • What replaces pip_i in HH? → S/qi\partial S/\partial q_i.
What does the Hamilton-Jacobi equation read in full?
H(q,S/q,t)+S/t=0H(q,\partial S/\partial q,t)+\partial S/\partial t = 0
What condition on the new Hamiltonian KK generates the HJ equation?
K0K\equiv 0, making all new coordinates and momenta constant.
What is Hamilton's principal function SS physically?
The action Ldt\int L\,dt evaluated along the actual trajectory.
Which generating-function type is used and what are its relations?
Type-2 F2=S(q,P,t)F_2=S(q,P,t), with pi=S/qip_i=\partial S/\partial q_i, Qi=S/PiQ_i=\partial S/\partial P_i, K=H+S/tK=H+\partial S/\partial t.
What is Hamilton's characteristic function WW and when is it defined?
W(q)W(q) from S=WEtS=W-Et, defined when HH is time-independent; satisfies H(q,W/q)=EH(q,\partial W/\partial q)=E.
For nn degrees of freedom, how many independent constants does a complete integral have?
nn non-trivial constants, identified with the new momenta Pi=αiP_i=\alpha_i.
For the free particle, what is SS?
S=2mExEtS=\sqrt{2mE}\,x - Et.
Why does K=0K=0 trivialize the motion?
Because Q˙=K/P=0\dot Q=\partial K/\partial P=0 and P˙=K/Q=0\dot P=-\partial K/\partial Q=0, so all new variables are constant.
Recall Feynman: explain to a 12-year-old

Imagine you must walk a complicated maze. Newton's way: feel the walls and push step by step. The Hamilton-Jacobi way: first draw a magic map where every point already has an arrow saying "go here next." Once you have that perfect map (SS), you never have to think — you just follow arrows and the maze solves itself. Building the magic map is hard (it's one big equation), but after that, walking is free. The arrows are the momenta, and the map's "height" is the total effort (action) to reach each point.


9. Connections

  • Canonical Transformations — HJ is the canonical transformation to constant variables.
  • Hamilton's Equations — the starting point; HJ replaces 2n2n ODEs with one PDE.
  • Action and Hamilton's PrincipleSS is the action; HJ is the PDE the action obeys.
  • Separation of Variables — the practical method to solve HJ for integrable systems.
  • Action-Angle Variables — built directly from WW for periodic motion.
  • Schrodinger Equation — the classical limit of QM reduces to HJ (ψeiS/\psi\sim e^{iS/\hbar}).

Concept Map

generated by

defining relations

gives

applied to

yields

substitute p into H

substitute into K equals H plus dS/dt

solved for

equals

is

Canonical transformation

Type-2 function S q,P,t

p equals dS/dq, Q equals dS/dP

New Hamiltonian K

Demand K equals 0

Q,P constant, dynamics trivial

Hamilton-Jacobi PDE

Principal function S

Action integral of L dt

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Dekho, Hamilton-Jacobi equation ka core idea bahut elegant hai. Newton bolta hai "force se chalo", Lagrange bolta hai "energy se", aur Hamilton phase space ki geometry use karta hai. HJ ek step aage jaata hai: hum ek aisa generating function SS dhoondhte hain jo coordinates ko aise naye coordinates (Q,P)(Q,P) me badal de jo bilkul move hi na karein — yaani Q˙=0\dot Q=0, P˙=0\dot P=0. Iske liye hum demand karte hain ki naya Hamiltonian K=0K=0 ho. Jaise hi yeh hota hai, saari dynamics ek hi PDE me simat jaati hai: H(q,S/q,t)+S/t=0H(q,\partial S/\partial q,t)+\partial S/\partial t=0. Yahi hai Hamilton-Jacobi equation.

Sabse khoobsurat baat: yeh SS koi random function nahi hai — yeh actually action hai, S=LdtS=\int L\,dt. Jab tum dS/dtdS/dt nikaalte ho trajectory ke along, toh wo pq˙H=L\sum p\dot q - H = L ban jaata hai. Matlab action khud apne differential law ko follow kar raha hai. Yeh wahi cheez hai jo aage chal ke Schrodinger equation se connect hoti hai (ψeiS/\psi \sim e^{iS/\hbar}), isliye yeh classical aur quantum ka pul hai.

Practically, jab HH time pe depend nahi karta, hum S=WEtS=W-Et likhte hain, jahan WW characteristic function hai aur EE energy. Phir H(q,W/q)=EH(q,\partial W/\partial q)=E solve karte hain. Free particle aur harmonic oscillator dono is method se 4-5 steps me exact solution de dete hain. Yaad rakho: nn degrees of freedom ke liye complete integral me nn constants aati hain, jo new momenta ban jaati hain — yahi sabse common galti hai ki log in constants ko ignore kar dete hain.

Go deeper — visual, from zero

Test yourself — Analytical Mechanics

Connections