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
  • 201,751
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
  • 2
  • 9
  • 2
    I can already picture you having a mental breaking down after realizing it was just this all along. No worries man, it happens to everyone, sometimes we get so stuck we start to question if 2+2=4. – PedroDM Apr 25 '20 at 12:18
  • Yes really! I failed to notice that $T$ also depends on $\theta$. This was a really stupid mistake, thank you very much for clearing it up. And, it isn't an inverted pendulum above a cart, it is a pendulum below the cart. – ModCon Apr 25 '20 at 12:20
  • Hi PedroDM, you can use \left( and )\right in MathJax to automatically adjust the sizes of ( and ) respectively. –  Apr 25 '20 at 12:25
  • Oh thanks Fake Mod, I'm sorry for the bad formatting, I just copied from the OP cause I thought it was quicker and good enough. Thanks for the advice. – PedroDM Apr 25 '20 at 12:38