Solution (source code)

= Solution

Because the equation depends on the ratio $y/x$, set $u=y/x$, so $y'=u+xu'$. Dividing by $x^2$ and substituting gives
$$
u+xu'+u=1+u^2,\qquad x\frac{du}{dx}=(u-1)^2.
$$
This reduces the <homogeneous first-order differential equation> to a <separable differential equation>. For $u\ne1$,
$$
\int\frac{du}{(u-1)^2}=\int\frac{dx}{x},\qquad
-\frac1{u-1}=\ln x+C.
$$
At $x=e$, the condition $y=0$ gives $u=0$, so $1=1+C$ and $C=0$. Hence
$$
\boxed{y(x)=x\left(1-\frac1{\ln x}\right),\qquad 1<x<\infty.}
$$
The interval displayed is the maximal solution interval containing $x=e$: there is a pole at $x=1$. Separating variables omitted the solution $u=1$, or $y=x$, but that solution does not satisfy the given condition.