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 = 0.528134 (sec), leaf count = 7

\[\{\{y(x)\to \sin (x)\}\}\]

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

\[\left [y \left (x \right ) = -\frac {{\mathrm e}^{-\cos \left (x \right )}}{\textit {\_C1} +\int {\mathrm e}^{-\cos \left (x \right )}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] -> Sin[x]}}

Maple raw input

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

Maple raw output

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