So, I have to prove directly (e.g. by substitution) that if a path satisfies the Euler-Lagrange equations for the Lagrangian $L$ it does so for $$L'=L+\frac{df(q,t)}{dt}.$$ Let me tell you what I have done:

$$\frac{d}{dt}\frac{\partial L'}{\partial \dot{q_i}}-\frac{\partial L'}{\partial q_i}=(\frac{d}{dt}\frac{\partial L}{\partial \dot{q_i}}-\frac{\partial L}{\partial q_i})+(\frac{d}{dt}\frac{\partial}{\partial \dot{q_i}}\frac{df}{dt}-\frac{\partial}{\partial q_i}\frac{df}{dt})$$

I would like to somehow prove that the second parenthesis is $0$ to this end I have used the following:

$$\frac{\partial}{\partial \dot{q_i}}=\sum\frac{\partial q_j}{\partial \dot{q_i}}\frac{\partial}{\partial q_j} \Rightarrow \frac{d}{dt}\frac{\partial}{\partial \dot{q_i}}=\sum \frac{d}{dt}\frac{\partial q_j}{\partial \dot{q_i}}\frac{\partial}{\partial q_j}=\sum \frac{\partial \dot{q_j}}{\partial \dot{q_i}}\frac{\partial}{\partial q_j}.$$

Now the proof is complete IF $$\frac{\partial \dot{q_j}}{\partial \dot{q_i}}=δ_{ij} .$$ I know this is true for $q_i,q_j$ but is it also true for their derivates?

  • 3
    $\begingroup$ yes it is also true for the derivatives, in part because they are considered independent variables. $\endgroup$ May 14, 2018 at 17:40
  • $\begingroup$ Related: physics.stackexchange.com/q/174137/2451 and links therein. $\endgroup$
    – Qmechanic
    May 14, 2018 at 17:45

3 Answers 3


Simplest is to go with \begin{align} \frac{df}{dt}&= \frac{\partial f}{\partial q}\dot q + \frac{\partial f}{\partial t}\, ,\\ \frac{d}{dt}\left(\frac{\partial }{\partial \dot{q}}\frac{df}{dt}\right)&= \frac{d}{dt}\left(\frac{\partial f}{\partial q} \right)\\ &= \frac{\partial }{\partial q}\left( \frac{df}{dt}\right) \end{align} You can deal with the multivariable case yourself.


Just for completeness, another more straightforward way to do this is by considering that by solving the Euler-Lagrange equations you are essentially finding a stationary point of the action $S = \int_{t_i}^{t_f} L dt$. In other words, you find the path $q(t)$ which minimizes the action, given fixed end point $q(t_f)$, $q(t_i)$. This is the procedure that yields the Euler-Lagrange equations.

Having said that, consider then the action $S' = \int_{t_i}^{t_f} dt L' = \int_{t_i}^{t_f} dt\left[ L +\frac{df}{dt}\right]$

Then, integrating :

$$ S' = \int_{t_i}^{t_f} dt L + [f(q,t)]^{t_f}_{t_i} = S+f(q(t_f),t_f)-f(q(t_i),t_i)$$

Now, the end points of the trajectory are fixed while finding the stationary point. Hence, when we variate $S$, we variate the path, but not the end points. In other words :

$$\delta S' = \delta S + \underbrace{\delta\big(f(q(t_f),t_f)-f(q(t_i),t_i)\big)}_{= 0} \Leftrightarrow \delta S' = \delta S$$

Hence, the variation of $S'$ and $S$ is the same, so they provide equivalent equation of motion !

  • 1
    $\begingroup$ Thanks! To be honest , I feel more comfortable using my familiar vector calculus than variational techniques, so an answer in that spirit is very useful ! $\endgroup$
    – Nick A.
    May 15, 2018 at 16:06

You're on the right track and almost there with your proof, you need to look at something called 'cancelation of dots' a useful little trick when doing Lagrangian Mechanics. A good proof is given here by Bernhard Heijstek.