How to find integral of the form $e^xf(x)$? I always face trouble with these type of integrals.
I need to find $$\int{e^x \frac{x(\cos x -\sin x)-\sin x}{x^2}}dx$$
My problem would be solved if can express $f(x)$ like $g(x)+g'(x)$ but identifying $g(x)$ by trial and error method is sometimes tedious.Is there any easier approach?

The typo can be not in the signs of the fraction but in the sign of the argument of the exponential function, that is if we replace $e^{x}$ by $e^{-x}$ the fraction remains as it is and the answer would be 
$$\frac{ \sin (x)}{x}e^{-x}+C,$$ since 
$$\int e^{-x}\frac{ x (\cos (x)- \sin (x))-  \sin (x)}{x^2}\,dx=\frac{ \sin (x)}{x}e^{-x}+C
$$ which can be obtained easly by parts. 
I think it is obvious to see that the fraction is nothing but $$f^\prime(x)-f(x)$$ where $f(x)$ is the product $f(x)=(\frac{1}{x}) \sin(x).$ Recall $ (\frac{1}{x})^\prime=-\frac{1}{x^2}$.
