Total divergences in a variational principle (source code)

= Total divergences in a variational principle

Adding $dF(q,t)/dt$ to a mechanical <Lagrangian> changes its <action> by $F(q_f,t_f)-F(q_i,t_i)$. Fixed endpoint <variations> therefore leave its bulk <Euler-Lagrange equations> unchanged. For fields, adding $\partial_\mu K^\mu$ changes the action by a boundary flux. The same conclusion holds for compactly supported variations or appropriate fixed boundary data. If $K$ depends on field derivatives, those boundary data must also control their variations. Such terms can still change canonical momenta, boundary observables, and representatives of <Noether currents>; equivalence of bulk equations does not mean that every boundary-value problem is identical.