Originally Posted by
TheEmptySet By inspection you can see (guess) that one solution is
$\displaystyle y=x$
Now we can use reduction of order
$\displaystyle y=xu(x) \quad y'=u(x)+xu'(x) \quad y''=xu''(x)+2u'(x)$
$\displaystyle x^2(xu''(x)+2u'(x))-(x^2+2x)(u(x)+xu'(x) )+(x+2)(xu(x))=0$
Simplifying gives
$\displaystyle x^3u''(x)+(2x^2-x^3-2x^2)u'(x)+(-x^2-2x+x^2+2x)u(x)=0$
$\displaystyle x^3(u''(x)-u'(x))=0 \iff \frac{du'}{dx}=u'$
$\displaystyle \frac{du'}{u'}=dx \implies \ln|u'|=x+c \implies u'(x)=Ae^{x}$
integrating once more gives
$\displaystyle u(x)=Ae^{x}+B$
Now picking A=1 B=0 gives
$\displaystyle u(x)=e^{x} \implies y=xe^{x}$
So the solution is
$\displaystyle y_c=c_1x+c_2xe^{x}$