Mechanicsundergraduategraduate

Hamilton's Canonical Equations

Also known as: Canonical equations · Hamiltonian flow

H is a landscape over phase space; states flow along its contour lines, position fed by momentum and momentum drained by force.

q˙i=Hpi,p˙i=Hqi\dot{q}_i = \frac{\partial H}{\partial p_i}, \qquad \dot{p}_i = -\frac{\partial H}{\partial q_i}
Live simulation
warming up the physics…

Live phase portrait of the harmonic oscillator: a grid of arrows shows the Hamiltonian vector field (p/m, −kq), while a state point with a fading trail rides the flow around its ellipse.

Equivalent forms

q˙=pm,p˙=kq  (SHO)\dot{q} = \frac{p}{m}, \quad \dot{p} = -kq \;\text{(SHO)}
z˙={z,H}\dot{z} = \{z, H\}
One asymmetric minus sign generates all of conservative dynamics — and makes phase-space flow incompressible.