# Lagrangian of a system (First pages of L&L)

1. Apr 16, 2010

### fluidistic

1. The problem statement, all variables and given/known data
The problem can be found in L&L's book "Mechanics" in the end of the first chapter. (See the last picture of page 12 of http://books.google.com.ar/books?id...v+Davidovich+Landau"&cd=2#v=onepage&q&f=false ). The mass m1 is free to move on the x-axis. While the mass m2 moves like a pendulum. There's the gravitational acceleration $$\vec g$$. I must find the Lagrangian of such a system.
I keep getting $$L=\frac{m_1 \dot x ^2}{2}+\frac{m_2 }{2} \left [ \dot x ^2 +2 \dot{\vec x} \dot \theta l \cos (\theta) + \dot \theta ^2 l^2 +2gl \cos (\theta) \right ]$$. I see that I have an error: I have a vector $$\dot {\vec x }$$ which is impossible.
L&L's answer is $$L\frac{1}{2} (m_1+m_2) \dot x^2 +\frac{1}{2}m_2 (l^2 \theta ^2 +2l \dot x \theta \cos \theta)+m_2 g l \cos \theta$$.
I don't understand what I'm doing wrong. Also L&L don't have any $$\dot \theta$$ term... Mine appeared when I calculated T_2, the kinetic energy of m_2 in polar coordinates. When I derivated the position $$\vec r_2 =(\dot {\vec x} + l \sin \theta )\hat i + (l \cos \theta) \hat j$$ with respect to time I got some $$\dot \theta$$ terms.

Last edited: Apr 16, 2010
2. Apr 16, 2010

### Gokul43201

Staff Emeritus
Looks like a couple of typos in that version of L&L - the $l \theta$ terms in the solution ought to be $$l \dot \theta$$. You can tell by inspection that the posted solution is dimensionally off (missing a factor of 1/time).

As for your concern about having an vector $\mathbf{\dot x}$ ... what about the other vector in that term: $$\mathbf{\dot \theta}$$?

Last edited: Apr 16, 2010
3. Apr 16, 2010

### fluidistic

Ok thanks for the clarification.
If I understand you, $$\theta$$ is a vector? I'm not really swallowing it. Can you confirm this? It would makes sense anyway, but I don't understand it. Hmm not sure it would make sense since I'd have a $$\cos (\text{vector})$$ term which doesn't seem OK.

4. Apr 16, 2010

### Gokul43201

Staff Emeritus
No, my LaTeX is messed up. For some reason, I can't get inline tex tags to work properly (with \vec and \dot). Fixing it ... give me a minute.

EDIT: Fixed now.

5. Apr 16, 2010

### fluidistic

Ok perfect. I just found the same problem "explained in wikipedia" (see http://en.wikipedia.org/wiki/Lagrangian_mechanics#Pendulum_on_a_movable_support) but I still have my problem with $$\dot \vec x$$.
Here is what I do: $$\vec r_2 = (\vec x + l \sin \theta)\hat i +(l \cos \theta) \hat j$$.
In order to find the kinetic energy of $$m_2$$ (or m in wikipedia's article), I need the velocity squared. The velocity is $$\dot \vec r_2 =(\dot \vec x + \dot \theta l \cos \theta)\hat i +(- \dot \theta l \sin \theta) \hat j$$. Am I right until now?
So that $$|\dot \vec r_2|^2=(\dot \vec x + \dot \theta l \cos \theta)^2+(- \dot \theta l \sin \theta)^2= \dot x ^2 + 2 \underbrace{\dot \vec x}_{\text{this term}} \dot \theta l \cos( \theta ) + \dot \theta ^2 l^2 \cos ^2 (\theta)$$.
EDIT: I FIND MY MISTAKE! A beginner one. Of course, there is no vector. I expressed the components of r (a vector) as vectors! Problem solved!
Thanks for your time. Now I go back to play with these Lagrangians. :)

Last edited: Apr 16, 2010
6. Apr 16, 2010

### fluidistic

Out of curiosity, I've plugged the Lagrangian into Euler-Lagrange equation and since I have 2 generalized coordinates (x and theta), I've found 2 equations. Namely the one that is in wikipedia: $$\ddot x \cos (\theta) +l \ddot \theta + g \sin (\theta)=0$$ if I take $$\theta$$ as variable and another one if I take x as variable: $$m_2 \ddot x +2l \left [ \ddot \theta \cos (\theta) -\dot \theta ^2 \sin \theta \right ]=0$$.
Are they both the equations of motion? Or there's just one of these equations that describe the whole motion of the system?

7. Apr 20, 2010

### Gokul43201

Staff Emeritus
How many equations would you require to describe the motion of say a projectile?

8. Apr 20, 2010

### fluidistic

I think I made an error in my last post (I've redone the arithmetics and got a different answer), but my question doesn't change.
In this case I think I'd need 2 equations. One for the horizontal component of the position and one for the vertical component of the position vector; that is if I'm using Cartesian coordinates. If I derivate I get the velocity and if I derivate again I get the acceleration. I'd be done if I'm given the 2 initial conditions $$(\vec x_0, \vec v_0)$$. I hope I'm right on this.

But still, in the case of this pendulum I get 2 equations involving theta, x and their derivatives. Both equations are worth 0. Hence I can equate them and write the first minus the second =0 and I've all the information within 1 single equation. Is this right?