4.1.15 \(y'(x)=1-y(x) \cot (x)\)

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

[_linear]

Book solution method
Linear ODE

Mathematica
cpu = 0.0148926 (sec), leaf count = 15

\[\left \{\left \{y(x)\to c_1 \csc (x)-\cot (x)\right \}\right \}\]

Maple
cpu = 0.007 (sec), leaf count = 15

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

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

Mathematica raw output

{{y[x] -> -Cot[x] + C[1]*Csc[x]}}

Maple raw input

dsolve(diff(y(x),x) = 1-y(x)*cot(x), y(x),'implicit')

Maple raw output

y(x) = (-cos(x)+_C1)/sin(x)