BetaFree coursewareRewritten from MIT OpenCourseWareCC BY-NC-SA 4.0
Open CosmologyPhysics & cosmology, from high school to a graduate year

Canonical transformations and their generating functions

Hamiltonian mechanics allows changes of variables that mix coordinates and momenta, (q, p) → (Q, P), as long as the new variables obey Hamilton's equations with some new Hamiltonian K. Requiring Hamilton's principle to hold in both sets of variables means the two integrands differ by a total time derivative dF/dt. When F depends on half old and half new variables it generates the transformation: four basic types F₁(q, Q, t), F₂(q, P, t), F₃(p, Q, t), F₄(p, P, t), each with K = H + ∂F/∂t. Applied to the harmonic oscillator, a well-chosen transformation makes the new momentum P = E/ω constant and the new coordinate Q = ωt + δ a simple phase.

You need this first

Full reading path (145 pages)
  1. Vectors (8.01)
  2. Position and velocity in one dimension (8.01)
  3. Acceleration in one dimension (8.01)
  4. Motion in two dimensions and projectiles (8.01)
  5. Newton's laws of motion (8.01)
  6. Momentum and impulse (8.01)
  7. Conservation of momentum (8.01)
  8. Centre of mass and its motion (8.01)
  9. Relative velocity and recoil (8.01)
  10. Symmetry and Galilean invariance (8.033)
  11. The universal law of gravitation (8.01)
  12. Contact forces: the normal force and friction (8.01)
  13. Tension in ropes and the spring force (8.01)
  14. The derivative: slope of the tangent line and rate of change (18.01)
  15. Limits and continuity (18.01)
  16. Derivatives of sine and cosine, and the product and quotient rules (18.01)
  17. The chain rule and higher derivatives (18.01)
  18. Implicit differentiation and the derivatives of inverse functions (18.01)
  19. Exponentials and logarithms: the number e and its derivatives (18.01)
  20. Linear and quadratic approximations (18.01)
  21. Curve sketching with the first and second derivative (18.01)
  22. Sketching strategy and maximum–minimum problems (18.01)
  23. More max–min, and related rates (18.01)
  24. A ring on a string, and Newton's method (18.01)
  25. The mean value theorem and inequalities (18.01)
  26. Differentials and antiderivatives (18.01)
  27. Kinetic energy and work in one dimension (8.01)
  28. Work and kinetic energy in two and three dimensions (8.01)
  29. Conservative and non-conservative forces (8.01)
  30. Potential energy (8.01)
  31. Circular motion: polar coordinates, position and velocity (8.01)
  32. Uniform circular motion: centripetal acceleration, period and frequency (8.01)
  33. Circular motion: tangential acceleration and angular acceleration (8.01)
  34. Newton's second law and circular motion: banked turns and orbits (8.01)
  35. Circular motion dynamics: worked problems (8.01)
  36. Mechanical energy and energy conservation (8.01)
  37. Definite integrals and Riemann sums (18.01)
  38. The first fundamental theorem of calculus (18.01)
  39. Potential energy diagrams (8.01)
  40. Differential equations and separation of variables (18.01)
  41. Direction fields, isoclines and integral curves (18.03)
  42. Euler's method and better numerical methods (18.03)
  43. First-order linear equations and integrating factors (18.03)
  44. Substitutions: scaling, Bernoulli and homogeneous equations (18.03)
  45. Autonomous equations, critical points and stability (18.03)
  46. Complex numbers and complex exponentials (18.03)
  47. Indeterminate forms and L'Hôpital's rule (18.01)
  48. The second fundamental theorem of calculus (18.01)
  49. Improper integrals (18.01)
  50. Infinite series and convergence tests (18.01)
  51. Stacking blocks and Taylor series (18.01)
  52. The harmonic oscillator (8.03)
  53. Constant coefficients: steady state, superposition and sinusoidal input (18.03)
  54. Combining sine and cosine; models for first-order linear equations (18.03)
  55. Second-order linear equations with constant coefficients (18.03)
  56. Complex characteristic roots and damped oscillations (18.03)
  57. Damped free oscillators (8.03)
  58. Linear operators, the Wronskian and normalized solutions (18.03)
  59. Inhomogeneous equations, particular solutions and stability (18.03)
  60. Driven oscillators and resonance (8.03)
  61. Vectors and the dot product (18.02)
  62. Determinants and the cross product (18.02)
  63. Planes through three points, and matrices (18.02)
  64. Equations of planes and square systems (18.02)
  65. The geometry of linear equations (18.06)
  66. Elimination with matrices (18.06)
  67. Matrix multiplication and inverse matrices (18.06)
  68. Factorization into A = LU (18.06)
  69. Transposes, permutations and vector spaces (18.06)
  70. Properties of determinants (18.06)
  71. Determinant formulas and cofactors (18.06)
  72. Cramer's rule, the inverse matrix and volume (18.06)
  73. Column space and nullspace (18.06)
  74. Eigenvalues and eigenvectors (18.06)
  75. Coupled oscillators and normal modes (8.03)
  76. Coupled pendulums and beats (8.03)
  77. Driven coupled oscillators and symmetry (8.03)
  78. Symmetry and infinitely many oscillators (8.03)
  79. The beaded string and the wave equation (8.03)
  80. Particular solutions: the exponential input theorem (18.03)
  81. Resonance and beats (18.03)
  82. Introduction to Fourier series (18.03)
  83. Normal modes of a string and Fourier series (8.03)
  84. Travelling waves, energy and reflection (8.03)
  85. Sound waves (8.03)
  86. Parametric equations of lines and the cycloid (18.02)
  87. Velocity, acceleration and Kepler's second law (18.02)
  88. Functions of two variables and partial derivatives (18.02)
  89. Tangent planes, critical points and least squares (18.02)
  90. The second derivative test (18.02)
  91. Differentials and the chain rule (18.02)
  92. The gradient and directional derivatives (18.02)
  93. Lagrange multipliers (18.02)
  94. Non-independent variables (18.02)
  95. Double integrals (18.02)
  96. Double integrals in polar coordinates, and their uses (18.02)
  97. Change of variables in double integrals (18.02)
  98. Vector fields and line integrals (18.02)
  99. Fields: scalar, vector, gravitational and electric (8.02)
  100. Field lines, charging and electric dipoles (8.02)
  101. Electric fields of continuous charge distributions (8.02)
  102. Electric potential and potential energy (8.02)
  103. Gradient fields and path independence (18.02)
  104. Testing for gradient fields, potentials and curl (18.02)
  105. Green's theorem (18.02)
  106. Flux and the normal form of Green's theorem (18.02)
  107. Simply connected regions (18.02)
  108. Triple integrals and cylindrical coordinates (18.02)
  109. Spherical coordinates and gravitational attraction (18.02)
  110. Vector fields in space and flux through surfaces (18.02)
  111. Flux through graphs and the divergence theorem (18.02)
  112. Gauss's law (8.02)
  113. Conductors, capacitors and stored energy (8.02)
  114. Shielding, combining capacitors and dielectrics (8.02)
  115. Current, resistance and DC circuits (8.02)
  116. Rigid bodies and rotational kinematics (8.01)
  117. Moment of inertia (8.01)
  118. Torque and the cross product (8.01)
  119. Magnetic fields and the force on moving charges (8.02)
  120. Forces on currents and the Biot–Savart law (8.02)
  121. Magnetic dipoles: torque, energy and force (8.02)
  122. Levitation and Ampère's law (8.02)
  123. The divergence theorem, its proof and the diffusion equation (18.02)
  124. Line integrals, gradient fields and curl in space (18.02)
  125. Stokes' theorem (18.02)
  126. Stokes' theorem, path independence and div curl = 0 (18.02)
  127. Div and curl in physics: torque and Maxwell's equations (18.02)
  128. Faraday's law of induction (8.02)
  129. Eddy currents, transformers and magnetic materials (8.02)
  130. Measuring circuits and RC circuits (8.02)
  131. Self-inductance, LR circuits and magnetic energy (8.02)
  132. LC oscillations and damped RLC circuits (8.02)
  133. AC circuits, phasors and resonance (8.02)
  134. Displacement current, Maxwell's equations and light (8.02)
  135. Electromagnetic waves (8.03)
  136. The speed of light and the Michelson–Morley experiment (8.033)
  137. Deriving the Lorentz transformation (8.033)
  138. Time dilation, length contraction and the interval (8.033)
  139. Four-vectors, the Doppler effect and aberration (8.033)
  140. Doppler effect, aberration and the twin paradox (8.033)
  141. Geodesics and the calculus of variations (8.033)
  142. The brachistochrone and the hanging chain (8.033)
  143. Angular momentum of a point particle (8.01)
  144. Newton to Lagrange: inertial frames and the Euler–Lagrange equations (8.09)
  145. Hamiltonian mechanics: phase space, the Legendre transformation and a pendulum on a sliding support (8.09)
On this page · 8 sections
  1. The ideal: every coordinate cyclic
  2. Transformations in phase space
  3. What a canonical transformation must satisfy
  4. Generating functions of the first type
  5. The other three types
  6. Point transformations are canonical
  7. The harmonic oscillator, made cyclic
  8. Summary

Chapter 4 of Stewart's 8.09 notes turns from the Lagrangian to the Hamiltonian way of doing mechanics, with one question in mind: how much simpler can a problem become if we choose the right variables? The Lagrangian and Hamiltonian formalisms themselves were reviewed in Chapter 1 (Section 1.2 there covers Hamilton's equations). This page follows the notes' short introduction and Section 4.1 (notes pp. 60–65), in order, in its own words and with its own worked example.

The ideal: every coordinate cyclic#

Suppose we were lucky enough to find coordinates qiq_i that are all cyclic: none of them appears in the Hamiltonian. Then p˙i=−∂H/∂qi=0\dot p_i = -\partial H/\partial q_i = 0, so every momentum is a constant, pi=αip_i = \alpha_i. If HH itself is conserved, it is a function of these constants alone (notes p. 60):

A Hamiltonian of constant momenta only
H=H(α1,…,αn)H = H(\alpha_1, \ldots, \alpha_n)
In words

H equals H( alpha one, and so on, alpha sub n )

Source: 8.09 Chapter 4 notes (Stewart, typed, pp. 60–91), Introduction, eq. (4.1), p. 60

and Hamilton's other equation gives each coordinate a constant rate of change:

Every coordinate grows linearly
q˙i=∂H∂αi=ωi(α)⇒qi=ωit+δi\dot q_i = \frac{\partial H}{\partial \alpha_i} = \omega_i(\alpha) \quad\Rightarrow\quad q_i = \omega_i t + \delta_i
In words

q sub i dot equals partial H over partial alpha sub i equals omega sub i ( alpha ) which gives q sub i equals omega sub i t plus delta sub i

Source: 8.09 Chapter 4 notes (Stewart, typed, pp. 60–91), Introduction, eq. (4.2), p. 60

with constants δi\delta_i. Nothing could be simpler. The plan of the chapter is to hunt for changes of variables that make as many coordinates cyclic as possible. First we need to know which changes of variables are allowed.

Transformations in phase space#

In Lagrangian mechanics two kinds of change leave the Euler-Lagrange equations intact: a point transformation Q=Q(q,t)Q = Q(q, t) of the coordinates, with the Lagrangian rewritten in the new variables, and adding a total time derivative dF[q,t]/dtdF[q, t]/dt to the Lagrangian (notes pp. 60–61). The Hamiltonian formalism treats coordinates and momenta as independent, so it can afford more freedom: point transformations of the whole phase space,

A change of phase-space variables
Qi=Qi(q,p,t)andPi=Pi(q,p,t)Q_i = Q_i(q, p, t) \quad\text{and}\quad P_i = P_i(q, p, t)
In words

capital Q sub i equals capital Q sub i (q, p, t) and capital P sub i equals capital P sub i (q, p, t)

Source: 8.09 Chapter 4 notes (Stewart, typed, pp. 60–91), Section 4.1, eq. (4.3), p. 61

where the old variables obey Hamilton's equations,

Hamilton's equations
q˙i=∂H∂piandp˙i=−∂H∂qi\dot q_i = \frac{\partial H}{\partial p_i} \quad\text{and}\quad \dot p_i = -\frac{\partial H}{\partial q_i}
In words

q sub i dot equals partial H over partial p sub i and p sub i dot equals minus partial H over partial q sub i

Source: 8.09 Chapter 4 notes (Stewart, typed, pp. 60–91), Section 4.1, eq. (4.4), p. 61

Most such transformations scramble the equations of motion. The transformation is called canonical if the new variables obey equations of the same form, with some new Hamiltonian K(Q,P,t)K(Q, P, t) (eqs. (4.5)–(4.6)):

Hamilton's equations in the new variables
Q˙i=∂K∂PiandP˙i=−∂K∂Qi\dot Q_i = \frac{\partial K}{\partial P_i} \quad\text{and}\quad \dot P_i = -\frac{\partial K}{\partial Q_i}
In words

capital Q sub i dot equals partial capital K over partial capital P sub i and capital P sub i dot equals minus partial capital K over partial capital Q sub i

Source: 8.09 Chapter 4 notes (Stewart, typed, pp. 60–91), Section 4.1, eq. (4.6), p. 61

From here on a repeated index is summed over.

What a canonical transformation must satisfy#

Hamilton's equations follow from Hamilton's principle written in phase space: the integral of piq˙i−Hp_i\dot q_i - H between fixed end times is stationary. For the new variables to obey the new equations, the same must hold for PiQ˙i−KP_i\dot Q_i - K (eqs. (4.7)–(4.8)):

Hamilton's principle in the old and new variables
δ∫t1t2(piq˙i−H)dt=0,δ∫t1t2(PiQ˙i−K)dt=0\delta\int_{t_1}^{t_2}\left(p_i\dot q_i - H\right)dt = 0, \qquad \delta\int_{t_1}^{t_2}\left(P_i\dot Q_i - K\right)dt = 0
In words

delta the integral from t one to t two of the quantity p sub i q sub i dot minus H, d t equals 0, delta the integral from t one to t two of the quantity capital P sub i capital Q sub i dot minus capital K, d t equals 0

Source: 8.09 Chapter 4 notes (Stewart, typed, pp. 60–91), Section 4.1, eqs. (4.7)–(4.8), p. 61

Both statements hold together if the two integrands agree up to a constant factor λ\lambda and the time derivative of some function FF:

The condition linking the two integrands
λ (piq˙i−H)=PiQ˙i−K+F˙\lambda\,(p_i\dot q_i - H) = P_i\dot Q_i - K + \dot F
In words

lambda the quantity p sub i q sub i dot minus H, equals capital P sub i capital Q sub i dot minus capital K plus capital F dot

Source: 8.09 Chapter 4 notes (Stewart, typed, pp. 60–91), Section 4.1, eq. (4.9), p. 61

The extra term does no harm: its integral is F(t2)−F(t1)F(t_2) - F(t_1), and since the paths are varied with their end points held fixed, δF\delta F vanishes at both ends (eq. (4.10)). The factor λ\lambda sorts transformations into kinds (notes pp. 61–62):

  • λ=1\lambda = 1: a canonical transformation, the case studied from now on.
  • λ≠1\lambda \neq 1: an extended canonical transformation. It adds nothing new, because rescaling qq and pp brings it back to λ=1\lambda = 1.
  • If in addition QQ and PP do not depend on tt explicitly, the transformation is called restricted canonical.

All transformations here are assumed invertible, so that any two of the four sets q,p,Q,Pq, p, Q, P can serve as independent variables.

Generating functions of the first type#

When FF is written as a function of a mixture of old and new variables, it is called a generating function: it encodes the whole transformation. There are four basic choices. The first takes the old and new coordinates as the independent variables (eq. (4.11)), F=F1(q,Q,t)F = F_1(q, Q, t). Its total time derivative, by the chain rule, goes into the condition with λ=1\lambda = 1:

The condition for a type-1 generating function
piq˙i−H=PiQ˙i−K+∂F1∂t+∂F1∂qiq˙i+∂F1∂QiQ˙ip_i\dot q_i - H = P_i\dot Q_i - K + \frac{\partial F_1}{\partial t} + \frac{\partial F_1}{\partial q_i}\dot q_i + \frac{\partial F_1}{\partial Q_i}\dot Q_i
In words

p sub i q sub i dot minus H equals capital P sub i capital Q sub i dot minus capital K plus partial capital F one over partial t plus partial capital F one over partial q sub i, times q sub i dot plus partial capital F one over partial capital Q sub i, times capital Q sub i dot

Source: 8.09 Chapter 4 notes (Stewart, typed, pp. 60–91), Section 4.1, eq. (4.12), p. 62

Since qq and QQ are independent, their velocities can be varied independently, and the coefficients of q˙i\dot q_i, of Q˙i\dot Q_i and the remaining terms must match one by one:

Type-1 transformation
pi=∂F1∂qi,Pi=−∂F1∂Qi,K=H+∂F1∂tp_i = \frac{\partial F_1}{\partial q_i}, \qquad P_i = -\frac{\partial F_1}{\partial Q_i}, \qquad K = H + \frac{\partial F_1}{\partial t}
In words

p sub i equals partial capital F one over partial q sub i, capital P sub i equals minus partial capital F one over partial capital Q sub i, capital K equals H plus partial capital F one over partial t

Source: 8.09 Chapter 4 notes (Stewart, typed, pp. 60–91), Section 4.1, eq. (4.13), p. 62

The first two relations give pp and PP as functions of (q,Q,t)(q, Q, t) (eq. (4.14)); solving them gives the new variables in terms of the old. The third tells us the new Hamiltonian. (Eq. (4.13) in the notes prints the first relation with ∂Qi\partial Q_i in the denominator, a typo; the table on p. 64 has ∂qi\partial q_i.)

The notes give two quick examples (notes pp. 62–63). The function F1=−Q/qF_1 = -Q/q generates p=Q/q2p = Q/q^2 and P=1/qP = 1/q, that is Q=pq2Q = pq^2 and P=1/qP = 1/q (eqs. (4.15)–(4.17)). In the other direction, given a transformation one can test whether it is canonical by trying to build its F1F_1. For Q=ln⁡(p/q)Q = \ln(p/q) and P=−(q2/2+1) p/qP = -(q^2/2 + 1)\,p/q (eq. (4.18)), write p=qeQp = qe^Q, integrate ∂F1/∂q=qeQ\partial F_1/\partial q = qe^Q over qq to get 12q2eQ+g(Q)\tfrac{1}{2}q^2e^Q + g(Q), and fix the unknown function gg by demanding P=−∂F1/∂QP = -\partial F_1/\partial Q. It works with g=eQg = e^Q:

Generating function of the second example
F1=(q22+1)eQF_1 = \left(\frac{q^2}{2} + 1\right)e^{Q}
In words

capital F one equals the quantity q squared over 2 plus 1, e to the power capital Q

Source: 8.09 Chapter 4 notes (Stewart, typed, pp. 60–91), Section 4.1, eq. (4.22), p. 63

so that transformation is canonical.

The other three types#

The remaining choices pair old and new variables differently. To use the old coordinates and new momenta, take F=F2(q,P,t)−QiPiF = F_2(q, P, t) - Q_iP_i (eq. (4.23)). The subtracted product is there so that, after the chain rule, the terms in Q˙i\dot Q_i cancel and only q˙i\dot q_i and P˙i\dot P_i remain to be matched (eq. (4.24)). The result:

Type-2 transformation
pi=∂F2∂qi,Qi=∂F2∂Pi,K=H+∂F2∂tp_i = \frac{\partial F_2}{\partial q_i}, \qquad Q_i = \frac{\partial F_2}{\partial P_i}, \qquad K = H + \frac{\partial F_2}{\partial t}
In words

p sub i equals partial capital F two over partial q sub i, capital Q sub i equals partial capital F two over partial capital P sub i, capital K equals H plus partial capital F two over partial t

Source: 8.09 Chapter 4 notes (Stewart, typed, pp. 60–91), Section 4.1, eq. (4.25), p. 63

In the same way F=F3(p,Q,t)+qipiF = F_3(p, Q, t) + q_ip_i uses the old momenta and new coordinates (eq. (4.26)), and F=F4(p,P,t)+qipi−QiPiF = F_4(p, P, t) + q_ip_i - Q_iP_i the old and new momenta (eq. (4.27)). The notes collect all four in a table (p. 64), each with its simplest example:

Generating functionTransformationSimplest caseResult
F1(q,Q,t)F_1(q, Q, t)pi=∂F1/∂qip_i = \partial F_1/\partial q_i, Pi=−∂F1/∂QiP_i = -\partial F_1/\partial Q_iF1=qiQiF_1 = q_iQ_iQi=piQ_i = p_i, Pi=−qiP_i = -q_i
F2(q,P,t)F_2(q, P, t)pi=∂F2/∂qip_i = \partial F_2/\partial q_i, Qi=∂F2/∂PiQ_i = \partial F_2/\partial P_iF2=qiPiF_2 = q_iP_iQi=qiQ_i = q_i, Pi=piP_i = p_i
F3(p,Q,t)F_3(p, Q, t)qi=−∂F3/∂piq_i = -\partial F_3/\partial p_i, Pi=−∂F3/∂QiP_i = -\partial F_3/\partial Q_iF3=piQiF_3 = p_iQ_iQi=−qiQ_i = -q_i, Pi=−piP_i = -p_i
F4(p,P,t)F_4(p, P, t)qi=−∂F4/∂piq_i = -\partial F_4/\partial p_i, Qi=∂F4/∂PiQ_i = \partial F_4/\partial P_iF4=piPiF_4 = p_iP_iQi=piQ_i = p_i, Pi=−qiP_i = -q_i

Two lessons hide in the last column. F2=qiPiF_2 = q_iP_i is the identity, which makes type 2 the natural starting point for transformations close to the identity (Section 4.3 uses this). And F1=qiQiF_1 = q_iQ_i swaps coordinates and momenta, up to a sign: in Hamiltonian mechanics the labels "coordinate" and "momentum" are a matter of convention.

For every type the new Hamiltonian is

The new Hamiltonian
K=H+∂Fi∂tK = H + \frac{\partial F_i}{\partial t}
In words

capital K equals H plus partial capital F i over partial t

Source: 8.09 Chapter 4 notes (Stewart, typed, pp. 60–91), Section 4.1, eq. (4.28), p. 64

so a generating function without explicit time dependence leaves the Hamiltonian's value unchanged, K=HK = H (eq. (4.29)), only rewritten in the new variables. With several degrees of freedom one may also mix types, using, say, type 1 for one pair of variables and type 2 for another.

Point transformations are canonical#

A type-2 function linear in the new momenta (notes p. 64),

Generating a point transformation
F2=fi(q,t) PiF_2 = f_i(q, t)\,P_i
In words

capital F two equals f sub i (q, t) capital P sub i

Source: 8.09 Chapter 4 notes (Stewart, typed, pp. 60–91), Section 4.1, eq. (4.30), p. 64

gives new coordinates Qi=∂F2/∂Pi=fi(q,t)Q_i = \partial F_2/\partial P_i = f_i(q, t) that depend on the old coordinates only (eq. (4.31)): an ordinary change of coordinates, of the kind familiar from Lagrangian mechanics. Its other half fixes how the momenta must change along with it:

How the momenta follow a change of coordinates
pi=∂fj∂qi Pjp_i = \frac{\partial f_j}{\partial q_i}\,P_j
In words

p sub i equals partial f sub j over partial q sub i, times capital P sub j

Source: 8.09 Chapter 4 notes (Stewart, typed, pp. 60–91), Section 4.1, eq. (4.32), p. 64

which can be solved for the PjP_j. So every coordinate change, completed by the right momenta, is canonical. (The notes write the derivative as ∂fi/∂qj\partial f_i/\partial q_j with PjP_j, which is the transpose of what ∂F2/∂qi\partial F_2/\partial q_i gives; for a single coordinate the two agree.)

Worked example

A free particle in squared coordinates

A particle of mass m=2m = 2 kg moves freely along a line at v=3v = 3 m/s, so H=p2/(2m)H = p^2/(2m) and q=vtq = vt (taking q=0q = 0 at t=0t = 0). Use F2=q2PF_2 = q^2P to define new variables. Find QQ, PP and the new Hamiltonian KK, check that Hamilton's equations hold in the new variables, and evaluate everything at t=1t = 1 s.

The transformation

Q=∂F2/∂P=q2Q = \partial F_2/\partial P = q^2 and p=∂F2/∂q=2qPp = \partial F_2/\partial q = 2qP, so P=p/(2q)P = p/(2q). This is the point transformation f=q2f = q^2, valid for q>0q > 0.

The new Hamiltonian

F2F_2 has no explicit time dependence, so K=HK = H. With p=2qPp = 2qP and q2=Qq^2 = Q: K=(2qP)2/(2m)=2QP2/mK = (2qP)^2/(2m) = 2QP^2/m. The free particle now looks like a particle whose "kinetic energy" depends on its position: QQ is no longer cyclic. A poor choice of variables can make a problem harder, not easier.

Check Hamilton's equations

Along the motion Q=v2t2Q = v^2t^2 and P=mv/(2vt)=m/(2t)P = mv/(2vt) = m/(2t). Then Q˙=2v2t\dot Q = 2v^2t, and ∂K/∂P=4QP/m=4v2t2⋅m/(2t)/m=2v2t\partial K/\partial P = 4QP/m = 4v^2t^2\cdot m/(2t)/m = 2v^2t, which agrees. Also P˙=−m/(2t2)\dot P = -m/(2t^2), and −∂K/∂Q=−2P2/m=−m/(2t2)-\partial K/\partial Q = -2P^2/m = -m/(2t^2), which agrees too.

Numbers at t=1t = 1 s

q=3q = 3 m and p=mv=6p = mv = 6 kg m/s, so Q=9Q = 9 m² and P=6/(2×3)=1P = 6/(2 \times 3) = 1 kg/s. The energy is H=62/4=9H = 6^2/4 = 9 J, and K=2×9×12/2=9K = 2 \times 9 \times 1^2/2 = 9 J, the same value.

The harmonic oscillator, made cyclic#

Now a transformation that helps (notes pp. 64–65). Take the oscillator

Harmonic oscillator
H=p22m+kq22,k=mω2H = \frac{p^2}{2m} + \frac{kq^2}{2}, \qquad k = m\omega^2
In words

H equals p squared over the quantity 2 m, plus k q squared over 2, k equals m omega squared

Source: 8.09 Chapter 4 notes (Stewart, typed, pp. 60–91), Section 4.1, eq. (4.33), p. 64

Its energy is a sum of two squares, which suggests writing pp as a cosine and qq as a sine of a new variable QQ, with an amplitude set by a new momentum PP. With a constant α\alpha still to be chosen:

A trial transformation
p=α2mP cos⁡Q,q=αmω2mP sin⁡Qp = \alpha\sqrt{2mP}\,\cos Q, \qquad q = \frac{\alpha}{m\omega}\sqrt{2mP}\,\sin Q
In words

p equals alpha the square root of 2 m capital P cos capital Q, q equals alpha over the quantity m omega, times the square root of 2 m capital P sine capital Q

Source: 8.09 Chapter 4 notes (Stewart, typed, pp. 60–91), Section 4.1, eq. (4.34), p. 65

Substituting, H=Pα2(cos⁡2Q+sin⁡2Q)=Pα2H = P\alpha^2(\cos^2 Q + \sin^2 Q) = P\alpha^2 (eq. (4.35)). The new Hamiltonian does not contain QQ at all, and the new momentum is the energy divided by α2\alpha^2 (eq. (4.36)).

Is it canonical? Look for a type-1 generating function. Dividing the two relations gives p/q=mωcot⁡Qp/q = m\omega\cot Q (eq. (4.37)), so pp is known as a function of qq and QQ, and

Building the generating function
F1=∫p(q,Q) dq+g(Q)=12mωq2cot⁡Q+g(Q),P=−∂F1∂Q=mωq22sin⁡2Q−dgdQF_1 = \int p(q, Q)\,dq + g(Q) = \frac{1}{2}m\omega q^2\cot Q + g(Q), \qquad P = -\frac{\partial F_1}{\partial Q} = \frac{m\omega q^2}{2\sin^2 Q} - \frac{dg}{dQ}
In words

capital F one equals the integral of p(q, capital Q ) d q plus g( capital Q ) equals one half m omega q squared cot capital Q plus g( capital Q ), capital P equals minus partial capital F one over partial capital Q equals m omega q squared over the quantity 2 sine squared capital Q, minus d g over d capital Q

Source: 8.09 Chapter 4 notes (Stewart, typed, pp. 60–91), Section 4.1, eq. (4.38), p. 65

Choosing dg/dQ=0dg/dQ = 0 gives q2=2Psin⁡2Q/(mω)q^2 = 2P\sin^2 Q/(m\omega) (eq. (4.39)). This matches the trial transformation only if α2=ω\alpha^2 = \omega, that is α=ω\alpha = \sqrt{\omega}. With that choice the transformation is canonical, and

The new momentum
P=EωP = \frac{E}{\omega}
In words

capital P equals capital E over omega

Source: 8.09 Chapter 4 notes (Stewart, typed, pp. 60–91), Section 4.1, eq. (4.40), p. 65

Hamilton's equation for the new coordinate is now trivial, because K=H=ωPK = H = \omega P:

The new coordinate is a phase
Q˙=∂K∂P=ω⇒Q=ωt+δ\dot Q = \frac{\partial K}{\partial P} = \omega \quad\Rightarrow\quad Q = \omega t + \delta
In words

capital Q dot equals partial capital K over partial capital P equals omega which gives capital Q equals omega t plus delta

Source: 8.09 Chapter 4 notes (Stewart, typed, pp. 60–91), Section 4.1, eq. (4.41), p. 65

and substituting back gives the familiar solution:

The oscillator solved
q=2Emω2 sin⁡(ωt+δ),p=2mE cos⁡(ωt+δ)q = \sqrt{\frac{2E}{m\omega^2}}\,\sin(\omega t + \delta), \qquad p = \sqrt{2mE}\,\cos(\omega t + \delta)
In words

q equals the square root of 2 capital E over the quantity m omega squared, end of root, sine of the quantity omega t plus delta, p equals the square root of 2 m capital E cos of the quantity omega t plus delta

Source: 8.09 Chapter 4 notes (Stewart, typed, pp. 60–91), Section 4.1, eq. (4.42), p. 65

The notes record the final transformation for later use:

The oscillator's canonical transformation
q=2Pmω sin⁡Q,p=2mωP cos⁡Qq = \sqrt{\frac{2P}{m\omega}}\,\sin Q, \qquad p = \sqrt{2m\omega P}\,\cos Q
In words

q equals the square root of 2 capital P over the quantity m omega, end of root, sine capital Q, p equals the square root of 2 m omega capital P cos capital Q

Source: 8.09 Chapter 4 notes (Stewart, typed, pp. 60–91), Section 4.1, p. 65 (unnumbered)

In the old variables the motion runs round an ellipse in the (q,p)(q, p) plane; in the new ones it runs along a straight line, PP fixed and QQ increasing at the steady rate ω\omega. The graph below draws the ellipse from this transformation: PP sets its size, and QQ is the position around it. Section 4.6 returns to this picture: PP is the oscillator's action divided by 2π2\pi, and QQ its angle.

Phase-space orbits of the oscillator, computed from q=2P/mω sin⁡Qq = \sqrt{2P/m\omega}\,\sin Q and p=2mωP cos⁡Qp = \sqrt{2m\omega P}\,\cos Q as QQ runs from 0 to 2π2\pi. With m=1m = 1 kg and ω=2\omega = 2 per second, P=1P = 1 J s gives an ellipse with qq from −1 to 1 m and pp from −2 to 2 kg m/s, energy ωP=2\omega P = 2 J. The dashed orbit has P=0.5P = 0.5 J s.

That is the whole strategy of the chapter in miniature. The remaining difficulty is that we had to guess the transformation, and checking it meant an integration. Section 4.2 gives a test that needs only derivatives.

Summary#

  • A canonical transformation (q,p)→(Q,P)(q, p) \to (Q, P) keeps Hamilton's equations in force, with a new Hamiltonian KK. Hamilton's principle in both sets of variables requires piq˙i−H=PiQ˙i−K+F˙p_i\dot q_i - H = P_i\dot Q_i - K + \dot F.
  • A generating function FF of half old and half new variables encodes the transformation. The four types: F1(q,Q,t)F_1(q, Q, t), F2(q,P,t)F_2(q, P, t), F3(p,Q,t)F_3(p, Q, t), F4(p,P,t)F_4(p, P, t), each with K=H+∂F/∂tK = H + \partial F/\partial t.
  • F2=qiPiF_2 = q_iP_i is the identity; F1=qiQiF_1 = q_iQ_i exchanges coordinates and momenta. Every point transformation is canonical, through F2=fi(q,t)PiF_2 = f_i(q, t)P_i.
  • For the harmonic oscillator, q=2P/(mω)sin⁡Qq = \sqrt{2P/(m\omega)}\sin Q, p=2mωPcos⁡Qp = \sqrt{2m\omega P}\cos Q is canonical, gives K=ωPK = \omega P with P=E/ωP = E/\omega constant, and makes Q=ωt+δQ = \omega t + \delta a phase.
  • The aim of the chapter: find variables in which all coordinates are cyclic, so that the motion is trivial.

Symbols on this page

Show the 61 symbols used here
α\alpha alpha.
A constant in the oscillator's trial transformation; it is canonical only for α = √ω. Say it: “alpha”.
δ\delta delta.
The phase of the oscillator, Q = ωt + δ (in radians); in δ∫(…)dt and δF, a small variation of the path. Say it: “delta”.
λ\lambda lambda.
A constant factor in λ(p q̇ − H) = P Q̇ − K + Ḟ; λ = 1 for a canonical transformation. Say it: “lambda”.
π\pi pi.
The ratio of a circle's circumference to its diameter, π ≈ 3.14159. Say it: “pi”.
ω\omega omega.
The angular frequency of the harmonic oscillator, ω = √(k/m). Unit: rad/s. Say it: “omega”.
≠\neq not equal.
Is not equal to. Say it: “is not equal to”.
→\to arrow.
Goes to (tends to), or becomes. Say it: “goes to”.
⇒\Rightarrow implies.
Implies: what follows is a consequence of what came before. Say it: “which gives”.
×\times times.
Times (multiplication). Between two vectors: the cross product. Say it: “times”.
⋅\cdot dot.
Times (multiplication). Between two vectors: the dot product. Say it: “times”.
∂\partial partial.
Partial derivative: the rate of change with one variable, holding the others fixed. Say it: “partial”.
∫\int integral.
Integral: the sum of infinitely many small pieces, such as the area under a curve. Say it: “the integral of”.
sin⁡\sin sine.
Sine of an angle. Say it: “sine”.
cos⁡\cos cosine.
Cosine of an angle. Say it: “cos”.
cot⁡\cot cotangent.
Cotangent of an angle, cos/sin. Say it: “cot”.
ln⁡\ln natural logarithm.
Natural logarithm (base e ≈ 2.718). Say it: “log”.
HH H.
The Hamiltonian, a function of the coordinates, momenta and time. Unit: J. Say it: “H”.
kk k.
The spring constant of the oscillator, k = mω². Unit: N/m. Say it: “k”.
tt t.
Time. Unit: s (min for the tank). Say it: “t”.
dd d.
Marks an infinitesimal change, as in dq or dt; d/dt is a total time derivative. Say it: “d”.
ee e.
Euler's number, e ≈ 2.718, the base of the exponential. Say it: “e”.
mm m.
The mass of the particle. Unit: kg. Say it: “m”.
ff f.
The point transformation of the worked example, Q = f(q) = q². Say it: “f”.
gg g.
A function of Q alone, the 'constant' of integration when F₁ is found by integrating over q. Say it: “g”.
FF F.
A function whose total time derivative Ḟ is the difference between the old and new integrands; a generating function when it mixes old and new variables. Say it: “capital F”.
vv v.
The speed of the free particle in the worked example. Unit: m/s. Say it: “v”.
PP P.
The momentum conjugate to Q: a new momentum, after a canonical transformation. Say it: “capital P”.
QQ Q.
A new generalised coordinate, after a canonical transformation. Say it: “capital Q”.
qq q.
A generalised coordinate (the old coordinate when the variables are changed). Say it: “q”.
pp p.
The momentum conjugate to q (the old momentum when the variables are changed). Say it: “p”.
t1t_{1} t one.
The start of a time interval [t₁, t₂]. Unit: s. Say it: “t one”.
t2t_{2} t two.
The end of a time interval [t₁, t₂]. Unit: s. Say it: “t two”.
F1F_{1} F one.
A generating function of type 1, F₁(q, Q, t): old and new coordinates. Say it: “capital F one”.
F2F_{2} F two.
A generating function of type 2, F₂(q, P, t): old coordinates and new momenta. Say it: “capital F two”.
EE E.
The energy of the system. Unit: J. Say it: “capital E”.
KK K.
The new Hamiltonian K(Q, P, t), which gives Hamilton's equations in the new variables. Unit: J. Say it: “capital K”.
αi\alpha_{i} Tully–Fisher exponent.
The constant value of the i-th momentum when every coordinate is cyclic. Say it: “alpha sub i”.
pip_{i} p i.
The momentum conjugate to q_i (old variables). Say it: “p sub i”.
qiq_{i} q sub i.
The i-th generalised coordinate (old variables). Say it: “q sub i”.
qjq_{j} q sub j.
The j-th generalised coordinate (old variables). Say it: “q sub j”.
QiQ_{i} Q sub i.
The i-th new coordinate, after a canonical transformation. Say it: “capital Q sub i”.
α1\alpha_{1} alpha one.
The first of the constant momenta α_i. Say it: “alpha one”.
F4F_{4} F 4.
A generating function of type 4, F₄(p, P, t): old and new momenta. Say it: “capital F four”.
F3F_{3} F 3.
A generating function of type 3, F₃(p, Q, t): old momenta and new coordinates. Say it: “capital F three”.
fif_{i} f i.
The function giving the i-th new coordinate, Q_i = f_i(q, t), in a point transformation. Say it: “f sub i”.
PjP_{j} P j.
The j-th new momentum, after a canonical transformation. Say it: “capital P sub j”.
p˙i\dot{p}_{i} p i dot.
The rate of change dp_i/dt of the i-th momentum. Say it: “p sub i dot”.
q˙i\dot{q}_{i} q i dot.
The velocity dq_i/dt of the i-th coordinate. Say it: “q sub i dot”.
ωi\omega_{i} omega i.
The constant rate ∂H/∂α_i at which the cyclic coordinate q_i grows. Say it: “omega sub i”.
fjf_{j} f j.
The function giving the j-th new coordinate, Q_j = f_j(q, t), in a point transformation. Say it: “f sub j”.
FiF_{i} F i.
Any one of the four types of generating function F₁ to F₄. Say it: “capital F i”.
PiP_{i} P i.
The momentum conjugate to Q_i (new variables). Say it: “capital P sub i”.
Q˙i\dot{Q}_{i} Q i dot.
The rate of change dQ_i/dt of the i-th new coordinate. Say it: “capital Q sub i dot”.
P˙i\dot{P}_{i} P i dot.
The rate of change dP_i/dt of the i-th new momentum. Say it: “capital P sub i dot”.
q˙\dot{q} q dot.
The velocity dq/dt. Say it: “q dot”.
Q˙\dot{Q} Q dot.
The rate of change dQ/dt of the new coordinate. Say it: “capital Q dot”.
P˙\dot{P} P dot.
The rate of change dP/dt of the new momentum. Say it: “capital P dot”.
F˙\dot{F} F dot.
The total time derivative dF/dt of the function F. Say it: “capital F dot”.
F˙1\dot{F}_{1} F one dot.
The total time derivative dF₁/dt of the type-1 generating function. Say it: “capital F one dot”.
αn\alpha_{n} alpha n.
The last of the constant momenta α_i. Say it: “alpha sub n”.
δi\delta_{i} delta i.
The value of the cyclic coordinate q_i at t = 0. Say it: “delta sub i”.

Tap or click a symbol in a formula to see the same explanation. All symbols: symbols and notation.

Words on this page

Show the 44 words used here

New here

canonical transformation.
A change of coordinates and momenta together that keeps Hamilton's equations in the same form, with a new Hamiltonian.
generating function.
A function of old and new variables whose partial derivatives give a change of variables that is sure to be canonical.

Also used

Lagrangian.
A function of a system's coordinates, velocities and time, usually kinetic minus potential energy, from which its equations of motion follow. Explained in From a chain of masses to a fluid: fields, Eulerian variables and pressure.
Hamiltonian.
The energy of a system written as a function of its coordinates and momenta; in quantum mechanics, the operator for that energy. Explained in Hamiltonian mechanics: phase space, the Legendre transformation and a pendulum on a sliding support.
Hamilton's equations.
The equations of motion written as first-order equations for coordinates and momenta: each rate of change is a derivative of the Hamiltonian. Explained in Hamiltonian mechanics: phase space, the Legendre transformation and a pendulum on a sliding support.
p..
Page, in a reference to a source; pp. means pages, as in pp. 3–5.
cyclic.
Of a coordinate: absent from the Lagrangian or Hamiltonian, so the momentum that goes with it stays constant. Explained in Symmetry and conservation laws: cyclic coordinates, scaling, and when H is the energy.
momentum.
The quantity paired with a coordinate in Lagrangian and Hamiltonian mechanics: how the Lagrangian changes with that coordinate's rate of change. Explained in The Hamilton-Jacobi equation.
conserved.
Keeping the same total value as time passes, as energy and momentum do when nothing outside changes them. Explained in Conservation of energy.
rate of change.
How fast one quantity changes compared with another, often time: the change in the first divided by the change in the second. Explained in Rates of change and area under a graph.
change of variables.
Rewriting a problem in new variables suited to it; in an integral this needs a factor, the Jacobian, for how areas or volumes stretch. Explained in Change of variables in double integrals.
Euler–Lagrange equation.
The equation a path must satisfy to make an integral such as the action stationary; in mechanics, the equation of motion from a Lagrangian. Explained in Newton to Lagrange: inertial frames and the Euler–Lagrange equations.
point transformation.
A change from one set of coordinates to another, possibly depending on time, that leaves the Euler–Lagrange equations in the same form. Explained in Newton to Lagrange: inertial frames and the Euler–Lagrange equations.
total derivative.
An expression that is exactly the time or other derivative of one single function, so it can be integrated at once.
phase space.
The space of all possible states of a system, one axis for each coordinate and one for each momentum. Explained in Statistical mechanics and the microcanonical ensemble.
equation of motion.
The equation, usually from Newton's second law, that says how a system's position changes with time. Explained in The harmonic oscillator.
Eq..
Equation: followed by its number in the source, as in Eq. 3.12; Eqs. means equations.
Hamilton's principle.
The rule that a system moves along the path for which the action, the time total of its Lagrangian, is stationary. Explained in Newton to Lagrange: inertial frames and the Euler–Lagrange equations.
integral.
A sum of very many very small pieces, such as the area under a graph; it undoes taking a derivative. Explained in Rates of change and area under a graph.
integrand.
The function being integrated: the f(x) in ∫ f(x) dx. Explained in The logarithm from an integral, and areas between curves.
derivative.
The rate at which a function changes as its input changes: the slope of its graph at a point. Explained in Position and velocity in one dimension.
invertible.
Of a square matrix or operator: having an inverse that undoes it; for a matrix this happens exactly when its determinant is not zero. Explained in The geometry of linear equations.
chain rule.
The rule for the derivative of a function of a function: multiply the derivative of the outer one by that of the inner one. Explained in Circular motion: polar coordinates, position and velocity.
velocity.
How fast and in which direction something moves: the change in position in each unit of time. Explained in Speed and velocity.
integration.
Finding an integral: adding up very many small pieces, or finding an antiderivative. Explained in Differentials and antiderivatives.
degree of freedom.
One of the independent ways a system can move, counted by the number of coordinates needed to fix its position. Explained in Linearized gravity: dynamic sources and the true degrees of freedom.
linear.
Of a relation or equation: using only first powers of the unknowns, so doubling the cause doubles the effect and effects simply add. Explained in Solving and rearranging formulas.
transpose.
The matrix made by writing the rows of a matrix as columns, flipping it across its main diagonal. Explained in Planes through three points, and matrices.
kinetic energy.
The energy a body has because it is moving. Explained in Kinetic energy and the work–energy theorem.
energy.
A quantity, measured in joules, that a body or field has because of its motion, position or state; a closed system keeps its total. Explained in Conservation of energy.
amplitude.
The size of an oscillation or wave: the largest distance from its middle position, or the number multiplying the sine. Explained in Oscillations and simple harmonic motion.
ellipse.
An oval curve: the set of points whose distances from two fixed points, the foci, add up to the same total. Explained in Kepler's laws and orbits.
graph.
The picture of a function: the curve y = f(x) for one variable, or the surface z = f(x, y) for two. Explained in Graphs, straight lines and slope.
action.
A number given to a whole path of motion: the Lagrangian added up over time along that path. Explained in Action-angle variables: frequencies without solving the motion.
harmonic oscillator.
Anything that swings back and forth about a balance point with a restoring force proportional to how far it is pulled away, like a spring. Explained in The harmonic oscillator.

Academic

formalism.
A particular mathematical way of writing and working with a theory.
up to a constant.
Apart from a constant (or a sign, factor or phase): the two agree once that one difference is allowed for.
vanish.
To become zero; sometimes, of a fixed point or solution, to stop existing.
explicit.
Stated or written out directly and in full, with nothing left to be worked out.
assumption.
Something accepted as true, without proof, so that an argument or calculation can proceed; to assume is to accept it so.
typo.
A small typing mistake in a printed or written text.
convention.
An agreed choice, such as which direction counts as positive, that could have been made differently.
valid.
True or correctly applicable under the stated conditions.
trivial.
So simple or obvious that it needs no argument; in maths, also the obvious zero solution.

Tap or click a word, here or in the text, for its meaning in this lesson. All words: the glossary. How many words are marked in the text: Reading options (the “Aa” button).

Where this leads

In cosmology

Pages that build on this

Practise

Check your understanding

  1. A generating function F1(q,Q)F_1(q, Q) has no explicit time dependence. Which set of relations does it give?
  2. Which generating function produces the identity transformation Qi=qiQ_i = q_i, Pi=piP_i = p_i?
  3. The type-2 function F2=q2PF_2 = q^2P is applied to a free particle of mass 22 kg moving at 33 m/s. At the moment when q=3q = 3 m, what are QQ and PP?
  4. In the oscillator transformation q=2P/(mω) sin⁡Qq = \sqrt{2P/(m\omega)}\,\sin Q, p=2mωP cos⁡Qp = \sqrt{2m\omega P}\,\cos Q, what are the new Hamiltonian and Q˙\dot Q?
0 of 4 answered

Flashcards

1 / 5