Hamilton's Equations
The symmetric first-order equations that govern all of classical mechanics: \(\dot{q} = \partial H/\partial p\),\(\dot{p} = -\partial H/\partial q\). Together with Poisson brackets and canonical transformations, they reveal the algebraic heart of mechanics.
Historical Context
William Rowan Hamilton published his reformulation of mechanics in two landmark papers (1834-1835), "On a General Method in Dynamics." His key insight was to treat position and momentum as independent variables on equal footing, reducing the second-order Euler-Lagrange equations to a system of first-order equations. Carl Gustav Jacobi then developed the Hamilton-Jacobi equation (1837), showing how to solve Hamilton's equations by finding a single generating function.
Poisson had introduced his bracket in 1809, but its deep significance was recognized only after Hamilton's work. In the 20th century, Dirac showed that the Poisson bracket is the classical limit of the quantum commutator: \(\{f, g\} \to \frac{1}{i\hbar}[\hat{f}, \hat{g}]\). This correspondence is the foundation of canonical quantization.
1. Derivation of Hamilton's Equations
Starting from \(H(q, p, t) = \sum_i p_i \dot{q}_i - L(q, \dot{q}, t)\), we compute the total differential:
\[dH = \sum_i \dot{q}_i\,dp_i + \sum_i p_i\,d\dot{q}_i - \sum_i \frac{\partial L}{\partial q_i}dq_i - \sum_i \frac{\partial L}{\partial \dot{q}_i}d\dot{q}_i - \frac{\partial L}{\partial t}dt\]
Using \(p_i = \partial L/\partial \dot{q}_i\), the \(d\dot{q}_i\) terms cancel:
\[dH = \sum_i \dot{q}_i\,dp_i - \sum_i \frac{\partial L}{\partial q_i}dq_i - \frac{\partial L}{\partial t}dt\]
But since \(H = H(q, p, t)\), we also have:
\[dH = \sum_i \frac{\partial H}{\partial q_i}dq_i + \sum_i \frac{\partial H}{\partial p_i}dp_i + \frac{\partial H}{\partial t}dt\]
Comparing coefficients of \(dq_i\), \(dp_i\), and \(dt\):
Hamilton's Equations of Motion
\[\dot{q}_i = \frac{\partial H}{\partial p_i}\]
\[\dot{p}_i = -\frac{\partial H}{\partial q_i}\]
\[\frac{\partial H}{\partial t} = -\frac{\partial L}{\partial t}\]
These are \(2n\) first-order ODEs, equivalent to the \(n\) second-order Euler-Lagrange equations. The beautiful antisymmetry — a plus sign in the first equation, a minus sign in the second — is the hallmark of Hamiltonian mechanics.
2. Poisson Brackets
The Poisson bracket of two phase-space functions \(f(q, p, t)\) and\(g(q, p, t)\) is defined as:
\[\{f, g\} = \sum_{i=1}^n \left(\frac{\partial f}{\partial q_i}\frac{\partial g}{\partial p_i} - \frac{\partial f}{\partial p_i}\frac{\partial g}{\partial q_i}\right)\]
Fundamental Properties
- Antisymmetry: \(\{f, g\} = -\{g, f\}\)
- Linearity: \(\{af + bg, h\} = a\{f, h\} + b\{g, h\}\)
- Leibniz rule: \(\{fg, h\} = f\{g, h\} + g\{f, h\}\)
- Jacobi identity: \(\{f, \{g, h\}\} + \{g, \{h, f\}\} + \{h, \{f, g\}\} = 0\)
Fundamental Brackets
The canonical coordinates themselves satisfy:
\[\{q_i, q_j\} = 0, \quad \{p_i, p_j\} = 0, \quad \{q_i, p_j\} = \delta_{ij}\]
These are the classical analogs of the canonical commutation relations in quantum mechanics: \([\hat{q}_i, \hat{p}_j] = i\hbar\,\delta_{ij}\).
Equations of Motion in Bracket Form
Hamilton's equations can be written compactly as:
\[\dot{f} = \{f, H\} + \frac{\partial f}{\partial t}\]
for any phase-space function \(f\). In particular, \(\dot{q}_i = \{q_i, H\}\) and\(\dot{p}_i = \{p_i, H\}\). A quantity \(f\) is conserved if and only if\(\{f, H\} = 0\) and \(\partial f / \partial t = 0\).
3. Canonical Transformations
A canonical transformation is a change of phase-space coordinates \((q, p) \to (Q, P)\) that preserves the form of Hamilton's equations:
\[\dot{Q}_i = \frac{\partial K}{\partial P_i}, \quad \dot{P}_i = -\frac{\partial K}{\partial Q_i}\]
for some new Hamiltonian \(K(Q, P, t)\). Equivalently, a transformation is canonical if and only if it preserves all Poisson brackets:
\[\{Q_i, Q_j\} = 0, \quad \{P_i, P_j\} = 0, \quad \{Q_i, P_j\} = \delta_{ij}\]
Generating Functions
Canonical transformations can be generated by four types of generating functions:
The new Hamiltonian is \(K = H + \partial F/\partial t\). If \(F\) has no explicit time dependence, then \(K = H\) — the Hamiltonian is unchanged.
Example: Point Transformation
A simple coordinate change \(Q = Q(q, t)\) is canonical. The Type-2 generating function is \(F_2 = \sum_i P_i Q_i(q, t)\), which gives:
\(p_j = \sum_i P_i \frac{\partial Q_i}{\partial q_j}\) — the usual transformation law for conjugate momenta.
4. The Symplectic Structure
Hamilton's equations can be written in matrix form using the phase-space vector \(\mathbf{z} = (q_1, \ldots, q_n, p_1, \ldots, p_n)^T\):
\[\dot{\mathbf{z}} = J \cdot \nabla_z H, \quad J = \begin{pmatrix} 0 & I_n \\ -I_n & 0 \end{pmatrix}\]
The matrix \(J\) is the symplectic matrix. It satisfies\(J^2 = -I_{2n}\) and \(J^T = -J\). A transformation is canonical if and only if its Jacobian matrix \(M\) is symplectic: \(M^T J M = J\).
The symplectic structure gives phase space a natural geometry — symplectic geometry — that is fundamentally different from Riemannian geometry. The key object is the symplectic 2-form \(\omega = \sum_i dp_i \wedge dq_i\), which is closed (\(d\omega = 0\)) and non-degenerate. This structure is preserved by Hamiltonian evolution.
5. The Hamilton-Jacobi Equation
The Hamilton-Jacobi equation is the ultimate goal of Hamiltonian mechanics: find a canonical transformation that makes the new Hamiltonian \(K = 0\), so that all new coordinates and momenta are constants of motion.
We seek a Type-2 generating function \(S(q, P, t)\) (called Hamilton's principal function) such that \(K = H + \partial S/\partial t = 0\). Since \(p_i = \partial S/\partial q_i\), we get:
The Hamilton-Jacobi Equation
\[H\left(q_1, \ldots, q_n, \frac{\partial S}{\partial q_1}, \ldots, \frac{\partial S}{\partial q_n}, t\right) + \frac{\partial S}{\partial t} = 0\]
This is a first-order partial differential equation for \(S(q, t)\). A complete solution (containing \(n\) free constants \(\alpha_1, \ldots, \alpha_n\) besides the trivial additive constant) gives the complete solution to the mechanical problem.
Example: Free Particle
\(H = p^2/(2m)\). The HJ equation is \(\frac{1}{2m}\left(\frac{\partial S}{\partial x}\right)^2 + \frac{\partial S}{\partial t} = 0\).
Try \(S = \alpha x - \frac{\alpha^2}{2m}t\). Then \(p = \partial S/\partial x = \alpha\) and\(\frac{\partial S}{\partial \alpha} = x - \frac{\alpha}{m}t = \beta\) (constant).
This gives \(x = \beta + \frac{\alpha}{m}t\) — uniform motion with momentum \(\alpha\) and initial position \(\beta\).
Connection to Quantum Mechanics
The Hamilton-Jacobi equation is the classical limit of the Schrodinger equation. Writing \(\psi = A\,e^{iS/\hbar}\) and taking \(\hbar \to 0\), the Schrodinger equation reduces to the Hamilton-Jacobi equation. The wavefronts of \(\psi\)become the surfaces of constant \(S\), and the rays (particle trajectories) are perpendicular to these surfaces.
Python Simulation: Hamiltonian Dynamics and Phase Portraits
We solve Hamilton's equations for several systems, visualize phase portraits, verify Poisson bracket relations numerically, and demonstrate canonical transformations.
Hamilton Equations: Phase Portraits and Poisson Brackets
PythonClick Run to execute the Python code
Code will be executed with Python 3 on the server
Summary
- Hamilton's equations are \(2n\) first-order ODEs treating \(q\) and \(p\) symmetrically.
- Poisson brackets encode the algebraic structure of mechanics: \(\dot{f} = \{f, H\}\).
- The fundamental brackets \(\{q_i, p_j\} = \delta_{ij}\) become commutators in quantum mechanics.
- Canonical transformations preserve the Poisson bracket structure (symplecticity).
- The Hamilton-Jacobi equation reduces mechanics to solving a single PDE for the generating function \(S\).
- Symplectic integrators preserve phase-space structure and give superior long-time energy conservation.