✓ Mathematica : cpu = 0.0171002 (sec), leaf count = 15
DSolve[-(x^2*Sin[x]) - y[x] + x*Derivative[1][y][x] == 0,y[x],x]
✓ Maple : cpu = 0.007 (sec), leaf count = 12
dsolve(x*diff(y(x),x)-y(x)-x^2*sin(x) = 0,y(x))
Hand solution
Linear first order, exact, separable. \(y^{\prime }-\frac {y}{x}=x\sin x\), integrating factor \(\mu =e^{\int -\frac {1}{x}dx}=e^{-\ln x}=\frac {1}{x}\), hence
Verification
restart; ode:=x*diff(y(x),x)-y(x)=x^2*sin(x); my_sol:=x*(_C1-cos(x)); odetest(y(x)=my_sol,ode); 0