##### 4.8.37 $$(1-n) x^{n-1}+x^{2 n-2}+x^n y'(x)+y(x)^2=0$$

ODE
$(1-n) x^{n-1}+x^{2 n-2}+x^n y'(x)+y(x)^2=0$ ODE Classiﬁcation

[_Riccati]

Book solution method
Riccati ODE, Generalized ODE

Mathematica
cpu = 43.559 (sec), leaf count = 0 , could not solve

DSolve[(1 - n)*x^(-1 + n) + x^(-2 + 2*n) + y[x]^2 + x^n*Derivative[1][y][x] == 0, y[x], x]

Maple
cpu = 0.491 (sec), leaf count = 1097

$\left [y \left (x \right ) = -\frac {\left (-2 x^{\frac {3}{2}-\frac {3 n}{2}+\frac {\sqrt {-3+n}\, \sqrt {n +1}}{2}} \sqrt {-3+n}\, \sqrt {n +1}\, \textit {\_C1} n +2 x^{\frac {3}{2}-\frac {3 n}{2}+\frac {\sqrt {-3+n}\, \sqrt {n +1}}{2}} \sqrt {-3+n}\, \sqrt {n +1}\, \textit {\_C1} -2 x^{\frac {3}{2}-\frac {3 n}{2}+\frac {\sqrt {-3+n}\, \sqrt {n +1}}{2}} \textit {\_C1} \,n^{2}+4 x^{\frac {3}{2}-\frac {3 n}{2}+\frac {\sqrt {-3+n}\, \sqrt {n +1}}{2}} \textit {\_C1} n -2 x^{\frac {3}{2}-\frac {3 n}{2}+\frac {\sqrt {-3+n}\, \sqrt {n +1}}{2}} \textit {\_C1} \right ) x^{n} \hypergeom \left (\left [\right ], \left [-\frac {\sqrt {-3+n}\, \sqrt {n +1}-2 n +2}{n -1}\right ], \frac {x^{1-n}}{n -1}\right )}{2 x \left (n -1+\sqrt {-3+n}\, \sqrt {n +1}\right ) \left (\sqrt {-3+n}\, \sqrt {n +1}-n +1\right ) \left (\textit {\_C1} \,x^{\frac {\sqrt {-3+n}\, \sqrt {n +1}}{2}-\frac {n}{2}+\frac {1}{2}} \hypergeom \left (\left [\right ], \left [-\frac {\sqrt {-3+n}\, \sqrt {n +1}-n +1}{n -1}\right ], \frac {x^{1-n}}{n -1}\right )+x^{-\frac {\sqrt {-3+n}\, \sqrt {n +1}}{2}-\frac {n}{2}+\frac {1}{2}} \hypergeom \left (\left [\right ], \left [\frac {n -1+\sqrt {-3+n}\, \sqrt {n +1}}{n -1}\right ], \frac {x^{1-n}}{n -1}\right )\right )}-\frac {\left (\left (-x^{\frac {\sqrt {-3+n}\, \sqrt {n +1}}{2}-\frac {n}{2}+\frac {1}{2}} \left (-3+n \right )^{\frac {3}{2}} \left (n +1\right )^{\frac {3}{2}} \textit {\_C1} +x^{\frac {\sqrt {-3+n}\, \sqrt {n +1}}{2}-\frac {n}{2}+\frac {1}{2}} \sqrt {-3+n}\, \sqrt {n +1}\, \textit {\_C1} \,n^{2}-2 x^{\frac {\sqrt {-3+n}\, \sqrt {n +1}}{2}-\frac {n}{2}+\frac {1}{2}} \sqrt {-3+n}\, \sqrt {n +1}\, \textit {\_C1} n +x^{\frac {\sqrt {-3+n}\, \sqrt {n +1}}{2}-\frac {n}{2}+\frac {1}{2}} \sqrt {-3+n}\, \sqrt {n +1}\, \textit {\_C1} -4 x^{\frac {\sqrt {-3+n}\, \sqrt {n +1}}{2}-\frac {n}{2}+\frac {1}{2}} \textit {\_C1} n +4 \textit {\_C1} \,x^{\frac {\sqrt {-3+n}\, \sqrt {n +1}}{2}-\frac {n}{2}+\frac {1}{2}}\right ) \hypergeom \left (\left [\right ], \left [-\frac {\sqrt {-3+n}\, \sqrt {n +1}-n +1}{n -1}\right ], \frac {x^{1-n}}{n -1}\right )+\left (2 x^{\frac {3}{2}-\frac {3 n}{2}-\frac {\sqrt {-3+n}\, \sqrt {n +1}}{2}} \sqrt {-3+n}\, \sqrt {n +1}\, n -2 x^{\frac {3}{2}-\frac {3 n}{2}-\frac {\sqrt {-3+n}\, \sqrt {n +1}}{2}} \sqrt {-3+n}\, \sqrt {n +1}-2 x^{\frac {3}{2}-\frac {3 n}{2}-\frac {\sqrt {-3+n}\, \sqrt {n +1}}{2}} n^{2}+4 x^{\frac {3}{2}-\frac {3 n}{2}-\frac {\sqrt {-3+n}\, \sqrt {n +1}}{2}} n -2 x^{\frac {3}{2}-\frac {3 n}{2}-\frac {\sqrt {-3+n}\, \sqrt {n +1}}{2}}\right ) \hypergeom \left (\left [\right ], \left [\frac {\sqrt {-3+n}\, \sqrt {n +1}+2 n -2}{n -1}\right ], \frac {x^{1-n}}{n -1}\right )+\left (x^{-\frac {\sqrt {-3+n}\, \sqrt {n +1}}{2}-\frac {n}{2}+\frac {1}{2}} \left (-3+n \right )^{\frac {3}{2}} \left (n +1\right )^{\frac {3}{2}}-x^{-\frac {\sqrt {-3+n}\, \sqrt {n +1}}{2}-\frac {n}{2}+\frac {1}{2}} \sqrt {-3+n}\, \sqrt {n +1}\, n^{2}+2 x^{-\frac {\sqrt {-3+n}\, \sqrt {n +1}}{2}-\frac {n}{2}+\frac {1}{2}} \sqrt {-3+n}\, \sqrt {n +1}\, n -x^{-\frac {\sqrt {-3+n}\, \sqrt {n +1}}{2}-\frac {n}{2}+\frac {1}{2}} \sqrt {-3+n}\, \sqrt {n +1}-4 x^{-\frac {\sqrt {-3+n}\, \sqrt {n +1}}{2}-\frac {n}{2}+\frac {1}{2}} n +4 x^{-\frac {\sqrt {-3+n}\, \sqrt {n +1}}{2}-\frac {n}{2}+\frac {1}{2}}\right ) \hypergeom \left (\left [\right ], \left [\frac {n -1+\sqrt {-3+n}\, \sqrt {n +1}}{n -1}\right ], \frac {x^{1-n}}{n -1}\right )\right ) x^{n}}{2 x \left (n -1+\sqrt {-3+n}\, \sqrt {n +1}\right ) \left (\sqrt {-3+n}\, \sqrt {n +1}-n +1\right ) \left (\textit {\_C1} \,x^{\frac {\sqrt {-3+n}\, \sqrt {n +1}}{2}-\frac {n}{2}+\frac {1}{2}} \hypergeom \left (\left [\right ], \left [-\frac {\sqrt {-3+n}\, \sqrt {n +1}-n +1}{n -1}\right ], \frac {x^{1-n}}{n -1}\right )+x^{-\frac {\sqrt {-3+n}\, \sqrt {n +1}}{2}-\frac {n}{2}+\frac {1}{2}} \hypergeom \left (\left [\right ], \left [\frac {n -1+\sqrt {-3+n}\, \sqrt {n +1}}{n -1}\right ], \frac {x^{1-n}}{n -1}\right )\right )}\right ]$ Mathematica raw input

DSolve[(1 - n)*x^(-1 + n) + x^(-2 + 2*n) + y[x]^2 + x^n*y'[x] == 0,y[x],x]

Mathematica raw output

DSolve[(1 - n)*x^(-1 + n) + x^(-2 + 2*n) + y[x]^2 + x^n*Derivative[1][y][x] == 0
, y[x], x]

Maple raw input

dsolve(x^n*diff(y(x),x)+x^(2*n-2)+y(x)^2+(1-n)*x^(n-1) = 0, y(x))

Maple raw output

[y(x) = -1/2*(-2*x^(3/2-3/2*n+1/2*(-3+n)^(1/2)*(n+1)^(1/2))*(-3+n)^(1/2)*(n+1)^(
1/2)*_C1*n+2*x^(3/2-3/2*n+1/2*(-3+n)^(1/2)*(n+1)^(1/2))*(-3+n)^(1/2)*(n+1)^(1/2)
*_C1-2*x^(3/2-3/2*n+1/2*(-3+n)^(1/2)*(n+1)^(1/2))*_C1*n^2+4*x^(3/2-3/2*n+1/2*(-3
+n)^(1/2)*(n+1)^(1/2))*_C1*n-2*x^(3/2-3/2*n+1/2*(-3+n)^(1/2)*(n+1)^(1/2))*_C1)/x
/(n-1+(-3+n)^(1/2)*(n+1)^(1/2))/((-3+n)^(1/2)*(n+1)^(1/2)-n+1)*x^n/(_C1*x^(1/2*(
-3+n)^(1/2)*(n+1)^(1/2)-1/2*n+1/2)*hypergeom([],[-1/(n-1)*((-3+n)^(1/2)*(n+1)^(1
/2)-n+1)],1/(n-1)*x^(1-n))+x^(-1/2*(-3+n)^(1/2)*(n+1)^(1/2)-1/2*n+1/2)*hypergeom
([],[1/(n-1)*(n-1+(-3+n)^(1/2)*(n+1)^(1/2))],1/(n-1)*x^(1-n)))*hypergeom([],[-((
-3+n)^(1/2)*(n+1)^(1/2)-2*n+2)/(n-1)],1/(n-1)*x^(1-n))-1/2*((-x^(1/2*(-3+n)^(1/2
)*(n+1)^(1/2)-1/2*n+1/2)*(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