I'm stuck on a problem in the last chapter of Hamill's Student's Guide to Lagrangians and Hamiltonians. It asks why adding:
$$ \frac {\partial \mathscr{L}} {\partial t} + \frac {\partial \mathscr{L}} {\partial x} $$
to the Lagrangian density $\mathscr{L}$ won't change Lagrange's equations.
I've tried starting from Lagrange's equations themselves and from Hamilton's principle, but I can't get the new terms to cancel out. I also know that if the partial derivatives were of the variation, I could integrate and the variation would be zero at the boundary - but this hasn't really helped. Any help would be much appreciated!
References:
- P. Hamill, A Student’s Guide to Lagrangians and Hamiltonians, 2014; problem 7.1 p. 166.