linguistic:voice_change, structural:summarization
Non-uniqueness

The Lagrangian of a given system is not unique. A Lagrangian L can be multiplied by a nonzero constant a and shifted by an arbitrary constant b, and the new Lagrangian L ′ = aL + b will describe the same motion as L. If one restricts as above to trajectories q over a given time interval } and fixed end points P = q (t) and P = q (t), then two Lagrangians describing the same system can differ by the "total time derivative" of a function f (q, t): L ′ (q, q ˙, t) = L (q, q ˙, t) + d f (q, t) d t, {\displaystyle L'(\mathbf {q},{\dot {\mathbf {q} }},t)=L(\mathbf {q},{\dot {\mathbf {q} }},t)+{\frac {\mathrm {d} f(\mathbf {q},t)}{\mathrm {d} t}},} where d f (q, t) d t {\textstyle {\frac {\mathrm {d} f(\mathbf {q},t)}{\mathrm {d} t}}} means ∂ f (q, t) ∂ t + ∑ i ∂ f (q, t) ∂ q i q ˙ i. {\textstyle {\frac {\partial f(\mathbf {q},t)}{\partial t}}+\sum _{i}{\frac {\partial f(\mathbf {q},t)}{\partial q_{i}}}{\dot {q}}_{i}.}

Both Lagrangians L and L ′ produce the same equations of motion since the corresponding actions S and S ′ are related via S ′ = ∫ t st t fin L ′ (q (t), q ˙ (t), t) d t = ∫ t st t fin L (q (t), q ˙ (t), t) d t + ∫ t st t fin d f (q (t), t) d t d t = S + f (P fin, t fin) − f (P st, t st), {\displaystyle {\begin{aligned}S'&=\int _{t_{\text{st}}}^{t_{\text{fin}}}L'(\mathbf {q} (t),{\dot {\mathbf {q} }}(t),t)\,dt\\&=\int _{t_{\text{st}}}^{t_{\text{fin}}}L(\mathbf {q} (t),{\dot {\mathbf {q} }}(t),t)\,dt+\int _{t_{\text{st}}}^{t_{\text{fin}}}{\frac {\mathrm {d} f(\mathbf {q} (t),t)}{\mathrm {d} t}}\,dt\\&=S+f(P_{\text{fin}},t_{\text{fin}})-f(P_{\text{st}},t_{\text{st}}),\end{aligned}}} with the last two components f (P, t) and f (P, t) independent of q.