Question 15.7: Determine the Lagrangian and the equation of motion of the f...
Determine the Lagrangian and the equation of motion of the following system: Let m be a point mass on a massless bar of length l which in turn is fixed to a hinge. The hinge oscillates in the vertical direction according to h(t) = h_{0} cos ωt.
The only degree of freedom is the angle ϑ between the bar and the vertical (upright pendulum).

Learn more on how we answer questions.
The position of the point mass m is (x, y):
x = l sin ϑ, y = h(t) +l cos ϑ = h_{0} cos ωt +l cos ϑ.Differentiation of this equation yields
\dot{x}= \dot{ϑ} l cos ϑ, \dot{y} =−(ωh_{0} sin ωt + \dot{ϑ} l sin ϑ).Hence, the kinetic energy T becomes
T = \frac{1}{2} m(\dot{x}^{2} + \dot{y}^{2})= \frac{1}{2} m(\dot{ϑ}^{2}l^{2} + ω^{2}h^{2}_{0} sin^{2} ωt +2ωh_{0} \dot{ϑ}l sin ϑ sin ωt),
and the potential energy reads
V = mgy = mg(h_{0} cos ωt +l cos ϑ).Then the Lagrangian becomes
L = T −V= \frac{m}{2} \left[ \dot{ϑ}^{2}l^{2} +ω^{2}h^{2}_{0} sin^{2} ωt +2ωh_{0}\dot{ϑ} sin ϑ sin ωt −2g(h_{0} cos ωt +l cos ϑ)\right]
The Lagrange equation reads
\frac{d}{dt} \left(\frac{∂L}{∂ \dot{ϑ}}\right) − \frac{∂L}{∂ϑ}= 0,\frac{∂L}{∂ \dot{ϑ}}= ml^{2}\dot{ϑ} + mωh_{0}l sin ϑ sin ωt,
\frac{∂L}{∂ϑ}= mωh_{0} \dot{ϑ}l cos ϑ sin ωt + mgl sin ϑ,
\frac{d}{dt} \frac{∂L}{∂ \dot{ϑ}} = ml^{2} \ddot{ϑ} + mωh_{0}l\dot{ϑ} cos ϑ sin ωt + mω^{2}h_{0}l sin ϑ cos ωt,
l^{2}\ddot{ϑ} +ωh_{0}l\dot{ϑ} cos ϑ sin ωt +ω^{2}h_{0}l sin ϑ cos ωt −ωh_{0}l\dot{ϑ} cos ϑ sin ωt −gl sin ϑ = 0,
or
l\ddot{ϑ} +ω^{2}h_{0} sin ϑ cos ωt −g sin ϑ = 0.
The substitution ϑ^{′} = ϑ − π ⇒ sin ϑ =−sin ϑ^{′} ; for small displacements, −sin ϑ^{′} ≈ −ϑ^{′}, i.e.,
l\ddot{ϑ}^{′} +(g −ω^{2}h_{0} cos ωt)ϑ^{′} = 0.This is the desired equation of motion. If the piston is at rest, i.e., h(t) = h_{0} = 0, we get
\ddot{ϑ}^{′} + \frac{g}{l} ϑ^{′} = 0.This is the equation of motion of the ordinary pendulum!