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

How to drop terms in a Lagrangian?

  1. Apr 20, 2013 #1
    Hi guys,

    So textbooks have it that: "Two Lagrangians differing by a total time-derivative of a function of the coordinates are equivalent". I have no idea what that means or how to use it; so I dont know which terms I can drop from Lagrangians, which is a bit of a problem.

    For example, consider a random example... a simple pendulum of length [itex]l[/itex] and mass [itex]m[/itex]. I'll spice it up a bit by saying that the point of suspension can move vertically according to the law [itex]y = la(t)[/itex], where obviously [itex]a[/itex] is a function of time.

    If you consider the angle between the pendulum and the vertical, [itex]θ[/itex], to be the degree of freedom, you end up with the Lagrangian:

    [itex]L = T - V = \frac{1}{2}ml^{2}[\dot{a}(t) - 2sin(θ)\dot{a}(t)\dot{θ}+\dot{θ}^{2}] - mgl[a(t) + cos(θ)] [/itex]

    Could you please explain what that "differing by a total time-derivative of a function of the coordinates..." thing means by demonstrating on this example Lagrangian which terms I can drop? or any other way you think is best? You dont HAVE to demonstrate on this particular example, I just thought it might help if you had a Lagrangian to play with.

    Thanks a lot!
     
  2. jcsd
  3. Apr 20, 2013 #2

    WannabeNewton

    User Avatar
    Science Advisor

    Hi Dix! What book is this from may I ask?

    Let ##L(t,q,\dot{q})## be a lagrangian and define another lagrangian ##\bar{L}(t,q,\dot{q}) = L(t,q,\dot{q}) + \frac{\mathrm{d} }{\mathrm{d} t}f(q,t)## where, as you can see, ##f## is a function of time and the configuration space coordinates. Now, the new action ##\bar{S}## is given by ##\bar{S} = \int_{t_0}^{t_1} L(t,q,\dot{q})dt + \frac{\mathrm{d} }{\mathrm{d} t}\int _{t_{0}}^{t_1}f(q,t)dt = S + f(q(t_1),t_1) - f(q(t_0),t_0)## where ##S## is the action associated with ##L##. Since we fix the endpoints ##q(t_0), q(t_1)## for the fixed times ##t_0,t_1##, the terms next to ##S## are just constants so when we take the first variation, we just get ##\delta \bar{S} = \delta S## hence we end up with the same equations of motion.
     
  4. Apr 21, 2013 #3
    Hello Mr.Newton :P

    Umm, what I wrote isnt exactly from one textbook, its more like a superposition of what i've read from different sources, including Goldstein's Classical Mechanics as well as Landau / Lifgarbagez Mechanics.

    Speaking of Landau-Lifgarbagez, I'm failing to understand some steps in the derivation of the Euler-Lagrange equation on page 3. Perhaps if I understand this step I could fully understand your answer.

    In case you havent got the book, it goes like this: You have the action integral of a 1-degree of freedom Lagrangian: [itex]S = \int^{t1}_{t0} L(q,\dot{q},t) [/itex]

    So we want to find a function [itex]q(t)[/itex] such that [itex]S[/itex] is a minimum, or stationary. So let's vary [itex]q(t)[/itex] by an amount [itex]δ[/itex] and replace [itex]q(t)[/itex] by [itex]q(t) + δq(t)[/itex]. This variation is obviously 0 at the end points.

    Now, to find the change in the action, we take the difference between the changed action and the original:

    [itex]δS = \int^{t1}_{t0} L(q + δq,\dot{q} + δ\dot{q},t) - \int^{t1}_{t0} L(q,\dot{q},t) [/itex].

    At this point, the book loses me. here's what it says that I dont understand:
    "when this difference is expanded in powers of [itex]δq[/itex] and [itex]δ\dot{q}[/itex], the leading terms are of first order". I understand what it means by "the leading terms are of first order" because the variation is so small so the powers beyond 1 are literally 0. But I dont understand the expanding thing. It doesnt show the steps, just the result:

    [itex]δS = δ\int^{t1}_{t0} L(q,\dot{q},t) dt = 0[/itex].

    So I dont understand how this expression is obtained from the above. Beyond this everything is quite clear...
     
  5. Apr 21, 2013 #4

    WannabeNewton

    User Avatar
    Science Advisor

    Ok, well my first and foremost advice would be: do not use Landau to learn mechanics! It's great as a reference and as a work of pure elegance that you can marvel but it is not something you want to learn from.

    I'll write out the usual derivation here, just to be complete. Consider the first variation (I'll drop the bounds on the integral since they are annoying to write - it is understood that the bounds are from some fixed time ##t_0## to some other fixed time ##t_1##) ##\delta S = \int L(q + \delta q, \dot{q} + \delta \dot{q}, t)dt - \int L(q,\dot{q}, t)dt##. Remember that the principle of stationary action for the first variation says the action shouldn't change to first order so we can Taylor expand the first term as ##L(q + \delta q, \dot{q} + \delta \dot{q}, t) = L(q,\dot{q}, t) + \frac{\partial L}{\partial q}\delta q + \frac{\partial L}{\partial \dot{q}}\delta \dot{q} ## and drop the second order and higher terms. From here we see that our variation becomes ##\delta S = \int (\frac{\partial L}{\partial q}\delta q + \frac{\partial L}{\partial \dot{q}}\delta \dot{q}) dt ##. We can simplify this expression using integration by parts (there's a reason why which you will see in just a bit) as ##\delta S = \int\frac{\partial L}{\partial \dot{q}}\delta \dot{q} dt = \frac{\partial L}{\partial \dot{q}}\delta q|_{t_0} ^{t_1} - \int \delta q\frac{\mathrm{d} }{\mathrm{d} t}\frac{\partial L}{\partial \dot{q}}dt##. Since we fix the endpoints, the boundary terms vanish hence our final express for the variation of the action becomes ## \delta S = \int (\frac{\partial L}{\partial q} - \frac{\mathrm{d} }{\mathrm{d} t}\frac{\partial L}{\partial \dot{q}})\delta q dt ##.

    Now, the last part is to show that the expression in the parenthesis must vanish. I don't think there is much need to go into the exact details but I'm sure you have seen the technique before of using bump functions (or even partitions of unity if you've done differential geometry of surfaces) to show that the only way this integral can vanish identically for arbitrary such variations is if ##\frac{\partial L}{\partial q} - \frac{\mathrm{d} }{\mathrm{d} t}\frac{\partial L}{\partial \dot{q}} = 0##.
     
  6. Apr 21, 2013 #5
    Alright, I understand everything...apart from how you did the taylor expansion. Even so, I know how to derive the Euler-Lagrange equation but my method is slightly different to yours...it still gets the same result so I guess it doesnt matter. The difference is that instead of taylor-expanding, i set the derivative of the action with respect to the variation = 0. It gives the same thing, but I guess the maths might not be so rigorous. Just a quick question: If i say that [itex]q = q + δq[/itex], then [itex]\frac{dq}{dδ} = q[/itex]. Is that "right"...so to speak?

    Coming back to the terms we can drop from a Lagrangian, is it basically any function that's a total time derivative of ANY of the coordinates? For example, say I have a Lagrangian [itex]L = L(q,\dot{q},t)[/itex]. This lagrangian has 3 inputs / coordinates: [itex]q, \dot{q}, t[/itex]. Now, let's imagine that, somewhere in the actual expression of this Lagrangian, I have 3 total derivatives of other arbitrary functions of each of these inputs / coordinates: [itex]\dot{a}(q)[/itex], [itex]\dot{b}(\dot{q})[/itex] and [itex]\dot{c}(t))[/itex]. Are these all 0?
     
  7. Apr 21, 2013 #6

    WannabeNewton

    User Avatar
    Science Advisor

    I can't understand what's being done here. ##\delta## is not some kind of variable that you differentiate with respect to. It denotes the variation. Writing down the equations of motion by using ##\frac{\delta S}{\delta q} = 0## is fine however, which is what you said to have done in your previous post. This is in fact how you will see it written down when you start looking at functionals of entire fields (e.g. Klein-Gordon field), and the associated field equations, instead of just coordinates of a collection of finitely many particles.

    If you look at my first post, the proof was only for total time derivatives of functions that depend on time and/or any of the configuration space coordinates. This worked because I used the fact that we keep the configuration space coordinates fixed at the end points, as you can see in that post. If you want to include functions that also depend on the time derivatives of those coordinates then you have to demand that the first time derivatives are fixed at the endpoints too but this is an extra imposition on top of the sufficient conditions when deriving the equations of motion from varying the action associated with the lagrangian.
     
    Last edited: Apr 21, 2013
  8. Apr 21, 2013 #7

    WannabeNewton

    User Avatar
    Science Advisor

    Perhaps a concrete example might help. Take our system to be the simple pendulum. The usual lagrangian is just ##L = \frac{1}{2}ml^{2}\dot{\theta}^{2} + mgl\cos\theta##. Consider adding a total time derivative of the function ##f(\theta,t) = t\sin\theta ## so that we have a new lagrangian ##L = \frac{1}{2}ml^{2}\dot{\theta}^{2} + mgl\cos\theta + \frac{\mathrm{d} }{\mathrm{d} t}(t\sin\theta) = \frac{1}{2}ml^{2}\dot{\theta}^{2} + mgl\cos\theta + \sin\theta + t\cos\theta\dot{\theta}##. Doing the usual computations, we have ##\frac{\partial L}{\partial \theta} = -mgl\sin\theta + cos\theta -t\sin\theta\dot{\theta}, \frac{\partial L}{\partial \dot{\theta}} = ml^{2}\dot\theta + t\cos\theta##. Hence, the equations of motion become ##-mgl\sin\theta + cos\theta -t\sin\theta\dot{\theta} - ml^{2}\ddot\theta - \cos\theta +t\sin\theta\dot\theta = -mgl\sin\theta - ml^{2}\ddot\theta = 0##. As you can see, we end up with the usual equations of motion for the simple pendulum i.e. adding the total time derivative of a function of the configuration space coordinates and time did not change the resulting equations of motion for the given system.
     
  9. Apr 22, 2013 #8
    Yes that helps, I understand it a bit better now.
    I do however want to ask a question about a specific Lagrangian I've seen in my lecturer's notes. The lagrangian, of a pendulum whose point of suspension can move horizontally by means of a function [itex]lb(t)[/itex], is as follows:

    [itex]L = \frac{1}{2}ml^{2}(\dot{θ}^{2} +2\dot{b}(t)cosθ\dot{θ}+[\dot{b}(t)]^{2}) + mglcosθ[/itex]

    He simplifies this by dropping only the [itex][\dot{b}(t)]^{2}[/itex] term, which is fine because it's a total time derivative of a function of time. But so is [itex]2\dot{b}(t)cosθ\dot{θ}[/itex]...or not?

    Maybe i can paraphrase my question: does the term [itex]2\dot{b}(t)cosθ\dot{θ}[/itex] not get dropped because it isnt EXACTLY a total time derivative of some function? Unlike, for example, [itex]\dot{b}(t)[/itex]; which is EXACTLY a total derivative of [itex]b(t)[/itex]? I guess I'm confused because it has got a [itex]\dot{b}(t)[/itex] FACTOR in it...so shouldnt it get dropped as well...

    I'm starting to feel a bit intellectually challenged now :'( Thanks for being so patient though Mr.Newton!
     
  10. Apr 22, 2013 #9

    WannabeNewton

    User Avatar
    Science Advisor

    Yes dix, if the expression doesn't drop out identically from the equations of motion then it wasn't exactly the total time derivative of some function of time and the configuration space coordinates (not just any old function).
     
  11. Apr 22, 2013 #10

    WannabeNewton

    User Avatar
    Science Advisor

    Don't be! There is no real physics involved here. We are just saying that the lagrangian is only unique up to an additive total time derivative of an arbitrary differentiable function of the configuration space coordinates and time (in the sense that we end up with the same equations of motion). So for a single degree of freedom system, if there is a term ##g(t,q,\dot{q})## in your lagrangian such that ##g(t,q,\dot{q}) = \frac{\mathrm{d} }{\mathrm{d} t}f(q,t)## then we can immediately drop this term because we will end up with the same equations of motion.
     
  12. Apr 17, 2015 #11
    Hi WannabeNewton, I have a question I was hoping you could answer. I have a lagrangian

    $$L=\dfrac{m}{2}e^{\gamma t}\dot{q}^2 - e^{\gamma t}\dfrac{k}{2}q^2 $$
    I solve it for the equation of motion and then I use a transformation $$ s=e^{\frac{\gamma t}{2}} $$ and rewrite the original lagrangian, and then solve it for the equation of motion. My question is; when I write the new lagrangian there is a term $$-\dfrac{m}{2}\gamma s\dot{s}$$ and in my notes this term can be dropped "because it is a total time derivative". I was trying to compare it to your last comment, but this term doesn't seem to be of the form $$g(s,\dot{s},t) = \dfrac{d}{dt}f(s,t) $$ or am I missing something?

    Thanks!
     
  13. Apr 17, 2015 #12
    What's the derivative of [y(x)]^2 ?
     
  14. Apr 17, 2015 #13
    $$2[y(x)][y'(x)]$$ so I guess my "f" would be $$-(\dfrac{\sqrt{m\gamma}}{2} s)^2$$ thanks for that!
     
  15. Apr 18, 2015 #14
    I have another question. In the first part of the question above, the equation of motion is a damped oscillator
    $$ \ddot{q} + \gamma \dot{q} - \dfrac{k}{m}q = 0 $$
    Why can't I drop the ## \gamma \dot{q} ## term, is it not the time derivative of ##\gamma q##?
    Thanks
     
  16. Apr 18, 2015 #15
    You can't drop terms in the equations of motion as you do in the lagrangian, do not confuse the two.
     
  17. Apr 18, 2015 #16
    I actually meant to ask about the ## \dot{q} ## term in the lagrangian! I can see it's not an exact time derivative because of the ##e^{\gamma t}## term, right?
     
  18. Apr 18, 2015 #17
    I don't see any terms linear in the first derivative of q.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook