ODE
\[ x y'(x)=\sin (x)-2 y(x) \] ODE Classification
[_linear]
Book solution method
Linear ODE
Mathematica ✓
cpu = 0.187106 (sec), leaf count = 19
\[\left \{\left \{y(x)\to \frac {\sin (x)-x \cos (x)+c_1}{x^2}\right \}\right \}\]
Maple ✓
cpu = 0.008 (sec), leaf count = 17
\[\left [y \left (x \right ) = \frac {\sin \left (x \right )-x \cos \left (x \right )+\textit {\_C1}}{x^{2}}\right ]\] Mathematica raw input
DSolve[x*y'[x] == Sin[x] - 2*y[x],y[x],x]
Mathematica raw output
{{y[x] -> (C[1] - x*Cos[x] + Sin[x])/x^2}}
Maple raw input
dsolve(x*diff(y(x),x) = sin(x)-2*y(x), y(x))
Maple raw output
[y(x) = (sin(x)-x*cos(x)+_C1)/x^2]