\[ a x^2 y(x)^n y'(x)-2 x y'(x)+y(x)=0 \] ✓ Mathematica : cpu = 0.314464 (sec), leaf count = 42
\[\text {Solve}\left [\frac {n \left (\log (x)-\log \left (-a x y(x)^n+n+2\right )\right )}{n+2}-\frac {2 n \log (y(x))}{n+2}=c_1,y(x)\right ]\] ✓ Maple : cpu = 0.224 (sec), leaf count = 33
\[\{x^{-n} \left (a x y \left (x \right )^{n}-n -2\right )^{n} y \left (x \right )^{2 n}-c_{1} = 0\}\]