# Obtain the Lagrangian from the system of coupled equation [closed]

In this particular paper,

"Interaction between a moving mirror and radiation pressure: A Hamiltonian formulation" by C.K.Law, PhysRevA.51.2537

$$\ddot{Q}_{k}=-\omega^{2}_{k}Q_{k}+2\dfrac{\dot{q}}{q}\sum_{j}g_{kj}\dot{Q}_{j}+\dfrac{\ddot{q}q-\dot{q}^{2}}{q^{2}}\sum_{j}g_{kj}Q_{j}+\dfrac{\dot{q}^{2}}{q^{2}}\sum_{j\ell}g_{jk}g_{j\ell}Q_{\ell} \tag{2.6}$$

$$m\ddot{q}=-\dfrac{\partial V(q)}{\partial q}+\dfrac{1}{q}\sum_{k,j}(-1)^{k+j}\omega_{k}\omega_{j}Q_{k}Q_{j} \tag{2.7}$$ where $\:k,j,\ell \in \mathbb{N}^{+} \equiv \lbrace 1,2,3,\cdots \rbrace.$

Here the position-dependent frequencies $\omega_{k}$ are given by $$\omega_{k}(q)=\dfrac{k\pi}{q} \tag{2.8}$$ and the dimensionless coefficients $\:g_{kj}\:$ are given by

$$g_{kj} = \begin{cases} (-1)^{k+j}\dfrac{2kj}{j^{2}-k^{2}}& \text{, k \ne j} \tag{2.9-2.10}\\ \qquad \quad 0 & \text{, k=j} \end{cases}$$

$$\begin{split} & L\left(q,\dot{q},Q_{k},\dot{Q}_{k}\right)=\\ &\dfrac{1}{2}\sum_{k}\left[\dot{Q}_{k}^{2}-\omega_{k}^{2}(q)Q_{k}^{2}\right]+\dfrac{1}{2}m\dot{q}^{2}-V(q)-\dfrac{\dot{q}}{q} \sum_{j,k}g_{kj}\dot{Q}_{k}Q_{j}+\dfrac{\dot{q}^{2}}{2q^{2}}\sum_{j,k,\ell}g_{kj}g_{k\ell}Q_{\ell}Q_{j} \end{split} \tag{3.1}$$

how to obtain the Lagrangian as given in Eq 3.1 from the system of coupled Equation 2.6 & 2.7

Problem i am facing is to identify the canonical momentum in such Equation and also unable to formulate in Euler-Lagrangian form so as to get the lagrangian.

Τhe canonical momenta $\:P_{k},p\:$ conjugate to $\:Q_{k},q\:$ respectively are given in the paper by the following equations \begin{align} P_{k}&=\dot{Q}_{k}-\frac{\dot{q}}{q}\sum_{j}g_{kj}Q_{j} \tag{3.3}\\ p&=m\dot{q}-\dfrac{1}{q}\sum_{jk}g_{kj}P_{k}Q_{j} \tag{3.4} \end{align}

I have tried the back-step process where i had tried to get the system of eqns. from the given Lagrangian with no success. May be i need a different approach

I will be very grateful for any kind of help regarding this matter.

• Labels k, j, l seem to run over the entire ${\mathbb N}$. In eqs.(2.9-2.10), do you have $g_{kj}=0$ for $k=±j$ or are $k,j ≥ 0$?
– udrv
Aug 20 '15 at 23:15

## 1 Answer

MAIN SECTION : The Lagrangian

Let express the equations of motion and the Euler-Lagrange equations with zero right hand sides $$\bbox[#FFFF88,12px]{\ddot{Q}_{k}+\omega^{2}_{k}Q_{k}-2\dfrac{\dot{q}}{q}\sum_{j}g_{kj}\dot{Q}_{j}-\dfrac{\ddot{q}q-\dot{q}^{2}}{q^{2}}\sum_{j}g_{kj}Q_{j}-\dfrac{\dot{q}^{2}}{q^{2}}\sum_{j\ell}g_{jk}g_{j\ell}Q_{\ell}=0} \tag{01a}$$

$$\bbox[#FFFF88,12px]{m\ddot{q}+\dfrac{\partial V(q)}{\partial q}-\dfrac{1}{q}\sum_{k,j}(-1)^{k+j}\omega_{k}\omega_{j}Q_{k}Q_{j}=0} \tag{01b}$$

$$\bbox[#E1FFFF,12px]{\dfrac{d}{dt}\left( \dfrac{\partial L}{\partial \dot{Q}_{k}}\right)-\dfrac{\partial L}{\partial Q_{k}}=0} \tag{02a}$$

$$\bbox[#E1FFFF,12px]{\dfrac{d}{dt}\left( \dfrac{\partial L}{\partial \dot{q}}\right)-\dfrac{\partial L}{\partial q}=0} \tag{02b}$$

where $\:L\left(q,\dot{q},Q_{k},\dot{Q}_{k}\right)\:$ the Lagrangian.

We proceed to the following definitions in order to handle the large amount of variables and indices by means of compressed simplified expressions : $$\mathbf{Q}\stackrel{\text{def}}{\equiv} \begin{bmatrix} Q_{1}\\ Q_{2}\\ \vdots\\ Q_{k}\\ \vdots\\ \end{bmatrix} \qquad \mathbf{\dot{Q}}\stackrel{\text{def}}{\equiv} \begin{bmatrix} \dot{Q}_{1}\\ \dot{Q}_{2}\\ \vdots\\ \dot{Q}_{k}\\ \vdots\\ \end{bmatrix} \qquad \mathbf{\ddot{Q}}\stackrel{\text{def}}{\equiv} \begin{bmatrix} \ddot{Q}_{1}\\ \ddot{Q}_{2}\\ \vdots\\ \ddot{Q}_{k}\\ \vdots\\ \end{bmatrix} \tag{03}$$

$$\mathrm{G} \stackrel{\text{def}}{\equiv} \begin{bmatrix} 0& g_{12} & g_{13} & \cdots & g_{1k} & \cdots \\ g_{21} & 0 & g_{23} & \cdots & g_{2k} & \cdots \\ \vdots & \vdots & \vdots & \vdots & \vdots & \vdots\\ g_{k1} & g_{k2} & g_{k3} & \cdots & 0 & \cdots\\ \vdots & \vdots & \vdots & \vdots & \vdots & \vdots \end{bmatrix} =-\mathrm{G}^{\rm{T}} \tag{04}$$

$$\Omega\left(q\right)\stackrel{\text{def}}{\equiv} \begin{bmatrix} \omega_{1} & 0 & \cdots & 0 & \cdots \\ 0 & \omega_{2} & \cdots & 0 & \cdots \\ \vdots & \vdots & \vdots & \vdots & \vdots\\ 0 & 0 & \cdots & \omega_{k}& \cdots \\ \vdots & \vdots & \vdots & \vdots & \vdots \end{bmatrix} = \dfrac{\pi}{q} \begin{bmatrix} 1 & 0 & \cdots & 0 & \cdots \\ 0 & 2 & \cdots & 0 & \cdots \\ \vdots & \vdots & \vdots & \vdots & \vdots\\ 0 & 0 & \cdots & k & \cdots \\ \vdots & \vdots & \vdots & \vdots & \vdots \end{bmatrix} =\Omega^{\rm{T}}\left(q\right) \tag{05}$$

$$\phi\left(q,\dot{q}\right)\stackrel{\text{def}}{\equiv}\dfrac{\dot{q}}{q} \tag{06}$$

We define also the real scalar below, something like the inner product of real vectors

$$\boldsymbol{<}\mathbf{Q},\mathbf{P}\boldsymbol{>}\stackrel{\text{def}}{\equiv} \sum_{k}Q_{k}P_{k} \tag{07}$$

Under these definitions and using equations (A-01), see AUXILIARY SECTION, we have the following expressions (08) in place of the equations of motion (01) and (09) in place of (02):

$$\mathbf{\ddot{Q}}+\Omega^{2}\left(q\right)\mathbf{Q}-2\phi\left(q,\dot{q}\right)\mathrm{G}\mathbf{\dot{Q}}-\dot{\phi}\left(q,\dot{q}\right)\mathrm{G}\mathbf{Q}+\phi^{2}\left(q,\dot{q}\right)\rm{G}^{2}\mathbf{Q}=\mathbf{0} \tag{08a}$$

$$m\ddot{q}+\dfrac{\partial V(q)}{\partial q}-\dfrac{1}{q}\boldsymbol{<}\Omega^{2}\left(q\right)\mathbf{Q},\mathbf{Q}\boldsymbol{>}+\dfrac{1}{q}\boldsymbol{<}\Omega^{2}\left(q\right)\mathbf{Q},\mathrm{G}\mathbf{Q}\boldsymbol{>}=0 \tag{08b}$$ $$\dfrac{d}{dt}\left( \dfrac{\partial L}{\partial \mathbf{\dot{Q}}}\right)-\dfrac{\partial L}{\partial \mathbf{Q}}=\mathbf{0} \tag{09a}$$ $$\dfrac{d}{dt}\left( \dfrac{\partial L}{\partial \dot{q}}\right)-\dfrac{\partial L}{\partial q}=0 \tag{09b}$$ while the Lagrangian of the system, see equation (3.1) in the question, using equations (A-02) is expressed as $$\begin{split} & L\left(q,\dot{q},\mathbf{Q},\mathbf{\dot{Q}}\right)=\\ &\dfrac{1}{2}\boldsymbol{<}\mathbf{\dot{Q}}, \mathbf{\dot{Q}}\boldsymbol{>}-\dfrac{1}{2}\boldsymbol{<}\Omega^{2}\left(q\right)\mathbf{Q},\mathbf{Q}\boldsymbol{>}+\dfrac{1}{2}m\dot{q}^{2}-V(q)-\phi\boldsymbol{<}\mathrm{G}\mathbf{Q}, \mathbf{\dot{Q}}\boldsymbol{>}-\dfrac{1}{2}\phi^{2}\boldsymbol{<}\mathrm{G}^{2}\mathbf{Q},\mathbf{Q}\boldsymbol{>} \end{split} \nonumber$$ $$\text{-----------------------------------------------------------} \tag{10}$$ and in even more compact form $$L\left(q,\dot{q},\mathbf{Q},\mathbf{\dot{Q}}\right)= \dfrac{1}{2}\left(\left\Vert \phi\mathrm{G}\mathbf{Q}-\mathbf{\dot{Q}}\right\Vert^{2}-\left\Vert\Omega\mathbf{Q}\right\Vert^{2} \right)+\dfrac{1}{2}m\dot{q}^{2}-V \tag{10\;^{\boldsymbol{\prime}}}$$ We'll try to build the Lagrangian step by step by a trial and error procedure.

So, we expect the 1st term of equation (08a) to come from a Lagrangian part $\:L_{1}\left(\mathbf{\dot{Q}}\right)\:$ such that by (09a) $$\dfrac{d}{dt}\left( \dfrac{\partial L_{1}}{\partial \mathbf{\dot{Q}}}\right)= \mathbf{\ddot{Q}}\Longrightarrow \dfrac{\partial L_{1}}{\partial \mathbf{\dot{Q}}}=\mathbf{\dot{Q}} \tag{11}$$ From the rule (A-3.d), see AUXILIARY SECTION, $\:L_{1}\:$ is $$L_{1}\left(\mathbf{\dot{Q}}\right)=\dfrac{1}{2}\boldsymbol{<}\mathbf{\dot{Q}}, \mathbf{\dot{Q}}\boldsymbol{>} \tag{12}$$ since $$\dfrac{\partial\left(\boldsymbol{<}\mathbf{\dot{Q}}, \mathbf{\dot{Q}}\boldsymbol{>}\right)}{\partial\mathbf{\dot{Q}}}=2\mathbf{\dot{Q}} \tag{13}$$

For the 2nd term of equation (08a) we expect a Lagrangian part $\:L_{2}\left(q,\mathbf{Q}\right)\:$ such that by (09a) $$-\dfrac{\partial L_{2}}{\partial \mathbf{Q}}= \Omega^{2}\left(q\right)\mathbf{Q} \tag{14}$$ so $$L_{2}\left(q,\mathbf{Q}\right)=-\dfrac{1}{2}\boldsymbol{<}\Omega^{2}\left(q\right)\mathbf{Q},\mathbf{Q}\boldsymbol{>} \tag{15}$$ since from the rule (A-3.c) and the symmetric (more exactly : diagonal) matrix $\:\Omega^{2}=\left(\Omega^{2}\right)^{\rm{T}}\:$ $$\dfrac{\partial\left(\boldsymbol{<}\Omega^{2}\mathbf{Q}, \mathbf{Q}\boldsymbol{>}\right)}{\partial\mathbf{Q}}=\left[\Omega^{2}+\left(\Omega^{2}\right)^{\rm{T}}\right]\mathbf{Q}=2\Omega^{2}\mathbf{Q} \tag{16}$$ But as the Lagrangian part $\:L_{2}\left(q,\mathbf{Q}\right)\:$ is a function of $\:q\:$ also, it produces items in the equations of motion if inserted to the 2nd term of (09b) : $$-\dfrac{\partial L_{2}}{\partial q}=+\dfrac{1}{2}\dfrac{\partial\left(\boldsymbol{<}\Omega^{2}\mathbf{Q}, \mathbf{Q}\boldsymbol{>}\right)}{\partial\mathbf{Q}}=+\boldsymbol{<}\Omega \dfrac{\partial \Omega}{\partial q} \mathbf{Q},\mathbf{Q}\boldsymbol{>}=-\dfrac{1}{q}\boldsymbol{<}\Omega^{2}\left(q\right)\mathbf{Q},\mathbf{Q}\boldsymbol{>} \tag{17}$$ that is exactly the 3rd term in equation (08b).

On the other hand the first two terms of (08b) are those of a particle moving in a potential, so they come from a Lagrangian part $\:L_{3}\left(q,\dot{q}\right)\:$ : $$L_{3}\left(q,\dot{q}\right)=\dfrac{1}{2}m\dot{q}^{2}-V(q) \tag{18}$$ This part $\:L_{3}\left(q,\dot{q}\right)\:$ if inserted to (9a) produces nothing (no term in equations of motion). Now, in (08a) half of the 3rd term and the 4th term give $$-\phi\left(q,\dot{q}\right)\mathrm{G}\mathbf{\dot{Q}}-\dot{\phi}\left(q,\dot{q}\right)\mathrm{G}\mathbf{Q}=\dfrac{d}{dt}\left(-\phi\mathrm{G}\mathbf{Q}\right) \tag{19}$$ so we expect a Lagrangian part $\:L_{4}\left(q,\dot{q},\mathbf{Q},\mathbf{\dot{Q}}\right)\:$ such that by (09a) $$\dfrac{\partial L_{4}}{\partial \mathbf{\dot{Q}}}= -\phi\left(q,\dot{q}\right)\mathrm{G}\mathbf{Q} \tag{20}$$ that is $$L_{4}\left(q,\dot{q},\mathbf{Q},\mathbf{\dot{Q}}\right)=-\phi\left(q,\dot{q}\right)\boldsymbol{<}\mathrm{G}\mathbf{Q}, \mathbf{\dot{Q}}\boldsymbol{>} \tag{21}$$ But, because of the antisymmetry of $\:\mathrm{G}\;$, this part may be expressed also as $$L_{4}\left(q,\dot{q},\mathbf{Q},\mathbf{\dot{Q}}\right)=+\phi\left(q,\dot{q}\right)\boldsymbol{<}\mathrm{G} \mathbf{\dot{Q}},\mathbf{Q}\boldsymbol{>} \tag{22}$$ so inserting this in the 2nd term of (09a) $$-\dfrac{\partial L_{4}}{\partial \mathbf{Q}}= -\phi\left(q,\dot{q}\right)\mathrm{G}\mathbf{\dot{Q}} \tag{23}$$ which is the other half of the 3rd term in (08a). This means that $\:L_{4}\:$, if inserted in (09a), produces the 3rd and 4th terms of (08a) $$\dfrac{d}{dt}\left( \dfrac{\partial L_{4}}{\partial \mathbf{\dot{Q}}}\right)-\dfrac{\partial L_{4}}{\partial \mathbf{Q}}=-2\phi\left(q,\dot{q}\right)\mathrm{G}\mathbf{\dot{Q}}-\dot{\phi}\left(q,\dot{q}\right)\mathrm{G}\mathbf{Q} \tag{24}$$ The output of the insertion of $\:L_{4}\:$ in (09b) would be examined later together with $\:L_{5}\:$. The 5th term of (08a) may be come from a Lagrangian part $\:L_{5}\left(q,\dot{q},\mathbf{Q},\mathbf{\dot{Q}}\right)\:$ such that by (09a)
$$-\dfrac{\partial L_{5}}{\partial \mathbf{Q}}=\phi^{2}\left(q,\dot{q}\right)\mathrm{G}^{2}\mathbf{Q} \tag{25}$$ so $$L_{5}\left(q,\dot{q},\mathbf{Q},\mathbf{\dot{Q}}\right)=-\dfrac{1}{2}\phi^{2}\boldsymbol{<}\mathrm{G}^{2}\mathbf{Q},\mathbf{Q}\boldsymbol{>} \tag{26}$$ since from (A-03.c) and the symmetry of $\:\mathrm{G}^{2}\:$ $$\dfrac{\partial\left(\boldsymbol{<}\mathrm{G}^{2}\mathbf{Q},\mathbf{Q}\boldsymbol{>}\right)}{\partial \mathbf{Q}}=\left(\mathrm{G}^{2}+\left(\mathrm{G}^{2}\right)^{\rm{T}}\right)\mathbf{Q}=2\mathrm{G}^{2}\mathbf{Q} \tag{27}$$ It can be proved, see A PROOF SECTION, that the sum $\:L_{45}=L_{4}+L_{5}\:$ $$L_{45}\left(q,\dot{q},\mathbf{Q},\mathbf{\dot{Q}}\right)=L_{4}+L_{5}=-\dfrac{1}{2}\phi^{2}\boldsymbol{<}\mathrm{G}^{2}\mathbf{Q},\mathbf{Q}\boldsymbol{>}-\phi\left(q,\dot{q}\right)\boldsymbol{<}\mathrm{G}\mathbf{Q}, \mathbf{\dot{Q}}\boldsymbol{>} \tag{28}$$ if inserted in (09b) produces the 4th term of (08b) $$\dfrac{d}{dt}\left( \dfrac{\partial L_{45}}{\partial \dot{q}}\right)-\dfrac{\partial L_{45}}{\partial q}=+\dfrac{1}{q}\boldsymbol{<}\Omega^{2}\left(q\right)\mathbf{Q},\mathrm{G}\mathbf{Q}\boldsymbol{>} \tag{29}$$

In equation (30) below we sum up the found Lagrangian parts and the final Lagrangian is $$\begin{split} & L\left(q,\dot{q},\mathbf{Q},\mathbf{\dot{Q}}\right)=\\ &\underbrace{\dfrac{1}{2}\boldsymbol{<}\mathbf{\dot{Q}}, \mathbf{\dot{Q}}\boldsymbol{>}}_{L_{1}}\underbrace{-\dfrac{1}{2}\boldsymbol{<}\Omega^{2}\left(q\right)\mathbf{Q},\mathbf{Q}\boldsymbol{>}}_{L_{2}}\underbrace{+\dfrac{1}{2}m\dot{q}^{2}-V(q)}_{L_{3}}\underbrace{-\phi\boldsymbol{<}\mathrm{G}\mathbf{Q}, \mathbf{\dot{Q}}\boldsymbol{>}}_{L_{4}}\underbrace{-\dfrac{1}{2}\phi^{2}\boldsymbol{<}\mathrm{G}^{2}\mathbf{Q},\mathbf{Q}\boldsymbol{>}}_{L_{5}} \end{split} \nonumber$$ $$\text{-----------------------------------------------------------} \tag{30}$$ identical to that given in the paper, equation (10).

Equations (31) are the equations of motion (08) with braces under items indicated from which Lagrangian terms $\:L_{m}\:$ these items come from :
$$\underbrace{\mathbf{\ddot{Q}}}_{L_{1}}\underbrace{+\Omega^{2}\left(q\right)\mathbf{Q}}_{L_{2}}\underbrace{-2\phi\left(q,\dot{q}\right)\mathrm{G}\mathbf{\dot{Q}}-\dot{\phi}\left(q,\dot{q}\right)\mathrm{G}\mathbf{Q}}_{L_{4}}\underbrace{+\phi^{2}\left(q,\dot{q}\right)\rm{G}^{2}\mathbf{Q}}_{L_{5}}=\mathbf{0} \tag{31a}$$ $$\underbrace{m\ddot{q}+\dfrac{\partial V(q)}{\partial q}}_{L_{3}}\underbrace{-\dfrac{1}{q}\boldsymbol{<}\Omega^{2}\left(q\right)\mathbf{Q},\mathbf{Q}\boldsymbol{>}}_{L_{2}}\underbrace{+\dfrac{1}{q}\boldsymbol{<}\Omega^{2}\left(q\right)\mathbf{Q},\mathrm{G}\mathbf{Q}\boldsymbol{>}}_{L_{4}+L_{5}}=0 \tag{31b}$$
Note that the canonical momenta $\:\mathbf{P},p\:$ conjugate to $\:\mathbf{Q},q\:$ respectively are
\begin{align} \mathbf{P}&=\dfrac{\partial L}{\partial \mathbf{\dot{Q}}}=\mathbf{\dot{Q}}-\frac{\dot{q}}{q}\mathrm{G}\mathbf{Q} \tag{32a}\\ p&=\dfrac{\partial L}{\partial \dot{q}}=m\dot{q}-\dfrac{1}{q}\boldsymbol{<}\mathrm{G}\mathbf{Q},\mathbf{P}\boldsymbol{>} \tag{32b} \end{align} where for the proof of (32b) \begin{align} p&=\dfrac{\partial L}{\partial \dot{q}}=m\dot{q}-\dfrac{1}{q}\boldsymbol{<}\mathrm{G}\mathbf{Q}, \mathbf{\dot{Q}}\boldsymbol{>}-\frac{\dot{q}}{q^{2}}\boldsymbol{<}\mathrm{G}^{2}\mathbf{Q},\mathbf{Q}\boldsymbol{>} \nonumber\\ &=m\dot{q}-\dfrac{1}{q}\boldsymbol{<}\mathrm{G}\mathbf{Q}, \mathbf{\dot{Q}}\boldsymbol{>}+\frac{\dot{q}}{q^{2}}\boldsymbol{<}\mathrm{G}\mathbf{Q},\mathrm{G}\mathbf{Q}\boldsymbol{>} \nonumber\\ &=m\dot{q}-\dfrac{1}{q}\boldsymbol{<}\mathrm{G}\mathbf{Q}, \underbrace{\mathbf{\dot{Q}}-\frac{\dot{q}}{q}\mathrm{G}\mathbf{Q}}_{\mathbf{P}}\boldsymbol{>}=m\dot{q}-\dfrac{1}{q}\boldsymbol{<}\mathrm{G}\mathbf{Q},\mathbf{P}\boldsymbol{>} \tag{32b$\;^{\boldsymbol{\prime}}$} \end{align} Equations (32a) and (32b) are identical to (3.3) and (3.4) of the paper respectively, given below \begin{align} P_{k}&=\dot{Q}_{k}-\frac{\dot{q}}{q}\sum_{j}g_{kj}Q_{j} \tag{3.3}\\ p&=m\dot{q}-\dfrac{1}{q}\sum_{jk}g_{kj}P_{k}Q_{j} \tag{3.4} \end{align}

AUXILIARY SECTION : Compressed simplified expressions and partial differentiation rules

Equations (A-01) are useful for the conversion of the equations of motion from the form (01) to the form (08) : \begin{align} &\omega^{2}_{k}Q_{k}=\left[\Omega^{2}\left(q\right)\mathbf{Q}\right]_{k} \tag{A-01.a}\\ &\sum_{j}g_{kj}Q_{j}=\left[\mathrm{G}\mathbf{Q}\right]_{k} \tag{A-01.b}\\ &\sum_{j}g_{kj}\dot{Q}_{j}=\left[\mathrm{G}\mathbf{\dot{Q}}\right]_{k} \tag{A-01.c}\\ &\sum_{j\ell}g_{jk}g_{j\ell}Q_{\ell}=-\sum_{\ell}\left(\sum_{j}g_{kj}g_{j\ell}\right)Q_{\ell}=-\sum_{\ell}\left( \mathrm{G}^{2}\right)_{k\ell}Q_{\ell}=-\left(\mathrm{G}^{2}\mathbf{Q}\right)_{k} \tag{A-01.d}\\ &\dfrac{\ddot{q}q-\dot{q}^{2}}{q^{2}}=\dfrac{d}{dt}\left(\dfrac{\dot{q}}{q}\right)=\dfrac{d\phi\left(q,\dot{q}\right)}{dt}=\dot{\phi}\left(q,\dot{q}\right) \tag{A-01.e}\\ &\sum_{k,j}(-1)^{k+j}\omega_{k}\omega_{j}Q_{k}Q_{j}=\boldsymbol{<}\Omega^{2}\left(q\right)\mathbf{Q},\mathbf{Q}\boldsymbol{>}-\boldsymbol{<}\Omega^{2}\left(q\right)\mathbf{Q},\mathrm{G}\mathbf{Q}\boldsymbol{>} \tag{A-01.f} \end{align} The proof of (A-01.f) runs as follows $$\sum_{k,j}(-1)^{k+j}\omega_{k}\omega_{j}Q_{k}Q_{j}=\underbrace{\sum_{k}\omega^{2}_{k}Q^{2}_{k}}_{\boldsymbol{<}\Omega^{2}\left(q\right)\mathbf{Q},\mathbf{Q}\boldsymbol{>}}+\underbrace{\sum_{k,j\ne k}(-1)^{k+j}\omega_{k}\omega_{j}Q_{k}Q_{j}}_{-\boldsymbol{<}\Omega^{2}\left(q\right)\mathbf{Q},\mathrm{G}\mathbf{Q}\boldsymbol{>}} \tag{A-01.f\;^{\boldsymbol{\prime}}}$$ since \begin{align} &\sum_{k,j\ne k}(-1)^{k+j}\omega_{k}\omega_{j}Q_{k}Q_{j}=\left(\dfrac{\pi}{q}\right)^{2}\sum_{k,j\ne k}(-1)^{k+j}kjQ_{k}Q_{j}= \nonumber\\ &\left(\dfrac{\pi}{q}\right)^{2}\sum_{k,j\ne k}\underbrace{(-1)^{k+j}\dfrac{2kj}{j^{2}-k^{2}}}_{g_{kj}}\dfrac{j^{2}-k^{2}}{2}Q_{k}Q_{j}=\dfrac{1}{2}\sum_{k,j}g_{kj}\left(\omega^{2}_{j}-\omega^{2}_{k}\right)Q_{k}Q_{j}= \nonumber\\ &-\dfrac{1}{2}\sum_{j}\underbrace{\left(\omega^{2}_{j}Q_{j}\right)}_{\left[\Omega^{2}\left(q\right)\mathbf{Q}\right]_{j}}\overbrace{\sum_{k}g_{jk}Q_{k}}^{\left[\mathrm{G}\mathbf{Q}\right]_{j}}-\dfrac{1}{2}\sum_{k}\underbrace{\left(\omega^{2}_{k}Q_{k}\right)}_{\left[\Omega^{2}\left(q\right)\mathbf{Q}\right]_{k}}\overbrace{\sum_{j}g_{kj}Q_{j}}^{\left[\mathrm{G}\mathbf{Q}\right]_{k}}=-\boldsymbol{<}\Omega^{2}\left(q\right)\mathbf{Q},\mathrm{G}\mathbf{Q}\boldsymbol{>} \tag{A-01.f\;$^{\boldsymbol{\prime\prime}}$} \nonumber \end{align} $$\text{-----------------------------------------------------------} \tag{A-01.f\;^{\boldsymbol{\prime\prime}}}$$

Equations (A-02) and (A-03) are useful for the conversion of the Lagrangian from the form (3.1), see equation in question, to the form (10) and for the construction of this Lagrangian step by step from the equations of motion (08) : \begin{align} &\sum_{k}\dot{Q}_{k}^{2}=\boldsymbol{<}\mathbf{\dot{Q}}, \mathbf{\dot{Q}}\boldsymbol{>}=\left\Vert\mathbf{\dot{Q}}\right\Vert^{2} \tag{A-02.a}\\ &\sum_{k}\omega_{k}^{2}(q)Q_{k}^{2}=\boldsymbol{<} \Omega^{2}\mathbf{Q}, \mathbf{Q}\boldsymbol{>}=\boldsymbol{<} \Omega\mathbf{Q},\Omega^{\rm{T}} \mathbf{Q}\boldsymbol{>}=\boldsymbol{<} \Omega\mathbf{Q},\Omega\mathbf{Q}\boldsymbol{>}=\left\Vert\Omega\mathbf{Q}\right\Vert^{2} \tag{A-02.b}\\ &\sum_{j,k}g_{kj}\dot{Q}_{k}Q_{j}=\boldsymbol{<}\mathrm{G}\mathbf{Q}, \mathbf{\dot{Q}}\boldsymbol{>}=-\boldsymbol{<}\mathrm{G}\mathbf{\dot{Q}}, \mathbf{Q}\boldsymbol{>} \tag{A-02.c}\\ &\sum_{j,k,\ell}g_{kj}g_{k\ell}Q_{\ell}Q_{j}=-\boldsymbol{<}\mathrm{G}^{2}\mathbf{Q},\mathbf{Q}\boldsymbol{>}=\boldsymbol{<}\mathrm{G}\mathbf{Q},\mathrm{G}\mathbf{Q}\boldsymbol{>}=\left\Vert\mathrm{G}\mathbf{Q}\right\Vert^{2} \tag{A-02.d} \end{align} Equations (A-02.c) and (A-02.d) are proved respectively as follows \begin{align} &\sum_{j,k}g_{kj}\dot{Q}_{k}Q_{j}=\sum_{k}\left(\sum_{j}g_{kj}Q_{j}\right)\dot{Q}_{k}=\sum_{k}\left[\mathrm{G}\mathbf{Q}\right]_{k}\left[\mathbf{\dot{Q}}\right]_{k}= \nonumber\\ &\boldsymbol{<}\mathrm{G}\mathbf{Q}, \mathbf{\dot{Q}}\boldsymbol{>}=\boldsymbol{<}\mathbf{Q}, \mathrm{G}^{\rm{T}}\mathbf{\dot{Q}}\boldsymbol{>}=\boldsymbol{<}\mathbf{Q}, -\mathrm{G}\mathbf{\dot{Q}}\boldsymbol{>}=-\boldsymbol{<}\mathrm{G}\mathbf{\dot{Q}}, \mathbf{Q}\boldsymbol{>} \tag{A-02.c$\;^{\boldsymbol{\prime}}$} \end{align} \begin{align} &\sum_{j,k,\ell}g_{kj}g_{k\ell}Q_{\ell}Q_{j}=\sum_{k}\left(\sum_{j}g_{kj}Q_{j}\right)\left(\sum_{\ell}g_{k \ell}Q_{\ell}\right)=\sum_{k}\left[\mathrm{G}\mathbf{Q}\right]_{k}\left[\mathrm{G}\mathbf{Q}\right]_{k} \nonumber\\ &=\boldsymbol{<}\mathrm{G}\mathbf{Q},\mathrm{G}\mathbf{Q}\boldsymbol{>}=\boldsymbol{<}\mathrm{G}^{\rm{T}}\mathrm{G}\mathbf{Q},\mathbf{Q}\boldsymbol{>}=-\boldsymbol{<}\mathrm{G}^{2}\mathbf{Q},\mathbf{Q}\boldsymbol{>} \tag{A-02.d$\;^{\boldsymbol{\prime}}$} \end{align}

Equations (A-03) below are in a sense partial differentiation rules of a scalar function of a vector variable $\:\mathbf{S}\:$ with respect to this variable. The scalar functions are usually inner products and the variable vector is $\:\mathbf{S}=\mathbf{Q}\;\text{or}\;\mathbf{\dot{Q}}\:$. In the following $\:\mathbf{A},\mathbf{R}\:$ are vectors and $\:\mathrm{F}\:$ linear transformation all of them independent of the variable vector $\:\mathbf{S}\:$. Usually $\:\mathrm{F}=\Omega,\Omega^{2},\mathrm{G},\mathrm{G}^{2}\:$ :

\begin{align} &\dfrac{\partial\left( \boldsymbol{<}\mathbf{A},\mathbf{S}\boldsymbol{>}\right)}{\partial \mathbf{S}}=\dfrac{\partial\left( \boldsymbol{<}\mathbf{S},\mathbf{A}\boldsymbol{>}\right)}{\partial \mathbf{S}} =\mathbf{A} \tag{A-03.a}\\ &\dfrac{\partial\left( \boldsymbol{<}\mathbf{R},\mathrm{F}\mathbf{S}\boldsymbol{>}\right)}{\partial \mathbf{S}}=\dfrac{\partial\left( \boldsymbol{<}\mathrm{F}^{\rm{T}}\mathbf{R},\mathbf{S}\boldsymbol{>}\right)}{\partial \mathbf{S}} =\mathrm{F}^{\rm{T}}\mathbf{R} \tag{A-03.b}\\ &\dfrac{\partial\left( \boldsymbol{<}\mathrm{F}\mathbf{S},\mathbf{S}\boldsymbol{>}\right)}{\partial \mathbf{S}}=\left(\mathrm{F}+\mathrm{F}^{\rm{T}}\right)\mathbf{S} \tag{A-03.c}\\ &\dfrac{\partial\left( \boldsymbol{<}\mathbf{S},\mathbf{S}\boldsymbol{>}\right)}{\partial \mathbf{S}}=2 \mathbf{S} \tag{A-03.d} \end{align} (A-03.b) is a special case of (A-03.a) with $\:\mathbf{A}=\mathrm{F}^{\rm{T}}\mathbf{R}\:$ and (A-03.d) is a special case of (A-03.c) with $\:\mathrm{F}=\mathrm{I}\:$.

An identity useful in the following section is $$\mathrm{G}^{\rm{T}}=-\mathrm{G} \:\Longrightarrow \: \boldsymbol{<}\mathrm{G}\mathbf{S},\mathbf{S}\boldsymbol{>}=0, \quad \text{for any real vector }\: \mathbf{S} \tag{A-04}$$ since $$\boldsymbol{<}\mathrm{G}\mathbf{S},\mathbf{S}\boldsymbol{>}=\boldsymbol{<}\mathbf{S},\mathrm{G}^{\rm{T}}\mathbf{S}\boldsymbol{>}=\boldsymbol{<}\mathbf{S},\left(-\mathrm{G}\right)\mathbf{S}\boldsymbol{>}=-\boldsymbol{<}\mathrm{G}\mathbf{S},\mathbf{S}\boldsymbol{>} \tag{A-04\;^{\boldsymbol{\prime}}}$$

A PROOF SECTION : Proof of equation (29) given equation (28).

We'll prove equation (29) from (28), the two equations repeated here for convenience $$\dfrac{d}{dt}\left( \dfrac{\partial L_{45}}{\partial \dot{q}}\right)-\dfrac{\partial L_{45}}{\partial q}=+\dfrac{1}{q}\boldsymbol{<}\Omega^{2}\left(q\right)\mathbf{Q},\mathrm{G}\mathbf{Q}\boldsymbol{>} \tag{29}$$ where $$L_{45}\left(q,\dot{q},\mathbf{Q},\mathbf{\dot{Q}}\right)\stackrel{\text{def}}{\equiv}-\dfrac{1}{2}\phi^{2}\left(q,\dot{q}\right)\boldsymbol{<}\mathrm{G}^{2}\mathbf{Q},\mathbf{Q}\boldsymbol{>}-\phi\left(q,\dot{q}\right)\boldsymbol{<}\mathrm{G}\mathbf{Q}, \mathbf{\dot{Q}}\boldsymbol{>} \tag{28}$$

\begin{align} -\dfrac{\partial L_{45}}{\partial q}&=\phi\dfrac{\partial \phi}{\partial q}\boldsymbol{<}\mathrm{G}^{2}\mathbf{Q},\mathbf{Q}\boldsymbol{>}+\dfrac{\partial \phi}{\partial q}\boldsymbol{<}\mathrm{G}\mathbf{Q},\mathbf{\dot{Q}}\boldsymbol{>} \nonumber\\ &=\left(\dfrac{\dot{q}}{q}\right)\dfrac{\partial \left(\dfrac{\dot{q}}{q}\right)}{\partial q}\boldsymbol{<}\mathrm{G}^{2}\mathbf{Q},\mathbf{Q}\boldsymbol{>}+\dfrac{\partial \left(\dfrac{\dot{q}}{q}\right)}{\partial q}\boldsymbol{<}\mathrm{G}\mathbf{Q},\mathbf{\dot{Q}}\boldsymbol{>} \nonumber \end{align} so $$-\dfrac{\partial L_{45}}{\partial q}=\left(-\dfrac{\dot{q}^{2}}{q^{3}}\right)\boldsymbol{<}\mathrm{G}^{2}\mathbf{Q},\mathbf{Q}\boldsymbol{>}+\left(-\dfrac{\dot{q}}{q^{2}}\right)\boldsymbol{<}\mathrm{G}\mathbf{Q},\mathbf{\dot{Q}}\boldsymbol{>} \tag{B-01}$$ Now \begin{align} \dfrac{\partial L_{45}}{\partial \dot{q}}&=-\phi\dfrac{\partial \phi}{\partial \dot{q}}\boldsymbol{<}\mathrm{G}^{2}\mathbf{Q},\mathbf{Q}\boldsymbol{>}-\dfrac{\partial \phi}{\partial \dot{q}}\boldsymbol{<}\mathrm{G}\mathbf{Q},\mathbf{\dot{Q}}\boldsymbol{>}\;\Longrightarrow \nonumber\\ \dfrac{\partial L_{45}}{\partial \dot{q}}&=\left(-\dfrac{\dot{q}}{q^{2}}\right)\boldsymbol{<}\mathrm{G}^{2}\mathbf{Q},\mathbf{Q}\boldsymbol{>}+\left(-\dfrac{1}{q}\right)\boldsymbol{<}\mathrm{G}\mathbf{Q},\mathbf{\dot{Q}}\boldsymbol{>} \tag{B-02} \end{align} Differentiating (B-02) with respect to $\:t\:$ \begin{align} &\dfrac{d}{dt}\left(\dfrac{\partial L_{45}}{\partial \dot{q}}\right)=\left(-\dfrac{\ddot{q}q-2\dot{q}^{2}}{q^{3}}\right)\boldsymbol{<}\mathrm{G}^{2}\mathbf{Q},\mathbf{Q}\boldsymbol{>}+\left(-\dfrac{\dot{q}}{q^{2}}\right)\boldsymbol{<}\mathrm{G}^{2}\mathbf{\dot{Q}},\mathbf{Q}\boldsymbol{>} \nonumber\\ &+\left(-\dfrac{\dot{q}}{q^{2}}\right)\boldsymbol{<}\mathrm{G}^{2}\mathbf{Q},\mathbf{\dot{Q}}\boldsymbol{>}+\left(\dfrac{\dot{q}}{q^{2}}\right)\boldsymbol{<}\mathrm{G}\mathbf{Q},\mathbf{\dot{Q}}\boldsymbol{>}+\left(-\dfrac{1}{q}\right)\underbrace{\boldsymbol{<}\mathrm{G}\mathbf{\dot{Q}},\mathbf{\dot{Q}}\boldsymbol{>}}_{=0,\text{see (A-04)}} \nonumber\\ &+\left(-\dfrac{1}{q}\right)\boldsymbol{<}\mathrm{G}\mathbf{Q},\mathbf{\ddot{Q}}\boldsymbol{>} \tag{B-03} \end{align} Adding (B-01) and (B-03) \begin{align} &\dfrac{d}{dt}\left(\dfrac{\partial L_{45}}{\partial \dot{q}}\right)-\dfrac{\partial L_{45}}{\partial q}= \nonumber\\ &\left(-\dfrac{\ddot{q}q-\dot{q}^{2}}{q^{3}}\right)\boldsymbol{<}\mathrm{G}^{2}\mathbf{Q},\mathbf{Q}\boldsymbol{>}+\left(-\dfrac{2\dot{q}}{q^{2}}\right)\boldsymbol{<}\mathrm{G}^{2}\mathbf{Q},\mathbf{\dot{Q}}\boldsymbol{>}+\left(-\dfrac{1}{q}\right)\boldsymbol{<}\mathrm{G}\mathbf{Q},\mathbf{\ddot{Q}}\boldsymbol{>}= \nonumber\\ &+\dfrac{1}{q}\boldsymbol{<}\left(\dfrac{\ddot{q}-\dot{q}^{2}}{q^{2}}\right) \mathrm{G}\mathbf{Q}+\dfrac{2\dot{q}}{q}\mathrm{G}\mathbf{\dot{Q}}-\mathbf{\ddot{Q}},\mathrm{G}\mathbf{Q}\boldsymbol{>}=+\dfrac{1}{q}\boldsymbol{<}\underbrace{\dot{\phi}\mathrm{G}\mathbf{Q}+2\phi\mathrm{G}\mathbf{\dot{Q}}-\mathbf{\ddot{Q}}}_{=\Omega^{2}\left(q\right)\mathbf{Q}+\phi^{2}\mathrm{G}^{2}\mathbf{Q},\text{ see (08a)}},\mathrm{G}\mathbf{Q}\boldsymbol{>} \nonumber\\ &+\dfrac{1}{q}\boldsymbol{<}\Omega^{2}\left(q\right)\mathbf{Q}+\phi^{2}\mathrm{G}^{2}\mathbf{Q},\mathrm{G}\mathbf{Q}\boldsymbol{>}=+\dfrac{1}{q}\boldsymbol{<}\Omega^{2}\left(q\right)\mathbf{Q},\mathrm{G}\mathbf{Q}\boldsymbol{>}+\dfrac{\phi^{2}}{q}\underbrace{\boldsymbol{<}\mathrm{G}^{2}\mathbf{Q},\mathrm{G}\mathbf{Q}\boldsymbol{>}}_{=0,\text{see (A-04)}} \nonumber \end{align} so $$\dfrac{d}{dt}\left( \dfrac{\partial L_{45}}{\partial \dot{q}}\right)-\dfrac{\partial L_{45}}{\partial q}=+\dfrac{1}{q}\boldsymbol{<}\Omega^{2}\left(q\right)\mathbf{Q},\mathrm{G}\mathbf{Q}\boldsymbol{>} \tag{B-04}$$ QED.