\[ a x^2 y(x)^n y'(x)-2 x y'(x)+y(x)=0 \] ✓ Mathematica : cpu = 0.126164 (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.218 (sec), leaf count = 33
\[ \left \{ {\frac { \left ( \left ( y \left ( x \right ) \right ) ^{n} \right ) ^{2} \left ( \left ( y \left ( x \right ) \right ) ^{n}ax-n-2 \right ) ^{n}}{{x}^{n}}}-{\it \_C1}=0 \right \} \]