4.1.49 \(y'(x)=\cos (x)-y(x) (\sin (x)-y(x))\)

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

[_Riccati]

Book solution method
Riccati ODE, Generalized ODE

Mathematica
cpu = 6.56183 (sec), leaf count = 57

\[\left \{\left \{y(x)\to \frac {c_1 \sin (x) \left (\int _1^x e^{-\cos (K[1])} \, dK[1]\right )+c_1 \left (-e^{-\cos (x)}\right )+\sin (x)}{c_1 \int _1^x e^{-\cos (K[1])} \, dK[1]+1}\right \}\right \}\]

Maple
cpu = 0.175 (sec), leaf count = 25

\[ \left \{ y \left ( x \right ) =-{\frac {{{\rm e}^{-\cos \left ( x \right ) }}}{{\it \_C1}+\int \!{{\rm e}^{-\cos \left ( x \right ) }}\,{\rm d}x}}+\sin \left ( x \right ) \right \} \] Mathematica raw input

DSolve[y'[x] == Cos[x] - (Sin[x] - y[x])*y[x],y[x],x]

Mathematica raw output

{{y[x] -> (-(C[1]/E^Cos[x]) + Sin[x] + C[1]*Integrate[E^(-Cos[K[1]]), {K[1], 1, 
x}]*Sin[x])/(1 + C[1]*Integrate[E^(-Cos[K[1]]), {K[1], 1, x}])}}

Maple raw input

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

Maple raw output

y(x) = -1/(_C1+Int(exp(-cos(x)),x))*exp(-cos(x))+sin(x)