Use symbolic computations in Matlab to solve the initial value problem

y=y2+xyx2x2,y(1)=2\displaystyle {y}'=\frac{{{y}^{{2}}+{x}{y}-{x}^{{2}}}}{{x}^{{2}}},\quad{y}{\left({1}\right)}={2}

Note: use simplify(y(x))\displaystyle {\left({y}{\left({x}\right)}\right)} to obtain a simplified version of your solution y(x)\displaystyle {y}{\left({x}\right)} obtained by the Matlab dsolve built-in function.
y(x)=\displaystyle {y}{\left({x}\right)}=