This is proof that $L'$ represents same equation of motion with $L$ through Lagrange eq.
I understand $L'$ satisfies Lagrange eq, but how does this proof mean $L'$ and $L$ describe same motion of particle?
In other words, why does total time derivative term which is added to $L$ make no difference in equation of motion?
Lagrangian Formalism – Adding a Total Time Derivative Term to the Lagrangian
classical-mechanicslagrangian-formalism
Related Solutions
Let us for simplicity consider just classical point mechanics (i.e. a $0+1$ dimensional world volume) with only one variable $q(t)$. (The generalization to classical field theory on an $n+1$ dimensional world volume with several fields is straightforward.)
Let us reformulate the title(v1) as follows:
Why can't the Lagrangian $L$ always be written as a total derivative $\frac{dF}{dt}$?
In short, it is because:
In physics, the action functional $S[q]$ should be local, i.e. of the form $S[q]=\int dt~L$, where the $L$ is a function of the form $$L~=~L(q(t), \dot{q}(t), \ddot{q}(t), \ldots, \frac{d^Nq(t)}{dt^N};t),$$ and where $N\in\mathbb{N}_{0}$ is some finite order. (In most physics applications $N=1$, but this is not important in what follows. Note that the Euler-Lagrange equations get modified with higher-order terms if $N>1$.)
Similarly, we demand that $F$ is of local form $$F~=~F(q(t), \dot{q}(t), \ddot{q}(t), \ldots, \frac{d^{N-1}q(t)}{dt^{N-1}};t),$$ We stress that $L$ and $F$ only refer to the same time instant $t$. In other words, if $t$ is now, then $L$ and $F$ does not depend on the past nor the future.
The special intermediate role played by the $q$ variable in between $L$ and $t$. Note that there can be both implicit and explicit time-dependence of $L$ and $F$.
Counterexample: Consider
$$L~=~-\frac{k}{2}q(t)^2.$$ Then we can write $L=\frac{dF}{dt}$ as a total time derivative by defining
$$F=-\frac{k}{2}\int_0^t dt'~q(t')^2. $$
($F$ is unique up to a functional K[q] that doesn't depend on $t$.) But $F$ is not on local form as it also depends on the past $t'<t$.
Finally, let us mention that one can prove (still under assumption of locality in above sense plus assuming that the configuration space is contractible, due to an algebraic Poincare lemma of the so-called bi-variational complex, see e.g. Ref. 1) that
$$ \text{The Lagrangian density is a total divergence} $$ $$\Updownarrow$$ $$\text{The Euler-Lagrange equations are identically satisfied}. $$
References:
- G. Barnich, F. Brandt and M. Henneaux, Local BRST cohomology in gauge theories, Phys. Rep. 338 (2000) 439, arXiv:hep-th/0002245.
I) OP essentially asked (v1):
If two Lagrangian densities ${\cal L}$ and $\tilde{\cal L}$ have the same eqs. of motions, must they necessarily differ by a total divergence?
Answer: No, not necessarily, one e.g. can always multiply a Lagrangian density ${\cal L}$ with a constant factor $\tilde{\cal L}=\lambda {\cal L}$ different from one $\lambda\neq 1$ without altering the EL equations, but the difference $$\tilde{\cal L}-{\cal L}=(\lambda-1) {\cal L} \tag{A}$$ is not a total divergence if ${\cal L}$ is not.
II) OP essentially asked (v4):
If EL equations are trivially satisfied for all field configurations, is the Lagrangian density ${\cal L}$ necessarily a total divergence?
Answer: Yes, modulo topological obstructions in field configuration space. This follows from an algebraic Poincare lemma of the so-called bi-variational complex, see e.g. Ref. 1.
We should mention that an elementary follow-your-nose-type proof exists for Lagrangians of the form $L(q^i,\dot{q}^j,t)$ without higher-order derivatives, see e.g. Ref. 2. We stress that the proof-technique of Ref. 2 does not work in the presence of higher-order derivatives or in the case of field theory. [Also Ref. 2 seems to overlook the counterexample in eq. (A).]
III)
If two Lagrangian densities ${\cal L}$ and $\tilde{\cal L}$ have the same eqs. of motions, does there exist a constant factor $\lambda$ such that $\tilde{\cal L}-\lambda{\cal L}$ necessarily differ by a total divergence?
Answer: No, not necessarily. There are topological counterexamples.
References:
G. Barnich, F. Brandt and M. Henneaux, Local BRST cohomology in gauge theories, Phys. Rep. 338 (2000) 439, arXiv:hep-th/0002245.
J.V. Jose and E.J. Saletan, Classical Dynamics: A Contemporary Approach, 1998; Section 2.2.2, p. 67.
Best Answer
You have seen that the substitution $$L\longrightarrow L':= L+\frac{\mathrm{d}F}{\mathrm{d}t}$$ does not change the Euler-Lagrange equations. Now, this happens because the time derivative satisfies the Euler-Lagrange equations identically.
Let us consider a concrete example. Take the Lagrangian of a simple harmonic oscillator: $$L_\text{HO}=\frac{1}{2}m\dot q^2-\frac{1}{2}m\omega^2q^2$$ which gives the Euler-Lagrange equations $$\ddot q=-\omega^2 q$$ Now consider the modified Lagrangian $$L'=\frac{1}{2}m\dot q^2-\frac{1}{2}m\omega^2q^2+\dot q=L_\text{HO}+\dot q$$ The Euler-Lagrange equations are obviously linear. Thus $$\text{EL}[L']=\text{EL}[L_\text{HO}]+\text{EL}[\dot q]$$ As was shown above, $\dot q$'s Euler-Lagrange equation will vanish, but we can verify this: $$\text{EL}[\dot q]:=\frac{\mathrm{d}}{\mathrm{d}t}\frac{\partial \dot q}{\partial\dot q}-\frac{\partial\dot q}{\partial q}=\frac{\mathrm{d}1}{\mathrm{d}t}-0=0$$ Thus, $$\text{EL}[L']=\text{EL}[L_\text{HO}]$$ i.e. the modified Lagrangian still implies $\ddot q=-\omega^2q$.