\[ \left (x^2-1\right ) y'(x)+2 x y(x)-\cos (x)=0 \] ✓ Mathematica : cpu = 0.0245701 (sec), leaf count = 26
DSolve[-Cos[x] + 2*x*y[x] + (-1 + x^2)*Derivative[1][y][x] == 0,y[x],x]
\[\left \{\left \{y(x)\to \frac {\sin (x)}{x^2-1}+\frac {c_1}{x^2-1}\right \}\right \}\] ✓ Maple : cpu = 0.01 (sec), leaf count = 19
dsolve((x^2-1)*diff(y(x),x)+2*x*y(x)-cos(x) = 0,y(x))
\[y \left (x \right ) = \frac {\sin \left (x \right )+c_{1}}{\left (x -1\right ) \left (1+x \right )}\]