4.8.38 \(x^n y'(x)=a^2 x^{2 n-2}+b^2 y(x)^2\)

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

[[_homogeneous, `class G`], _Riccati]

Book solution method
Riccati ODE, Generalized ODE

Mathematica
cpu = 0.0685813 (sec), leaf count = 143

\[\left \{\left \{y(x)\to \frac {x^{n-1} \left (c_1 \left (a b \sqrt {\frac {(n-1)^2-4 a^2 b^2}{a^2 b^2}}+n-1\right )+\left (-a b \sqrt {\frac {(n-1)^2-4 a^2 b^2}{a^2 b^2}}+n-1\right ) x^{a b \sqrt {\frac {(n-1)^2-4 a^2 b^2}{a^2 b^2}}}\right )}{2 b^2 \left (x^{a b \sqrt {\frac {(n-1)^2}{a^2 b^2}-4}}+c_1\right )}\right \}\right \}\]

Maple
cpu = 0.02 (sec), leaf count = 72

\[ \left \{ \ln \relax (x ) -{\it \_C1}-2\,{\frac {1}{\sqrt {4\,{a}^{2}{b}^{2}-{n}^{2}+2\,n-1}}\arctan \left ({\frac {2\,{b}^{2}y \relax (x ) {x}^{1-n}-n+1}{\sqrt {4\,{a}^{2}{b}^{2}-{n}^{2}+2\,n-1}}} \right ) }=0 \right \} \] Mathematica raw input

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

Mathematica raw output

{{y[x] -> (x^(-1 + n)*((-1 - a*b*Sqrt[(-4*a^2*b^2 + (-1 + n)^2)/(a^2*b^2)] + n)*
x^(a*b*Sqrt[(-4*a^2*b^2 + (-1 + n)^2)/(a^2*b^2)]) + (-1 + a*b*Sqrt[(-4*a^2*b^2 +
 (-1 + n)^2)/(a^2*b^2)] + n)*C[1]))/(2*b^2*(x^(a*b*Sqrt[-4 + (-1 + n)^2/(a^2*b^2
)]) + C[1]))}}

Maple raw input

dsolve(x^n*diff(y(x),x) = a^2*x^(2*n-2)+b^2*y(x)^2, y(x),'implicit')

Maple raw output

ln(x)-_C1-2/(4*a^2*b^2-n^2+2*n-1)^(1/2)*arctan((2*b^2*y(x)*x^(1-n)-n+1)/(4*a^2*b
^2-n^2+2*n-1)^(1/2)) = 0