Consider the two differential equations \begin{align*} \ddot{x}_{A} - \gamma(x_{A} + x_{B}) &= 0, \\ \ddot{x}_{B} + \gamma(x_{A} + x_{B}) &= 0 \end{align*} where $\gamma$ is a constant. I am looking either for a Lagrangian $L = L(x, \dot{x}, t)$ that can reproduce these equations or a proof that shows this is impossible.
Unfortunately, my initial question was framed too narrowly, so I will leave two questions (they're not exactly the same as you will see in the answers). The first one was my original one. The second one is my new one.
Question 1. Is there a function $L = L(x, \dot{x}, t)$ such that \begin{align*} \frac{d}{dt}\frac{\partial L}{\partial \dot{x}_{A}} - \frac{\partial L}{\partial x_{A}} = \ddot{x}_{A} - \gamma(x_{A} + x_{B}), \\ \frac{d}{dt}\frac{\partial L}{\partial \dot{x}_{B}} - \frac{\partial L}{\partial x_{B}} = \ddot{x}_{B} + \gamma(x_{A} + x_{B})? \end{align*}
Question 2. Is there a function $L = L(x, \dot{x}, t)$ such that when setting the Euler-Lagrange expressions to zero we obtain differential equations that yield the same solutions as my original differential equations?
After looking around, I found the inverse problem for Lagrangians giving the Helmholtz conditions. Let us define $f^{A}(x^{A}, x^{B}) = \gamma\cdot (x^{A} + x^{B})$ and $f^{B}(x^{A}, x^{B}) = -\gamma\cdot (x^{A} + x^{B})$ as in the wiki page, and let us define $$\Phi_{j}^{i} = \frac{1}{2} \frac{\mathrm{d}}{\mathrm{d} t} \frac{\partial f^{i}}{\partial \dot{x}^{j}} - \frac{\partial f^{i}}{\partial x^{j}} - \frac{1}{4} \frac{\partial f^{i}}{\partial \dot{x}^{k}} \frac{\partial f^{k}}{\partial \dot{x}^{j}}.$$ Here we easily obtain $$ (\Phi_{j}^{i}) = \begin{pmatrix} -\gamma & -\gamma \\ \gamma & \gamma \end{pmatrix}. $$ Now the wiki page says that we need to find a non-singular symmetric matrix $g = (g_{ij})$ such that conditions $(\text{H}1)$-$(\text{H}3)$ in the wiki page are satisfied (see image at the bottom for conditions). I found that $$ g = \begin{pmatrix} 1 & \frac{3}{2} \\ \frac{3}{2} & 2 \end{pmatrix} $$ works, so I concluded that there should be a Lagrangian for my differential equations. However, I have not been able to find such any desired function that works.
Questions:
- Was my above reasoning in determining that a Lagrangian exists correct? Did I make a correct application of Douglas's theorem?
- Can anyone help me find a Lagrangian? I tried various functions, yet they all failed to produce the differential equations.
- If no one can give me an explicit answer, then can anyone tell me what steps I should take to construct a Lagrangian?
Some references:
- The wikipedia page is here.
- This is the link to Douglas's paper on the inverse problem for Lagrangians.
- This post asks about the inverse problem, and the answers provide some references.
- The thesis referenced in the MSE post provides an interesting so-called explicit condition on page 67, but it is only stated for the 1D one particle case. NOTE: It seems their condition only works for problems similar to Question 1. In Example IV.1 they conclude that a damped oscillator doesn't have a Lagrangian for the general case. This is true in the context of Question 1, but false in the context of Question 2 as this post demonstrates. If you multiply the differential equation by an exponential, then a Lagrangian can reproduce the differential equation.
- The MSE post referenced Olver's Applications of Lie groups to differential equations.
- Relevant wikipedia image as of 12/6/2022 in case it gets edited: