ODE No. 187

\[ -a y(x)^2-b x^{2 n-2}+x^n y'(x)=0 \] Mathematica : cpu = 0.233043 (sec), leaf count = 328

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

\[\left \{\left \{y(x)\to -\frac {x^n \left (\frac {1}{2} \sqrt {a} \sqrt {b} \left (\sqrt {\frac {(n-1)^2}{a b}-4}-\frac {n-1}{\sqrt {a} \sqrt {b}}\right ) x^{\frac {1}{2} \sqrt {a} \sqrt {b} \left (\sqrt {\frac {(n-1)^2}{a b}-4}-\frac {n-1}{\sqrt {a} \sqrt {b}}\right )-1}+\frac {1}{2} \sqrt {a} \sqrt {b} c_1 \left (-\frac {n-1}{\sqrt {a} \sqrt {b}}-\sqrt {\frac {(n-1)^2}{a b}-4}\right ) x^{\frac {1}{2} \sqrt {a} \sqrt {b} \left (-\frac {n-1}{\sqrt {a} \sqrt {b}}-\sqrt {\frac {(n-1)^2}{a b}-4}\right )-1}\right )}{a \left (x^{\frac {1}{2} \sqrt {a} \sqrt {b} \left (\sqrt {\frac {(n-1)^2}{a b}-4}-\frac {n-1}{\sqrt {a} \sqrt {b}}\right )}+c_1 x^{\frac {1}{2} \sqrt {a} \sqrt {b} \left (-\frac {n-1}{\sqrt {a} \sqrt {b}}-\sqrt {\frac {(n-1)^2}{a b}-4}\right )}\right )}\right \}\right \}\] Maple : cpu = 0.066 (sec), leaf count = 60

dsolve(x^n*diff(y(x),x)-a*y(x)^2-b*x^(2*n-2) = 0,y(x))
 

\[y \left (x \right ) = \frac {\left (-\tan \left (\frac {\sqrt {4 a b -n^{2}+2 n -1}\, \left (-\ln \left (x \right )+c_{1}\right )}{2}\right ) \sqrt {4 a b -n^{2}+2 n -1}+n -1\right ) x^{n -1}}{2 a}\]