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

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

Maple
cpu = 0.051 (sec), leaf count = 45

\[\left [\frac {2 x^{2} \cot \left (y \left (x \right )\right )-2 \ln \left (x \right ) \cot \left (y \left (x \right )\right )+\pi \cot \left (y \left (x \right )\right )+2 \textit {\_C1} \cot \left (y \left (x \right )\right )-2 y \left (x \right ) \cot \left (y \left (x \right )\right )+2}{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 & ][-1/2*x^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))

Maple raw output

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