A uniform bar of mass M and length 2L is suspended from one end by a spring of force constant k . The bar can swing freely only in one vertical plane ,and the spring is constrained to move only in the vertical direction. Setup the equations of motion in the Lagrangian formulation.