4.1.32 \(y'(x)=\sin (2 x)-y(x) \tan (x)\)

ODE
\[ y'(x)=\sin (2 x)-y(x) \tan (x) \] ODE Classification

[_linear]

Book solution method
Linear ODE

Mathematica
cpu = 0.19243 (sec), leaf count = 15

\[\{\{y(x)\to \cos (x) (-2 \cos (x)+c_1)\}\}\]

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

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

DSolve[y'[x] == Sin[2*x] - Tan[x]*y[x],y[x],x]

Mathematica raw output

{{y[x] -> (C[1] - 2*Cos[x])*Cos[x]}}

Maple raw input

dsolve(diff(y(x),x) = sin(2*x)-y(x)*tan(x), y(x))

Maple raw output

[y(x) = (-2*cos(x)+_C1)*cos(x)]