### Lagrangian and Hamiltonian formalism

#### Problem:

The Lagrangian of a system is given by L({qi, vi}), where {qi} are linearly independent generalized coordinates and {vi = dqi/dt} are the generalized velocities.
d/dt(∂L/∂vi) - ∂L/∂qi = 0,  ∂L/∂vi  = pi.
A symmetry is a coordinate transformation that does not change the form of the Lagrangian.
Consider a continuous coordinate transformation, which is a transformation that can be built from infinitesimal transformations of the form  {qi --> qi' = qi  + δqi}, with δqi = f({qi})ε,
where ε --> 0.  Show that if the Lagrangian is invariant under this transformation (δL = 0), then the quantity Q = ∑ pi f({qi}) is a constant of motion, i.e. a conserved quantity.

Solution:

• Concepts:
Lagrangian mechanics
• Reasoning:
δL({qi, vi}) = ∑[(∂L/∂vi) δvi - ∂L/∂qi) δqi]
• Details of the calculation:
δL = ∑[pi δvi - ∂L/∂qi) δqi].
From Lagrange's equations  ∂L/∂qi = dpi/dt.
δL = ∑[pi δ(dqi/dt) - (dpi/dt)) δqi] = ∑[pi d(δqi)/dt  -  (dpi/dt)) δqi] = d/dt∑ [pi δqi]
Note:  δ(dqi/dt) = d(δqi)/dt
δL = 0 --> ∑ [pi δqi] = constant.

#### Problem:

Let {qi} and {pi} be the generalized coordinates and momenta of a system and let A, B,  and C be arbitrary functions of the q's and p's.
The Poisson Bracket (PB) of A and C is defined as
{A, C} = ∑i [(∂A/∂qi) (∂C/∂pi) - (∂A/∂pi) (∂C/∂qi)].

Properties of the PB that can be easily verified are
{A, C} = -{C, A},  {kA, C} = k{A, C} for any constant k.
{(A+B), C} = {A, C} + {B, C}.
{(AB), C} = A{B, C} + B{A, C}

(a)  Evaluate {qi, qj}, {pi, pj}, and {qi, pj} for arbitrary i, j.
(b)  Evaluate {qin, pi}.  (Hint: use mathematical induction)
(c)  Evaluate {F, p} for an arbitrary smooth function F of the generalized coordinate q.
(Any smooth function can be arbitrarily well approximated by a polynomial.)

Solution:

• Concepts:
Poisson Bracket
• Reasoning:
We are asked to evaluate various Poisson Brackets.
• Details of the calculation:
(a)  {qi, qj} = 0,  {pi, pj} = 0,  {qi, pj} = δij.
(b)  {qi2, pi} = 2 qi {qi, pi}= 2 qi
{qin, pi} = n qin-1, for n = 2.
Assume {qin-1, pi} = (n-1) qin-2.
Then {qin, pi} = qi{qin-1, pi} + qin-1{qi, pi} = (n-1) qin-1 + qin-1 = n qin-1.
{qin, pi} = n qin-1 therefore holds for all n.
(c)   F(q) = ∑n Anqn.  {F, p} = ∑n An{qn, p} = ∑n An n qin-1 = dF/dq.
{F, p} = dF/dq.

#### Problem:

Let {qi} and {pi} be the generalized coordinates and momenta of a system and let F, and G be arbitrary functions of the q's and p's.
The Poisson Bracket (PB) of F and G is defined as
{F, G} = ∑i [(∂F/∂qi) (∂G/∂pi) - (∂F/∂pi) (∂G/∂qi)].
(a)  Show that dqj/dt = {qj, H},  dpj/dt = {pj, H} is another way of writing Hamilton's equations of motion.
(b)  Write dF/dt in terms of a PB.
(c)  Consider the three Cartesian components of the angular momentum L
We have {Li, Lj} = ∑k εijk Lk.
Assume the Hamiltonian of a system is given by H = ωLz.  Use the Poisson Bracket formulation to work out the equations of motion for the vector L.

Solution:

• Concepts:
Poisson Bracket formulation of classical mechanics
• Reasoning:
We are asked to show how the PB formalism can be used to find the evolution of a physical quantity.
• Details of the calculation:
(a)  {qj, H} =  ∑i [(∂qj/∂qi) (∂H/∂pi) - (∂qj /∂pi) (∂H/∂qi)] = ∂H/∂pj
dqj/dt = ∂H/∂pj
{pj, H} = ∑i [(∂qj/∂qi) (∂H/∂pi) - (∂qj /∂pi) (∂H/∂qi)] = -∂H/∂qj
dpj/dt = -∂H/∂qj
(b)  dF/dt = ∑i [(∂F/∂qi) (dqi/dt) + (∂F/∂pi) (dpi/dt)]
(dqi/dt) = (∂H/∂pi),  (dpi/dt) = -(∂H/∂qi)
dF/dt = ∑i ((∂F/∂qi) (∂H/∂pi) - (∂F/∂pi) (∂H/∂qi)) = {F, H}
(c)  dLi/dt = {Li, H} = ω{Li, Lz}
dLz/dt = 0.
dLx/dt = -ωLy
dLy/dt = ωLx
Lx = A cos(ωt + φ)
Ly = A sin(ωt + φ)
The z-component of L does not change.  The component of L perpendicular to the z-axis in the xy-plane rotate ccw about the origin with constant angular velocity ω = ωk.

#### Problem:

Assume every point in phase space is shifted by an amount δqi = {qi,G}, δpi = {pi,G}, where G is an arbitrary function of the coordinates and conjugate momenta.
G is called the generator of the transformation δqi, δpi.
Show that the function of the coordinates and conjugate momenta F is changed by an amount δF = {F,G} by the transformation.

Solution:

• Concepts:
Poisson Bracket formulation of classical mechanics
• Reasoning:
We are asked to explore the connection between symmrtry and conservation laws.
• Details of the calculation:
δF = (∂F/∂qi) δqi + (∂F/∂pi) δpi  (summation convention)
δF = (∂F/∂qi) {qi,G},  + (∂F/∂pi) {pi,G} = {F, G}   (show by writing out all the terms in the PB)
When the transformation generated by G does not change the Lagrangian or Hamiltonian, then   δH = {H, G} = 0.
Assume G is such a symmetry transformation.  Find dG/dt.
dG/dt = (∂G/∂qi) (∂qi/∂t)  + (∂G/∂pi) (∂pi/∂t)  = (∂G/∂qi) (∂H/∂pi) - (∂G/∂pi) (∂H/∂qi) = {G,H}
dG/dt = 0.  If G generates a symmetry transformation, the G is a constant of motion.

#### Problem:

Consider the motion of a particle in a potential U(r) in a rotating frame.  Let Ω be the angular velocity of the rotating frame with respect to an inertial frame and let Ω be constant.
(a)  Express the Lagrangian of the particle in terms of r and v of the particle in the rotating frame.
(b)  Obtain the equations of motion in the rotating frame.
(c)  Obtain the Hamiltonian of the particle in the rotating frame.

Solution:

• Concepts:
Lagrangian and Haniltonian mechanics, rotating frames
• Reasoning:
We are asked to write down the lagrangian and the Hamiltonian in the rotating frame and to obtain the equations of motion in the rotating frame.
• Details of the calculation:
(a)  L = T - U.  In the inertial frame L = ½mvi2 - U(r).
The relationship between the velocity vi in the inertial frame and the velocity v in a frame rotating with constant angular velocity Ω is
vi = v + Ω × r.
In terms of r and v in the rotationg frame L = ½m(v + Ω × r)2 - U(r), or
L = ½mv2 + ½m(Ω × r)2 + m(Ω × r) - U(r),
(b)  ∂L/∂v = mv + m(Ω × r)
(d/dt)∂L/∂v = mdv/dt + m(Ω × v)
∂L/∂r = (∂/∂r)(½m(Ω × r)2 + m(Ω × r) - U(r))
d(Ω × r)2 = 2(Ω × r)·(Ω × dr) = 2[(Ω × r) × Ω]·dr
(∂/∂r)(Ω × r)2 = 2[(Ω × r) × Ω] = -2[(Ω × (Ω × r)]
(∂/∂r)((Ω × r)) = (∂/∂r)[(v × Ω)·r] = (v × Ω) = -(Ω × v)
The equation of motion is (d/dt)∂L/∂v = ∂L/∂r.
mdv/dt + m(Ω × v) = -m[(Ω × (Ω × r)] - m(Ω × v) - ∂U(r)/∂r
mdv/dt = - ∂U(r)/∂r - m[(Ω × (Ω × r)] - 2m(Ω × v)
is the equation of motion in the rotating frame.
-2m(Ω × v) = Coriolis force
-m Ω × (Ω × r) = centrifugal force
(c)  p = ∂L/∂v = mv + m(Ω × r), v = (p - m(Ω × r))/m
H = p·v - L
H(p, r) = (p - m(Ω × r))/m - ½(p - m(Ω × r))2/m - ½m(Ω × r)2 - (p - m(Ω × r))·(Ω × r) + U(r)
= p2/m - (Ω × r) - p2/(2m) -  ½m(Ω × r))2 + (Ω × r)
- ½m(Ω × r)2 - (Ω × r) + m(Ω × r))2 + U(r)
= p2/(2m) - (Ω × r)  + ½m(Ω × r))2 - ½m(Ω × r)2 + U(r)
H(p, r) = (p - m(Ω × r))2/(2m)  - ½m(Ω × r)2 + U(r)
is the Hamiltonian of the particle in the rotating frame.

#### Problem:

The Lagrangian of a system of N degrees of freedom is

What is the Hamiltonian for a symmetric mass matrix Mij = Mji?

Solution:

• Concepts:
The Lagrangian and the Hamiltonian
• Reasoning:
Given the Lagrangian, we are asked to find the Hamiltonian of a system.
• Details of the calculation:

Therefore:

We then have:

In matrix notation: