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 Classification

[_Riccati]

Book solution method
Riccati ODE, Generalized ODE

Mathematica
cpu = 22.0608 (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.43 (sec), leaf count = 498

\[ \left \{ y \relax (x ) =-{\frac {{x}^{n}}{x} \left ({x}^{{\frac {3}{2}}-{\frac {3\,n}{2}}+{\frac {1}{2}\sqrt {n-3}\sqrt {n+1}}}{\it \_C1}\, \left (n-1 \right ) \left (n-1+\sqrt {n-3}\sqrt {n+1} \right ) {\mbox {$_0$F$_1$}(\ ;\,{\frac {1}{n-1} \left (-\sqrt {n-3}\sqrt {n+1}+2\,n-2 \right ) };\,{\frac {{x}^{1-n}}{n-1}})}+{x}^{{\frac {3}{2}}-{\frac {3\,n}{2}}-{\frac {1}{2}\sqrt {n-3}\sqrt {n+1}}} \left (n-1 \right ) \left (n-1-\sqrt {n-3}\sqrt {n+1} \right ) {\mbox {$_0$F$_1$}(\ ;\,{\frac {1}{n-1} \left (\sqrt {n-3}\sqrt {n+1}+2\,n-2 \right ) };\,{\frac {{x}^{1-n}}{n-1}})}-{\frac {{\it \_C1}}{2}{x}^{{\frac {1}{2}\sqrt {n-3}\sqrt {n+1}}-{\frac {n}{2}}+{\frac {1}{2}}} \left (- \left (n-3 \right ) ^{{\frac {3}{2}}} \left (n+1 \right ) ^{{\frac {3}{2}}}+ \left (n-1 \right ) \left (-4+\sqrt {n+1} \left (n-1 \right ) \sqrt {n-3} \right ) \right ) {\mbox {$_0$F$_1$}(\ ;\,{\frac {1}{n-1} \left (n-1-\sqrt {n-3}\sqrt {n+1} \right ) };\,{\frac {{x}^{1-n}}{n-1}})}}+{\frac {1}{2}{\mbox {$_0$F$_1$}(\ ;\,{\frac {1}{n-1} \left (n-1+\sqrt {n-3}\sqrt {n+1} \right ) };\,{\frac {{x}^{1-n}}{n-1}})} \left (- \left (n-3 \right ) ^{{\frac {3}{2}}} \left (n+1 \right ) ^{{\frac {3}{2}}}+ \left (n-1 \right ) \left (4+\sqrt {n+1} \left (n-1 \right ) \sqrt {n-3} \right ) \right ) {x}^{-{\frac {1}{2}\sqrt {n-3}\sqrt {n+1}}-{\frac {n}{2}}+{\frac {1}{2}}}} \right ) \left (n-1+\sqrt {n-3}\sqrt {n+1} \right ) ^{-1} \left (n-1-\sqrt {n-3}\sqrt {n+1} \right ) ^{-1} \left ({\it \_C1}\,{x}^{{\frac {1}{2}\sqrt {n-3}\sqrt {n+1}}-{\frac {n}{2}}+{\frac {1}{2}}}{\mbox {$_0$F$_1$}(\ ;\,{\frac {1}{n-1} \left (n-1-\sqrt {n-3}\sqrt {n+1} \right ) };\,{\frac {{x}^{1-n}}{n-1}})}+{x}^{-{\frac {1}{2}\sqrt {n-3}\sqrt {n+1}}-{\frac {n}{2}}+{\frac {1}{2}}}{\mbox {$_0$F$_1$}(\ ;\,{\frac {1}{n-1} \left (n-1+\sqrt {n-3}\sqrt {n+1} \right ) };\,{\frac {{x}^{1-n}}{n-1}})} \right ) ^{-1}} \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),'implicit')

Maple raw output

y(x) = -x^n*(x^(3/2-3/2*n+1/2*(n-3)^(1/2)*(n+1)^(1/2))*_C1*(n-1)*(n-1+(n-3)^(1/2
)*(n+1)^(1/2))*hypergeom([],[(-(n-3)^(1/2)*(n+1)^(1/2)+2*n-2)/(n-1)],1/(n-1)*x^(
1-n))+x^(3/2-3/2*n-1/2*(n-3)^(1/2)*(n+1)^(1/2))*(n-1)*(n-1-(n-3)^(1/2)*(n+1)^(1/
2))*hypergeom([],[((n-3)^(1/2)*(n+1)^(1/2)+2*n-2)/(n-1)],1/(n-1)*x^(1-n))-1/2*x^
(1/2*(n-3)^(1/2)*(n+1)^(1/2)-1/2*n+1/2)*_C1*(-(n-3)^(3/2)*(n+1)^(3/2)+(n-1)*(-4+
(n+1)^(1/2)*(n-1)*(n-3)^(1/2)))*hypergeom([],[(n-1-(n-3)^(1/2)*(n+1)^(1/2))/(n-1
)],1/(n-1)*x^(1-n))+1/2*hypergeom([],[1/(n-1)*(n-1+(n-3)^(1/2)*(n+1)^(1/2))],1/(
n-1)*x^(1-n))*(-(n-3)^(3/2)*(n+1)^(3/2)+(n-1)*(4+(n+1)^(1/2)*(n-1)*(n-3)^(1/2)))
*x^(-1/2*(n-3)^(1/2)*(n+1)^(1/2)-1/2*n+1/2))/x/(n-1+(n-3)^(1/2)*(n+1)^(1/2))/(n-
1-(n-3)^(1/2)*(n+1)^(1/2))/(_C1*x^(1/2*(n-3)^(1/2)*(n+1)^(1/2)-1/2*n+1/2)*hyperg
eom([],[(n-1-(n-3)^(1/2)*(n+1)^(1/2))/(n-1)],1/(n-1)*x^(1-n))+x^(-1/2*(n-3)^(1/2
)*(n+1)^(1/2)-1/2*n+1/2)*hypergeom([],[1/(n-1)*(n-1+(n-3)^(1/2)*(n+1)^(1/2))],1/
(n-1)*x^(1-n)))