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

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

[_separable]

Book solution method
Separable ODE, Neither variable missing

Mathematica
cpu = 0.0379573 (sec), leaf count = 35

\[\left \{\left \{y(x)\to \text {InverseFunction}\left [\frac {1}{2} (\tan (\text {$\#$1})-\text {$\#$1})\& \right ]\left [c_1-\frac {x^2}{2}+\frac {\log (x)}{2}\right ]\right \}\right \}\]

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

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

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

Mathematica raw output

{{y[x] -> InverseFunction[(-#1 + Tan[#1])/2 & ][-x^2/2 + C[1] + Log[x]/2]}}

Maple raw input

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

Maple raw output

1/2*(2+(2*x^2+Pi+2*_C1-2*y(x)-2*ln(x))*cot(y(x)))/cot(y(x)) = 0