Solution (source code)

= Solution

On the interval $x>0$ containing the initial point, divide the <linear ordinary differential equation> by $x$ to obtain $y'-2y/x=x$. Its <integrating factor> is $e^{\int-2\,dx/x}=x^{-2}$, giving
$$
\frac{d}{dx}\left(\frac{y}{x^2}\right)=\frac1x,
\qquad y=x^2(\ln x+C).
$$
The initial condition gives $1=C$. Hence
$$
\boxed{y(x)=x^2(1+\ln x),\qquad x>0.}
$$
Direct differentiation gives $y'=x(3+2\ln x)$, so $xy'-2y=x^2$ and $y(1)=1$. The coefficient of $y'$ vanishes at zero; the boxed expression is the solution on the regular initial-value interval, rather than an assertion of unique continuation through zero.