Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Lagrangian - is it that hard?

  1. Jan 11, 2010 #1

    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. jcsd
  3. Jan 11, 2010 #2
    OK, just believe this without any proof... the Lagrangian is just a function of position and velocity [tex]L(x, y, ... ,\dot{x}, \dot{y})[/tex], where [tex]x[/tex], [tex]y[/tex], etc. are some "generalized" coordinates that describe everything in your system. ([tex]\dot{x}=\frac{dx}{dt}[/tex].) Once you find the Lagrangian, the equations of motion are given by the Euler-Lagrange equations for each coordinate: [tex]\frac{d}{dt}\frac{\partial L}{\partial\dot x}=\frac{\partial L}{\partial x}[/tex].

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

    If [tex]x[/tex] does not occur in [tex]L[/tex], there is a symmetry of some sort in this coordinate, and this leads directly to [tex]\frac{\partial L}{\partial\dot x}[/tex] being a conserved constant!
  4. Jan 11, 2010 #3
    TMFKAN64, thanks for the reply.

    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?
  5. Jan 11, 2010 #4
    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 [tex]\partial_{\dot{x}} L[/tex] 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 [tex]L[/tex] takes the form [tex]L=T-U[/tex] where [tex]T=\frac{1}{2}m\dot{x}^2[/tex] is the kinetic energy and [tex]U[/tex] is some potential function.

    Suppose a particle of mass [tex]m[/tex] moving due to a force derived of a potential


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

    First step: Write the Lagrangian

    [tex]L=\frac{1}{2}mv^2 - U(x)[/tex]

    Apply E-L equations:

    [tex]\frac{\partial L}{\partial x} = - \frac{d}{dx}U(x)[/tex]

    [tex]\frac{\partial L}{\partial \dot{x}} = m\dot{x}[/tex]

    [tex]\frac{d}{dt}\frac{\partial L}{\partial \dot{x}} = m\dot{v}[/tex]

    And finally


    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
  6. Jan 11, 2010 #5
    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 [tex]mgh=\frac{1}{2}mv^2[/tex]?

    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.
  7. Jan 11, 2010 #6
    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...
  8. Jan 11, 2010 #7
    Hello Advent,

    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 ***.


    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.
  9. Jan 11, 2010 #8
    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.
  10. Jan 11, 2010 #9
    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 [tex]L(q,\dot{q},t)[/tex] you mean that the function L, the Lagrangian, depends on that three variables, this is multivariable calculus. For example you have a Lagrangian [tex]L=2x+9\dot{x}^2+3t[/tex]. If you remember the Euler Lagrange equations (the magic box as twofish said) you have to compute [tex]\partial_{x}L[/tex] and [tex]\partial_{\dot{x}}L[/tex] (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


    As you see we have a term [tex]9\dot{x}^2[/tex] 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 [tex]x[/tex] and [tex]\dot{x}[/tex] namely derivative. This is functional dependence on the Lagrangian, Lagrange thought that would be helpful to think of [tex]x[/tex] and [tex]\dot{x}[/tex] as somekind of independent variables. Now, with


    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 [tex] f: \mathbb{R} \rightarrow \mathbb{R}[/tex] in our case. In a most general case, for example somekind of electric potential in the space [tex] f: \mathbb{R}^3 \rightarrow \mathbb{R}[/tex]. 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.[tex]f=-\nabla U[/tex]. 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
  11. Jan 11, 2010 #10
    Sorry but you differentiated the second term wrong - remember x and xdot are independent!
  12. Jan 11, 2010 #11
    Advent, thank you for your reply.

    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?
  13. Jan 11, 2010 #12
    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.
  14. Jan 11, 2010 #13
    "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.
  15. Jan 11, 2010 #14


    User Avatar
    Gold Member

    It means this: say you're looking at projectile motion. Your kinetic energy is [tex]T = \frac{1}{2}m*v^2 = \frac{1}{2}(\frac{dx}{dt} + \frac{dy}{dt})[/tex]. [tex]\frac{dy}{dt}[/tex] and [tex]\frac{dx}{dt}[/tex] 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 [tex] L = T - U[/tex] which means [tex] L = \frac{1}{2}(\frac{dx}{dt} + \frac{dy}{dt}) - mgy[/tex]. Thus, as you can see, the Lagrangian is a function, that is composed of, [tex]\frac{dy}{dt}[/tex],[tex]\frac{dx}{dt}[/tex], 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, [tex]p=mv_x[/tex]. In a case where angular momentum is conserved, it's [tex]p = mr^2\frac{d\phi}{dt}[/tex]. 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 [tex]k = k_1cos(\omega t) + k_0[/tex] 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
  16. Jan 11, 2010 #15

    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.
  17. Jan 11, 2010 #16
    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 [tex]\theta[/tex], L would have the same value regardless of how you rotate the system through this angle... there is a *rotational* symmetry.

    Make sense?
  18. Jan 12, 2010 #17
    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.
  19. Jan 12, 2010 #18
    what? a lagrangian mechanics book for high school students!?! can u please name the book and its author.
  20. Jan 13, 2010 #19

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


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

    twofish-quant and madness,

    thanks for the intel.

    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) ?


    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
  21. Jan 13, 2010 #20
    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.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook