I'm looking for a better approach to compute $\int_{0}^{\infty} \frac{x\sin(\pi x)}{(x^2+4)^3} dx$.
Our contour $\mathcal C$ consists of a upper half-plane semicircle and the real axis joining the ends, where we take the limit of the radius to infinity.
By Jordan's lemma, the semicircular part of $\mathcal C$ vanishes (first equality). Which leaves us to use the residue theorem (second equality) to compute,
$$ \require{cancel} I := \int_{0}^{\infty} \frac{x\sin(\pi x)}{(x^2+4)^3}dx = \frac{1}{2}\oint_{\mathcal C}f(z)dz = \pi \big(R\{f,2i\}\cancel{+R\{f,-2i\} }\big)\ . $$
As both poles are the pole is of third order, we need to take two a second derivative
$$ \lim_{z\to 2i} \frac{1}{2!} \frac{d^2}{dz^2}\bigg( (z+2i)^{-3}z\sin(\pi z) \bigg) $$ in order to find the residue at $z=2i$.
Although this seems tedious, we'll give it a try.
To simplify the notation, put $a:=(z+2i)^{-1}$, $\ b:= \pi \cos(\pi z)\ $ and $\ c:= \sin(\pi z).$
For the first derivative on the left, this yields
$$ (-3a^4 z + a^3)c + a^3bz \ , $$ which we can reorganize as
$$ -3a^4 zc + a^3(c + bz) \ . $$
The second derivative yields
$$ 12a^5 cz-3a^4(c+bz) -3a^4(c+bz) + a^3(b-\pi^2 cz + b) , $$
which we can reorganize as
$$ 12a^5 cz -6a^4(c+bz) + a^3(2b-\pi^2 cz) \\ = 12(z+2i)^{-5}z\sin(\pi z) -6(z+2i)^{-4}\big(\sin(\pi z) + \pi z \cos(\pi z)\big) +(z+2i)^{-3}\big( \sin(\pi z) + \pi z \cos(\pi z) \big) . $$
Plugging in $z=2i$ yields (if I didn't make any calculation mistakes)
$$ R\{f,2i\} = -2^{-7}\big(\sin(2i \pi)(2\pi^2 -3) + i \cos(2i\pi) \big) \ . $$
Wolfram Alpha says the result should be $I = 2^{-7}e^{-2\pi} \pi^2 (1+2\pi)$.
Even ìf this approach turns out to work, short of a few calculations mistakes, I don't find it particularly efficient.
I'm wondering whether there is a more practical approach for computing the residue $R\{f,2i\}$, or even $I$.