# How to find the Lagrangian of this system?

I am trying to find the Lagrangian $L$ of a system I am studying. The equations of motion is:

$$\left\{ \begin{array}{c l} r \ddot{\phi} + 2\dot{r} \dot{\phi}+k(r) \cdot r \dot{r} \dot{\phi} = 0\\ \ddot{r} - r \dot{\phi}^2 - k(r) \cdot r^2 \dot{\phi}^2 = 0 \end{array}\right.$$

I have tried a general Ansatz $L=L_1+L_2=\Sigma_{m,n,p,q} C_{m,n,p,q} r^m \dot{r}^n \phi^p \dot{\phi}^q+L_2(k(r))$ and plugged into the Euler-Lagrange equation but find the calculation extremely tedious. Is there some systematic way to find it?

I'd really appreciate any hints. Thank you!

Update:

By a little bit rearrangement, $$\left\{ \begin{array}{c l} \ddot{\phi} + F(r) \dot{r} \dot{\phi}= 0\\ \ddot{r} +G(r) \dot{\phi}^2 = 0 \end{array}\right.$$ where $$F(r)=\frac{2}{r} + k(r), \quad G(r)=-(r+k(r)\cdot r^2)$$

If we assume $$L=A(r) \dot{r}^2 + B(r) \dot{\phi}^2 +C(r) \dot{r} \dot{\phi}$$ (so that I can get the metric easily)

Then $$\left\{ \begin{array}{c l} \mathscr{L}_r L = 2A \ddot{r} -B_r \dot{\phi}^2+C\ddot{\phi} +A_r \dot{r}^2\\ \mathscr{L}_\phi L = 2B \ddot{\phi} +2B_r \dot{r}\dot{\phi}+C_r\dot{r}^2 + C \ddot{r} \end{array}\right.$$ where $\mathscr{L}_q L \equiv \frac{d}{dt} \left(\frac{\partial{L}}{\partial{\dot{q}}}\right)-\frac{\partial{L}}{\partial{q}}$

By comparison with the EOM, it requires $$\frac{2A}{1}= \frac{-B_r}{G(r)}, \quad \frac{2B}{1}=\frac{2B_r}{F(r)}, \quad C=0, \quad A_r=0$$

It seems fine except for $A_r=0$ is conflicting with the others.

• Out of curiosity, how did you get the EOMs in the first place? Commented May 20, 2018 at 18:33
• @Qmechanic, actually they are just $a_{\phi} + k(r) v_r v_{\phi} =0$ and $a_r -k(r) v_{\phi}^2 = 0$. Commented May 20, 2018 at 19:04
• From a comment of OP it seems that we have the motion of a point particle under the influence of a force : $$\mathbf{F} = m\mathbf{a}=m \left(a_r\mathbf{e}_{r}+a_\phi\mathbf{e}_{\phi}\right)= m k(r) \upsilon_{\phi}\left(\upsilon_{\phi}\mathbf{e}_{r}-\upsilon_r\mathbf{e}_{\phi}\right) \tag{com-01}$$ always normal to its velocity : $$\boldsymbol{\upsilon}\left(t\right)=\dot{r}\mathbf{e}_{r}+ r\dot{\phi}\,\mathbf{e}_{\phi}=\upsilon_r\mathbf{e}_{r}+\upsilon_{\phi}\,\mathbf{e}_{\phi} \tag{com-02}$$ as the magnetic force for example. Commented May 21, 2018 at 18:49
• @Shengkai Li I apologize, but I'll continue tomorrow. Note that $$\dfrac{\mathbf{F}}{m}=\boldsymbol{\upsilon}\boldsymbol{\times}\mathbf{B} \quad\text{where} \quad \mathbf{B}=k(r)\upsilon_{\phi}\mathbf{e}_{z} \tag{com-03}$$ Commented May 21, 2018 at 21:59
• Not to distract you, but have you noticed $\phi$ is absent, so you might as well define $\theta\equiv\dot{\phi}$ and the equation for it is 1st, not second order. But a Lagrangian for it may be problematic. Commented May 21, 2018 at 23:29

## 1 Answer

We want to find the metric for these equations: \begin{align*} &\ddot{\varphi} +F(r)\,\dot{\varphi}\,\dot{r}=0&(1) \\ &\ddot{r} +G(r)\,\left(\dot{\varphi}\right)^2=0&(2) \end{align*} $\textbf{Theory}$

The equations of motions are: (I use the NEWTON EULER method ) \begin{align*} &J^T J \,\ddot{\vec{q}} =- J^T\,\frac{\partial\left( J\,\dot{\vec{q}}\right)}{\partial\vec{q}}\,\dot{\vec{q}}+J^T\,\vec{f_a}&(3)\\ \end{align*} With vector $\vec{q}$ of the generalized coordinates: \begin{align*} \vec{q}= \begin{bmatrix} \varphi \\ r \\ \end{bmatrix} \end{align*}, the Jacobi-Matrix (Ansatz): \begin{align*} J&= \begin{bmatrix} r & 0 \\ \varphi & 1 \\ \end{bmatrix} \end{align*} and the vector $\vec{f_a}$ of the external forces (Ansatz): \begin{align*} \vec{f_a}= \begin{bmatrix} 0 \\ -\frac{\varphi}{r}\,\dot{\varphi}\,\dot{r} \\ \end{bmatrix} \end{align*} We get the equation of motions (with (3)): \begin{align*} &\ddot{\varphi} +\frac{1}{r}\,\dot{\varphi}\,\dot{r}=0& (4)\\ &\ddot{r} +\left(\dot{\varphi}\right)^2=0&(5) \end{align*} Compare the coefficients of equation (1) with (4) and (2) with (5) we get: \begin{align*} F(r) & =\frac{2}{r}+k_1(r)\overset{!}{=}\frac{1}{r} \,\Rightarrow\quad k_1(r)=-\frac{1}{r}\\ G(r) &=-\left(r+k_2(r)\,r^2\right)\overset{!}{=}1\,\Rightarrow\quad k_2(r)=-{\frac {r+1}{{r}^{2}}} \end{align*} To fulfill the equations (1) and (2) I have to take two functions $k_1(r)$ and $k_2(r)$.

$\textbf{Metric}:$

\begin{align*} &g=J^T\,J= \begin{bmatrix} r^2+\varphi^2 & \varphi \\ \varphi & 1 \end{bmatrix} \end{align*}

• Thanks! It is interesting the $k(r)$'s are limited to make the ansatz work. Commented May 25, 2018 at 14:11