Adding a term to the Lagrangian

L_1 dt + \int_{t_1}^{t_2} dG/dt dt= \int_{t_1}^{t_2} \mathcal L_1 dt + G(t_2) - G(t_1)= S_1 + G(t_2) - G(t_1).$$The boundary terms cancel out the difference in the actions. This is why adding total derivatives to the Lagrangian is not a big deal.
  • #1
kent davidge
933
56
It's known that the Lagragian is invariant when one adds to it a total time derivative of a function. I was thinking about the possible forms of this function. Could it be a function of ##x,\dot x, \lambda##? Or it should be a function of ##x## only?

Here ##x: \ \{x^\mu (\lambda) \}## are the coordinates, ##\dot x: \ \{ dx^\mu/d\lambda \}## the corresponding "velocities" and ##\lambda## the parameter.

I think my question is due to my lack of knowledge on variation, because:
if one considers ##\delta \int (df / d\lambda) d\lambda = \delta (f|_{\lambda_f} - f|_{\lambda_i})## then it seems that ##f## can be a function of the three quantities I mentioned above, because the variation will be zero anyways. But if the correct way is to put the ##\delta## symbol inside the integral first, then the variation would vanish only if ##f = f(x)##.
 
Physics news on Phys.org
  • #2
kent davidge said:
It's known that the Lagragian is invariant when one adds to it a total time derivative of a function.
The Lagrangian is not invariant. The equations of motion are.

It does not matter what the function is a function of because it will be directly integrable and only give a boundary contribution that does not affect the variations inside your time interval.
 
  • Love
Likes kent davidge
  • #3
Orodruin said:
It does not matter what the function is a function of
That is not correct. It cannot depend on the velocities. Given [itex]L_{1}(x_{a} , \dot{x}_{a} , t)[/itex], then in order for [itex]L_{2}(x_{a} , \dot{x}_{a} , t) = L_{1}(x_{a} , \dot{x}_{a} , t) + F (x_{a} , \dot{x}_{a} ,t)[/itex] to reproduce the same E-L equations, the function [itex]F[/itex] must satisfies E-L equations identically (independent of the specific time dependence of [itex]x_{a}[/itex], i.e., independent of the solutions [itex]x_{a}(t)[/itex]). Indeed, we prove the following: A function of [itex]x_{a}(t), \ \dot{x}_{a}(t)[/itex] and [itex]t[/itex] satisfies E-L equations identically (i.e., off-shell) if, and only if, it is the total time derivative [itex]dG/dt[/itex] of some continuous function [itex]G(x_{a}(t) , t )[/itex].
Proof
The “if” part: Let [tex]F = \frac{d}{dt} G(x , t) = \frac{\partial G}{\partial x_{c}} \dot{x}_{c} + \frac{\partial G}{\partial t} .[/tex] (repeated indices are summed over). Now [tex]\frac{\partial F}{\partial \dot{x}_{a}} = \frac{\partial G}{\partial x_{a}}, \ \ \frac{d}{dt} \left( \frac{\partial F}{\partial \dot{x}_{a}} \right) = \frac{\partial^{2}G}{\partial x_{c}\partial x_{a}} \dot{x}_{c} + \frac{\partial^{2}G}{\partial t \partial x_{a}} ,[/tex] and [tex]\frac{\partial F}{\partial x_{a}} = \frac{\partial^{2}G}{\partial x_{a}\partial x_{c}} \dot{x}_{c} + \frac{\partial^{2}G}{\partial x_{a} \partial t}.[/tex] Thus, from the continuity of [itex]G( x, t)[/itex], we see that [itex]F[/itex] satisfies E-L’s equations [tex] \frac{d}{dt} \left( \frac{\partial F}{\partial \dot{x}_{a}} \right) = \frac{\partial F}{\partial x_{a}},[/tex] identically (i.e., independent of the functional form of [itex]G(x ,t)[/itex] and of the specific time dependence of [itex]x_{a}[/itex]).
The “only if” part: Let [itex]F[/itex] be some function of [itex]x_{a}, \dot{x}_{a}[/itex] and [itex]t[/itex], which satisfies the E-L’s equations identically. These can be rewritten as [tex]\frac{\partial^{2}F}{\partial \dot{x}_{c}\partial \dot{x}_{a}} \ddot{x}_{c} + \frac{\partial^{2}F}{\partial x_{c}\partial \dot{x}_{a}}\dot{x}_{c} + \frac{\partial^{2}F}{\partial t \partial \dot{x}_{a}} = \frac{\partial F}{\partial x_{a}} .[/tex] The [itex]\ddot{x}[/itex]’s appear only in the first term on the left. Since we want the equations to be satisfied independent of the [itex]x[/itex]’s, the coefficients of each of the [itex]\ddot{x}[/itex]’s must be zero [tex]\frac{\partial^{2}F}{\partial \dot{x}_{a}\partial \dot{x}_{c}} = 0 .[/tex] This means that [itex]F[/itex] is a linear function of the velocities [itex]\dot{x}[/itex]’s. We may write [tex]F(x , \dot{x} , t) = f_{c}(x , t) \dot{x}_{c} + g(x , t),[/tex] for some functions [itex]f_{a}(x,t)[/itex] and [itex]g(x,t)[/itex] to be determined. From this we get [tex]\frac{d}{dt}\left( \frac{\partial F}{\partial \dot{x}_{a}} \right) = \frac{\partial f_{a}}{\partial x_{c}} \dot{x}_{c} + \frac{\partial f_{a}}{\partial t} ,[/tex] and [tex]\frac{\partial F}{\partial x_{a}} = \frac{\partial f_{c}}{\partial x_{a}} \dot{x}_{c} + \frac{\partial g}{\partial x_{a}} .[/tex] Thus, the E-L equations for [itex]F[/itex] becomes [tex]\left( \frac{\partial f_{a}}{\partial x_{c}} - \frac{\partial f_{c}}{\partial x_{a}} \right) \dot{x}_{c} + \frac{\partial f_{a}}{\partial t} = \frac{\partial g}{\partial x_{a}} . \ \ \ (1)[/tex] Again, we want these equations to be satisfied independent of the [itex]x[/itex]’s. Thus the coefficients of each of the [itex]\dot{x}[/itex]’s must vanish: [tex]\frac{\partial f_{a}}{\partial x_{c}} = \frac{\partial f_{c}}{\partial x_{a}}.[/tex] Thus, there exists some continuous function [itex]G(x,t)[/itex] such that [tex]f_{a}(x,t) = \frac{\partial}{\partial x_{a}}G(x,t) .[/tex] Substituting this in (1), we find [tex]\frac{\partial^{2}G}{\partial t \partial x_{a}} = \frac{\partial g}{\partial x_{a}}, \ \ \Rightarrow \ \ g = \frac{\partial G}{\partial t} .[/tex] Thus, in order to satisfy E-L’s equation off shell, a function [itex]F(x , \dot{x} , t)[/itex] must have the form [tex]F = \frac{\partial G}{\partial x_{c}} \dot{x}_{c} + \frac{\partial G}{\partial t} = \frac{d}{dt} G(x , t).[/tex]
 
  • #4
samalkhaiat said:
That is not correct.
Yes, it most certainly is. A total time derivative of a function that depends on velocities still satisfies the Euler-Lagrange equations, but it does not depend only on ##x## and ##\dot x##. It also depends on ##\ddot x##, which breaks your assumption that the function added to the Lagrangian can only depend on ##x## and ##\dot x##.

Sure, you can go ahead and have a discussion about including second derivatives in the Lagrangian, but mathematically it is absolutely clear that adding any total time derivative does not affect the equations of motion (see below), because such a term satisfies the EL equations off shell by design.

samalkhaiat said:
These can be rewritten as
No they generally cannot, not if ##F## depends on ##\ddot x## (or any higher order derivatives), which it will if the function you are taking the time derivative of depends on velocities. There is an additional term in the EL equations for integrands that depend on the second derivatives. In general in variational calculus where the integrand ##\mathcal L## depends on derivatives up to ##x^{(n)}##, you have
$$
\sum_{k = 0}^n (-1)^k \frac{d^k}{dt^k}\frac{\partial \mathcal L}{\partial x^{(k)}} = 0.
$$
(This does appear, e.g., (for the spatial derivatives) in deriving the equations of motion for a beam with some stiffness (where the potential energy per unit length is proportional to the curvature of the beam, which can be expressed using the second spatial derivatives).)

To see that a total derivative does not affect the action apart from a boundary term is trivial. Let ##\mathcal L_2 = \mathcal L_1 + dG/dt## with ##G## being an arbitrary function, containing as many time derivatives as you want of ##x##. You then have
$$
S_2 = \int_{t_1}^{t_2} \mathcal L_2 dt = \int_{t_1}^{t_2} (\mathcal L_1 + dG/dt) dt.
$$
The second term can be integrated directly to yield
$$
S_2 = S_1 + [G|_{t_2} - G|_{t_1}].
$$
Taking the variation of this will not introduce terms depending on anything other than ##t_1## and ##t_2## in the boundary terms so if you look at only internal variations, you immediately end up with the same Euler-Lagrange equations.

Note that, if you assume that ##G## is a function of ##x## and ##\dot x##, then ##dG/dt## will generally be a function of ##x##, ##\dot x##, and ##\ddot x##. Then you can go on and argue about whether you should allow second derivatives in the Lagrangian, but the math is clear. You can add any function on the form ##dG/dt## without affecting the Euler-Lagrange equations because any function of the form ##dG/dt## satisfies the Euler-Lagrange equations off shell.

samalkhaiat said:
Thus, in order to satisfy E-L’s equation off shell, a function [itex]F(x , \dot{x} , t)[/itex] must have the form [tex]F = \frac{\partial G}{\partial x_{c}} \dot{x}_{c} + \frac{\partial G}{\partial t} = \frac{d}{dt} G(x , t).[/tex]
This is correct for a function ##F## that is only a function of ##x##, ##\dot x##, and ##t##. It is not true for an arbitrary function ##F##. For example, it certainly is not true if you allow ##F## to depend on ##\ddot x##, which it will if it is the total derivative of a function that depends on ##\dot x##. Generally, for a ##G## that depends on derivatives up to ##x^{(n-1)}##, you would have
$$
F = \frac{\partial G}{\partial t} + \sum_{k=0}^{n-1} \frac{\partial G}{\partial x^{(k)}} x^{(k+1)}
= \frac{dG}{dt}.
$$
 
Last edited:
  • #5
Orodruin said:
Yes, it most certainly is.
Then you should be able to answer this: I give you [itex]L_{1} = \frac{1}{2}\dot{x}^{2}[/itex], find for me a function [itex]G(x,\dot{x},t)[/itex] such that [itex]L_{2} \equiv L_{1} + dG/dt[/itex] is another equivalent Lagrangian.

Sure, you can go ahead and have a discussion about including second derivatives in the Lagrangian
Yes, it is obviously clear that my post was about Lagrangians that are at most quadratic in the velocities, i.e., those which describe wide range of mechanical systems.
 
  • #6
samalkhaiat said:
Yes, it is obviously clear that my post was about Lagrangians that are at most quadratic in the velocities, i.e., those which describe wide range of mechanical systems
Sorry, but this is not the point. The point is not depending on accelerations. This was your assumption and it is obvious that if you place this restriction you cannot have G depend on velocities. However, this does not change the fact that you get the same equations of motion if you let G depend on velocities. I suggest you try it.

As an example, you can always add ##t_0 d\mathcal L/dt## to your Lagrangian and recover the same equations of motion. In your proposed case this would be ##t_0 \dot x \ddot x##. This will give you the same equations of motion unless you make arithmetic errors. This leads to:
\begin{align*}
\delta S &= \int \delta L dt = \int \left(\frac{1}{2}(\dot x + \delta \dot x)^2 + t_0 (\dot x + \delta \dot x)(\ddot x + \delta \ddot x) - \frac{\dot x^2}{2} - t_0 \dot x \ddot x\right)dt \\
&\simeq \int (\dot x\, \delta \dot x + t_0 \dot x \, \delta\ddot x + t_0 \ddot x \, \delta\dot x) dt
\simeq \int (- \ddot x + t_0 \dddot x - t_0 \dddot x)\delta x\, dt = - \int \ddot x \, \delta x\, dt,
\end{align*}
which is the same variation as that of ##\mathcal L = \dot x^2/2## up to boundary terms and have the same EL equations (i.e., ##\ddot x = 0##).
 
Last edited:
  • #7
Orodruin said:
Sorry, but this is not the point. The point is not depending on accelerations. This was your assumption and it is obvious that if you place this restriction you cannot have G depend on velocities.
Yes, sorry, I meant to say “at most quadratic in velocities and not depending on accelerations”.
However, this does not change the fact that you get the same equations of motion if you let G depend on velocities.
Of course, by going from the variation problem for [itex]L_{1}(x, \dot{x})[/itex] with [tex]\frac{\partial L_{1}}{\partial x} = \frac{d}{dt} \frac{\partial L_{1}}{\partial \dot{x}},[/tex] to another variation problem for [itex]L_{2}(x, \dot{x}, \ddot{x}, \cdots )[/itex] with [tex]\frac{\partial L_{2}}{\partial x} = \frac{d}{dt} \frac{\partial L_{2}}{\partial \dot{x}} - \frac{d^{2}}{dt^{2}} \frac{\partial L_{2}}{\partial \ddot{x}} + \cdots ,[/tex] then [itex]G = G(x, \dot{x} , \cdots )[/itex]
 

1. What is the purpose of adding a term to the Lagrangian?

Adding a term to the Lagrangian allows for the incorporation of new physical effects or interactions into a system. It can also help to simplify the equations of motion and make them more accurate.

2. How do you determine the appropriate term to add to the Lagrangian?

The appropriate term to add to the Lagrangian is determined by the specific physical system being studied. It may involve considering the symmetries and conservation laws of the system, as well as experimental data and theoretical predictions.

3. Can adding a term to the Lagrangian change the behavior of a system?

Yes, adding a term to the Lagrangian can change the behavior of a system. This is because the Lagrangian is directly related to the equations of motion, so any changes to the Lagrangian will affect the behavior of the system.

4. Are there any limitations to adding a term to the Lagrangian?

There are some limitations to adding a term to the Lagrangian. It must be physically meaningful and consistent with the symmetries and conservation laws of the system. Additionally, the added term should not significantly alter the overall behavior of the system.

5. Can adding a term to the Lagrangian improve the accuracy of a model?

Yes, adding a term to the Lagrangian can improve the accuracy of a model. By incorporating new physical effects or interactions, the equations of motion become more accurate and can better describe the behavior of the system.

Similar threads

Replies
1
Views
828
  • Calculus
Replies
25
Views
903
Replies
3
Views
1K
Replies
19
Views
1K
Replies
1
Views
1K
  • Special and General Relativity
Replies
7
Views
1K
  • Special and General Relativity
Replies
3
Views
1K
Replies
1
Views
809
  • Special and General Relativity
Replies
7
Views
1K
Replies
5
Views
1K
Back
Top