##### 4.4.23 $$x y'(x)=a x^n+b y(x)+c y(x)^2+k$$

ODE
$x y'(x)=a x^n+b y(x)+c y(x)^2+k$ ODE Classiﬁcation

[_rational, _Riccati]

Book solution method
Riccati ODE, Generalized ODE

Mathematica
cpu = 0.500278 (sec), leaf count = 589

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

Maple
cpu = 0.116 (sec), leaf count = 254

$\left [y \left (x \right ) = -\frac {\left (\sqrt {b^{2}-4 c k}\, \textit {\_C1} +\textit {\_C1} b \right ) \BesselY \left (\frac {\sqrt {b^{2}-4 c k}}{n}, \frac {2 \sqrt {c a}\, x^{\frac {n}{2}}}{n}\right )-2 \sqrt {c a}\, x^{\frac {n}{2}} \BesselY \left (\frac {\sqrt {b^{2}-4 c k}+n}{n}, \frac {2 \sqrt {c a}\, x^{\frac {n}{2}}}{n}\right ) \textit {\_C1} +\left (\sqrt {b^{2}-4 c k}+b \right ) \BesselJ \left (\frac {\sqrt {b^{2}-4 c k}}{n}, \frac {2 \sqrt {c a}\, x^{\frac {n}{2}}}{n}\right )-2 \BesselJ \left (\frac {\sqrt {b^{2}-4 c k}+n}{n}, \frac {2 \sqrt {c a}\, x^{\frac {n}{2}}}{n}\right ) \sqrt {c a}\, x^{\frac {n}{2}}}{2 c \left (\BesselY \left (\frac {\sqrt {b^{2}-4 c k}}{n}, \frac {2 \sqrt {c a}\, x^{\frac {n}{2}}}{n}\right ) \textit {\_C1} +\BesselJ \left (\frac {\sqrt {b^{2}-4 c k}}{n}, \frac {2 \sqrt {c a}\, x^{\frac {n}{2}}}{n}\right )\right )}\right ]$ Mathematica raw input

DSolve[x*y'[x] == k + a*x^n + b*y[x] + c*y[x]^2,y[x],x]

Mathematica raw output

{{y[x] -> -1/2*(-(Sqrt[a]*Sqrt[c]*x^n*BesselJ[1 - Sqrt[b^2 - 4*c*k]/n, (2*Sqrt[a
]*Sqrt[c]*Sqrt[x^n])/n]*C[1]*Gamma[1 - Sqrt[b^2 - 4*c*k]/n]) + b*Sqrt[x^n]*Besse
lJ[-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