What is the most general transformation between Lagrangians which give the same equation of motion?

This question is made up from 5 (including the main titular question) very closely related questions, so I didn't bother to ask them as different/followup questions one after another. On trying to answer the titular question on my own, I was recently led to think that scale transformations and addition by a total time derivative are the only transformations of the Lagrangian which give the same Equation of motion according to this answer by Qmechanic with kind help from respected users in the hbar. I will ignore topological obstructions from now on in this question. The reasoning was that if we have that

Two Lagrangians $$L$$ and $$L'$$ which satisfy the same EOM then we have that the EL equations are trivially satisfied for some $$L-\lambda L'$$. The answer "yes" to (II) in Qmechanic's answer then implies that $$L-\lambda L'$$ is a total time derivative.

However I am confused upon reading the Reference 2 i.e. "J.V. Jose and E.J. Saletan, Classical Dynamics: A Contemporary Approach, 1998"; (referred to as JS in the following) mentioned in the answer. I have several closely related questions---

JS (section 2.2.2 pg. 67) says

For example, let $$L_1$$ and $$L_2$$ be two Lagrangian functions such that the equations of motion obtained from them are exactly the same. Then it can be shown that there exists a function $$\Phi$$ on $$\mathbb{Q}$$ such that $$L_1-L_2 = d\Phi/dt$$.

(i) Why doesn't this assertion not violate Qmechanic's answer to (I) here, namely why should two lagrangians having same EOM necessarily deviate by a total derivative of time, when Qmechanic explicitly mentioned scale transformation to be such a transformation? Infact on the next page(pg. 68) JS also says

It does not mean, however, that Lagrangians that yield the same dynamics must necessarily differ by a total time derivative.

exactly what Qmechanic asserts with example.

But then JS gives an example

$$L_a= (\dot{q_1}\dot{q_2} -q_1q_2)~~\text{and}~~L_b = \frac{1}{2}\left[\dot{q_1})^2 +(\dot{q_2})^2 - (q_1)^2- (q_2)^2\right]$$ yield the same dynamics, but they do not differ by a total time derivative.

Also, this is (atleast manifestly) not equivalent to a scale transformation of the Lagrangian. So we found a transformation which is not a scale transformation or adding a total derivative but gives the same dynamics contrary to what I was led to think from Qmechanic's answer by the reasoning mentioned in the first paragraph(actually first block-quote) of this question.

(ii) So where was the reasoning in the first para wrong /How is the assertion in the first para consistent with this particular example?

Surprisingly JS pg 68 also says

What we have just proven (or rather what is proven in Problem 4) means that if a Lagrangian is changed by adding the time derivative of a function, the equations of motion will not be changed.

(iii) But didn't they just state and prove the converse on pg. 67?

• If "Yes" then

$$~~~(a)$$ As asked in part (A) of this question how is this consistent with part (I) of the previous answer by Qmechanic.

$$~~~(b)$$ Did JS make a mistake on pg. 68 then?

• If "No" i.e. what is stated on pg 68 is what is proved on pg 67 then

$$~~~(a)$$ Did JS make a mistake on pg. 67 then? i.e. How are the statement on pg 67 and the proof consistent with the statement on pg 68?

$$~~~(b)$$ Why did Qmechanic cite this as a reference to support his answer to (II) which is almost(*) the converse of what is given in JS?

(*) "Almost" because I don't see how the statement on pg. 67 uses the word "trivially" from Qmechanic's statement

If EL equations are trivially satisfied for all field configurations, is the Lagrangian density $$\mathcal{L}$$ necessarily a total divergence?

Assuming, the answer to the above question is somehow "yes", what I understood from pg. 67 of JS is that they are simply taking two Lagrangians which satisfy the same EOM as the assumptions of the theorem that they move on to prove and what Qmechanic is taking as assumption in his answer to (II) is a single Lagrangian which satisfy the EL equations for any arbitrary choice of $$q,\dot{q}$$ and $$t$$ on which the Lagrangian depends. So how are these two assumptions are supposed to be the same? Or more simply put,

(iv) How is Qmechanic's statement in answer to (II) in the previous question equivalent to what is stated in JS?

(v) Finally, is the titular question answerable with or without using Qmechanic's previous answer? If so, How?

If someone is not interested in answering all these questions (labelled $$(i)-(v)$$ with ($$iii$$) containing multiple subquestions), an overall explanation/discussion in new words, of the answer by Qmechanic and what's written on JS and their comparison might also help.

Rather than answering the question point-by-point, I am going to cut to the essence.

Suppose that we are given $$n$$ independent variables $$x=(x^i)=(x^1,\dots,x^n)$$, $$m$$ "dependent variables" $$y=(y^\sigma)=(y^1,\dots,y^m)$$ and also their "formal derivatives" eg. $$y^\sigma_i$$, $$y^\sigma_{i_1...i_k}$$ etc, then a system of $$m$$ differential equations can be specified in terms of functions $$\Delta_\sigma(x,y,y_{(1)},\dots,y_{(s)}),$$ where $$y_{(k)}=(y^\sigma_{i_1...i_k})$$.

Assuming no "topological obstructions", if there are Lagrangian functions $$L(x,y,\dots,y_{(r)}),\quad\text{and}\quad L^\prime(x,y,\dots,y_{(r^\prime)})$$ such that $$\Delta_\sigma=\frac{\delta L}{\delta y^\sigma}\equiv\frac{\delta L^\prime}{\delta y^\sigma},$$where $$\frac{\delta}{\delta y^\sigma}=\sum_{k\ge 0}(-1)^k d_{i_1}\dots d_{i_k}\frac{\partial}{\partial y^\sigma_{i_1...i_k}},$$ then we necessarily have $$L^\prime = L + d_i K^i.$$

However this requires that the functions $$\Delta_\sigma$$ be given in definite form, once and for all. But say for example that $$M^\sigma_{\ \tau}$$ is a matrix that can possibly depend on all variables (independent, dependent, derivative) and is invertible. Then the functions $$\Delta^\prime_\sigma=M^\tau_{\ \sigma}\Delta_\tau$$ have the same zeroes, so the solutions of the two differential equations coincide.

It might happen that $$\Delta_\sigma$$ and $$\Delta^\prime_\sigma$$ both have Lagrangians $$L$$ and $$L^\prime$$, but then these two Lagrangians do not need to be related by a total divergence.

Note that the scale transformation $$L^\prime =\lambda L$$ results in $$\Delta^\prime_\sigma = \lambda \Delta_\sigma$$, so in this case the equations of motion are not exactly the same.

Appendix: Here's a proof of the claim that for two Lagrangians that have the exact same equations of motion, they differ in a total divergence. The first variation of $$L$$ can be written as $$\delta L=\sum_{k=0}^r\frac{\partial L}{\partial y^\sigma_{i_1...i_k}}\delta y^\sigma_{i_1...i_k}=\frac{\delta L}{\delta y^\sigma}\delta y^\sigma+d_i\left(\sum_{i=0}^{r-1}\pi^{ii_1...i_k}_\sigma\delta y^\sigma_{i_1...i_k}\right),$$ where the "Lagrangian momenta" $$\pi^{i_1...i_k}_\sigma$$ can be computed explicitly, but we don't need it.

Let us write $$[y]:=(y,y_{(1)},\dots,y_{(r)},\dots)$$, then consider $$\frac{\mathrm d}{\mathrm dt}L(x,[ty])=\sum_{k=0}^r\frac{\partial L}{\partial y^\sigma_{i_1...i_k}}(x,[ty])y^\sigma_{i_1...i_k},$$ so this is the same as $$\delta L$$ evaluated at $$ty$$ with $$\delta y=y$$, hence $$\frac{\mathrm d L}{\mathrm dt}(x,[ty])=\frac{\delta L}{\delta y^\sigma}(x,[ty])y^\sigma + d_i\left(\sum_{k=0}^{r-1}\pi^{ii_1...i_k}_\sigma(x,[ty])y^\sigma_{i_1...i_k}\right).$$ Integrating from $$0$$ to $$1$$ gives $$L(x,[y])-L(x,[0])=\int_0^1\frac{\delta L}{\delta y^\sigma}(x,[ty])y^\sigma\mathrm dt+d_i K^i(x,[y]),$$ where $$K^i(x,[y])=\int_0^1\sum_{k=0}^{r-1}\pi^{ii_1...i_k}_\sigma(x,[ty])y^\sigma_{i_1...i_k}\mathrm dt.$$ But $$L(x,[0])$$ is just an ordinary function of $$x$$ which can always be written in divergence form $$L(x,[0])=\partial_i k^i=d_i k^i$$ for some $$k^i(x)$$ (eg. take $$k^i(x)=\int_{0}^{1}t^{n-1}L(tx,[0])x^i\mathrm dt$$), so redefining $$K^i$$ to be $$K^i + k^i$$, we get $$L(x, [y])=\int_0^1\frac{\delta L}{\delta y^\sigma}(x,[ty])y^\sigma\mathrm dt+d_i K^i(x,[y]).$$ If $$L$$ is a null Lagrangian, i.e. $$\delta L/\delta y^\sigma\equiv 0$$ identically, then we get $$L=d_i K^i$$ from the above formula.

Now if $$L,L^\prime$$ are Lagrangians with the exact same field equations, then $$L^\prime-L$$ is a null Lagrangian, so we obtain $$L^\prime=L+d_i K^i$$.

• So according to the last sentence of this answer before the Appendix, the reasoning in the first block-quote is wrong because scale transformations don't yield exactly the same EOM and so we can't apply the statement you proved in the Appendix ? Commented Sep 12, 2023 at 9:19
• @Sanjana Yes, essentially. This whole problem is closely related to the difficulties with the inverse problem to the calculus of variations. Deciding that a system of equations is variational (Euler-Lagange eqs of some Lagrangian) in a fixed analytic form is easy and can be done by methods similar to what I did in the appendix. Deciding of a system of eqs can be transformed into some equivalently good form which is variational is on the other hand a difficult problem with no general solutions. Commented Sep 12, 2023 at 11:36
• Concerning Ref. 1 the main point is that the quote

For example, let $$L_1$$ and $$L_2$$ be two Lagrangian functions such that the $$\color{red}{\text{equations of motion}}$$ obtained from them are exactly the same. Then it can be shown that there exists a function $$\Phi$$ on $$\mathbb{Q}$$ such that $$L_1-L_2 = d\Phi/dt$$.

should be interpreted/can be corrected as$$^1$$

For example, let $$L_1$$ and $$L_2$$ be two Lagrangian functions such that the $$\color{green}{\text{Euler-Lagrange expressions}}$$ obtained from them are exactly the same. Then it can be shown that there exists a function $$\Phi$$ on $$\mathbb{Q}$$ such that $$L_1-L_2 = d\Phi/dt$$.

• Here the $$\color{green}{\text{Euler-Lagrange expressions}}$$ mean $$E_k(L):=\frac{\partial L}{\partial q^k}-\frac{d}{dt}\frac{\partial L}{\partial \dot{q}^k},$$ while the $$\color{red}{\text{equations of motion}}$$ in principle could refer to any equivalent formulation of such equations, possibly after a series of mathematical manipulations, such as e.g., multiplying both sides with the same non-zero constant $$\lambda\neq 0$$.

• The counterexample, where $$L_2=\lambda L_1$$, where $$\lambda\neq 1$$ is a constant, and where $$L_1$$ is not a total time derivative, still stands.

References:

1. J.V. Jose and E.J. Saletan, Classical Dynamics: A Contemporary Approach, 1998; Section 2.2.2, p. 67.

--

$$^1$$ In fairness it should be said that Ref. 1 does clarify in eq. (2.30).

• I think as of now (i) and (ii) are answered. (i) JS pg 67 doesn't include scale transformations at all (ii) The reasoning in the first para is wrong simply because scale transformations aren't applicable in what's written on JS pg 67. Please correct me if I am wrong. Commented Sep 12, 2023 at 9:17