### Lagrange multipliers

#### Problem:

A heavy particle with mass m is placed on top of a vertical hoop.  Calculate the reaction of the hoop on the particle by means of the Lagrange undetermined multipliers and Lagrange's equations.  Find the height at which the particle falls off.

Solution:

• Concepts:
Lagrange's Equations, Lagrange multipliers
d/dt(∂L/∂(dqk/dt)) -  ∂L/∂qk = ∑lλlalk,    Σk alk dqk + alt dt =  0.
• Reasoning:
The problem requires us to use the method of Lagrange multipliers.

Imagine the particle to be constrained to move on the hoop.  For a small θ, the force of constraint points away from the origin.  For a large θ it points toward the origin. The angle for which the force of constraint is zero is the angle at which the particle falls off.  To find the force of constraint as a function of θ, we use the technique of Lagrange multipliers.
We have two coordinates, r and θ, and one equation of constraint, r = R, which must be cast into the form λ1Σ a1k dqk = 0,  λ1(a1r dr + a dθ) = 0.
The equation of constraint is r = R, dr  =  0,  therefore we can choose a1r = 1, a1θ  =  0.
• Details of the calculation:
T = ½m((dr/dt)2 + r2(dθ/dt)2),  U = mgr cosθ.
L = ½m((dr/dt)2 + r2(dθ/dt)2) - mgr cosθ.
∂L/∂(dr/dt)  = m dr/dt,  d/dt(∂L/∂(dr/dt)) = md2r/dt2
∂L/∂r = mr(dθ/dt)2 - mgcosθ.
∂L/∂(dθ/dt) = mr2(dθ/dt),  d/dt(∂L/∂(dθ/dt)) = mr2d2θ/dt2 +  2mr(dθ/dt)(dr/dt),
∂L/∂θ = mgr sinθ.
d/dt(∂L/∂(dr/dt)) - ∂L/∂r = λ1a1r
md2r/dt2 - mr(dθ/dt)2 +  mgcosθ = λ1                          (1)
d/dt(∂L/∂(dθ/dt)) - ∂L/∂θ = λ1a
mr2d2θ/dt2 +  2mr(dθ/dt)(dr/dt) - mgr sinθ = 0.             (2)

The equation of constraint is dr = 0.  We have three equations and three unknowns,
r(t), θ(t), and λ1.
dr/dt = 0 --> d2r/dt2 = 0, r = R.
mR2d2θ/dt2 - mgRsinθ = 0.                                             (from 2)
-mR(dθ/dt)2 +  mgcosθ = λ1,                                           (from 1)
dθ/dt =  [(g/R)cosθ - λ1/(mR)]½.
The particle falls off when λ1 = 0.   Then  dθ/dt =  [(g/R)cosθ]½.

To find an expression for λ1 we need to solve the differential equation
d2θ/dt2 = (g/R)sinθ
for dθ/dt and equate the solution with dθ/dt =  [(g/R)cosθ - λ1/(mR)]½
Denote dθ/dt = f(θ).
df(θ)/dt = [df(θ)/dθ]f(θ) = ½df2(θ)/dθ = (g/R)sinθ.
f2(θ) = A - (2g/R)cosθ.
dθ/dt =  [A - (2g/R)cosθ]½.

Initial conditions:  dθ/dt = 0 for θ = 0, A = 2g/R.
dθ/dt =  [(2g/R) - (2g/R)cosθ]½.
The particle falls off when (g/R)cosθ  = (2g/R) - (2g/R)cosθ, or cosθ = (2/3), θ = 48.19o.

To find λ1 set (2g/R) - (2g/R)cosθ = (g/R)cosθ - λ1/(mR).
λ1/(mR) = (3g/R)cosθ - (2g/R), λ1 = 3mg cosθ - 2mg.
λ1a1r = Fr, Fr =  is the reaction of the hoop on the particle.

#### Problem:

A bead of mass m slides without friction on a circular loop of radius a.  The loop lies in a vertical plane.

(a)  Use the Lagrange multiplier method and find the appropriate Lagrangian including terms expressing the constraints.
(b)  Apply the Euler-Lagrange equations to obtain the equations of motion and solve for θ << 1.
(c)  Find the force of constraint.

Solution:

• Concepts:
Lagrangian Mechanics, Lagrange multipliers
• Reasoning:
We are instructed to use the Lagrange multiplier method
• Details of the calculation:
T = ½m((dr/dt)2 + r2(dθ/dt)2),  U = -mgrcosθ,  L = T - U.
(a)  We have two coordinates, r, and θ, and one equation of constraint, r = a, which we want to cast into the form λ1∑ a1k dqk = 0.  We have dr = 0, a1r = 1, a = 0.
(b)  Equations of motion:
d/dt(∂L/∂(dqk/dt)) -  ∂L/∂qk = ∑lλlalk,    Σk alk dqk + alt dt =  0.
d2r/dt2 - r(dθ/dt)2 - gcosθ = λ1/m.
d2θ/dt2 =  -(g/r)sinθ.
The equation of constraint is r = a, dr/dt = d2r/dt2 = 0.
Therefore d2θ/dt2 =  -(g/a)sinθ,  -a(dθ/dt)2 - gcosθ = λ1/m.
If θ << 1, then d2θ/dt2 = -(g/a)θ.  θ = θmaxsin(ωt + θ0),  ω2 = g/a.
-a(dθ/dt)2 - g = λ1/m,  λ1 = -mg + ma(dθ/dt)2 = -mg - mv2/a.
(c)  The force of constraint has magnitude mg + mv2/a and points radially inward towards the origin.

#### Problem:

Two masses m1 and m2 are connected by a massless string that runs over a frictionless pulley.  The length of the string, l, somehow increases at a constant rate, i.e. l(t) = l0 + l1t.  Use the method of Lagrange multipliers to determine the tension of the string at time t.

Solution:

• Concepts:
Lagrange's Equations, Lagrange multipliers
d/dt(∂L/∂(dqk/dt)) -  ∂L/∂qk = ∑lλlalk,    Σk alk dqk + alt dt =  0.
• Reasoning:
The problem requires us to use the method of Lagrange multipliers.
Let the generalized coordinate xi denote the distance along the string from the top of the pulley to the mass mi.
Then L = m1(dx1/dt)2/2 + m2(dx2/dt)2/2 + m1gx1 + m2gx2.
The equation of constraint is x1 + x2 = l0 + l1t,  dx1 + dx2 - l1dt = 0.  There is only one equation of constraint.  We write λ(ax1 dx1 + ax2 dx2 + atdt)  = 0.
ax1 = 1,  ax2 = 1,  at = -l1.
• Details of the calculations:
The equations of motion are
m1d2x1/dt2 - m1g = λ,
m2d2x2/dt2 - m2g = λ.
From dx1 + dx2 - l1dt = 0 we obtain
d2x1/dt2 + d2x2/dt2 = 0.
Solving these 3 equations we obtain
m1d2x1/dt2 - m2d2x2/dt2 = (m1 - m2)g .
m1d2x1/dt2 + m2d2x1/dt2 = (m1 - m2)g .
d2x1/dt2 = (m1 - m2)g/(m1 + m2).
λ = m1(m1 - m2)g/(m1 + m2) - m1g = -2m1m2g/(m1 + m2).
λ is the force of constraint acting on m1, its magnitude is the tension in the string, the - sign indicates that it is acting upward on m1.

#### Problem:

Consider a particle of mass m constrained to remain on the surface of a cylinder of radius b.   Let the axis of the cylinder be the z-axis.  The particle is subject to the force of gravity mg in the negative z-direction.
(a)  Use the Lagrange multiplier method and find the appropriate Lagrangian including a term expressing the constraint.
(b)  Apply the Euler-Lagrange equations to obtain the equations of motion.
(c)  Find the force of constraint and briefly discuss why this value is reasonable and to be expected.
(d)  Now, repeat parts (a) and (b) without using the Lagrange multiplier method.  Instead, build the constraint into the general coordinates.

Solution:

• Concepts:
Lagrangian Mechanics, Lagrange multipliers
• Reasoning:
We are asked to find the force of constraint using Lagrange multipliers.
• Details of the calculation:
T = ½m((dr/dt)2 + (dz/dt)2) +  ½mr2(dφ/dt)2,  U = -mgz,  L = T - U.
(a)  We have three coordinates, r, z, and φ, and one equation of constraint, r = b, which we want to cast into the form λ1∑ a1k dqk = 0.  We have dr = 0, a1r = 1, a1z = a = 0.
(b)  Equations of motion:
d/dt(∂L/∂(dqk/dt)) -  ∂L/∂qk = ∑lλlalk,    Σk alk dqk + alt dt =  0.
md2r/dt2 - mr(dφ/dt)2 = λ1,  md2z/dt2 + mg = 0,  mr2d2φ/dt2 + 2mr(dr/dt)(dφ/dt) = 0
The equation of constraint is r = b, dr/dt = d2r/dt2 = 0.
Therefore d2z/dt2 = -g,  z(t) = z0 + vz0t - ½ gt2,
d2φ/dt2 = 0,  φ(t) = φ0 + ω0t, with ω0 = dφ/dt,
mbω02 = -λ1.
(c)  The force of constraint has magnitude mbω02 and points radially inward towards the z-axis.  It is the centripetal force providing the centripetal acceleration mvφ2/b.
(d)  T = ½m(dz/dt)2 +  ½mb2(dφ/dt)2,  U = -mgz,  L = T - U.
d/dt(∂L/∂(dqk/dt)) -  ∂L/∂qk = 0.
md2z/dt2 + mg = 0,  mr2d2φ/dt2 = 0.
d2z/dt2 = -g,  z(t) = z0 + vz0t - ½ gt2.
d2φ/dt2 = 0,  φ(t) = φ0 + ω0t.