= Solution
Work on an interval with $x\ne0$. When $n=3$, let $v=y^{-2}$. The resulting <linear ordinary differential equation> and its <integrating factor> are
$$
v'-\frac4xv=-2x^2,\qquad \mu=x^{-4},\qquad (x^{-4}v)'=-2x^{-2}.
$$
Integration gives $v=2x^3+Cx^4$. The real nonzero solutions and the separately checked zero solution are therefore
$$
\boxed{y=\pm(2x^3+Cx^4)^{-1/2}\quad\text{where }2x^3+Cx^4>0;\qquad y\equiv0.}
$$
For $n=1$, separation in the <linear ordinary differential equation> gives $y'/y=x^2-2/x$, hence
$$
\boxed{y=Cx^{-2}e^{x^3/3}.}
$$
Here $C=0$ already includes the zero solution. Division by $x$ is why these formulas are stated on intervals excluding zero; the original equation requires $y(0)=0$ if a classical solution is to extend through zero.
Back to article page