4.8.35 \(x^n y'(x)=x^{2 n-1}-y(x)^2\)

ODE
\[ x^n y'(x)=x^{2 n-1}-y(x)^2 \] ODE Classification

[_Riccati]

Book solution method
Riccati ODE, Generalized ODE

Mathematica
cpu = 0.0675225 (sec), leaf count = 222

\[\left \{\left \{y(x)\to \frac {x^{n-1} \left (c_1 (-1)^{n+1} \sqrt {x} \Gamma (n) I_{n-2}\left (2 \sqrt {x}\right )+c_1 (-1)^{n+1} \Gamma (n) I_{n-1}\left (2 \sqrt {x}\right )+c_1 (-1)^n n \Gamma (n) I_{n-1}\left (2 \sqrt {x}\right )+c_1 (-1)^{n+1} \sqrt {x} \Gamma (n) I_n\left (2 \sqrt {x}\right )-(n-1) \Gamma (2-n) I_{1-n}\left (2 \sqrt {x}\right )+\sqrt {x} \Gamma (2-n) I_{2-n}\left (2 \sqrt {x}\right )+\sqrt {x} \Gamma (2-n) I_{-n}\left (2 \sqrt {x}\right )\right )}{2 \left (c_1 (-1)^{n+1} \Gamma (n) I_{n-1}\left (2 \sqrt {x}\right )+\Gamma (2-n) I_{1-n}\left (2 \sqrt {x}\right )\right )}\right \}\right \}\]

Maple
cpu = 0.084 (sec), leaf count = 52

\[ \left \{ y \relax (x ) ={{x}^{n} \left (-{{\sl K}_{n}\left (2\,\sqrt {x}\right )}{\it \_C1}+{{\sl I}_{n}\left (2\,\sqrt {x}\right )} \right ) {\frac {1}{\sqrt {x}}} \left ({{\sl K}_{n-1}\left (2\,\sqrt {x}\right )}{\it \_C1}+{{\sl I}_{n-1}\left (2\,\sqrt {x}\right )} \right ) ^{-1}} \right \} \] Mathematica raw input

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

Mathematica raw output

{{y[x] -> (x^(-1 + n)*(-((-1 + n)*BesselI[1 - n, 2*Sqrt[x]]*Gamma[2 - n]) + Sqrt
[x]*BesselI[2 - n, 2*Sqrt[x]]*Gamma[2 - n] + Sqrt[x]*BesselI[-n, 2*Sqrt[x]]*Gamm
a[2 - n] + (-1)^(1 + n)*Sqrt[x]*BesselI[-2 + n, 2*Sqrt[x]]*C[1]*Gamma[n] + (-1)^
(1 + n)*BesselI[-1 + n, 2*Sqrt[x]]*C[1]*Gamma[n] + (-1)^n*n*BesselI[-1 + n, 2*Sq
rt[x]]*C[1]*Gamma[n] + (-1)^(1 + n)*Sqrt[x]*BesselI[n, 2*Sqrt[x]]*C[1]*Gamma[n])
)/(2*(BesselI[1 - n, 2*Sqrt[x]]*Gamma[2 - n] + (-1)^(1 + n)*BesselI[-1 + n, 2*Sq
rt[x]]*C[1]*Gamma[n]))}}

Maple raw input

dsolve(x^n*diff(y(x),x) = x^(2*n-1)-y(x)^2, y(x),'implicit')

Maple raw output

y(x) = 1/x^(1/2)*(-BesselK(n,2*x^(1/2))*_C1+BesselI(n,2*x^(1/2)))*x^n/(BesselK(n
-1,2*x^(1/2))*_C1+BesselI(n-1,2*x^(1/2)))