4.1.18 \(y'(x)=\sec (x)-y(x) \cot (x)\)

ODE
\[ y'(x)=\sec (x)-y(x) \cot (x) \] ODE Classification

[_linear]

Book solution method
Linear ODE

Mathematica
cpu = 0.164087 (sec), leaf count = 16

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

Maple
cpu = 0.027 (sec), leaf count = 16

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

DSolve[y'[x] == Sec[x] - Cot[x]*y[x],y[x],x]

Mathematica raw output

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

Maple raw input

dsolve(diff(y(x),x) = sec(x)-y(x)*cot(x), y(x))

Maple raw output

[y(x) = (-ln(cos(x))+_C1)/sin(x)]