Solution (source code)

= Solution

For a nonzero solution on a branch where the real power is differentiable, set $v=u^{1-\alpha}$. Multiplying the <Bernoulli differential equation> by $(1-\alpha)u^{-\alpha}$ gives the linear equation
$$
v'+(1-\alpha)f(x)v=(1-\alpha)g(x).
$$
It can be solved by an <integrating factor>. For the specified cubic equation take $\alpha=3$, $f=g=x$, so $v=u^{-2}$ satisfies $v'-2xv=-2x$. Its integrating factor is $e^{-x^2}$, giving $(ve^{-x^2})'=-2xe^{-x^2}$ and hence $v=1+Ce^{x^2}$. Thus all nonzero real solutions are
$$
\boxed{u(x)=\pm\frac1{\sqrt{1+Ce^{x^2}}},}
$$
on connected intervals where the denominator is positive, with a fixed sign on each interval. Also \b[$u\equiv0$] solves the original equation and must be restored because the substitution excluded it. The choices $C=0$ give the constant solutions $u=\pm1$. Smoothness of the original right-hand side gives uniqueness, so a nonzero solution cannot cross through the zero solution at a finite regular point.