How to calculate the integral:

$$I = \int\limits\_{0}^{\infty }\frac{e^{-x}\sin(\pi x)\cos(nx)}{x}dx ,$$

Using WolframAlpha, I got the following answer:

$I = \frac{1}{2}(\arctan(n + \pi) - \arctan(n- \pi))$

But I don't understand how we can get such an answer.