4.7.33 \(2 x^2 y'(x)=\left (x^2-y(x)^2\right ) (1-x \cot (x))+2 x y(x)\)

ODE
\[ 2 x^2 y'(x)=\left (x^2-y(x)^2\right ) (1-x \cot (x))+2 x y(x) \] ODE Classification

[[_homogeneous, `class D`], _Riccati]

Book solution method
Riccati ODE, Generalized ODE

Mathematica
cpu = 0.0711245 (sec), leaf count = 32

\[\left \{\left \{y(x)\to \frac {x \left (x-e^{2 c_1} \sin (x)\right )}{e^{2 c_1} \sin (x)+x}\right \}\right \}\]

Maple
cpu = 0.018 (sec), leaf count = 23

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

DSolve[2*x^2*y'[x] == 2*x*y[x] + (1 - x*Cot[x])*(x^2 - y[x]^2),y[x],x]

Mathematica raw output

{{y[x] -> (x*(x - E^(2*C[1])*Sin[x]))/(x + E^(2*C[1])*Sin[x])}}

Maple raw input

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

Maple raw output

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