# Lagrangian for inverted pendulum

An inverted pendulum consists of a particle of mass $$m$$ supported by a rigid massless rod of length $$l$$. The pivot $$O$$ has a vertical motion given by $$z=Asin\omega t$$. Obtain the Lagrangian and find the differential equation of motion.

I'm not sure how to obtain the kinetic and potential energies. For the potential energy, would it just be
$$V=mglcos\theta+Asin\omega t$$?

And is the kinetic energy
$$T=\frac{1}{2}m(l^{2}\dot{\theta}^{2}+A^{2}\omega^{2}cos^{2}\omega t)$$?

Since the Lagrangian wouldn't be time-independent, would this in any way affect the Euler-Lagrange equation, or would it remain the same?

Thanks, all.

Also, when the problem says 'inverted pendulum', does this mean that there's some kind of force preventing the pendulum from rotating to an equilibrium position (i.e. hanging straight down)? When I think of it, I visualize something like a metronome... does this sound right?

I saw this video on YouTube, and I just understood what it means by "inverted pendulum":

I guess the one in the problem is identical to this one, exact that the motion is vertical and given by the equation above.

So any ideas on the kinetic and potential energies, or on how the Euler-Lagrange equation changes if they're explicitly time-dependent?

Last edited by a moderator:
Well, as far as I can see in derivations, a rheonomic constraint shouldn't really matter. But what should I do with the time? Should I just ignore it and use the Euler-Lagrange equation normally, or should I treat it as a generalized coordinate?

And does anyone have any suggestions for the kinetic and potential energies?