I have a contour integral problem I need to solve, but I don't know the answer, so I wanted to verify that my work is correct.
$$ \int_{0}^{\infty}{\frac{\cos(ax)}{(x^2 + 1)^2}dx} $$
For this one, the function being integrated is even, so I can just take the integral over the entire real line and multiply by $ \dfrac{1}{2} $. That is $ \int_{0}^{\infty}{\dfrac{\cos(ax)}{(x^2 + 1)^2}dx} = \dfrac{1}{2}\int_{-\infty}^{\infty}{\dfrac{\cos(ax)}{(x^2 + 1)^2}dx} $. In the upper half-plane, the function being integrated has a double pole at $ i $. Therefore, I want to say that this is true:
$$ \int_{-\infty}^{\infty}{\frac{\cos(ax)}{(x^2 + 1)^2}dx} = \operatorname{Re} [2 \pi i\ \operatorname{Res}(\dfrac{e^{iz}}{(x^2 + 1)^2}, i)] $$
My solution yields: $ \int_{0}^{\infty}{\dfrac{\cos(ax)}{(x^2 + 1)^2}dx} = \dfrac{\pi}{4e} $
I have no way to verify the correctness of my answer, so is this correct or have I made a mistake somewhere?