4.1.16 \(y'(x)=x \csc (x)-y(x) \cot (x)\)

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

[_linear]

Book solution method
Linear ODE

Mathematica
cpu = 0.164195 (sec), leaf count = 19

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

Maple
cpu = 0.012 (sec), leaf count = 16

\[\left [y \left (x \right ) = \frac {\frac {x^{2}}{2}+\textit {\_C1}}{\sin \left (x \right )}\right ]\] Mathematica raw input

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

Mathematica raw output

{{y[x] -> ((x^2 + 2*C[1])*Csc[x])/2}}

Maple raw input

dsolve(diff(y(x),x) = x*csc(x)-y(x)*cot(x), y(x))

Maple raw output

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