# Lagrangian - is it that hard?

1. Jan 11, 2010

### jpas

Hi!

I´m a senior high school student and I´m doing a school project about the conservation laws. I enjoy physics very much and I come asking you for advice. This is not a homework question.

After doing most of my work for the school project, I´ve been told that you can get a deeper knowledge of the conservation laws by studying lagrangian mechanics. I have got about four months to complete my work and about 6 hours a week to spare for this project. I´m familiar with one variable diferential and integral calculus (on the integral part, I´m not totally familiar, but I can calculate volumes and know how to integrate by parts and the substitution rule) . I´m on the very beginning of studying partial differentiation.

I´ve realised I have to master more mathematics to learn lagrangian mechanics and the thing itself looks challenging as well. I don´t really need to learn already how to solve complicated mechanics problems using lagrangian mechanics, I just need to know the conservation laws part. My physics teacher is very friendly, she has told me that she could help me if difficulties emerged.

So, I ask you for advice. Can I learn all the math and physics in four months? If so, where should I start? What´s the better book to work with? Am I way over my head?

Oh, one more thing: I´m portuguese. Thought it would be interesting...

Last edited: Jan 11, 2010
2. Jan 11, 2010

### TMFKAN64

OK, just believe this without any proof... the Lagrangian is just a function of position and velocity $$L(x, y, ... ,\dot{x}, \dot{y})$$, where $$x$$, $$y$$, etc. are some "generalized" coordinates that describe everything in your system. ($$\dot{x}=\frac{dx}{dt}$$.) Once you find the Lagrangian, the equations of motion are given by the Euler-Lagrange equations for each coordinate: $$\frac{d}{dt}\frac{\partial L}{\partial\dot x}=\frac{\partial L}{\partial x}$$.

So, what does this have to do with conservation? Well, suppose that $$x$$ does not actually occur in $$L$$, so $$\frac{\partial L}{\partial x}=0$$. Then, the Euler-Lagrange equation for this coordinate gives $$\frac{d}{dt}\frac{\partial L}{\partial\dot x}=0$$, or integrating $$\frac{\partial L}{\partial\dot x}=C$$.

If $$x$$ does not occur in $$L$$, there is a symmetry of some sort in this coordinate, and this leads directly to $$\frac{\partial L}{\partial\dot x}$$ being a conserved constant!

3. Jan 11, 2010

### jpas

I´m not sure I understood entirely what you said. I´m not familiar with this euler-lagrange equation. Still, what´s the big deal with that quantity you mentioned being a conserved constant?
So, do you think this is very hard to learn? Or am I making a storm on a glass of water? Is this a long or a brief subject?

4. Jan 11, 2010

Conserved quantities are helpful to integrate the differential equations of motion. In "general" if you have a differential equation of order n, every constant you know, it reduces the order (i.e. the highest derivative that appears) in one unit.

The quantities $$\partial_{\dot{x}} L$$ are called conjugated momenta and play a key role in a parallel formulation of the mechanics, the Hamiltonian one. It's quite important to know this conserved quantities, they help to reduce the difficulty of the problems

Let's work the most classical example in Lagrangian mechanics:

There are lots of situations in wich the lagrangian $$L$$ takes the form $$L=T-U$$ where $$T=\frac{1}{2}m\dot{x}^2$$ is the kinetic energy and $$U$$ is some potential function.

Suppose a particle of mass $$m$$ moving due to a force derived of a potential

$$F=-\frac{d}{dx}U(x)$$.

When applying the Euler-Lagrange equations (Tip: Here, the $$x$$ and the $$v$$ are indepedent variables, the functional dependence of the Lagrangian is quite important).

First step: Write the Lagrangian

$$L=\frac{1}{2}mv^2 - U(x)$$

Apply E-L equations:

$$\frac{\partial L}{\partial x} = - \frac{d}{dx}U(x)$$

$$\frac{\partial L}{\partial \dot{x}} = m\dot{x}$$

$$\frac{d}{dt}\frac{\partial L}{\partial \dot{x}} = m\dot{v}$$

And finally

$$-\frac{d}{dx}U(x)=F=m\dot{v}=ma$$

Newton's equation

If you want to study this stuff and you're in high school, my gratz for you only for knowing that this actually exists. You want to study analytical mech? It's going to be a hard road especially if you haven't taken any differential equations and several variables courses (my advice is that you should take this before analytical mech), but yes, this is absolutely elegant and awesome physics.

The Lagrangian formulation and the Lagrangian aproach to a theory of physics is quite elegant and can be generalised. Even the whole Standard Model can be written in terms of a Lagrangian (please don't try to do this at home lol).

Well some random thoughts, hope it helps

5. Jan 11, 2010

### TMFKAN64

The derivation of the Euler-Lagrange equation isn't really that difficult... but it is longer than a single post. It's the reason that people study Lagrangian mechanics though... it's a way to easily get the equations of motion. As Advent pointed out, they give the same equations as Newton's laws would, but by phrasing it this way, you can see the importance of symmetry more easily.

Conserved (constant) quantities are important because they give us a simple way to solve problems. For example, suppose I tell you I have a 1kg weight at a height of 100m, and I drop it and ask you what velocity it will have when it hits the ground (neglecting air resistance). You could use F=ma to solve this... but isn't it much easier to say that total energy is a constant, so $$mgh=\frac{1}{2}mv^2$$?

Physics majors usually take an advanced dynamics course that covers Lagrangian mechanics with applications during their sophomore or junior year. I'm just hoping that you can understand the fundamentals here and see why it is considered an important topic.

6. Jan 11, 2010

### TMFKAN64

I'll just add one more thing:

If the Lagrangian doesn't depend on time, then total energy is conserved.
If the Lagrangian doesn't depend on some linear coordinate, then momentum in that direction is conserved.
If the Lagrangian doesn't depend on some particular angle, then angular momentum in that direction is conserved.

And so on...

7. Jan 11, 2010

### jpas

Nice reply. Unfourtunately, there aren´t any of those courses available for me.

I think I understood your application, thank you for using small, simple steps. Still, not everything is clear. First, what does it mean to say that L is a function of x , y, dx/dt,... ? Does it add these coordinates? Does it even matter?

Secondly, and I´m a bit embarassed by this, what is a potential? I usually use potential energy to solve physics problems, but remember, I´m on high school, don´t really know mathemathicly what a field is. I just use the intuitive sense of what potential energy is. How come force is the symmetric of the derivative of the potential in order to x? Are these questions too hard to answer, at my level? Sorry if I´m being too repetitive, but I´m really concerned about not getting into things over my head. Sorry, if I´m being a pain in the ***.

TMFKAN64,

nice insights. The importance of Lagrangian mechanics seems to be that the conservation laws are derived from it whithout using newton´s laws. We can even derive newton´s laws from the lagrangian, right?
We only need the lagrangian not to depend on something, whether it´s time, some linear coordinate or a particular angle, for something to be conserved. So, how can you know that the lagrangian does not effectively depend on time, or on some other coordinate or angle? Is it an assumption so that the conservation laws are verified? What does symmetry have to do with this? Last question, why does L= T - V . Sorry to you too if I´m annoying.

8. Jan 11, 2010

### twofish-quant

There are two important things about Lagrangian mechanics.

1) You can using it to magically solve very complex problems that you wouldn't be able to using Newton's equations. You write down a few equations, plug and chug through the magic box, and things magically work. Now explaining *why* the magic box works takes a bit of doing.

2) The second useful part of Lagrangian mechanics, is that modern physics regards the Lagrangian as more fundamental. What you do in a lot of particle physics is to start with a symmetry, write a Lagrangian that gives you that symmetry and then go from those to Newton's laws or whatever.

[q]So, how can you know that the lagrangian does not effectively depend on time, or on some other coordinate or angle?[/q]

Someone gives you the problem. In some situations the lagrangian does depend on time. For example if you have a speed boat with an engine.

9. Jan 11, 2010

As stated by me mechanics professor yes it does matter, but it's not trivial to get the idea. When you write down f=f(x) you specify that f is a function that depends on x and only on x. More general f=f (some symbol) means that f depends on some symbol whatever they will be. Then, if you have $$L(q,\dot{q},t)$$ you mean that the function L, the Lagrangian, depends on that three variables, this is multivariable calculus. For example you have a Lagrangian $$L=2x+9\dot{x}^2+3t$$. If you remember the Euler Lagrange equations (the magic box as twofish said) you have to compute $$\partial_{x}L$$ and $$\partial_{\dot{x}}L$$ (I changed the notation because it's more clear, no fractions and the post looks better, hope it does not confuse you. If it does, write down on a paper what I'm posting here, it helps). So let's do it for this Lagrangian

$$\partial_{x}L=2$$

As you see we have a term $$9\dot{x}^2$$ in the Lagrangian, but we don't care of it when we are differentiating with respect to x, even when it's a clearly obvios relation between $$x$$ and $$\dot{x}$$ namely derivative. This is functional dependence on the Lagrangian, Lagrange thought that would be helpful to think of $$x$$ and $$\dot{x}$$ as somekind of independent variables. Now, with

$$\partial_{\dot{x}}L=18x\dot{x}$$

Chain rule was used above.

It does not add coordinates, and it does matter as I hope you can see a little beat clearer now.

A potential is a function $$f: \mathbb{R} \rightarrow \mathbb{R}$$ in our case. In a most general case, for example somekind of electric potential in the space $$f: \mathbb{R}^3 \rightarrow \mathbb{R}$$. Do you understand that notation?

The force, well, what i said it was no true in every situation but there are a lot of situations in wich the force is the derivative (in multivariable calculus the nabla operator) of some potential function.$$f=-\nabla U$$. In friction this does not work, but for gravitational forces, Hooke's Law, Lorentz Force this works well. There is a really nice exercise you can look for that is, given a Lagrangian for a particle in an Electromagnetic Field, the Euler-Lagrange equations automatically (after some algebra) leads to the force must be equal to the Lorentz force. Some real magic here, but there is some math to know.. as always, hard study

10. Jan 11, 2010

Sorry but you differentiated the second term wrong - remember x and xdot are independent!

11. Jan 11, 2010

### jpas

I know see why the Lagrangian expression does matter. And yes, I understood the notation.

three final doubts:

1) how does one even get some lagrangian function? how did you find it? after that, I see how the partial derivative of x, for example, can be zero. I didn´t understand it before.

2) when you partially derived the function in order to the velocity, shouldn´t the result be just 18v . How come it is 18vx ? Because you said the chain rule was used, I feel like there´s something missing.

3) about the potential, when you have R cubed, that just meant that the potential is a function defined with three variables, therefore whose domain is R cubed, and whose range is R, because it only is defined in terms of one variable, right?

12. Jan 11, 2010

### twofish-quant

What you do is to calculate the kinetic energy (T), calculate the potential energy (V), and then set the Lagrangian to T-V. As far as *why* that works, there is a mathematical reason why, but you don't have to think about why it works to use the magic box, which is why it's so useful.

13. Jan 11, 2010

"2) when you partially derived the function in order to the velocity, shouldn´t the result be just 18v . How come it is 18vx ? Because you said the chain rule was used, I feel like there´s something missing."

Yes it should be 18v that's what my last post was saying.

14. Jan 11, 2010

### Pengwuino

It means this: say you're looking at projectile motion. Your kinetic energy is $$T = \frac{1}{2}m*v^2 = \frac{1}{2}(\frac{dx}{dt} + \frac{dy}{dt})$$. $$\frac{dy}{dt}$$ and $$\frac{dx}{dt}$$ being the velocity in the y and x direction respectively. Now, your potential energy is U = mgy. The potential tells you about the force involved. So our Lagrangian, as stated is $$L = T - U$$ which means $$L = \frac{1}{2}(\frac{dx}{dt} + \frac{dy}{dt}) - mgy$$. Thus, as you can see, the Lagrangian is a function, that is composed of, $$\frac{dy}{dt}$$,$$\frac{dx}{dt}$$, and y.

It turns out forces and fields are quite hard to work with. I'll simply say that for every conservative force, you can formulate something called a potential and it so happens that the force is the negative gradient of this potential's associated energy.

I believe you need to go a step further into something called constraints and lagrange multipliers to actually pull Newton's 2nd out of the Lagrangian.

If the potential energy does not depend on a certain coordinate (but it can depend on the time derivative), the "conjugate momenta" is conserved. The conjugate momenta in the case of projectile motion is the normal momentum we all know about, $$p=mv_x$$. In a case where angular momentum is conserved, it's $$p = mr^2\frac{d\phi}{dt}$$. If it depends linear, quadratically, exponentially, anything, then it is not a conserved quantity.

You know the Lagrangian doesnt depend on a coordinate simply off of what you know. If you're looking at any elementary system with say, a spring, you know the energy is kx^2/2 or that if you're looking at orbital bodies, the energy would be GmM/r. You could of course, have something weird. Say that you have a spring, but it has a time changing spring constant that various sinusoidally such as $$k = k_1cos(\omega t) + k_0$$ or something strange like that. Now your potential energy is time dependent and you know this as just part of the system. You basically know what your systems energies are and THEN you go through the Lagrangian mechanics to find out if something is conserved.

Finally, L = T - U is how it is defined. You'll need to go through the history of Lagrangian mechanics and least action and all that good stuff to see why it works however.

Last edited: Jan 11, 2010
15. Jan 11, 2010

### TMFKAN64

Yep.

As others have mentioned, L = T - V. So given whatever coordinates you want to use, you can pretty easily write down the Lagrangian for a given situation. Then, just look at it! If there is no t, it doesn't depend on time, if there is no x, it doesn't depend on that coordinate, and so on.

*Why* L = T - V and how to derive the Euler-Lagrange equations is a longer story. If you are really interested, you could pick up an advanced mechanics textbook... but I'd suggest that for now, you treat it as a black box.

16. Jan 11, 2010

### TMFKAN64

Sorry, I forgot to answer this bit.

Suppose L doesn't involve some linear coordinate x. This means that L has the same value if x = 0 or x = 100 or any other value... there is a *translational* symmetry.

Similarly, if L doesn't involve some angular coordinate $$\theta$$, L would have the same value regardless of how you rotate the system through this angle... there is a *rotational* symmetry.

Make sense?

17. Jan 12, 2010

### jpas

Hello to you all,

You´ve made it much simpler. Thank you. I have a textbook for high school students that teaches how to use lagrangian mechanics, I think I´l be able to understand it much better. Sorry for not having answered sooner, but I had classes in the morning, 45 minutes to lunch, and next classes start in 10 minutes. I promise a more complete answer to all of you in 4 hours, when I´ll arrive home again. Once again, from what I´ve read, things look clearer.

18. Jan 12, 2010

### hearts_hacker

what? a lagrangian mechanics book for high school students!?! can u please name the book and its author.

19. Jan 13, 2010

### jpas

Hello,

I had written a long answer but unfourtunately by internet connection went down.

hearts_hacker,

the textbook is portuguese and it says it was written for advanced high school students, among others. It´s called "Introdução à Física"

thanks for the intel.

Pengwuino,
thank you for the clear writing. I think I got the process: write down L=T-V , apply euler-lagrange equations and then discover interesting stuff. You´ve made it look easy.
Just one doubt. In your example, shouldn´t the kinetc energy be (0.5m(vx^2+vy^2) and not just 0.5m(vx+vy) ?

TMFKAN64,

It does makes sense. To be symmetrical relative to something means that you can undergo a process without changing anything. Therefore, sometimes, L is symmetrical to a spacial translation. Thank you for all the help.

I reviewed some apllications of lagrangians on my textbook and things seem to be working. Not knowing why L=T-V still bugs me a bit, though my textbook gave a non-mathemathical explanation of the principle of least action and how in the end L comes up to be T-V. (is it really that hard to figure it out? if not, where would be a good place to start?)

Thank you all very much. I´ll definitely swing by more often.

Last edited: Jan 13, 2010
20. Jan 13, 2010

### Klockan3

I think that this is a bit too hard for high school students. It is probably best if you accept it in the same manner you accepted F=ma, since they have exactly the same meaning and none of them can be derived from more fundamental facts. You can derive the Lagrangian and you can derive the equations you get by utilizing the extremum principle, but for that you must first assume F=ma. You could as well go the other way around.