##### 4.8.36 $$y(x) \left (x^{n-1}+y(x)\right )+x^n y'(x)+x^2=0$$

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

[_Riccati]

Book solution method
Change of Variable, new dependent variable

Mathematica
cpu = 0.461093 (sec), leaf count = 470

$\left \{\left \{y(x)\to -\frac {x^{n-1} \left (\left (x^{2 n}\right )^{\frac {1}{n}} \Gamma \left (\frac {n-4}{2 (n-2)}\right ) J_{\frac {n-4}{2 (n-2)}}\left (\frac {\left (x^{2 n}\right )^{\frac {1}{n}-\frac {1}{2}}}{2-n}\right )-\left (x^{2 n}\right )^{\frac {1}{n}} \Gamma \left (\frac {n-4}{2 (n-2)}\right ) J_{\frac {n}{4-2 n}-1}\left (\frac {\left (x^{2 n}\right )^{\frac {1}{n}-\frac {1}{2}}}{2-n}\right )+n \sqrt {x^{2 n}} \Gamma \left (\frac {n-4}{2 (n-2)}\right ) J_{\frac {n}{4-2 n}}\left (\frac {\left (x^{2 n}\right )^{\frac {1}{n}-\frac {1}{2}}}{2-n}\right )+c_1 \left (x^{2 n}\right )^{\frac {1}{n}} \Gamma \left (\frac {4-3 n}{4-2 n}\right ) \left (-J_{\frac {n}{2 (n-2)}-1}\left (\frac {\left (x^{2 n}\right )^{\frac {1}{n}-\frac {1}{2}}}{2-n}\right )\right )+c_1 \left (x^{2 n}\right )^{\frac {1}{n}} \Gamma \left (\frac {4-3 n}{4-2 n}\right ) J_{\frac {n}{2 (n-2)}+1}\left (\frac {\left (x^{2 n}\right )^{\frac {1}{n}-\frac {1}{2}}}{2-n}\right )+c_1 n \sqrt {x^{2 n}} \Gamma \left (\frac {4-3 n}{4-2 n}\right ) J_{\frac {n}{2 (n-2)}}\left (\frac {\left (x^{2 n}\right )^{\frac {1}{n}-\frac {1}{2}}}{2-n}\right )\right )}{2 \sqrt {x^{2 n}} \left (\Gamma \left (\frac {n-4}{2 (n-2)}\right ) J_{\frac {n}{4-2 n}}\left (\frac {\left (x^{2 n}\right )^{\frac {1}{n}-\frac {1}{2}}}{2-n}\right )+c_1 \Gamma \left (\frac {4-3 n}{4-2 n}\right ) J_{\frac {n}{2 (n-2)}}\left (\frac {\left (x^{2 n}\right )^{\frac {1}{n}-\frac {1}{2}}}{2-n}\right )\right )}\right \}\right \}$

Maple
cpu = 0.486 (sec), leaf count = 338

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

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

Mathematica raw output

{{y[x] -> -1/2*(x^(-1 + n)*(n*Sqrt[x^(2*n)]*BesselJ[n/(2*(-2 + n)), (x^(2*n))^(-
1/2 + n^(-1))/(2 - n)]*C[1]*Gamma[(4 - 3*n)/(4 - 2*n)] - (x^(2*n))^n^(-1)*Bessel
J[-1 + n/(2*(-2 + n)), (x^(2*n))^(-1/2 + n^(-1))/(2 - n)]*C[1]*Gamma[(4 - 3*n)/(
4 - 2*n)] + (x^(2*n))^n^(-1)*BesselJ[1 + n/(2*(-2 + n)), (x^(2*n))^(-1/2 + n^(-1
))/(2 - n)]*C[1]*Gamma[(4 - 3*n)/(4 - 2*n)] + (x^(2*n))^n^(-1)*BesselJ[(-4 + n)/
(2*(-2 + n)), (x^(2*n))^(-1/2 + n^(-1))/(2 - n)]*Gamma[(-4 + n)/(2*(-2 + n))] +
n*Sqrt[x^(2*n)]*BesselJ[n/(4 - 2*n), (x^(2*n))^(-1/2 + n^(-1))/(2 - n)]*Gamma[(-
4 + n)/(2*(-2 + n))] - (x^(2*n))^n^(-1)*BesselJ[-1 + n/(4 - 2*n), (x^(2*n))^(-1/
2 + n^(-1))/(2 - n)]*Gamma[(-4 + n)/(2*(-2 + n))]))/(Sqrt[x^(2*n)]*(BesselJ[n/(2
*(-2 + n)), (x^(2*n))^(-1/2 + n^(-1))/(2 - n)]*C[1]*Gamma[(4 - 3*n)/(4 - 2*n)] +
 BesselJ[n/(4 - 2*n), (x^(2*n))^(-1/2 + n^(-1))/(2 - n)]*Gamma[(-4 + n)/(2*(-2 +
 n))]))}}

Maple raw input

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

Maple raw output

[y(x) = (x^(-3*n+4)*_C1*n-4*x^(-3*n+4)*_C1)/(_C1*x^(-n)*hypergeom([],[1/2*(3*n-4
)/(n-2)],-1/4/(n-2)^2*x^(-2*n+4))+hypergeom([],[1/2*(n-4)/(n-2)],-1/4/(n-2)^2*x^
(-2*n+4)))*x^n/(3*n-4)/x/(n-4)*hypergeom([],[1/2*(5*n-8)/(n-2)],-1/4/(n-2)^2*x^(
-2*n+4))+((-3*x^(-n)*_C1*n^3+16*x^(-n)*_C1*n^2-16*x^(-n)*_C1*n)*hypergeom([],[1/
2*(3*n-4)/(n-2)],-1/4/(n-2)^2*x^(-2*n+4))+(3*n*x^(-2*n+4)-4*x^(-2*n+4))*hypergeo
m([],[1/2*(3*n-8)/(n-2)],-1/4/(n-2)^2*x^(-2*n+4)))/(_C1*x^(-n)*hypergeom([],[1/2
*(3*n-4)/(n-2)],-1/4/(n-2)^2*x^(-2*n+4))+hypergeom([],[1/2*(n-4)/(n-2)],-1/4/(n-
2)^2*x^(-2*n+4)))*x^n/(3*n-4)/x/(n-4)]