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.361029 (sec), leaf count = 222

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

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

\[\left [y \left (x \right ) = \frac {\left (-\BesselK \left (n , 2 \sqrt {x}\right ) \textit {\_C1} +\BesselI \left (n , 2 \sqrt {x}\right )\right ) x^{n}}{\sqrt {x}\, \left (\BesselK \left (n -1, 2 \sqrt {x}\right ) \textit {\_C1} +\BesselI \left (n -1, 2 \sqrt {x}\right )\right )}\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))

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)))]