Find the Lagrangian of the following mechanical system an its equation of motion. Consider the unstretched length of the ideal spring to be \(x_0\), its constant \(k\), the mass of the cart \(m\), and the angle of the incline \(\theta\). Ignore friction and the mass of the wheels.
The kinetic energy is
\( K.E. = \dfrac {1}{2} m\dot x^2 \)
The potential energy has two components, one elastic and one gravitational
\( P.E. = \dfrac {1}{2} k(x-x_0)^2 - mgx sin\theta\)
So, the Lagrangian is given by
\( \mathscr L = \dfrac {1}{2} m\dot x^2 - \dfrac {1}{2} k(x-x_0)^2 + mgx sin\theta\)
To find the equation of motion we find the derivatives
\( \dfrac{\partial \mathscr L}{\partial \dot x} = m\dot x \)
\( \dfrac {d}{dt} \dfrac{\partial \mathscr L}{\partial \dot x} = m\ddot x \)
\( \dfrac{\partial \mathscr L}{\partial x} = - k(x-x_0) + mg sin\theta \)
The equation of motion is
\( m\ddot x =- k(x-x_0) + mg sin\theta \)
We can rearrange the equation as follows
\( m\ddot x =- k(x-(x_0 + mgsin\theta/k)) \)
The solution is a simple harmonic oscillator with equilibrium length displaced due to the weight of the cart
\( x = x_0 + mgsin\theta/k + Acos(\omega t + \phi) \)
Where \(A\) is the amplitude, \( \phi \) is an arbitrary phase and
\( \omega = \sqrt {\dfrac{k}{m}} \)