4.9.31 \(y(x) y'(x)=\csc ^2(x)-y(x)^2 \cot (x)\)

ODE
\[ y(x) y'(x)=\csc ^2(x)-y(x)^2 \cot (x) \] ODE Classification

[_Bernoulli]

Book solution method
The Bernoulli ODE

Mathematica
cpu = 0.0364509 (sec), leaf count = 36

\[\left \{\left \{y(x)\to -\sqrt {c_1+2 x} \csc (x)\right \},\left \{y(x)\to \sqrt {c_1+2 x} \csc (x)\right \}\right \}\]

Maple
cpu = 0.022 (sec), leaf count = 20

\[ \left \{ \left (y \relax (x ) \right ) ^{2}+{\frac {-2\,x-{\it \_C1}}{ \left (\sin \relax (x ) \right ) ^{2}}}=0 \right \} \] Mathematica raw input

DSolve[y[x]*y'[x] == Csc[x]^2 - Cot[x]*y[x]^2,y[x],x]

Mathematica raw output

{{y[x] -> -(Sqrt[2*x + C[1]]*Csc[x])}, {y[x] -> Sqrt[2*x + C[1]]*Csc[x]}}

Maple raw input

dsolve(y(x)*diff(y(x),x) = csc(x)^2-y(x)^2*cot(x), y(x),'implicit')

Maple raw output

y(x)^2+(-2*x-_C1)/sin(x)^2 = 0