I'm given the Lagrangian $$L=\frac{1}{2}R^2\dot{\theta}^2(m+M)-mg(l-R\theta)+MgR\cos\theta$$
for a pulley system and I'm told that it has an equilibrium at $\theta_0=\arcsin(m/M)$.
I'm asked to find the approximate Lagrangian when $\theta \approx \theta_0$.
I have let $\theta=\theta_0+\delta\theta$. Then $L$ becomes \begin{align*} L=\frac{1}{2}R^2\delta\dot{\theta}^2(m+M)-mg(l-R(\theta_0+\delta\theta))+MgR\cos(\theta_0+\delta\theta) \end{align*}
I know that $$\cos(\theta_0+\delta\theta)\approx1-\frac{m}{M}\delta\theta-\frac{\theta_0^2}{2}-\frac{(\delta\theta)^2}{2}$$
Which then gives me $$L=\frac{1}{2}R^2\delta\dot{\theta}^2(m+M)+mgR(\delta\theta)-MgR\frac{\theta_0^2}{2}-MgR\frac{(\delta\theta)^2}{2}$$
This feels like it's just getting more and more messy though, is this right? And how do I go any further?