<<

Classical Examples (Hamiltonian Formalism)

Dipan Kumar Ghosh Physics Department, Indian Institute of Technology Bombay Powai, Mumbai 400076 October 16, 2016

1 Introduction

In Lagrangian formalism we described mechanical systems in terms of generalised coordi- nates and generalized velocities (qi, q˙i). An alternative formalism is to describe the system in terms of generalized coordinates and generalized momenta.

1.1 Legendre Transformation Going over from one set of independent variables to another is achieved by means of Legendre Transformation. We are already familiar with such transformation in ther- modynamics. Suppose we are working in a micro canonical ensemble in which we work with constant (N,V,E). A state function that depends on these variables is the entropy S which can be regarded as a function of (N,V,E). Alternatively, we could consider the E itself as a thermodynamic potential which is a function of (N,V,S). The prob- lem with a microcanonical ensemble is that it is difficult to keep total energy as constant. It is therefore desirable to have a canonical ensemble in which we use a different set of control parameter, viz. (N,V,T ) which can be easily achieved by keeping the system in thermal contact with a heat reservoir. The new state function which is appropriate to ∂E  this condition is the Helmholtz Free Energy F = E −TS. Note that T = . This ∂S V,N was an example of a Legendre transformation. Most experiments are performed under condition of fixed pressure rather than of constant volume. Instead one could think of a Legendre transform to enthalpy H = U + PV which is a function of (S,P,N). In this ∂E  case we observe that P = − . One can make yet another transformation where ∂V S,N

1 c D. K. Ghosh, IIT Bombay 2 we we take the control variable to be (T,P,N). We define in this case Gibb’s Free Energy

G(T,P,N) = H − TS = E + PV − TS = F + PV

All these are examples of Legendre of transformation. The essential idea behind Legendre transformation is to subtract off a conjugate pair to eliminate that variable. Suppose we have a system of spring with potential energy kx2/2 1 and thermal energy . The energy can be written as U(S, x) = kx2 + TS. Suppose we 2 ∂U wish to change the variable from x to the force F = − = −kx. The new energy ∂x function E(S,F ) can be written as follows:

E(S,F ) = U(S, x) − F x 1 = (TS + kx2) + kx2 2 3 = TS + F 2 2k The new energy function is the difference between the old function and the product of the old and the new variables. Mathematically, if f = f(x, y), we can write ∂f ∂f df = dx + dy ∂x ∂y = udx + vdy where ∂f ∂f u = , v = ∂x ∂y Suppose we wish to change over to a new set of control variables variable u and y, We define g = f − ux, where x is the variable going out and u (being the conjugate of x) is coming in. We then have

dg = df − udx − xdu = (udx + vdy) − (udx + xdu) = vdy − xdu

Note that dx does not appear in the above. We have ∂g ∂g x = − , v = ∂u ∂y

2 Legendre Transformation in Classical Mechanics- Hamilton’s Equations

We use essentially the same technique to go over from the Lagrangian description in terms of (q, q˙) to the Hamiltonian description in terms of (p, q). Recall that the canonically c D. K. Ghosh, IIT Bombay 3 conjugate is defined through ∂L pi = (1) ∂q˙i The definition (1) gives the known definition for the linear momentum in case of the Cartesian coordinates (p = mx˙) The Hamiltonian (which is the functional that corresponds to the thermodynamic potential ) is given in terms of the Lagrangian through X H = piq˙i − L (2) Note that we have X ∂L X ∂L dL = dq + dq˙ ∂q i ∂q˙ i i i i i X X = p˙idqi + pidq˙i (3) i i where we have used the Euler Lagrange equation d ∂L ∂L = dt ∂q˙i ∂q˙i which is equivalent to d ∂L pi = dt ∂qi to simplify the first term. Using the fact that ! X X X d piq˙i = q˙idpi + pidq˙i i i i and using (3), we can write X X X dH = d( piq˙i − L) = q˙idpi − p˙idqi i i i which gives the Hamilton’s Canonical Equations ∂H q˙i = (4a) ∂pi ∂H p˙i = − (4b) ∂qi

These are a set of 2n first order equations for 2n unknowns pi and qi which replace the n second order Lagrange equations. [Note that for Cartesian coordinates, in case ∂V of H = T + V , these give the standard equationsp ˙ = F = − and the velocity ∂x ∂T x˙ = = p/m]. ∂p The dynamics of a system with n generalized coordinates and n generalized momenta can be considered to take place in a 2n dimensional phase . A point in the at a particular represents the positions and momentum of all all the particles. As the system develops, the point in the phase space has a trajectory in this phase space. c D. K. Ghosh, IIT Bombay 4

2.1 Consider a system of n particles in a position dependent potential

1 X L = m q˙2 − V (q , q , . . . q ) 2 i i 1 2 n i

The moments are pi = miq˙i so that

1 X p2 H = i + V (q , q , . . . , q ) 2 2m 1 2 n i i Now,

dH X ∂H X ∂H ∂H = p˙ + q˙ + dt ∂p i ∂q i ∂t i i i i X ∂H ∂H X ∂H ∂H = − + ∂p ∂q ∂q ∂p i i i i i i = 0 where we have put the partial derivative of H with respect to time to be zero as the Hamiltonian does not have explicit time dependence. Thus for systems where the Hamil- tonian does not have explicit time dependence the total energy is conserved. If the energy is conserved, the trajectory in the phase space lies on 2n − 1 dimensional hyper surface.

2.2 Example: Simple Pendulum Take the reference of potential energy at the point of suspension. The Lagrangian is 1 L = ml2θ˙2 − mgl(1 − cos θ) 2

∂L 2 ˙ In this case, the canonical momentum p = pθ = = ml θ. The Hamiltonian is given ∂θ˙ by 1 p2 H = pθ˙ − L = ml2θ˙2 + (1 − mgl cos θ) = + (1 − mgl cos θ) 2 2ml2 c D. K. Ghosh, IIT Bombay 5

θ

l

l−lcos θ

For a conservative system such as the pendulum, the energy remains constant. In case of the pendulum, two types of motion is possible with a critical value of energy separating the two. If the energy is below the critical energy (which corresponds to the potential energy corresponding to the highest point (θ = π) of the trajectory the motion is oscillatory (though not necessarily simple harmonic). This is known as libration. When the energy exceeds the critical energy the pendulum executes rotational motion about the hinge.

The Hamilton’s equations are ∂H p˙ = − = −mgl sin θ ∂θ ∂H p θ˙ = = ∂p ml2

In the phase space(θ, p) a point corresponds to the state of the pendulum at a particular time and the state develops as per the above equations. The trajectory is called a flow. c D. K. Ghosh, IIT Bombay 6

We represent the flow by means of phase portraits, which shows the way the momentum (or the velocity) of the phase points change as we go away from a fixed point. Fixed point of a trajectory is a point at which the velocity of the phase point is zero. Such points are equilibrium points of the differential (Hamilton’s) equation. Fixed points are of two types: stable and unstable. Stable fixed points (also called attractors or sink) are points where the flow is moving towards the fixed points and unstable fixed points (repellers or sources) are those at which the flow is moving away from the fixed points. (There are also saddles where the flow is attracted in one direction are is repealed in another. There are also stable orbits which correspond to periodic solutions of the differential equation, which need not pass through the fixed points).

The phase plot for different values of energy are shown (figure from web) with the blue curve having pointed edges representing the critical curve separating the libration and rotation. It is known as the separatrix of the motion.

We have chosen x axis as θ and the y axis as p = ml2θ˙. For convenience, let us scale by taking ml2 = 1 so that θ˙ = p and

p2 H(θ, p) = − a2θ 2 √ where a = mgl. dx dp Thus = θ˙ = p/ml2 = p and = −mgl sin θ ≡ −a2 sin θ. If the particle is at dt dt (x, p), it has a velocity (x, ˙ p˙) = (p, −a2 sin θ). Our analyses starts by determining the region of the phase plane where dx/dt = 0, > 0 or < 0. On the x-axis p = 0, i.e. θ˙ = 0, i.e. there is no horizontal component. In the upper half plane p > 0 so that θ˙ > 0 so that θ increases with time and the trajectory moves rightward. The phase space is 2n dimensional. We can choose such that the first n components of a phase space vector (known as the “state vector”) are the n generalized coordinates followed by n components c D. K. Ghosh, IIT Bombay 7

q which are the conjugate momenta. Let us represent the state vector by ξ = . If H p is time independent, the level surfaces of H form 2n − 1 dimensional hypersurface in the ∂H phase space. The normal to the level surface is along the gradient . Thus the phase ∂ξ velocity vector is orthogonal to it,

2n 2n X ∂H X  ∂H ∂H ξ˙ = q˙ +p ˙ i ∂ξ i ∂q i ∂p i=1 i=1 i i n X = − (q ˙i(−p˙i) +p ˙iq˙i)) = 0 i=1 Thus the velocity vector is tangential to the level surface. This is similar to what happens in an incompressible fluid. Since the density remains constant,the equation of continuity ∂ρ + ∇ · (ρ~v) = 0 ∂t gives ∇ · v = 0, i.e. the velocity is divergenceless. This is known as Liouville Theorem. A consequence of the theorem is that the phase space volume remains constant though the shape of the region might change. We show below that for a Hamiltonian system, the Liouville Theorem is valid.

Consider a phase space volume dx0 at time t = 0− over an infinitesimal time dt. The trajectories evolve with time following Hamilton’s equations and the phase points are located in a volume element dxt at time t

p

dx t

dx 0

q

Since the solution of Hamilton’s equation depends on initial condition, the state vector at time t would depend on the state vector at time t = 0

ξt = ξt(ξ0) = ξt(q10, q2,0, . . . , qn,0, p1,0, p2,0, . . . , pn,0)

The transformation of state vector from time t = 0 to time t is thus like a coordinate transformation in the phase space from time t = 0 to time t and the phase space volume c D. K. Ghosh, IIT Bombay 8

transforms according to dξt = J(ξt, ξ0)dξ0 with

∂(q1,t, q2,t, . . . , qn,t, p1,t, p2,t, . . . , pn,t) J(ξt, ξ0) = ∂(q1,0, q2,0, . . . , qn,0, p1,0, p2,0, . . . , pn,0) Jacobian is the determinant of a matrix M i Tr ln M ∂ξt J = det M = e with Mi,j = j ∂ξ0 Differentiate J   n n dJ dM X X dMi,j = Tr M −1 eTr ln M = J (M −1) dt dt i,j dt i=1 j=1

i −1 −1 ∂x0 Since M is the inverse transformation from time t to time t = 0, we have Mi,j = j ∂xt j dMi,j ∂x˙ t and = i dt ∂x0 n n j n n n j dJ X X ∂xi ∂x˙ X X X ∂xi ∂x˙ ∂xk = J 0 t = J 0 t t dt j ∂xi j ∂xk ∂xi i=1 j=1 ∂xt 0 i=1 j=1 k=1 ∂xt t 0 n n n ! j X X X ∂xk ∂xi ∂x˙ = J t 0 t ∂xi j ∂xk j=1 k=1 i=1 0 ∂xt t n n n ! i X X X −1 ∂x0 = J Mi,j Mk,i j j=1 k=1 i=1 ∂xt n n n ! i X X X −1 ∂x0 = J Mk,iMi,j j j=1 k=1 i=1 ∂xt We have n n n j dJ X X ∂xi X ∂x˙ = J δ 0 = J t = J∇ x˙ = 0 dt j,k j j x j=1 k=1 ∂xt j=1 ∂xt

J(0) = 1 J(xt, x0) = 1 =⇒ dx0 = dxt Thus the Liouville Theorem is valid for a system for which the Hamiltonian exists (it is not necessary that the system be conservative).

3 Conservation Theorems

We had seen earlier that if the Lagrangian of a system is invariant under a symmetry operation, it leads to conservation of a quantity associated with the symmetry. Identical statement may be made with respect to the Hamiltonian. For instance, we had shown that dH ∂H = dt ∂t c D. K. Ghosh, IIT Bombay 9

Thus the Hamiltonian is conserved if it does not explicitly depend on time. Note that since H = pq˙ − L, if time does not appear explicitly in the Lagrangian, it will also not do so in the Hamiltonian either.

If a coordsinate qi is cyclic, ∂L/∂q˙i is conserved. Now if q is cyclic in the Lagrangian, it will also not appear in the expression for the Hamiltonian. Thus ∂H p˙i = − = 0 ∂qi

Thus the momentum conjugate to qi is conserved. If a system only has internal forces between constituent particles, it can be displaced rigidly in an arbitrary direction without a change in the Hamiltonian. This will lead to the momentum being a constant of motion. Likewise, if the system is invariant under rotation about an axis, it leads to a conservation of . There are some subtle differences between the Hamiltonian and the total energy. The Lagrangian is always given by L = T − V . Though its form may change depending on the generalized coordinates and velocities chosen, its value remains the same and is independent of our choice. The form of the Hamiltonian H(q, p, t) =qp ˙ − L(q, q,˙ t) may change depending on our choice of coordinates and momenta that we choose. Some choice may make the Hamiltonian to be identical to the total energy T + V while some others may lead to totally different function. A necessary and sufficient condition for H to be the total energy of the system is that its set of Cartesian coordinates can be written as functions of q1, q2 ... without explicit dependence on t or the generalized velocities,

xi = xi(q1, q2 ...) or equivalently

qi = qi(x1, x2,...)

3.1 Hamiltonian and Total Energy Hamiltonian is not the same as total energy though most of the time they turn out to be the same. The following examples will illustrate the difference. Example 1: Consider a mass attached at one end of a spring, the other end of the spring being fixed at the origin. The spring is inclined to the x-axis so that the mass m can move in the xy plane. c D. K. Ghosh, IIT Bombay 10

The Lagrangian is given by 1 1 L = T − V = m(r ˙2 + r2θ˙2) − kr2 2 2 The Hamiltonian is ∂L ∂L H = r˙ + θ˙ − L ∂r˙ ∂θ˙ 1 1 = m(r ˙2 + r2θ˙2) + kr2 2 2 In this case the Hamiltonian is equal to the total energy, which is conserved. In this case the generalized coordinates r, θ are related to the corresponding Cartesian coordinates without any explicit dependence on time or on generalized velocities,

x = r cos θ y = r sin θ

Example 2: Let us consider a variant of this problem where the spring threads over a massless rod which rotates (by means of external torque) with a constant angular velocity ω.

Note that in this case ω is not a variable as it has a constant value. Thus though the mass has both radial (r) and tangential ( θ) component of velocity, the latter is rω and the Lagrangian is given by 1 1 L = T − V = m(r ˙2 + r2ω2) − kr2 2 2 The Hamiltonian is given by ∂L H = r˙ − L ∂r˙ 1 1 1 = mr˙2 − m((r ˙2 + r2ω2) + kr2 2 2 2 1 1 = m(r ˙2 − r2ω2) + kr2 2 2 which is not the total energy. However, since the Lagrangian does not have explicit time dependence, H is a conserved quantity. The energy is not conserved, as in order to keep the rod moving with constant angular speed, energy must be suppled by the external source continuously. c D. K. Ghosh, IIT Bombay 11

Example 3: Consider a symmetric top rotating about a vertical axis with a constant angular speed ω.. The Lagrangian is 1 L = Iϕ˙ 2 − mgh 2 ω

In this situation the energy is equal to the Hamiltonian and both are conserved. However, consider a change of the frame of reference which is rotating with respect to the inertial frame with a constant angular velocity ω0. We have the new angle variable α = ϕ − ω0t. The modified Lagrangian is 1 L = I(α ˙ + ω )2 − mgh 2 0 ∂L p = = I(α ˙ + ω ) The new Hamiltonian is ∂α˙ 0 p2 H = pα˙ − L = + mgh − ω p 2I 0 p2 The energy is E = T + V = + mgh 6= H Though H does not have explicit time depen- 2I dence, H 6= E. The Hamiltonian is conserved but energy conservation does not follow. The coordinate system is rotating with respect to the inertial frame and the Hamiltonian dH p dE p cannot be identified with the energy. = − ω = 0 but = 6= 0 dt I 0 dt I Example 4: Consider the case of a mass sliding frictionlessly on a circular track which is rotating about its vertical axis. The Lagrangian is T − V with 1   T = mR2 θ˙2 + sin2 θω2 V = mgR(1 − cos θ) 2

∂L 2 ˙ pθ = = mR θ ∂θ˙ c D. K. Ghosh, IIT Bombay 12

ω

O R θ m ρ

The Hamiltonian is 1   H = p θ˙ − L = mR2θ˙2 − mR2 θ˙2 + sin2 θω2 + mgR(1 − cos θ) θ 2 1   = mR2 θ˙2 − sin2 θω2 + mgR(1 − cos θ) 2 Energy is 1   E = mR2 θ˙2 + sin2 θω2 + mgR(1 − cos θ) 6= H 2 To conserve energy E = constant, the hoop must slow down as the bead rises through the gravitational field. To keep the spinning speed constant a motor supplies energy continuously to the hoop. The system is not isolated. Since Hamiltonian does not have explicit dependence on time, H is conserved. The Cartesian coordinates are:

x = R sin θ cos ωt, y = R sin θ sin ωt, z = R(1 − cos θ)

However, if the angle of spinning ϕ was to be chosen as a generalized coordinate, and not ˙ maintained as ωt, the Hamiltonian would be H = (pθθ + pϕϕ˙) − L with mR2   L = θ˙2 + sin2 θϕ˙ 2 − mgR(1 − cos θ) 2 2 ˙ 2 2 The corresponding conjugate momenta are pθ = mR θ and pϕ = mR sin θϕ˙ The Hamiltonian is then given by mR2   H = θ˙2 + sin2 θϕ˙ 2 + mgR(1 − cos θ) 2 The Hamiltonian is once again the total energy.

3.2 Hamiltonian and Energy- Lagrangian with a different Gauge choice 1 1 dF (x, t) Consider a one dimensional harmonic oscillator with L = mx˙ 2 − kx2 + Since 2 2 dt the equations motion is independent of the choice of F (x, t), the energy is constant for c D. K. Ghosh, IIT Bombay 13

∂L all choices of F The Hamiltonian, however, depends on choice of F because p = = ∂x˙ ∂F mx˙ + ∂x 1 1 ∂F ∂F H = px˙ − L = mx˙ 2 + kx2 − = E − 2 2 ∂t ∂t ∂F If = constant, e.g. F = A + Bt, then H 6= E but H is still constant. This is ∂t because this term only adds a constant to the Lagrangian and to the Hamiltonian. If F is any other function of time, e.g., F = F0 sin Ωt, the Lagrangian and the Hamiltonian are time dependent and hence the Hamiltonian is not conserved though energy still is.

3.3 Charged particle in electromagnetic field - Hamilton’s equaltions Consider the Lagrangian of the electromagnetic field Lagrangian 1 L = mv2 − qϕ + q~v · A~ 2 ∂L The canonical momentum components are pi = = mvi + qAi ∂vi 1 1 H = ~v · ~p − L = mv2 + qϕ = (~p − qA~)2 + qϕ 2 2 B Consider a uniform magnetic field in the z direction : A~ = − (yˆi − xˆj) 2 1 q2B2 qB H = p2 + (x2 + y2) + (p y − p x) + qϕ 2m 8m 2m x y Hamilton’s equations are : ∂H q2B2 qB ∂ϕ p˙ = − = − x + p − q (5) x ∂x 4m 2m y ∂x ∂H q2B2 qB ∂ϕ p˙ = − = − y + p − q (6) y ∂y 4m 2m x ∂y ∂H px qB vx =x ˙ = = + y (7) ∂px m 2m ∂H py qB vy =y ˙ = = − x (8) ∂px m 2m

By substituting for py in eqn. (5), using (8) and by substituting for px in (6) from (7), we get qB ∂ϕ p˙ = v − q (9) x 2 y ∂x qB ∂ϕ p˙ = − v − q (10) y 2 x ∂y c D. K. Ghosh, IIT Bombay 14 we can supplement these with a third equation ∂H ∂ϕ p˙ = = −q (11) z ∂z ∂z

These do not, however, give the Lorentz force equation because the acceleration m~r¨ in this case is not ~p˙ as ~p is the canonical momentum which differs from m~v by a term proportional to the vector potential, which, in turn, has an implicit time dependence. To find the Lorentz force, we proceed as follows. d ∂A dx ∂A dy ∂A dz ∂A B A = x + x + x + x = − v (12) dt x ∂x dt ∂y dt ∂z dt ∂t 2 y d ∂A dx ∂A dy ∂A dz ∂A B A = y + y + y + y = + v (13) dt y ∂x dt ∂y dt ∂z dt ∂t 2 x where we have used the fact that the vector potential has no explicit dependence on time and Ax = −(B/2)y and Ay = (B/2)x. Using these we can find expressions for mx,¨ my¨ and mz¨. These can then be combined into a single equation

F~ = p~˙ = q(~v × B~ ) − q∇ϕ