# Homework Help: Lagrangian, proof

1. Apr 24, 2010

### fluidistic

1. The problem statement, all variables and given/known data
The main problem is that I do not understand the problem. Here it is: A particle describes a one-dimensional motion under the action of a conservative field: $$\ddot r =-\frac{dU(r)}{dr}$$.
Consider now the following coordinates transformation: r=r(q,t). Demonstrate that the generalized coordinate q(t) satisfies Euler-Lagrange's equation, namely $$\frac{d}{dt} \left ( \frac{\partial L}{\partial \dot q} \right ) -\frac{\partial L}{\partial q}=0$$. Note that $$L(q, \dot q , t)=T(q, \dot q ,t)-U(q,t)$$.

2. Relevant equations

3. The attempt at a solution
I fail to understand what is the "coordinates transformation". Do they mean a "coordinates system" that moves with a uniform velocity with respect the the first one? I'm not getting this at all.
I give it another try: I choose the origin as being in the straight line of the particle's motion. The particle's distance from me is r. It is convenient to use vectors instead of modulus but anyway... So the transformation transforms my "r" into "r(q,t)". What's that? I still don't understand.

2. Apr 24, 2010

### gabbagabbahey

The simply mean that any coordinate transformation from $r$ and $t$ to $q$ and $t$ can be described in functional form as $r=r(q,t)$. For example, it could be the transformation given by $r=3q^2-t$ or any other transformation.

In order to solve the problem at hand, try computing $\frac{d}{dt} \left ( \frac{\partial L}{\partial \dot q} \right ) -\frac{\partial L}{\partial q}$ using the chain rule, and then show that as long as $\ddot{r}=-\frac{dU}{dr}$, the result is zero.

3. Apr 24, 2010

### fluidistic

Thanks for the help. I'm sorry, I didn't copy well the problem. It is $$m\ddot r = - \frac{dU(r)}{dr}$$. Hopefully it doesn't change almost anything.
$$\frac{\partial L}{\partial q}=\frac{\partial T (q, \dot q , t)}{\partial r} \cdot \frac{\partial r }{\partial q} - m \ddot r \cdot \frac{\partial r}{\partial q} = \frac{\partial r}{\partial q} \left ( \frac{\partial T}{\partial r} - m \ddot r \right )$$.
And if I'm not wrong, $$\frac{\partial L}{\partial \dot q}=0$$.
Hence E-L's equation is satisfied if and only if $$\frac{\partial r}{\partial q} \left ( \frac{\partial T}{\partial r} - m \ddot r \right )=0$$. I don't think it's true so I made at least an error.

4. Apr 24, 2010

### gabbagabbahey

Good...and what is $\frac{\partial T}{\partial r}$ for a particle moving in one dimension? (What is $T(r,\dot{r},t)$?)

Why do you think this?

5. Apr 24, 2010

### fluidistic

Is it just 0? Since T=(m/2) (dot r) ^2, since there's no r, if you derivate with respect to r it's 0.

Oops you're right, it's not worth 0 since T does depend on velocity.
I reach, as E-L equation: $$\frac{\partial r}{\partial q} \left ( \frac{\partial T}{\partial r} -m \ddot r \right ) - \frac{\partial r}{\partial \dot q} \cdot \frac{\partial T(q, \dot q , t)}{\partial r}=0$$.
Which reduces to $$\frac{\partial r}{\partial q} \ddot r =0$$... which is untrue.

6. Apr 24, 2010

### gabbagabbahey

Yes. $T$ has no explicit dependence on $r$, so the partial derivative is zero.

How are you getting this?

$$\frac{d}{dt}\left(\frac{\partial L}{\partial \dot{q}}\right)=\frac{d}{dt}\left(\frac{\partial T}{\partial \dot{q}}\right)\neq \frac{\partial r}{\partial \dot q} \cdot \frac{\partial T(q, \dot q , t)}{\partial r}$$

Last edited: Apr 24, 2010
7. Apr 24, 2010

### fluidistic

Ok thanks for the clarification.

I made a typo error, I meant $$\frac{\partial r}{\partial q} \cdot \frac{\partial T(q, \dot q , t)}{\partial r}$$.
Now I believe that $$\frac{\partial L}{\partial \dot q}=\underbrace{\frac{\partial T (q, \dot q , t)}{\partial r}}_{=0} \cdot \frac{\partial r}{\partial \dot q}=0$$. So I reach once again $$\frac{\partial L}{\partial \dot q}=0$$. Here I don't see any error but it seems false.
I'm checking once again my arithmetics and I don't see any error. I reach that E-L equations holds if $$\frac{\partial r}{\partial q} \ddot r=0$$ which holds, at least mathematically.

8. Apr 24, 2010

### gabbagabbahey

Let's check your calculation for a very simple transformation, say $r=2q$. Under this transformation, $T=\frac{1}{2}m\dot{r}^2=2m\dot{q}^2$, and so $\frac{\partial L}{\partial\dot{q}}=4m\dot{q}\neq0$...clearly there is something wrong with your application of the chain rule. So, what exactly is wrong? Simple; $T=\frac{1}{2}m\dot{r}^2$ depends on $\dot{r}$, which in turn depends on $\dot{q}$.

In general, $T$ a function of several variables, and the chain rule tells you

$$\frac{\partial}{\partial\dot{q}}T(r,\dot{r},t)=\frac{\partial r}{\partial\dot{q}}\frac{\partial T}{\partial r}+\frac{\partial\dot{r}}{\partial\dot{q}}\frac{\partial T}{\partial\dot{r}}+\frac{\partial t}{\partial\dot{q}}\frac{\partial T}{\partial t}=\frac{\partial r}{\partial\dot{q}}\frac{\partial T}{\partial r}+\frac{\partial\dot{r}}{\partial\dot{q}}\frac{\partial T}{\partial\dot{r}}$$

(The last term is obviously zero since $\frac{\partial t}{\partial\dot{q}}=0$)

9. Apr 25, 2010

### fluidistic

Ok I see.
Ok I must do a quick review of calculus 3. I have a question though... If you simplify the expression this way for each term: $$\frac{\partial r}{\partial \dot q} \frac{\partial T}{\partial r}$$ to $$\frac{\partial T}{\partial \dot q}$$, you get $$\frac{\partial T}{\partial \dot q}=3\frac{\partial T}{\partial \dot q}$$.
So I'm guessing that the T's aren't all the same in each of the 3 terms of the sum. Is this right?

I don't really understand why it's true. $$\dot q$$ can depend on t, right? So we'd have $$\dot q (t)$$. Now I believe we could have a $$t(\dot q)$$ by taking the inverse function.
Now why $$\frac{\partial t}{\partial \dot q}=0$$, I have no idea.

I'm going to bed now, tomorrow when I wake up I check this problem. Thanks for everything once again.

10. Apr 25, 2010

### gabbagabbahey

You can only cancel out differentials like this when $T$ is a function of $r$ only. For example, $\frac{d}{dt}f(x)=\frac{dx}{dt}\frac{df}{dx}$ by the chain rule, so you can effectively cancel the $dx$'s to get $\frac{d}{dt}f(x)=\frac{df}{dt}$. But when your function depends on more than one variable, you get a sum of several terms (3 in this case) and if you naively cancel out differentials you get stuff like $\frac{\partial T}{\partial \dot{q}}=3\frac{\partial T}{\partial \dot{q}}$; which is clearly nonsense for nonzero $T$.

Now this is also a good question. Just remember that when you calculate a partial derivative you are always holding certain other variables constant. In this case, the Lagrangian is completely described by 3 variables; $q$, $\dot{q}$, and $t$...when you calculate the partial derivative w.r.t $\dot{q}$, you hold $q$ and $t$ fixed. Therefor, $\frac{\partial t}{\partial \dot q}=\frac{\partial q}{\partial \dot q}=0$.

You also have a related error in your earlier calculations for $\frac{\partial L}{\partial q}$, that I missed:

$$\frac{\partial T}{\partial q}\neq\frac{\partial r}{\partial q}\frac{\partial T}{\partial r}$$

you need to apply the chain rule properly.

Last edited: Apr 25, 2010
11. Apr 25, 2010

### fluidistic

Thanks once again for this very useful lesson.
I've tried to redo $$\frac{\partial L}{\partial q}$$ and I get the same "error". Let's see what I did. I'd appreciate if you could point me out where my mistake is.
$$\frac{\partial L}{\partial q}=\frac{\partial L}{\partial r} \cdot \frac{\partial r}{\partial q}+ \frac{\partial L}{\partial \dot q} \cdot \frac{\partial \dot q}{\partial q}+ \frac{\partial L}{\partial t} \cdot \frac{\partial t}{\partial q}$$$$= \left ( \frac{\partial T}{\partial r} - \frac{\partial U}{\partial r} \right ) \cdot \frac{\partial r}{\partial q}+\left ( \frac{\partial T}{\partial \dot q} - \frac{\partial U}{\partial \dot q} \right ) \cdot \frac{\partial \dot q}{\partial q}+ \left ( \frac{\partial T}{\partial t} - \frac{\partial U}{\partial t} \right ) \cdot \frac{\partial t}{\partial q}$$$$= \left ( \frac{\partial T}{\partial r} - \frac{\partial U}{\partial r} \right ) \cdot \frac{\partial r}{\partial q}= \left ( \frac{\partial T}{\partial r} +m \ddot r \right ) \cdot \frac{\partial r}{\partial q}=\frac{\partial T}{\partial r} \cdot \frac{\partial r}{\partial q}$$.
I hope there's no typo. Where did I go wrong?

12. Apr 25, 2010

### gabbagabbahey

Your error is in your first step. You either treat $L$ as a function of $r$, $\dot{r}$ and $t$ or of $q$, $\dot{q}$ and $t$...you don't mix up coordinate systems like you've done and treat it as a function of of $r$, $\dot{q}$ and $t$.

$$\frac{\partial L}{\partial q}=\frac{\partial L}{\partial r}\frac{\partial r}{\partial q}+ \frac{\partial L}{\partial \dot{r}}\frac{\partial \dot{r}}{\partial q}+ \frac{\partial L}{\partial t}\frac{\partial t}{\partial q}$$

13. Apr 25, 2010

### fluidistic

Ah I see thank you. I will treat L as function of q, $$\dot q$$ and t. By the way, aren't you mixing the variables also by writing
? It seems that you've used $$L(q, \dot r , t)$$. Or I'm still missing the point?
Edit: Yeah I'm missing something, you also use r.

14. Apr 25, 2010

### diazona

No, that's being consistent. The q that appears in gabbagabbahey's expression comes from the q in the $\partial L/\partial q$.

Think of it like this: let's say you decide to treat L as a function of three variables, X, Y, and Z. (Could be $r,\dot{r},t$ or $q,\dot{q},t$ or...) And let's say you want to express $\partial L/\partial A$ using the chain rule, where A is some variable (could be $q$). You go through the list of variables that $L$ depends on, and for each one, write a term like this
$$\frac{\partial L}{\partial X}\frac{\partial X}{\partial A}$$
You could sort of think of it as multiplying both top and bottom by $\partial X$ (although that's really just a memory aid, not any sort of rigorous mathematics). Once you've done that for each variable, add them all up. You'd get
$$\frac{\partial L}{\partial X}\frac{\partial X}{\partial A} + \frac{\partial L}{\partial Y}\frac{\partial Y}{\partial A} + \frac{\partial L}{\partial Z}\frac{\partial Z}{\partial A}$$
So for example, expressing $L$ in terms of $q,\dot{q},t$ would get you
$$\frac{\partial L}{\partial q}\frac{\partial q}{\partial q} + \frac{\partial L}{\partial \dot{q}}\frac{\partial \dot{q}}{\partial q} + \frac{\partial L}{\partial t}\frac{\partial t}{\partial q}$$
If $q,\dot{r},t$ were a valid set of variables for expressing $L$, you would get
$$\frac{\partial L}{\partial q}\frac{\partial q}{\partial q} + \frac{\partial L}{\partial \dot{r}}\frac{\partial \dot{r}}{\partial q} + \frac{\partial L}{\partial t}\frac{\partial t}{\partial q}$$
But that doesn't work.

15. Apr 25, 2010

### gabbagabbahey

That won't help you much...you'll simply get $\frac{\partial L}{\partial q}=\frac{\partial L}{\partial q}$, since $\dot{q}$ and $t$ are held constant for the partial derivative w.r.t $q$.

Treat it as a function of $r$, $\dot{r}$ and $t$ instead and you will get what I posted above.