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.0136703 (sec), leaf count = 19

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

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

\[ \left \{ y \relax (x ) ={\frac {1}{\sin \relax (x ) } \left ({\frac {{x}^{2}}{2}}+{\it \_C1} \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),'implicit')

Maple raw output

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