Given an ODE then regard it as an Euler-Lagrange equation, how to find a functional relative to it? Recently, I have been studied about Lp Minkowski problem. I met some confusion. The equation is an ODE like that
$$u_{xx}+u=\frac{g(x)}{u^{p+1}},   \quad x\in\mathbb{R} , \quad p\geq 0.$$
$g(x)$ is a positive function and $u>0, u(k)=u(2\pi+k),k\in\mathbb{R}$ . Then we regard it as an Euler-lagrange equation of a functional. The papers gave this one:
$$J[u]=(\int_0^{2\pi}\frac{g(x)}{u^p}dx)^{\frac{2}{p}}(\int_0^{2\pi}(u^2-u_x^2)dx).$$
In other word, a solution of this ODE is essentially a critical point of the functional. My question is how to find this functional? I think it is strange and maybe relative to eigenvalue of ODE? But why it has the power $\frac{2}{p}$? Thanks in advance.
 A: *

*OP's functional is of the form
$$ J[u]~= F[u]^r G[u]^s, \qquad r,s~\in~\mathbb{R},\tag{1}$$
where
$$ F[u]~:=~ \int_0^{2\pi}\!\mathrm{d}x(u^2-u_x^2) 
\qquad\text{and}\qquad 
G[u]~:=~ \int_0^{2\pi}\!\mathrm{d}x\frac{g(x)}{u^p}. \tag{2}$$


*The functional derivatives are
$$ \frac{\delta F[u]}{\delta u(x)}~=~2u(x)+2u_{xx}(x) 
\qquad\text{and}\qquad
\frac{\delta G[u]}{\delta u(x)}~=~ -p \frac{g(x)}{u^{p+1}(x)}.\tag{3} $$


*The sought-for functional derivative becomes$^1$
$$\begin{align} \frac{1}{J[u]}\frac{\delta J[u]}{\delta u(x)}
~=~& \frac{r}{F[u]}\frac{\delta F[u]}{\delta u(x)}+ \frac{s}{G[u]}\frac{\delta G[u]}{\delta u(x)}\cr
~=~&\frac{2r}{F[u]}(u(x)+u_{xx}(x))- \frac{sp}{G[u]}\frac{g(x)}{u^{p+1}(x)}\end{align}\tag{4}$$


*The stationary condition for $J$ is hence an ODE of the form
$$ u(x)+u_{xx}(x)~= k\frac{g(x)}{u^{p+1}(x)}, \qquad k~\in~\mathbb{R}\backslash\{0\}.\tag{5}$$


*Multiplying the ODE (5) with u(x) and integrating over $x$ implies that
$$F[u]~=~kG[u]\tag{6}$$
on-shell.


*Moreover, if the powers satisfy
$$ 2r~=~sp,\tag{7}$$
then the ODE (5) is a stationary path for $J$. This essentially answers OP's question about the power $\frac{2}{p}$.
--
$^1$ Strictly speaking $J[u]$ could be zero, so the factor $\frac{1}{J[u]}$ on the LHS of eq. (4) is better kept as a factor $J[u]$ on the RHS of eq. (4). We leave it to the reader to improve this.
