An ODE $-x '' + x = |x|^p x$ In the context of nonlinear Schrödinger equations(NLS), the following elliptic PDE is important and its solution is called ground state:
$- \Delta Q + Q = |Q|^{p}Q$ on $\mathbb{R}^d$, with $p > 0$.
When the dimension $d = 1$, this is just an ODE, and it is written as $ - x'' + x = |x|^p x$.
A lot of textbook says that we can solve this ODE explicitly by elementary method. However, I cannot do that.
 A: A good way to look at the ODE is as an equation that describes the motion of an object under the effect of a potential:
$m\ddot x=-\frac{d}{dx}V(x)$
where m is the mass of the object and $V$ is the potential.
In our case, $m=1$ and, as you can check, $V(x)=-\frac{1}{2}|x|^2+\frac{1}{p+2}|x|^{p+2}$.
For instance, by standard theory of this kind of ODEs, you know that the energy $E(t):=V(x(t))+\frac{1}{2}|\dot x(t)|^2$ is constant for solutions to this ODE.
Moreover, if your initial data $(x_0,\dot x_0)$ has energy $E(x_0,\dot x_0)=:E$, then the motion can only happen between the two closest points $x_1$ and $x_2$, s.t. $x_1<x_0<x_2$, where $V(x_1)=V(x_2)=E$. That is, $x_1\leq x(t)\leq x_2\quad \forall t\in\mathbb R$.
(In general, $x_1$ and $x_2$ do not always exist, but in this case they do because $V(x)\rightarrow+\infty$ for $x\rightarrow\pm\infty$).
In addition (with that same initial data), if for example $x_1$ is a stationary points of $V$, namely $V'(x_1)=0$, and if instead $V'(x_2)\neq0$, then the solution $x(t)$ behaves as folows: $x(t)-x_1\rightarrow 0$ exponentially as $x\rightarrow\pm \infty$.
(Edit: for the convergence to be exponential I think you have to assume $V''(x_1)\neq 0$ (that is in any case true in our case, see below), but I am not entirely sure. Without any doubt, the more you have null high order derivatives of $V$ calculated in $x_1$, the slower the convergence is.)
With these observations, to build the ground state, you just need to choose $(x_0,\dot x_0)$ such that $E(x_0,\dot x_0)$ is equal to $V(0)$, that as you can check by yourself is a stationary point of $V$, and the corresponding global solution $x(t)$ decays exponentially at $\pm\infty$. (As an analogy of above, in this case $x_1=0$ and $x_2$ is the positive solution that is closest to $0$ of the equation $V(x)=V(0)$).
Edit: When doing this, you have to choose the initial data such that $0<x_0<x_2$, otherwise the solution could be constant, or it could have the wrong sign.
When understanding all of this, it is better to plot $V(x)$ on a piece of paper.
Unfortunately, I don't know a reference that does this in detail.
