I'm given the following system of equations: \begin{align*} (m+M)\ddot{x}+m\cos\alpha\ddot{s}&=-kx \qquad(1)\\ \ddot{s}+\cos\alpha\ddot{x}&=-g\sin\alpha\qquad(2)\end{align*}
I'm asked to eliminate $\ddot{s}$ and solve for $x(t)$.
Computing $m\cos\alpha \,(1) - (2)$ gives me \begin{align*} (m\cos^2\alpha-(M+m))\ddot{x}+kx=\frac{mg\sin(2\alpha)}{2} \end{align*}
Let $m\cos^2\alpha-(M+m)=\Omega$ and let $k/\Omega=L^2$.
Then I get $$\ddot{x}+L^2x=\frac{mg\sin(2\alpha)}{2\Omega}$$
So \begin{align*} x_C(t)&=A\cos(Lt)+B\sin(Lt) \\ & = A\cos\left(\sqrt{\frac{k}{m\cos^2\alpha-(M+m)}}t \right)+B\sin\left(\sqrt{\frac{k}{m\cos^2\alpha-(M+m)}}t \right)\end{align*}
With a short calculation I also find that $x_P(t)=\frac{mg\sin(2\alpha)}{2k}$, and therefore the general solution is $x(t)=x_C(t)+x_P(t)$.
Can someone verify whether this is correct or not please?