## Mass on a spring at end of a solid pendulum

Nov 11, 2012 compiled on — Wednesday July 06, 2016 at 08:35 AM

This Demonstration describes the dynamics of a solid pendulum in which a bob mass slides back and
forth over a massless and smooth thin tube attached to the bottom of a pendulum bar. The bob mass is
attached to the end of a spring.
When the bob hits the ends of the tube it bounces back; the ends are assumed to be perfectly elastic.
The two equations of motions for the bob and the pendulum bar are derived using the Lagrangian method
which is solved numerically by Mathematica's built-in function NDSolve. The spring is anchored to the
left edge of the tube and assumed to be massless and can only move in one direction along the length of
the tube. Setting the spring stiffness to zero effectively removes the spring leaving the bob to oscillate
freely.