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

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

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

\[ \left \{ y \left ( x \right ) = \left ( \csc \left ( 2\,x \right ) +\cot \left ( 2\,x \right ) \right ) \left ( 2\, \left ( \cos \left ( x \right ) \right ) ^{2}+{\it \_C1}+\ln \left ( 1+\cos \left ( x \right ) \right ) +\ln \left ( \cos \left ( x \right ) -1 \right ) \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]*(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),'implicit')

Maple raw output

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