4.1.22 \(y'(x)=2 \left (\cos (2 x) \cot ^2(x)-y(x) \csc (2 x)\right )\)

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

[_linear]

Book solution method
Linear ODE

Mathematica
cpu = 0.189596 (sec), leaf count = 21

\[\{\{y(x)\to \cot (x) (\cos (2 x)+2 \log (\sin (x))-1+c_1)\}\}\]

Maple
cpu = 0.094 (sec), leaf count = 32

\[[y \left (x \right ) = \left (2 \left (\cos ^{2}\left (x \right )\right )+\ln \left (\cos \left (x \right )-1\right )+\ln \left (1+\cos \left (x \right )\right )+\textit {\_C1} \right ) \left (\csc \left (2 x \right )+\cot \left (2 x \right )\right )]\] Mathematica raw input

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

Mathematica raw output

{{y[x] -> Cot[x]*(-1 + C[1] + Cos[2*x] + 2*Log[Sin[x]])}}

Maple raw input

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

Maple raw output

[y(x) = (2*cos(x)^2+ln(cos(x)-1)+ln(1+cos(x))+_C1)*(csc(2*x)+cot(2*x))]