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

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

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

\[[y \left (x \right ) = \left (x +\textit {\_C1} \right ) \cos \left (x \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))

Maple raw output

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