= Solution
On an interval with $x\ne0$, this is a <homogeneous first-order differential equation>. Put $y=xv(x)$, so $y'=v+xv'$. Substitution and division by $x^2$ give
$$
xv'=v^2-2v=v(v-2).
$$
The constant choices $v=0$ and $v=2$ give $y=0$ and $y=2x$. Otherwise the <separable differential equation> gives
$$
\int\frac{dv}{v(v-2)}=\int\frac{dx}{x},\qquad
\frac12\ln\left|\frac{v-2}{v}\right|=\ln|x|+C_0.
$$
Absorbing the sign and the exponential integration constant yields $(v-2)/v=Cx^2$. Relabelling the arbitrary constant then gives
$$
\boxed{y(x)=\frac{2x}{1+Kx^2},\qquad\text{or}\qquad y(x)=0.}
$$
The first family already includes $y=2x$ at $K=0$. Choose any interval where its denominator is nonzero. These give all solutions on intervals avoiding $x=0$. Both families extend through $x=0$ with $y(0)=0$, as required by the original <ordinary differential equation>. Because it is singular there, differentiable continuations of the nonzero family may use different $K$ on the two sides: both one-sided derivatives at zero equal $2$.
Back to article page