Can someone check my working?

Solve $\displaystyle x^2y''-2xy'+2y=0$ by letting $\displaystyle y=x^m$

$\displaystyle y=x^m \Rightarrow y'=mx^{m-1} \Rightarrow y''=m(m-1)x^{m-2}$

$\displaystyle m(m-1)x^2x^{m-2}-2mx^{m-1}x+2x^m=0$

$\displaystyle m(m-1)x^m-2mx^m+2x^m=0$

$\displaystyle x^m(m(m-1)-2m+2)=0$

$\displaystyle x^m(m^2-m-2m+2)=0$

$\displaystyle x^m(m^2-3m+2)=0$

$\displaystyle x^m(m-1)(m-2)=0$

$\displaystyle \Rightarrow m=1, 2$

$\displaystyle y=x$ or $\displaystyle y=x^2$