# Lagrangian of inverted pendulum

1. Sep 24, 2008

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.