\[ -\left ((n-1) x^{n-1} y(x)\right )+x^{2 n-2}+x^n y'(x)+y(x)^2=0 \] ✓ Mathematica : cpu = 0.244603 (sec), leaf count = 19
DSolve[x^(-2 + 2*n) - (-1 + n)*x^(-1 + n)*y[x] + y[x]^2 + x^n*Derivative[1][y][x] == 0,y[x],x]
\[\left \{\left \{y(x)\to x^{n-1} \tan (-\log (x)+c_1)\right \}\right \}\] ✓ Maple : cpu = 0.044 (sec), leaf count = 17
dsolve(x^n*diff(y(x),x)+y(x)^2-(n-1)*x^(n-1)*y(x)+x^(2*n-2) = 0,y(x))
\[y \left (x \right ) = \tan \left (-\ln \left (x \right )+c_{1}\right ) x^{n -1}\]