EP 222: Classical Mechanics Tutorial Sheet 7: Solution
EP 222: Classical Mechanics Tutorial Sheet 7: Solution
EP 222: Classical Mechanics Tutorial Sheet 7: Solution
We showed in the lectures that using the point of suspension of the upper pendulum as
the origin of the coordinate system, the Lagrangian of a double pendulum consisting
of equal masses m, and equal length (l) pendula is given by
1
L = ml2 θ̇12 + ml2 θ̇22 + ml2 cos(θ1 − θ2 )θ̇1 θ̇2
2
+ 2mgl cos θ1 + mgl cos θ2 .
Using the definition of the generalized momenta, we have
∂L
p1 =
∂ θ̇1
∂L
p2 = ,
∂ θ̇2
leading to
p1 = 2ml2 θ̇1 + ml2 cos(θ1 − θ2 )θ̇2
p2 = ml2 θ̇2 + ml2 cos(θ1 − θ2 )θ̇1 .
1
Hamiltonian is defined as the Legendre transform of the Lagrangian
H = p1 θ̇1 + p2 θ̇2 − L,
where the generalized velocities θ̇1 and θ̇2 are expressed in terms of generalized mo-
menta p1 and p2 , using Eqs (1) and (2) above
p1 − p2 cos(θ1 − θ2 ) 2p2 − p1 cos(θ1 − θ2 )
H = p1 + p2
ml2 (1 + sin2 (θ1 − θ2 )) ml2 (1 + sin2 (θ1 − θ2 ))
2 2
2 p1 − p2 cos(θ1 − θ2 ) 1 2 2p2 − p1 cos(θ1 − θ2 )
− ml − ml
ml2 (1 + sin2 (θ1 − θ2 )) 2 ml2 (1 + sin2 (θ1 − θ2 ))
2 p1 − p2 cos(θ1 − θ2 ) 2p2 − p1 cos(θ1 − θ2 )
− ml cos(θ1 − θ2 )
ml2 (1 + sin2 (θ1 − θ2 )) ml2 (1 + sin2 (θ1 − θ2 ))
− 2mgl cos θ1 − mgl cos θ2 .
Question: Is the Hamiltonian same as total energy for this system, i.e., H = T + V ?
Answer: We studied in the lectures that it is the case if the following two conditions are
followed: (a) Potential energy is independent of generalized velocity, which is the case
here, and (b) kinetic energy is a homogeneous function of degree 2 of the generalized
velocities, which in this case means that ∂∂Tθ̇ θ̇1 + ∂∂Tθ̇ θ̇2 = 2T , which can be verified to
1 2
be true here. Hence, the given Hamiltonian is the total energy of the system.
H = px ẋ + py ẏ + pz ż − L,
where
∂L
px =
∂ ẋ
∂L
py =
∂ ẏ
∂L
pz = .
∂ ż
2
Thus
px = 2aẋ + cẏ + f y 2 ż (3)
b
py = + cẋ + g (4)
x
pz = f y 2 ẋ (5)
Here, Eqs. (4) and (5) give separate expressions for ẋ in terms of momenta, so it is
better to first compute the Hamiltonian in terms of velocities, and then eliminate them
to get the momenta. With this we have
b
H = ẋ(2aẋ + cẏ + f y 2 ż) + ẏ( + cẋ + g) + ż(f y 2 ẋ)
x
2 ẏ 2
p
− aẋ − b − cẋẏ − f y ẋż − g ẏ + k x2 + y 2
x p
= aẋ + cẋẏ + f y 2 ẋż + k x2 + y 2
2
p
= ẋ(2aẋ + cẏ + f y 2 ż) − aẋ2 + k x2 + y 2
pz pz p
= ( 2 )px − a( 2 )2 + k x2 + y 2
fy fy
pz pz p
= ( 2 )(px − a 2 ) + k x2 + y 2
fy fy
Above, we used Eqs. (3) and (5) to eliminate the velocities. This Hamiltonian cannot
be total energy because it is easy to verify that the velocity dependent part of it is not
a second degree homogeneous function of velocities. However, Hamiltonian is not an
explicit function of time, therefore, it is conserved. Furthermore, it does not depend
on z, i.e., z is a cyclic coordinate, therefore, pz will also be conserved.
3. A dynamical system has the Lagrangian
q̇22
L = q̇12 + + k1 q12 + k2 q̇1 q̇2 ,
a + bq12
where a, b, k1 , and k2 are constants. Find the equations of motion in the Hamiltonian
formalism.
Soln: As before
H = q̇1 p1 + q̇2 p2 − L,
with
∂L
p1 = = 2q̇1 + k2 q̇2
∂ q̇1
∂L 2q̇2
p2 = = + k2 q̇1
∂ q̇2 a + bq12
These can be solved to obtain q̇1 /q̇2 in terms of p1 /p2
{−2p1 + k2 (a + bq12 )p2 }
q̇1 = (6)
{k22 (a + bq12 ) − 4}
{(a + bq12 )(k2 p1 − 2p2 )}
q̇2 = (7)
{k22 (a + bq12 ) − 4}
3
But the velocity dependent part of the Lagrangian is a homogeneous function of degree
2 in the velocities, there is a part which is totally independent of the velocity. Thus,
Hamiltonian will be total energy
q̇22
H = q̇12 + 2
+ k2 q̇1 q̇2 − k1 q12 .
a + bq1
With this
2 2
{−2p1 + k2 (a + bq12 )p2 } 1 {(a + bq12 )(k2 p1 − 2p2 )}
H= 2 +
{k22 (a + bq12 ) − 4} (a + bq12 ) {k22 (a + bq12 ) − 4}2
{−2p1 + k2 (a + bq12 )p2 } {(a + bq12 )(k2 p1 − 2p2 )}
+ k2 × − k1 q12
{k22 (a + bq12 ) − 4} {k22 (a + bq12 ) − 4}
p21 (a + bq12 )p22 k2 (a + bq12 )p1 p2
= 2 2
+ 2 2
− 2 2
− k1 q12 .
{4 − k2 (a + bq1 )} {4 − k2 (a + bq1 )} {4 − k2 (a + bq1 )}
These equations are the same as Eqs. (6) and (7) above. The other two Hamilton’s
equations are
∂H
ṗ1 = −
∂q1
2bk22 q1 p21 2bq1 p22
=− 2 −
{4 − k22 (a + bq12 )} {4 − k22 (a + bq12 )}
2bk22 q1 (a + bq12 )p22 2k2 bq1 p1 p2
− 2 2
+
2
{4 − k2 (a + bq1 )} {4 − k22 (a + bq12 )}
2k23 b(a + bq12 )q1 p1 p2
+ 2 + 2k1 q1 ,
{4 − k22 (a + bq12 )}
4
4. A Hamiltonian of one degree of freedom has the form
p2 ba kq 2
H= − bqpe−αt + q 2 e−αt (α + be−αt ) + ,
2a 2 2
where a, b, α, and k are constants.
L = pq̇ − H, (8)
a2 (q̇ + bqe−αt )2
L = q̇a(q̇ + bqe−αt ) − + baq(q̇ + bqe−αt )e−αt
2a
ba kq 2
− q 2 e−αt (α + be−αt ) −
2 2
aq̇ 2 kq 2 abα 2 −αt
= − + baq q̇e−αt − q e
2 2 2
aq̇ 2 kq 2
d 1
= − + abq 2 e−αt ,
2 2 dt 2
so that
dF
L = L0 + ,
dt
2 2
with L0 = a2q̇ − kq2 and F (q, t) = 21 abq 2 e−αt . Note that L0 is the Lagriangian
5
where new canonical variables are P = q̇ and Q = q, so that the original Hamil-
tonian is
ba
H = H0 − bqpe−αt + q 2 e−αt (α + be−αt ).
2
On using the fact that p = a(q̇ + bqe ) = a(P + bQe−αt ), we obtain
−αt
ba 2 −αt
H = H0 − abQ(P + bQe−αt )e−αt + Q e (α + be−αt )
2
−αt 1 2 2 −2αt baα 2 −αt
= H0 − abQP e − ab Q e + Qe
2 2
5. (a) The Lagrangian for a system of one degree of freedom can be written as
m 2 2
q̇ sin ωt + q̇qω sin 2ωt + q 2 ω 2 .
L=
2
What is the corresponding Hamiltonian? Is it conserved?
Soln: We have
∂L 1
p= = mq̇ sin2 ωt + mqω sin 2ωt
∂ q̇ 2
1
(p − 2 mqω sin 2ωt)
=⇒ q̇ =
m sin2 ωt
So that
H = pq̇ − L
p(p − 12 mqω sin 2ωt) m (p − 21 mqω sin 2ωt)2
= −
m sin2 ωt 2 m2 sin4 ωt
m (p − 12 mqω sin 2ωt) 1
− qω 2 sin 2ωt − mω 2 q 2
2 m sin ωt 2
which leads to a tedious time-dependent expression
p2
1 1
H= −
2m sin2 ωt 2 sin4 ωt
1 1 1
− pqω sin 2ωt −
2 sin2 ωt 2 sin4 ωt
1 2 2 2 1 1
= mω q sin 2ωt − −1 ,
2 2 sin2 ωt 4 sin4 ωt
Q = q sin ωt.
6
Find the Lagrangian in terms of the new coordinate and the corresponding Hamil-
tonian. Is H conserved?
Soln: We make the substitutions in the Lagrangian
Q
q=
sin ωt
Q̇ − ωQ cot ωt
q̇ = ,
sin ωt
and after some tedious algebra we obtain the Lagrangian in terms of new variables
1 1
L = mQ̇2 + mω 2 Q2 .
2 2
∂L
Clearly, the Hamiltonian in new coordinates (with P = ∂ Q̇
= mQ̇) will be
P2 1
H= − mω 2 Q2 ,
2m 2
which depends on canonical variables P and Q, both of which are explicitly time
dependent. Therefore, Hamiltonian will not be conserved.