\[ a x^2 y(x)^n y'(x)-2 x y'(x)+y(x)=0 \] ✓ Mathematica : cpu = 0.129895 (sec), leaf count = 35
\[\text {Solve}\left [\frac {n \left (-\log \left (-a x y(x)^n+n+2\right )-2 \log (y(x))+\log (x)\right )}{n+2}=c_1,y(x)\right ]\]
✓ Maple : cpu = 0.214 (sec), leaf count = 33
\[ \left \{ {\frac {{x}^{n}}{ \left ( \left ( y \left ( x \right ) \right ) ^{n}ax-n-2 \right ) ^{n} \left ( \left ( y \left ( x \right ) \right ) ^{n} \right ) ^{2}}}-{\it \_C1}=0 \right \} \]