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?
The term in $\delta\theta$ must disappear if you are expressing the lagrangian around the equilibrium point. The Taylor expansion isn't correct either. This one will make the work:
$$\cos(\theta_0+\delta\theta)=\cos\theta_0-\frac mM\delta\theta-\frac{\delta\theta^2}{2}\cos\theta_0+O(\delta\theta^3)$$
Then:
$$L=\frac{1}{2}R^2\delta\dot{\theta}^2(m+M)-mgl+mgR\theta_0+mgR\delta\theta+MgR\cos\theta_0-mgR\delta\theta-MgR\cos\theta_0\frac{(\delta\theta)^2}{2}$$
The terms in $\delta\theta$ cancel out. Too, we can drop the constant terms as it doesn't change the equations of motion.
$$\tilde L=\frac{1}{2}R^2\delta\dot{\theta}^2(m+M)-MgR\cos\theta_0\frac{(\delta\theta)^2}{2}$$
Finally, as $\theta_0=\arcsin(m/M)\;;\cos\theta_0=\sqrt{M^2-m^2}/M$
$$\tilde L=\frac{1}{2}R^2\delta\dot{\theta}^2(m+M)-\frac{\sqrt{M^2-m^2}gR}{2}\delta\theta^2$$
The lagrangian for a harmonic oscillator, as expected.