It is well known that when a Lagrangian $L$ is incremented by the total time derivative of a function $f$ that does not depend on the time derivatives of the generalized coordinates, the same equations of motion are obtained. Usually the new Lagrangian is written as

$$L'(q,\dot q, t) = L(q, \dot q, t) + \frac{df}{dt}(q,t)$$

However, usually $L$ is considered as a function that depends on independent variables $q$ and $\dot q$, but that is obviously not the case with the term $\frac{df}{dt}(q,t)$. Wouldn't it be more correct (and more practical) to write

$$L'(q,\dot q, t) = L(q, \dot q, t) + \frac{\partial f}{\partial q}(q,t)\dot q + \frac{\partial f}{\partial t}(q,t)$$

so that in the action integral for a given trajectory it does have the form $\frac{df}{dt}(q(t),t)$, or is there something I misunderstood?

  • 1
    $\begingroup$ I think the answer is yes. Probably its usually written in this form because the $\frac{df}{dt}$ is shorter, catchier and hence easier to remember. But I remember that in my second semester I didn't understand for quite a while how something could not be the time derivative of something else. Your way of writing it would have helped me a lot, I guess. $\endgroup$
    – Noiralef
    May 3, 2015 at 12:24
  • 3
    $\begingroup$ Since $\frac{df}{dt}= \frac{\partial f}{\partial q}\dot{q} + \frac{\partial f}{\partial t}$ is an identity (via the chain rule), one is free to use any of the two forms one would like. They are equivalent. Related: physics.stackexchange.com/q/174137/2451 , physics.stackexchange.com/q/87628/2451 and links therein. $\endgroup$
    – Qmechanic
    May 3, 2015 at 12:51
  • $\begingroup$ @Qmechanic My question was mainly if it was still possible to consider $q$ and $\dot q$ as independent arguments. In the second form we could write $L'(a,b,c) = L(a,b,c) + \frac{\partial f}{\partial a}(a,c)b + \frac{\partial f}{\partial c}(a,c)$ without changing anything other than the names given to the arguments, in the first form that is not the case. $\endgroup$
    – doetoe
    May 3, 2015 at 13:09
  • $\begingroup$ How is the second way emphasizing the independence of $q$ and $\dot q$? Does it even matter what the extra term is a function of? $$\delta \int \frac{df}{dt}dt=\delta\int df=\delta (f_2-f_1)=0$$ $\endgroup$
    – gautam1168
    May 3, 2015 at 13:28
  • $\begingroup$ @gautam1168 Rather than emphasizing the independence in the second, the first is only meaningful if we assume an explicit dependence. But I don't mean to nitpick, I was genuinely confused. The comments of Noiralef and Qmechanics cleared up my doubts. $\endgroup$
    – doetoe
    May 3, 2015 at 13:36

2 Answers 2


Rigorously speaking, yes, you are right if dealing with the Lagrangian function. Indeed E.-L. equations should be more properly written $$\frac{d}{dt} \left(\frac{\partial L}{\partial \dot{q}^k}\right) - \frac{\partial L}{\partial {q}^k}= 0\:, \quad \frac{d q^k}{dt} = \dot{q}^k\quad k=1,\ldots, n\:.$$ In other words $\dot{q}^k$ becomes $\frac{d q^k}{dt}$ just along the solutions of the equations but, otherwise $\dot{q}^k$ and ${q}^k$ are independent variables. This is because, geometrically speaking, $L$ is a map from the first jet bundle $j^1(S)$ where $T: S\to \mathbb R$ is the fiber bundle called spacetime of configurations, the basis $\mathbb R$ represents the axis of time whereas every fiber $T^{-1}(t)$ is the configuration space at time $t$. Natural local coordinates adapted to the fiber bundle structure are the standard coordinates $t, q^1,\ldots, q^n$. The jet bundle $J^1(S)$ adds kinematic coordinates $\dot{q}^1,\ldots, \dot{q}^n$.

In this picture the identity, in local natural coordinates, $$\frac{df(q(t),t)}{dt}=\sum_{k=1}^n\frac{\partial f}{\partial q}(q(t),t)\dot{q}^k(t) + \frac{\partial f}{\partial t}(q(t),t)$$ makes sense along the solutions of EL equations, but it does not without fixing a curve $q=q(t)$ (solution of EL equations or not) because the derivative in the left-hand side cannot be computed. Nevertheless the formalism is constructed just to encourage this intuitive and effective interpretation since, after all it is quite harmless. One may define something like $$\widetilde{\frac{df(q,t)}{dt}}=\sum_{k=1}^n\frac{\partial f}{\partial q}(q,t)\dot{q}^k + \frac{\partial f}{\partial t}(q,t)\:,$$ without fixing a section of $S$. As soon as a solution of EL is given, the notation becomes consistent with the standard one.

It is important to stress that if focusing on the action rather than the Lagrangian, in order to implement the variational principle, it is correct to always identify $\dot{q}^k$ with $\frac{dq^k}{dt}$, since the action is a functional over a space of curves and $\dot{q}^k=\frac{dq^k}{dt}$ is always assumed to be valid on each of theses curves no matter if they satisfy EL equations or not.

  • 1
    $\begingroup$ Thanks, very interesting. Is viewing the Lagrangian as a function on a jet bundle very different from viewing it as a function on the tangent bundle of configuration space? Is one of the points of view more useful or more correct? $\endgroup$
    – doetoe
    May 3, 2015 at 13:54
  • 1
    $\begingroup$ Well, the tangent space of configuration space does not contain the time coordinate. This fact could give rise to problems: you may have different configuration spaces at different times (think of a point moving along a curve which changes it shape in time). Assuming to work with a jet bundle, actually the fibers must be diffeomorphic but not isometric, this is a mild condition which remains when using the fiber bundle structure... $\endgroup$ May 3, 2015 at 14:00

The OP has a point. If a dot denotes time-differentiation

$$\dot{q}~\equiv~ \frac{dq}{dt},$$

and if we add a total time derivative to the Lagrangian

$$\tilde{L}(q,\dot{q},t)-L(q, \dot{q}, t) ~=~ \frac{dF(q,t)}{dt}~\equiv~\frac{\partial F(q,t)}{\partial q}\dot{q} + \frac{\partial F(q,t)}{\partial t},$$

and if we want to view position $q$ and velocity $v$ as independent variables, cf. e.g. this Phys.SE post, then we should formally write

$$\tilde{L}(q,v,t)-L(q, v, t) ~=~ \frac{\partial F(q,t)}{\partial q}v + \frac{\partial F(q,t)}{\partial t}.$$


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.