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 Classification

[_Riccati]

Book solution method
Change of Variable, new dependent variable

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

\[\left \{\left \{y(x)\to -\frac {x^{n-1} \left (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 )+\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 )\right )}{2 \sqrt {x^{2 n}} \left (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 )+\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 )\right )}\right \}\right \}\]

Maple
cpu = 0.64 (sec), leaf count = 218

\[ \left \{ y \relax (x ) ={\frac {{x}^{n}}{x \left (n-4 \right ) } \left ({\frac {{x}^{-3\,n+4}{\it \_C1}\, \left (n-4 \right ) }{3}{\mbox {$_0$F$_1$}(\ ;\,{\frac {5\,n-8}{2\,n-4}};\,-{\frac {{x}^{-2\,n+4}}{4\, \left (n-2 \right ) ^{2}}})}}+ \left (n-{\frac {4}{3}} \right ) \left (-{\mbox {$_0$F$_1$}(\ ;\,{\frac {3\,n-4}{2\,n-4}};\,-{\frac {{x}^{-2\,n+4}}{4\, \left (n-2 \right ) ^{2}}})}n \left (n-4 \right ) {\it \_C1}\,{x}^{-n}+{x}^{-2\,n+4}{\mbox {$_0$F$_1$}(\ ;\,{\frac {3\,n-8}{2\,n-4}};\,-{\frac {{x}^{-2\,n+4}}{4\, \left (n-2 \right ) ^{2}}})} \right ) \right ) \left (n-{\frac {4}{3}} \right ) ^{-1} \left ({\it \_C1}\,{x}^{-n}{\mbox {$_0$F$_1$}(\ ;\,{\frac {3\,n-4}{2\,n-4}};\,-{\frac {{x}^{-2\,n+4}}{4\, \left (n-2 \right ) ^{2}}})}+{\mbox {$_0$F$_1$}(\ ;\,{\frac {n-4}{2\,n-4}};\,-{\frac {{x}^{-2\,n+4}}{4\, \left (n-2 \right ) ^{2}}})} \right ) ^{-1}} \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] -> -(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)*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[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*Sq
rt[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))]))/(2*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)] + B
esselJ[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),'implicit')

Maple raw output

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