2

I am solving a pendulum attached to a cart problem. Without going into unnecessary details, the generalised coordinates are chosen to be $x$ and $\theta$. The kinetic energy of the system contains a term (which contains) $\dot x\dot\theta\cos\theta$. Now when evaluating $\frac{\mathrm d}{\mathrm dt}(\frac{\partial T}{\partial\dot\theta})$ for this term, should the answer be just $\ddot x\cos\theta$ or $\ddot x\cos\theta-\dot x\dot\theta\sin\theta$? The former gives the correct equation of motion but I am not able to understand why it is not the latter, because $\theta$ also varies with time. I have checked that my kinetic energy expression is correct.

EDIT: To make the question clearer, I do not have a doubt in the fact that $$\frac{\partial}{\partial\dot\theta}(\dot x\dot\theta\cos\theta)=\dot x\cos\theta$$ My doubt is what is $$\frac{\mathrm d}{\mathrm dt}(\dot x\cos\theta)$$ equal to, more particularly, do we use the product rule to evaluate it or not? Because the correct answer seems to come about without using the product rule but that would mean assuming $\theta$ does not depend on time. Where am I wrong?

Qmechanic
  • 220,844
ModCon
  • 192

1 Answers1

3

By the looks of it you are trying to solve the "inverted pendulum above a cart problem".

You are just making an algebraic mistake. $\theta$ does depend on time and should be derived, and of course, you can never skip the product rule.

So you had: $$\frac{\mathrm d}{\mathrm dt}\left(\frac{\partial L}{\partial\dot\theta}\right)$$ and this gives $$\ddot x\cos\theta-\dot x\dot\theta\sin\theta$$ But thats not the entire story, Euler's formula is: $$\frac{\mathrm d}{\mathrm dt}\left(\frac{\partial L}{\partial\dot\theta}\right)-\frac{\partial L}{\partial\theta}=0$$ and $$-\frac{\partial L}{\partial\theta}=+\dot x\dot\theta\sin\theta$$

so... as you expected no terms with $\dot\theta$.

PedroDM
  • 381