4.1.30 \(y'(x)=\sec (x)-y(x) \tan (x)\)

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

[_linear]

Book solution method
Linear ODE

Mathematica
cpu = 0.0202716 (sec), leaf count = 13

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

Maple
cpu = 0.019 (sec), leaf count = 11

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

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

Mathematica raw output

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

Maple raw input

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

Maple raw output

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