# Lagrangian equivalence up to total time derivative: dependence on higher derivatives

I recently encountered the problem

Show that the Euler-Lagrange equations of motion for $L_1$ and $L_2$ are the same when $$L_2(\ddot{q},\dot{q},q,t) = L_1(\dot{q},q,t) + \frac{d}{dt} f(\dot{q},q,t).$$

My preferred method for the more common case where the $L_i$ are functions of derivatives to the same order is to argue that $L_i$'s E-L equations are satisfied iff $\delta S = 0$ which is true iff the action $$S_{i} [q] = \int_{t_1}^{t_2} L_i (\dot{q},q,t) \, dt$$ is stationary with respect to variations in $q(t)$. [I've written it out only for dependence up to $\dot{q}$ but it works to higher order].

Then $$S_1 [q] = S_2 [q] + f(q(t_{1}),t_{1}) - f(q(t_{2}),t_{2})$$ so $S_1$ is stationary iff $S_2$ is (so the two sets of E-L equations are equivalent).

I've tried generalising this to the mixed-order case with limited success. I think the above argument can be adapted to prove that (now for the original $L_{1,2}$) "$L_1$'s E-L equations satisfied" implies $L_2$'s are as well, since the space over which we hope to make $S_2$ stationary is a subspace of that over which $S_1$ is taken to be stationary. I have trouble proving the converse, and am not convinced it is possible by this method.

However, it is apparently possible (I haven't checked the algebra) to prove that $L_1$'s E-L equations are satisfied iff $L_2$'s are simply by (tedious) repeated differentiation and substitution. This seems troubling, if I am right that no proof of the previous style exists, as it suggests that the Euler-Lagrange equations somehow contain more information than their equivalent stationary-action-functional formulation.

However, I think it is also possible that there are subtleties overlooked in the chug-and-plug differentiation solution which are more obvious in its rival.

So, I have two questions:

1. Is this equivalence (E-L 1 satisfied iff E-L 2 satisfied) correct?
2. If so, is it possible to prove it more elegantly than a 'chug-and-plug' method?
3. If not, why not? How have we gained information by moving from $\delta S = 0$ to the Euler-Lagrange equations?

This wasn't entirely trivial and there are subtleties I'm not convinced I've resolved, but after some thought I arrived at the following argument.

By definition $L_2 (\ddot{q}, \dot{q},q,t) = L_1 (\dot{q},q,t) + \frac{d}{dt} f(\dot{q},q,t)$, so integrating from $t_1$ to $t_2$ with respect to time gives $$S_2 [q] = S_1 [q] + f(\dot{q}(t_{2}),q(t_{2}),t_2) - f(\dot{q}(t_{1}),q(t_{1}),t_1).$$

Then, taking the functional derivative, we have $$\delta S_2 = \delta S_1 + \frac{\partial f}{\partial \dot{q}} \left( \delta \dot q(t_2) - \delta \dot{q}(t_1)\right) + \frac{\partial f}{\partial q} \left(\delta {q}(t_2) - \delta{q}(t_1)\right).$$

Suppose $S_2$'s Euler-Lagrange equations are satisfied by some path $q$. Then $S_2$ is stationary with respect to variations $\delta q$ such that $\delta q (t_1) = \delta q (t_2) = 0$ and $\delta \dot{q} (t_1) = \delta \dot{q} (t_2) = 0$. So $\delta S_2 = 0$. The BCs then imply that $\delta S_1 = 0$, so $S_1$'s Euler-Lagrange equations are satisfied.

Now, the converse. Suppose instead $S_1$'s E-L equations are satisfied by some path $q$. Then $S_1$ is sationary wrt variations such that $\delta q (t_1) = \delta q (t_2) = 0$. So $$\delta S_2 = \frac{\partial f}{\partial \dot{q}} \left( \delta \dot q(t_2) - \delta \dot{q}(t_1)\right),$$ and so under the subspace over which we seek to prove $S_2$ is stationary (where the derivative of the variation vanishes at endpoints) we have $\delta S_2 = 0$. So $S_2$'s Euler-Lagrange equations are satisfied too.

So $L_1$, $L_2$ are equivalent.

However, I'm not entirely happy with this. It isn't clear whether this has resolved the problems or simply made them more difficult to spot. If anyone has any insightful comments or different ways of answering this question, I'd be very interested to hear them.