4.1.28 \(y'(x)=y(x) \tan (x)+\cos (x)\)

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

[_linear]

Book solution method
Linear ODE

Mathematica
cpu = 0.170778 (sec), leaf count = 21

\[\left \{\left \{y(x)\to \frac {1}{2} (\sin (x)+(x+2 c_1) \sec (x))\right \}\right \}\]

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

\[\left [y \left (x \right ) = \frac {\frac {x}{2}+\frac {\sin \left (2 x \right )}{4}+\textit {\_C1}}{\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 + 2*C[1])*Sec[x] + Sin[x])/2}}

Maple raw input

dsolve(diff(y(x),x) = cos(x)+y(x)*tan(x), y(x))

Maple raw output

[y(x) = (1/2*x+1/4*sin(2*x)+_C1)/cos(x)]