4.4.1 \(x y'(x)=x \sin (x)-y(x)\)

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

[_linear]

Book solution method
Linear ODE

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

\[\left \{\left \{y(x)\to \frac {c_1+\sin (x)-x \cos (x)}{x}\right \}\right \}\]

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

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

DSolve[x*y'[x] == x*Sin[x] - y[x],y[x],x]

Mathematica raw output

{{y[x] -> (C[1] - x*Cos[x] + Sin[x])/x}}

Maple raw input

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

Maple raw output

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