4.1.29 \(y'(x)=\cos (x)-y(x) \tan (x)\)

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

[_linear]

Book solution method
Linear ODE

Mathematica
cpu = 0.0289665 (sec), leaf count = 12

\[\left \{\left \{y(x)\to \left (c_1+x\right ) \cos (x)\right \}\right \}\]

Maple
cpu = 0.006 (sec), leaf count = 10

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

DSolve[y'[x] == Cos[x] - Tan[x]*y[x],y[x],x]

Mathematica raw output

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

Maple raw input

dsolve(diff(y(x),x) = cos(x)-y(x)*tan(x), y(x),'implicit')

Maple raw output

y(x) = (x+_C1)*cos(x)