<s>[INST] Closed form solutions of $\ddot x(t)-x(t)^n=0$ Given the ODE:
$$\ddot x(t)-x(t)=0$$
the solution is:
$$x(t)=C_1\exp(-t)+C_2\exp(t)$$
If we square the $x(t)$ we have:
$$\ddot x(t)-x(t)^2=0$$
and the solution is given by:
$$x(t)=6\wp(t+C_1;0,C_2)$$
and so for $x(t)^3$ which gives:
$$x(t)=\operatorname{sn}\left(\left(\frac{1}{2}i\sqrt t +C_1\right)C_2,i\right)$$
More generally, is it possible to find closed form solutions for the equation:
$$\ddot x(t)-x(t)^n=0$$
?
Thanks.
 [/INST] $$\begin{align*}
y''-y^n&=0\\
y'y''&=y'y^n\\
\int y'y'' dx &=\int y'y^n dx\\
\frac{(y')^2}{2} &=\frac{y^{n+1}}{n+1} +c_1\\
y' &=\sqrt {\frac{2y^{n+1}}{n+1} +2c_1 }\\
\int \frac{dy}{\sqrt {\frac{2y^{n+1}}{n+1} +2c_1 }} &=\int dx =x+a\\
\frac{1}{(2c_1)^{1/2}}\int \frac{dy}{ \sqrt{1+\frac{y^{n+1}}{c_1(n+1)}}} &=x+a\\
\int \frac{dy}{ \sqrt{1+\frac{y^{n+1}}{c_1(n+1)}}} &=(2c_1)^{1/2}x+a(2c_1)^{1/2}=(2c_1)^{1/2}x+c_2
\end{align*}$$
After here you can change variable and use the binomial expansion to evaluate integral.
$u=\frac{y^{n+1}}{c_1(n+1)}$
$${(1+u)}^{\alpha}= \sum_{n=0}^\infty \binom{\alpha}{n} u^n=1+ \alpha \frac{u}{1!}+\alpha (\alpha-1) \frac{u^2}{2!}+\dots$$
I avoided doing many calculations, and I preferred to use the quick way: ask Wolfram Alpha. Here is a link to the solution.
$k=\frac{1}{c_1(n+1)}$
$\int \frac{dy}{ \sqrt{1+ky^{n+1}}} =y. _2F_1 (\frac{1}{2},\frac{1}{n+1};\frac{n+2}{n+1}; -ky^{n+1}) = y. _2F_1 (\frac{1}{2},\frac{1}{n+1};\frac{n+2}{n+1}; -\frac{y^{n+1}}{c_1(n+1)})=(2c_1)^{1/2}x+c_2 $
Solution in closed form as Hypergeometric function
$$_2F_1 \left(\frac{1}{2},\frac{1}{n+1};\frac{n+2}{n+1}; -\frac{y^{n+1}}{c_1(n+1)}\right)=\frac{1}{y}\left(\sqrt{2c_1}x+c_2\right)$$
</s>