Solving $u''(x)-\frac{u'(x)^2}{u(x)}+\frac{u'(x)}{x}=u(x)^2$ I am looking to solve the following ODE:
$$u''(x)-\frac{u'(x)^2}{u(x)}+\frac{u'(x)}{x}=u(x)^2.$$
As far as I can see, none of the common methods to solve ODEs (separation of variables, integrating factor, Laplace transform, etc.) yield anything useful.
Can I have some guidance on how to solve this equation?
EDIT: I have, with the help of computer algebra systems, found the solution to this equation to be
$$u(x)=\frac{\mathrm{e}^{AB}A^4x^{A-2}}{\left(x^A-\frac{A^2}2\mathrm{e}^{AB}\right)^2}$$
for arbitrary constants $A$ and $B$. However, I am still lost on how one might arrive at this solution. Any ideas?
 A: If you have a non-linear ODE such as this there is one last hope in finding a solution by plugging in a monomial $x^{\alpha}$ with $\alpha\in\mathbb{R}$, especially if the depedencies of "$x$" is only given by some monomials, such as in the third summand.
By trying this, you have to count the de-/increase of homogeneity in each term, i.e. $u''$ has homogeneity $\alpha-2$, $\frac{(u')^2}{u}$ has $2(\alpha-1)-\alpha$, $\frac{u}{x}$ has $(\alpha-1)-1$ and finally $u^2$ has homogeneity $2\alpha$. Since every term on the L.H.S. would provide the same homogeneity $\alpha-2$, we are looking for a monomial $x^\alpha$ satisfying $\alpha-2=2\alpha$, i.e. $\alpha=-2$.
We still need to find the right coefficient $\beta\in\mathbb{R}$ such that $u(x)=\beta x^ {-2}$ actually solves the equation. Again, applying yields $6\beta-4\beta^2-2\beta=\beta^2$ and since we exclude $\beta=0$ we get a solution with $\beta=\frac{4}{5}$.
A: After @dennis_s's answer, what I tried (after a few other attempts), is to let $y=\frac 1{z x^2}$ which leads to
$$x^2 z z''-x^2 z'^2+x z z'+z=0$$ which is solvable ... using Wolfram Alpha.
Rearranging the result, 
$$z=\frac{e^{\sqrt{c_1} c_2} x^{-\sqrt{c_1}}+e^{-\sqrt{c_1} c_2} x^{\sqrt{c_1}}-2 } {2c_1}$$
A: $\def\d{\mathrm{d}}$From the original equation $\dfrac{\d^2 u}{\d x^2} - \dfrac{1}{u} \left( \dfrac{\d u}{\d x} \right)^2 + \dfrac{1}{x} \dfrac{\d u}{\d x} = u^2$, letting $v = \dfrac{1}{ux^2}$ as @ClaudeLeibovici does yields$$
x^2 v \frac{\d^2 v}{\d x^2} - x^2 \left( \frac{\d v}{\d x} \right)^2 + xv \frac{\d v}{\d x} + v = 0,
$$
and letting $y = \ln x$ yields\begin{align*}
v \frac{\d^2 v}{\d y^2} - \left( \frac{\d v}{\d y} \right)^2 + v = 0.\tag{1}
\end{align*}
Denoting $w = \dfrac{\d v}{\d y}$, (1) is equivalent to the following autonomous system:$$
\begin{cases}
\dfrac{\d v}{\d y} = w\\
\dfrac{\d w}{\d y} = \dfrac{w^2}{v} - 1
\end{cases},
$$
and\begin{align*}
\frac{\d w}{\d v} = \frac{1}{w} \left( \dfrac{w^2}{v} - 1 \right) \Longrightarrow (v - w^2) \,\d v + vw \,\d w = 0.\tag{2}
\end{align*}
The integrating factor of (2) is $\dfrac{1}{v^3}$, thus the solution to (2) is $\dfrac{w^2 - 2v}{2v^2} = C_1$, where $C_1$ is a constant. Now,$$
\frac{\d v}{\d y} = w = \pm\sqrt{\smash[b]{2C_1 v^2 + 2v}},
$$
which can be solved explicitly (with a lot of calculation).
