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.527741 (sec), leaf count = 32

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

Maple
cpu = 0.043 (sec), leaf count = 21

\[\left [y \left (x \right ) = -\tanh \left (-\frac {\ln \left (x \right )}{2}+\frac {\ln \left (\sin \left (x \right )\right )}{2}+\frac {\textit {\_C1}}{2}\right ) x\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))

Maple raw output

[y(x) = -tanh(-1/2*ln(x)+1/2*ln(sin(x))+1/2*_C1)*x]