# Adding a term to the Lagrangian Density without changing Lagrange's Equations

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:

1. P. Hamill, A Student’s Guide to Lagrangians and Hamiltonians, 2014; problem 7.1 p. 166.
• The linked post assumes that the fields go to zero at the boundary, but I don't think we can assume the Lagrangian density goes to zero at the boundary can we? – TKT Feb 18 at 19:57
• Nevermind, of course the variation of the Lagrangian density has to be zero at the boundaries. Thanks for pointing me to that link! – TKT Feb 18 at 20:20
• – Frobenius Feb 19 at 0:34

There are various issues with problem 7.1:

1. Firstly, when reading chapter 7, it becomes clear that Hamill confusingly is denoting a total spacetime derivative $$d/d x^{\mu}$$ as $$\partial/\partial x^{\mu}$$, cf. e.g. this Phys.SE post.

2. Secondly, for dimensional reasons, the function $$F^{\mu}$$ in the change in the Lagrangian density $$\Delta{\cal L}~=~\sum_{\mu=0}^3dF^{\mu}/d x^{\mu}\tag{*}$$ must be different than the Lagrangian density $${\cal L}$$ itself.

3. Thirdly, for given boundary conditions (BCs), the change (*) of the Lagrangian density may destroy the existence of the functional/variational derivative, cf. e.g. this Phys.SE post.

Altogether, this makes the corrected problem 7.1 effectively a duplicate of e.g. this Phys.SE post.

References:

1. P. Hamill, A Student’s Guide to Lagrangians and Hamiltonians, 2014; problem 7.1 p. 166.