Skip to main content

Physics Library

Free Physics Study Material for CSIR NET, IIT JAM, GATE, JEST & TIFR

by Pravegaa Education
Chapter 10

Hamiltonian Formulation

Theory, worked examples and 15 previous-year questions with full solutions — IIT JAM, GATE, JEST and CSIR NET-JRF, 2020 onwards.

Theory

10.1 From the Lagrangian to the Hamiltonian

The Lagrangian formulation describes a system with \(n\) degrees of freedom by \(n\) generalized coordinates \(q_1,\dots,q_n\) and yields \(n\) second-order differential equations for them. Hamilton’s reformulation of mechanics replaces these by \(2n\) first-order equations for \(2n\) independent variables, namely the coordinates \(q_i\) and the generalized momenta \(p_i\). Nothing new is added to the physics, but the change of variables reveals a symmetry between coordinates and momenta that underlies canonical transformations (Chapter 11), statistical mechanics and the passage to quantum mechanics.

The momentum conjugate to \(q_i\) is defined from the Lagrangian \(L(q_i,\dot q_i,t)\) as

\[\boxed{p_i=\frac{\partial L}{\partial \dot q_i}},\qquad i=1,\dots,n.\]

It is called the canonical momentum, or the momentum conjugate to \(q_i\). Its dimensions depend on those of \(q_i\): when \(q_i\) is a length, \(p_i\) is a linear momentum, and when \(q_i\) is an angle, \(p_i\) is an angular momentum. With this definition the Lagrange equations \(\frac{d}{dt}\frac{\partial L}{\partial\dot q_i}-\frac{\partial L}{\partial q_i}=0\) take the compact form \(\dot p_i=\partial L/\partial q_i\).

The Hamiltonian of the system is defined by

\[\boxed{H(q_i,p_i,t)=\sum_{i=1}^{n}p_i\dot q_i-L(q_i,\dot q_i,t)},\]

in which every generalized velocity \(\dot q_i\) on the right-hand side is to be expressed in terms of \((q_j,p_j,t)\) by inverting the \(n\) relations \(p_i=\partial L/\partial\dot q_i\). Numerically \(H\) is the same quantity whether it is written in terms of velocities or momenta, but as a function it must always be regarded as depending on \(q\), \(p\) and \(t\). The distinction matters, because Hamilton’s equations involve partial derivatives of \(H\) taken at constant \(p\), not at constant \(\dot q\).

(a) The Legendre transformation

The passage from \(L\) to \(H\) is an example of a Legendre transformation, which replaces a variable by the derivative of a function with respect to it. Consider a function \(f(x)\) and define the new variable \(u=df/dx\). The function

\[g(u)=ux-f(x),\]

with \(x\) eliminated in favour of \(u\), satisfies \(dg=u\,dx+x\,du-f'(x)\,dx=x\,du\), so that \(dg/du=x\). The roles of the two variables are therefore exchanged symmetrically: \(u=df/dx\) and \(x=dg/du\). The transformation is possible only if \(u=f'(x)\) can be solved uniquely for \(x\), which requires \(f''(x)\neq0\). Thermodynamics uses the same construction to pass from the internal energy \(U(S,V)\) to the enthalpy and to the free energies.

In mechanics the active variables are the velocities \(\dot q_i\), while \(q_i\) and \(t\) are passive. The momenta can be solved for the velocities only if the Hessian determinant

\[\det\left(\frac{\partial^2L}{\partial\dot q_i\,\partial\dot q_j}\right)\neq0.\]

A Lagrangian for which this determinant vanishes is called degenerate or singular. For example, a Lagrangian linear in a velocity gives a momentum that does not contain that velocity, and the Hamiltonian cannot be constructed by the elementary procedure. All the Lagrangians met in this book, apart from a few deliberately chosen examination exercises, are non-degenerate.

10.2 Hamilton's canonical equations

To find the equations of motion in the new variables we form the total differential of \(H\) in two ways. Regarded as a function of \((q_i,p_i,t)\),

\[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.\]

From the definition \(H=\sum_i p_i\dot q_i-L\), on the other hand,

\[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.\]

The terms in \(d\dot q_i\) cancel because \(p_i=\partial L/\partial\dot q_i\); this cancellation is precisely why \(H\) depends only on \(q\), \(p\) and \(t\). Using the Lagrange equations in the form \(\partial L/\partial q_i=\dot p_i\), the second expression becomes

\[dH=\sum_i\dot q_i\,dp_i-\sum_i\dot p_i\,dq_i-\frac{\partial L}{\partial t}dt.\]

Since the differentials \(dq_i\), \(dp_i\) and \(dt\) are independent, comparison of their coefficients in the two expressions gives

\[\boxed{\dot q_i=\frac{\partial H}{\partial p_i},\qquad \dot p_i=-\frac{\partial H}{\partial q_i}},\qquad \frac{\partial H}{\partial t}=-\frac{\partial L}{\partial t}.\]

The first \(2n\) relations are Hamilton’s canonical equations. They form a set of \(2n\) first-order equations, equivalent to the \(n\) second-order Lagrange equations; the last relation simply connects the explicit time dependence of \(H\) with that of \(L\). The first equation, \(\dot q_i=\partial H/\partial p_i\), expresses the generalized velocity in terms of the momentum and so reverses the definition of \(p_i\). The second, \(\dot p_i=-\partial H/\partial q_i\), is the dynamical equation, the generalized form of Newton’s second law.

As the simplest illustration, consider a particle of mass \(m\) moving along the \(x\)-axis in a potential \(V(x)\). Then \(L=\frac12m\dot x^2-V(x)\), \(p=m\dot x\) and

\[H=p\dot x-L=\frac{p^2}{m}-\frac{p^2}{2m}+V(x)=\frac{p^2}{2m}+V(x).\]

Hamilton’s equations give \(\dot x=p/m\) and \(\dot p=-V'(x)\), and eliminating \(p\) recovers Newton’s equation \(m\ddot x=-V'(x)\).

10.3 Constants of the motion

(a) Cyclic coordinates

A coordinate \(q_k\) that does not appear in the Lagrangian is called cyclic or ignorable. The Lagrange equation then gives \(\dot p_k=\partial L/\partial q_k=0\), so the conjugate momentum is conserved. The same statement follows at once from Hamilton’s equations: if \(q_k\) is absent from \(H\), then \(\dot p_k=-\partial H/\partial q_k=0\). A coordinate is absent from \(H\) exactly when it is absent from \(L\), since the partial derivatives satisfy \(\partial H/\partial q_k=-\partial L/\partial q_k\) for every \(k\).

The Hamiltonian treatment of a cyclic coordinate is particularly economical. Because \(p_k\) is a constant, say \(p_k=\alpha\), it enters \(H\) only as a parameter, and \(H\) then involves just the remaining \(2n-2\) variables. The cyclic coordinate itself is found afterwards by integrating \(\dot q_k=\partial H/\partial\alpha\). In the Lagrangian formulation, by contrast, \(\dot q_k\) generally still appears in \(L\) even though \(q_k\) does not.

(b) The time dependence of the Hamiltonian

The total time derivative of \(H(q,p,t)\) along a trajectory is

\[\frac{dH}{dt}=\sum_i\left(\frac{\partial H}{\partial q_i}\dot q_i+\frac{\partial H}{\partial p_i}\dot p_i\right)+\frac{\partial H}{\partial t}=\sum_i\left(\frac{\partial H}{\partial q_i}\frac{\partial H}{\partial p_i}-\frac{\partial H}{\partial p_i}\frac{\partial H}{\partial q_i}\right)+\frac{\partial H}{\partial t},\]

where Hamilton’s equations have been used. The sum vanishes identically, and therefore

\[\boxed{\frac{dH}{dt}=\frac{\partial H}{\partial t}=-\frac{\partial L}{\partial t}}.\]

Thus \(H\) is a constant of the motion whenever the Lagrangian, and hence the Hamiltonian, does not depend explicitly on time.

(c) When is the Hamiltonian the total energy?

Two separate questions must be kept apart: whether \(H\) is conserved, and whether \(H\) equals the total energy \(T+V\). The first is answered by Section 10.3(b). The second depends on the form of the kinetic energy.

Suppose the transformation from Cartesian coordinates to generalized coordinates, \(\mathbf r_a=\mathbf r_a(q_1,\dots,q_n)\), does not involve time explicitly; such constraints are called scleronomic. Then \(\dot{\mathbf r}_a=\sum_i(\partial\mathbf r_a/\partial q_i)\dot q_i\), and the kinetic energy

\[T=\frac12\sum_{i,j}M_{ij}(q)\,\dot q_i\dot q_j\]

is a homogeneous quadratic function of the velocities. By Euler’s theorem on homogeneous functions, \(\sum_i\dot q_i\,\partial T/\partial\dot q_i=2T\). If, in addition, the potential \(V\) does not depend on the velocities, then \(p_i=\partial T/\partial\dot q_i\) and

\[H=\sum_i p_i\dot q_i-L=2T-(T-V)=T+V.\]

Hence

\[\boxed{H=T+V\quad\text{if the constraints are scleronomic and } V=V(q)}.\]

When the constraints depend on time (rheonomic constraints), or when the coordinates are measured in a moving frame,

Continue reading — it's free

Register with your mobile number to unlock the full chapter and all 100+ chapters of the Physics Library.

Register / Login with OTP

Already registered? Use the same button — just verify your number.