I am trying to find the normal modes of a spring pendulum with moving support. The spring has spring constant $k$ and unstretched length $l_0$.
Sorry for my bad paint skills. The problem was stated to have three degrees of freedom. Let $x$ described the distance of the block of mass $M$ from equilibrium. Let the length of the pendulum be described by $l = l_0 + r$. Lastly $\theta$ is the angle of oscillation. Then the kinetic energy is, \begin{equation} T = \frac{1}{2}M\dot{x}^2 + \frac{1}{2}m(\dot{r}^2+(l_0+r)^2\dot{\theta}^2) \end{equation} The potential energy is then, \begin{equation} V = \frac{1}{2}kr^2 - mg(l_0+r)cos(\theta) \end{equation} So the Lagrangian is, \begin{equation} L = \frac{1}{2}M\dot{x}^2 + \frac{1}{2}m(\dot{r}^2+(l_0+r)^2\dot{\theta}^2) - \frac{1}{2}kr^2 + mg(l_0+r)cos(\theta) \end{equation} In small angle approximation we have, \begin{equation} L = \frac{1}{2}M\dot{x}^2 + \frac{1}{2}m(\dot{r}^2+(l_0+r)^2\dot{\theta}^2) - \frac{1}{2}kr^2 + mg(l_0+r) - \frac{1}{2}mg(1_0+r)\theta^2 \end{equation} The problem says to ignore anharmonic terms but I am a bit confused as to which terms that would be. I think that the anharmonic terms would be $mgr\theta^2$ but I am confused whether or not $(l_0+r)^2\dot{\theta}^2$ is anharmonic.
So if I follow my gut then I eliminate $mgr$ and $-\frac{1}{2}mgr\theta^2$ and the kinetic energy matrix is then \begin{pmatrix} M & 0 & 0\\ 0 & m & 0 \\ 0 & 0 & m(l_0+r)^2 \end{pmatrix} and then potential \begin{pmatrix} 0 & 0 & 0\\ 0 & k & 0 \\ 0 & 0 & mgl_0 \end{pmatrix} But I'm not sure if the $m(l_0+r)^2$ term belongs in the matrix. I feel like it should be $ml_0^2$ but I am not sure.
Also I am not 100% sure that I got the Lagrangian correct so please correct me if I am wrong!