<s>[INST] How to solve $y'' = y^3 - y$? 
Let $y$ be a function of $t$. Solve the following nonlinear ODE
$$y'' = y^3 - y$$ with the following initial conditions $y(0) = 0$ and $y'(0) = 0$.


So far, what I have is solving by integrating factor
\begin{align*}
y'y'' &= y'y^3 - y'y \\
\frac{1}{2}\left[(y')^2\right]' &= \frac{1}{4}(y^4)' - \frac{1}{2}(y^2)' \\
(y')^2 &= \frac{1}{2}y^4 - \frac{1}{2}y^2 + C_1 \\
y' &= \sqrt{\frac{1}{2}y^4 - \frac{1}{2}y^2 + C_1}
\end{align*}
Then do separation of variables and will have
$$\int\left(\frac{1}{2}y^4 - \frac{1}{2}y^2 + C_1\right)^{-1/2}dy = t$$
This is the furthest I can get. I don't see any analytical solution, other than $y(t) = 0$, to this equation.
Did I do anything wrong? Does the closed-form solution exist?
 [/INST] With these initial conditions there is only the solution $y=0$ allowed. To see this, note (as you have done) that
$$ C= \frac{y'^2}{2} + \frac{y^2}{2} -\frac{y^4}{4}$$
is conserved. Indeed, we have that
$$\frac{d C}{dt} = y' (y'' + y - y^3)  = 0\,.$$
From the initial conditions, we obtain that $C=0$. The function $y^2/2-y^4/4$ is monotonously increasing for $|y|\leq 1$. So, if we assume that $1\geq |y|> 0$ at some time $t>0$, we find that
$$ 0 =  C = \frac{y'^2}{2} + \frac{y^2}{2} -\frac{y^4}{4} > \frac{y'^2}{2} $$
which is a contradiction as $y'^2\geq 0$. So $y=0$ is the only solution.
</s>