Horizontally driven inverted pendulum

I have came across this situation, where a cart of mass $M$ moves along the (horizontal) $x$ axis and a second mass m is suspended at the end of a rigid, massless rod of length $L$ (the rod is attached to the cart at point $A$, and is free to pivot about $A$ in the $x-y$ plane). Here's a diagram:

I would like to derive expressions for the coordinates ($x$ and $y$) of the small mass $m$, if the cart is driven in the form $x= A\cos(\omega t)$.

I have used Lagrangian mechanics to solve for an equation, given by:

$$L \, \ddot{\alpha}=A (\omega)^2 \cos(\omega t)\cos(\alpha)+g \sin(\alpha)$$

This obviously is a very complicated equation to solve for $\alpha$. I'm wondering, for this driven pendulum, for there to be an stable equilibrium at $\alpha=0$, does $\alpha$ tend to $0$ (hence I can assume that $\cos(\alpha)=1$ and $\sin(\alpha)=0$)?

• actually there is a condition on the driving frequency as well. A very closely related problem is solved in Landau and Lifshitz's Mechanics, section 30. – ZeroTheHero May 5 '17 at 2:33
• @ZeroTheHero I think, what's written in Landau-Lifshitz is analysis for the stable equilibrium, which is the one where the pendulum is in its lowest stable position. This situation here is much more complicated, because the equilibrium upstairs is very unstable and getting it to become stable with a careful selection of $A$ and $\omega$ is quite a challenge. But that's ok, it happens to Zero to loose his eyes in a fruitcake :D... – Futurologist May 8 '17 at 21:16
• @Futurologist you could be right (about the fruitcake) and I would have misread... I have seen this solution somewhere for sure... I know this because I assigned this as a numerical problem to a student several years ago and we set it up in our lab, albeit in a slightly different way. Unfortunately I am away this month so my resources are not nearby... :( – ZeroTheHero May 8 '17 at 21:44
• @ZeroTheHero That sounds interesting... what did you guys obtained as results? I am very curious now. If and when you have time, please share. – Futurologist May 8 '17 at 22:27

It seems to me your equation of motion is wrong. I tried quickly to derive the Lagrangian and I got (hopefully didn't mess up the pluses and minuses) the Lagrangian $$\mathcal{L}(\alpha, \dot{\alpha}, t) = \frac{m}{2} \Big(L^2 \, \dot{\alpha}^2 \, + \, 2LA\omega \, \sin(\omega t) \cos(\alpha) \, \dot{\alpha} \Big) \, - \, mgL \, \cos(\alpha)$$ but you can cancel out the constant $m$ and $L$ so you get $$\mathcal{L}(\alpha, \dot{\alpha}, t) = \frac{1}{2} \Big(L \, \dot{\alpha}^2 \, + \, 2A\omega \, \sin(\omega t) \cos(\alpha) \, \dot{\alpha} \Big) \, - \, g \, \cos(\alpha)$$ This Lagrangian yields the Euler-Lagrange equation $$\frac{d}{dt} \Big( \, L \, \dot{\alpha} \, + \, A\omega \, \sin(\omega t) \cos(\alpha) \,\Big) = g \, \sin(\alpha)$$ which expands to $$L \, \ddot{\alpha} \, + \, A\omega^2 \, \cos(\omega t) \cos(\alpha) \, - \, A\omega \, \sin(\omega t) \sin(\alpha)\, \dot{\alpha} \, = \, g \, \sin(\alpha)$$ $$L \, \ddot{\alpha} \, = \, g \, \sin(\alpha) \, - \, A\omega^2 \, \cos(\omega t) \cos(\alpha) \, + \, A\omega \, \sin(\omega t) \sin(\alpha)\, \dot{\alpha}$$ This equation technically does not have equilibrium for $\alpha(t) \equiv 0$. What it does have, at least for small enough $A\omega$, is a periodic solution $\alpha_0(t + T) = \alpha_0(t)$ with $T = \frac{2\pi}{\omega}$, corresponding to an equilibrium. A quick qualitative analysis of the dynamical system generated by this equation shows that when $A\omega = 0$ this system is the usual pendulum and the periodic solution $\alpha_0(t)$ turns into an honest saddle point equilibrium $\alpha_0(t) \equiv 0$, which is a very unstable equilibrium. At the same time, this saddle equilibrium is structurally stable, meaning that small perturbations of the structure of the system, like allowing for very small, nonzero values of $A \omega \neq 0$ preserve the dynamical nature of this system nearby the periodic solution $\alpha_0$. In other words, for very small $A\omega$ the solution $\alpha_0$ is going to be a periodic orbit has behavior of a saddle-like periodic orbit, so it is highly unstable. To achieve stability, you need at least very large values for $A\omega$ (high frequency $\omega$ or very high amplitude $A$). I am assuming one could achieve that by adding a restricting condition of stability, turning this problem into a control system problem (the original equation plus an inequality condition with a Lyapunov function, depending on $A, \omega$), where one searches for control values of $A, \omega$ for which the equilibrium-like periodic solution $\alpha_0(t)$ is stable. Looks involved. So the question is, how badly do you need to solve something like this?