# Energy Conservation + Lagrangian = Big Headache

1. Dec 19, 2004

### cepheid

Staff Emeritus
I hesitated to ask this question because of all of the TeXing it would necessarily involve, but it's driving me nuts. Our prof gave us this question in the practice final, but I'm not posting it in HW help, because he's asking for a derivation straight from his notes. I already have the answer. It is the derivation I take issue with. When my friend and I tried it ourselves, we ran into a glaring inconsistency. So it is a theoretical/conceptual point: Here is the problem:

The energy of a system is defined as:

$$E = \frac{\partial L}{\partial \mathbf{\dot{q}}} \mathbf{\dot{q}} - L$$

where $L(\mathbf{q}, \dot{\mathbf{q}})$ is the Lagrangian of the system, and the N-dimensional vectors q, q dot, represent the generalised 'position' and 'velocity' coordinates.

(i) If L does not depend explicitly on t, show, with the aid of Lagrange's equations, that dE/dt = 0, ie that E is a constant of the motion.

So, we start out with:
dL/dt = 0.....................[1]

The "homogeneity of time" is the fundamental principle from which he led us to believe, the law of conservation of energy arises. Yet, if you check out his derivation:

$$\frac{\partial L}{\partial t} = \frac{\partial L}{\partial \dot{q}} \frac{d \dot{q}}{dt} + \frac{\partial L}{\partial q} \frac{dq}{dt}$$

$$= \frac{\partial L}{\partial \dot{q}} \ddot{q} + \frac{\partial L}{\partial q} \dot{q}$$

But Lagrange's equation states that:

$$\frac{\partial L}{\partial q} = \frac{d}{dt} \left(\frac{\partial L}{\partial \dot{q}}\right)$$

Substituting this back into the chain rule expression for dL/dt:

$$\frac{\partial L}{\partial t} = \frac{\partial L}{\partial \dot{q}} \ddot{q} + \frac{d}{dt} \left(\frac{\partial L}{\partial \dot{q}}\right) \dot{q} =0$$

So, from the Product Rule:

$$\frac{\partial L}{\partial t} = \frac{d}{dt} \left(\frac{\partial L}{\partial \dot{q}} \dot{q}\right)$$ ...................[2]

Then in his notes, he says something like: Condition [1] allows us to drop the dL/dt term from [2]. But if you look at his remaining derviation, he NEVER DOES THAT! Instead, he just brings dL/dt over to the other side of [2]:

$$\frac{d}{dt} \left(\frac{\partial L}{\partial \dot{q}} \dot{q}\right) - \frac{\partial L}{\partial t} = 0$$

$$\frac{d}{dt} \left(\frac{\partial L}{\partial \dot{q}} \dot{q} - L\right) = 0$$

which, from the definition of Energy:

$$= \frac{dE}{dt} = 0$$

What the hell? Where in this derivation does he ever make use of the fact that dL/dt = 0??? It would be exactly the same and give exactly the same results if dL/dt were non-zero! So, according to his derivation, the homogeneity of time has nothing to do with the law of conservation of energy. What is going on here?

Last edited: Dec 19, 2004
2. Dec 19, 2004

### Galileo

Only if all the forces involved are conservative does the Langrangian take the form:
$$\frac{\partial L}{\partial q} = \frac{d}{dt} \left(\frac{\partial L}{\partial \dot{q}}\right)$$

So the conservation of energy comes from this equation.

3. Dec 19, 2004

### pmb_phy

To be precise - That is the energy function. It does not always equal the energy. For a counter example see Goldstein's Classical Mechanics text. The page number depends on edition you have so if you want to look it up then let me know what version you have and I'll see if I can find it.

You're starting out wrong. Don't assume L does not depend on t to start with. Plug that in at the very end. Otherwise you won't see where the partial derivative of L comes in. You also started out by making an error (the partial derivative of L does not have the form you wrote. That is the total derivative on the right and the partial derivative on the left). You should have wrote

$$\frac{dL}{dt} = \frac{\partial L}{\partial \dot{q}} \frac{d \dot{q}}{dt} + \frac{\partial L}{\partial q} \frac{dq}{dt} + \frac{\partial L}{\partial t}$$

I've worked this all out before on my website so you can see the derivation there

http://www.geocities.com/physics_world/sr/relativistic_energy.htm

A force is conservative if (1) the Lagrangian has the form L = T - U where U = generalized potential and (2) L does not depend on time explicitly. Thus if you have a time dependant potential function Lagrange's equation takes the form you stated but the system won't be conservative and if the energy function = total energy then dE/dt will not vanish.

Pete

4. Dec 19, 2004

### marlon

So, we start out with:
dL/dt = 0..............THIS IS WRONG!!!!!!!.......[1]

Your first rule : dL/dt is WRONG. Keep in mind that it is the partial derivative of L with respect to t that is 0 because L does not depend explicitely on t...
$$\frac{\partial L}{\partial t} = 0$$ and not $$\frac{dL}{dt} = 0$$

Here you calculate dL/dt with the partial derivative of L with respect to t set equal to 0 :
$$\frac{dL}{dt} = \frac{\partial L}{\partial \dot{q}} \frac{d \dot{q}}{dt} + \frac{\partial L}{\partial q} \frac{dq}{dt} + (\frac{\partial L}{\partial t} = 0)$$

$$= \frac{\partial L}{\partial \dot{q}} \ddot{q} + \frac{\partial L}{\partial q} \dot{q}$$

But Lagrange's equation states that:

$$\frac{\partial L}{\partial q} = \frac{d}{dt} \left(\frac{\partial L}{\partial \dot{q}}\right)$$

Substituting this back into the chain rule expression for dL/dt:

$$\frac{dL}{dt} = \frac{\partial L}{\partial \dot{q}} \ddot{q} + \frac{d}{dt} \left(\frac{\partial L}{\partial \dot{q}}\right) \dot{q}$$ You wrote =0 here but this is NOT true since dL/dt does not equal zero. It is the PARTIAL DERIVATIVE OF L WITH RESPECT TO t THAT EQUALS ZERO...

So, from the Product Rule:

$$\frac{dL}{dt} = \frac{d}{dt} \left(\frac{\partial L}{\partial \dot{q}} \dot{q}\right)$$ ...................[2]

So basically you use the fact that the partial derivative of L with respect to t is zero and this yields [2]. Now put in [2] all formula's to one side and you have following expression :

$$\frac{d}{dt} \left(\frac{\partial L}{\partial \dot{q}} \dot{q}\right) - \frac{dL}{dt} = 0$$

$$\frac{d}{dt} \left(\frac{\partial L}{\partial \dot{q}} \dot{q} - L\right) = 0$$

which, from the definition of Energy:

$$= \frac{dE}{dt} = 0$$

regards
marlon

Last edited: Dec 19, 2004
5. Dec 19, 2004

### pmb_phy

I think we were typing at the same time!

Pete

6. Dec 19, 2004

### marlon

Yeah seems like it

lol

marlon

7. Dec 19, 2004

### dextercioby

If the Lagrangian does not depend on time explicitely,then the equations of Lagrange take a simple form:
$$\frac{\partial L}{\partial q^{i}}=\frac{d}{dt}(\frac{\partial L}{\partial\dot{q}^{i}}) (1)$$

Apply the operator $\frac{d}{dt}$ on the definiton of energy and take into account the Lagrange equations (1):
$$\frac{dE}{dt}=\frac{d}{dt}(\frac{\partial L}{\partial\dot{q}^{i}}\dot{q}^{i})-\frac{dL}{dt}$$

$$\frac{dE}{dt}=[\frac{d}{dt}(\frac{\partial L}{\partial\dot{q}^{i}})]\dot{q}^{i}+\frac{\partial L}{\partial\dot{q}^{i}}\ddot{q}^{i}-\frac{\partial L}{\partial q^{i}}\dot{q}^{i}-\frac{\partial L}{\partial\dot{q}^{i}}\ddot{q}^{i}$$

Reduce the 2 identical terms with opposite signs,and make use of the equations (1) (Lagrange)
$$\frac{dE}{dt}=\frac{\partial L}{\partial q^{i}}\dot{q}^{i}-\frac{\partial L}{\partial q^{i}}\dot{q}^{i}=0$$

q.e.d.

Daniel.

PS.It's the only way.

8. Dec 19, 2004

### dextercioby

Damn,Marlon,u beat me up to it.What a jerk,that teacher. :rofl:

Daniel.

EDIT:And Galileo and Pete,oh my god!!!!!!!I suck today. :yuck: But i know,it was from the damn indices.A theorist never forgets about indices... :tongue2: :tongue2:

Last edited: Dec 19, 2004
9. Dec 19, 2004

### pmb_phy

Except for calling that the energy his teacher is 100% correct.
Lagrange's equation's takes that form even if the Lagrangian is an explicit function of time.

Question: What does the "1" on the right hand side mean?

Pete

10. Dec 19, 2004

### dextercioby

1.It was a number,Pete,a number for an equation.Actually more equations... :tongue2:
2.You're right about the form:i wanted to write that total derivative explicitely,but then i realized i don't need its explicit form,as it would cancel out with the one in the energy total derivative.
3.He's a jerk,mixing total and partial derivatives wrt to time,proving he's got no idea whatsoever about what he's teaching.Damn,it makes me sick to think those teachers are gettin' paid,instead of kicked out... :yuck:

Daniel.

11. Dec 19, 2004

### pmb_phy

Oy! How did I miss something so simple!?!?
Recall what cepheid wrote
The derivation that cepheid posted was not a derivation made by his professor. Its a derviation that cepheid and his friend did.

Pete

12. Dec 19, 2004

### dextercioby

1. :rofl: It's curious,i made reference to it/them (to (1)) a couple of times... :tongue2:
2.I didn't read that part. :surprised Well,i guess i should appologize to Mr.Professor.Maybe he ain't a loser after all... :tongue2: Anyway,then it's cepheid's fault.Had he gotten the lecture notes (presumably correct),then should have made head and tail out of a simple derivation...
For now,i guess he's lost for theoretical physics... Or maybe not,though...It's up to him,anyway...Those calculations are terribly simple.

Daniel.

13. Dec 19, 2004

### marlon

I think that assigning faults is not the best strategy here in order to correct or solve any given problem at any given time...

???? This ain't got nothing to do with theoretical physics, this is standard - basic physics...

regards
marlon

14. Dec 19, 2004

### pmb_phy

Its not like I never made really dumb mistakes in my academic career.

I'll never forget a mistake when I was taking a linear algebra exam. The dimensions of the product of a 2x2 matrix and a 2x2 matrix is a 2x2 matrix and that was the problem I was working with, i.e. I was working with a 2x2 matrix. But there was a simply arithmetic calculation I had to make. That calculation is "2 times 2". I thinking about "2x2 matrix times a 2x2 matrix is a 2x2 matrix" and I guess that's why I kept writing 2x2 = 2. :yuck:

It took me a while to figure out what I was doing wrong since the answer seemed wrong. When I realized what I was doing I corrected it and got the answer right. But I'll never fporget that very dumb mistake!

Pete

15. Dec 19, 2004

### dextercioby

Yes,Marlon,but a little "critique" never hurt nobody,right...??It's better that someone pin points your mistakes and says something harsh.Who knows,if the shock's is too big,you might get the chance to wake up... :tongue2:

Analytical Mechanics is part of theoretical phyiscs and it's the first theory course a student deals with in college/university.I agree,these calculations are simple.Basic,if u want to... But if u screw them up and nobody steps up to correct your mistakes,what chances will u get to compute,let's say,the charge for the Dirac field evaluated on the solutions of the field equations and hence prove it describes two types of charged particles...????

I have a greater one.First semester.Second year.Exam on Magnetism.A problem which asked to compute a magetic flux through 500 spires.Evidently i computed the contribution of one spire and forgot to multiply by 500.At the end of the exam,i was able to convince both my teacher and some collegues (who had obtained the correct result) that my result was the good one and "Yes,the magnetic flux can be that small..."

Daniel.

16. Dec 19, 2004

### marlon

My biggest mistake is this one : on my crystallography-exam the prof asked me to explain how X-rays are generated and also to explain the spectrum. I answered that it was an incident ray of photons that excites some target atom in stead of an incident electron-ray...

regards
marlon

17. Dec 19, 2004

### pmb_phy

I believe I have the world record though - Not knowing the equality "2x2 = 4" on a math exam!

I challenge someone show me that did something dumber! :rofl:

Pete

18. Dec 19, 2004

### cepheid

Staff Emeritus
Guys...Thank you for all of the feedback. But...please go easy on us! I agree only 50% with Daniel. It is better that someone pinpoint our mistakes, but there is no need to say anything harsh. Daniel went from saying that our teacher was an idiot, to saying that I was an idiot, in the span of two posts! :tongue2: This is our first course in Lagrangian mechanics, and in a certain sense, our teacher is a bonehead, because although he may have been 100% correct in that he knows his stuff, he does not present it in a coherent and comprehensible manner in his notes. Frequently, they contain many small typos/errors/mistakes/ambiguities that can seriously affect our actual understanding of the physics involved.

1. Yes, my friend and I did try the derivation ourselves, but do you not think that afterwards we didn't check it against his notes to see whether or not we had made a mistake? His notes were...much the same as how I presented it. They were...in such a state that...the result our attempt to check and see if we had made a mistake was...indeterminate. :rofl:

2. I am embarrassed. I do know the difference between a total and a partial derivative, and I should have seen that the LHS was a total derivative based on the RHS, and understood that the question said L does not depend explicitly on t, from which we can glean ONLY that the partial derviative wrt was zero. Oh man...but keep in mind that he frequently switches back and forth between curly/straight d's in his notes without realising it, leaving us to deduce what the correct form should be. I told you...the guy knows his stuff, but he's lazy...and careless. So I'd like to claim (to use a comp sci analogy) that my mistake was a "syntax error", not a "logic error", but I should have caught it...

3. Goldstein was the text for this course in the past, but not this year for some reason. We have only to rely on his notes (which sometimes require a Rosetta stone to decipher) and a Schaum's outline which he recommended we buy..but this is supposed to supplement a text, not BE a text!!. As for the level of the course...on the one hand we are not smart enough for him to go into details like the difference between 'energy function' and energy, yet on the other hand, the math is being presented at the highest level possible!! We hadn't even done the Fourier transform until this semester, yet, a thorough knowledge of it was expected for the course. Why are we being treated like grad students (to whom all this stuff is elementary) in our third year undergrad? We hadn't the foggiest idea what "Tensors" were (and still don't), nor the "Green's function", yet he took it upon himself to teach them to us, which would have been great if he had actually taught them. But his "teaching" entailed saying a few words about it in class, noting that the results he was summarizing were "obvious", and then putting the rest in an "appendix" in the notes (or sometimes just claiming he would...later). I kid you not...he did the exact same thing so many times, that it has become a standing joke in the class.

Thank you for allowing me to release at least some of my pent up angst...however my exam in this course is tomorrow, so I'm gonna get back to work.

Last edited: Dec 19, 2004
19. Dec 19, 2004

### pmb_phy

I always go easy. I think the others were a bit harsh on you.
I agree.
Ah yes. Been there and done that my friend.
If I give you my personal e-mail address can you scan his notes and e-mail it to me?
Then this is a good learning experience for you. I'm surpised that it took you this long to get to this though. Normally one does this at home when you're up studying to all hours of the night. I highly recommend that you find a nice text which describes these things and then go through each derivation step by step until you can do it on your own without the text in front of you. As Sophocles once said

You've just learned a valuable lesson.
Make it a rule to never try to blame the teacher. If he's a nut then pay attention to the subject at hand and then hit the library and find a decent text in which you understand the derivation. That's why I always did.
Good. Goldstein is pretty advanced. That is no book for an undergrad.

No you don't. You have a library right? I know you have access to the internet. There's tons of stuff on the internet. I have the lecture notes from the Harvard course in PDF format. I can e-mail them to you if you'd like.
If he didn't mention it then its bad. His students will get the wrong impression that its always the energy function.
I'll hold him down and you slap him.

I knew of a prof who was like that. After I graduated from the college I went to my friend started in physics there. There was a new prof. This was his first teaching job. He started teaching my friend EM with tensors etc. My friend went nuts. He didn't learn EM from that guy that's for sure. But that prof is gone. He never made tenur.
Do you want to know them? I can't see how you'd need them at this level.
I never liked those things. They irritated me.

No problem. Been there, done that. Feel free to vent. It always helps.

You can e-mail me if you'd like. I can be of more help in e-mail.

Pete

ps - A friend of mine has a web site with good stuff on it for you. Please see
http://www.eftaylor.com/leastaction.html

20. Dec 21, 2004

### pmb_phy

Hold on. I'm not 100% sure of that energy/energy function comment I made. I know that the Hamiltonian does not always equal the energy. Whether the energy function always equals the energy .... I'm not quite sure. I don't think so.

The example I mentioned is in Goldstein's 3rd Ed. page 346 section 8.2. The problem involves a moving constraint.

Pete