ODE
\[ x y'(x)=\sin (x)-2 y(x) \] ODE Classification
[_linear]
Book solution method
Linear ODE
Mathematica ✓
cpu = 0.0106506 (sec), leaf count = 19
\[\left \{\left \{y(x)\to \frac {c_1+\sin (x)-x \cos (x)}{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 ) +{\it \_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),'implicit')
Maple raw output
y(x) = (sin(x)-x*cos(x)+_C1)/x^2