I have a complex integral $I$ to solve to show that
$$I=\int_{-\infty}^{\infty}\frac{x^3\sin{x}\;dx}{x^4+5x^2+4} = \frac{(4-e)\pi}{3e^2}$$
I know that you can integrate over the contour of a semicircle where and represent sin as an infinite sum but not sure what to do next. Should the polynomial be converted to a partial fraction too?
On a canonical semicircle of radius $\;R>0\;,\;\;C: \{z\in\Bbb C\;|;|z|=R\;,\;\;\text{Im z}>0\}\;$ , we get
$$\left|\int_C\frac{z^3\,e^{iz}}{z^4+5z^2+4}\right|\le \max_{z\in C}\frac{|z|^3|e^{iz}}{|z^4+5z^2+4}\,\cdot \ell(C)\le\frac{R^3\,e^{-\text{Im}\,z}}{R^4-5R^2-4}\cdot\pi R\xrightarrow[R\to\infty]{}0$$
since exponential kills polynomial and $\;e^{-\text{Im}\,z}\xrightarrow[R\to\infty]{}0\;$ because $\;\text{Im}\,z>0\;$ and $\;\text{Im}\,z\to\infty\;$ when $\;R\to\infty\;$ ...You could use Jordan's Lemma
Thus, if $\;D\;$ is the contour $\;C\cup [-R,R]\;$ (the semicircle and the diameter from $\;-R\;$ to $\;O\;$ in the real axis), you get
$$2\pi\left[\sum \text{Res}(F,z_k)\right]=\oint_D\frac{z^3\,e^{iz}}{z^4+5z^2+4}dz=\int_{-R}^R\frac{x^3\,e^{ix}}{x^4+5x^2+4}dx+\int_C\frac{z^3\,e^{iz}}{z^4+5z^2+4}dz$$
and on passing to the limit $\;R\to\infty\;$ you get your real improper integral on the right, and its value on the left.
Also, for the singularities (in fact, simple poles in this case so the residue is easily calculated):
$$z^4+5z^2+4=(z^2+1)(z^2+4)=(z-i)(z+i)(z+2i)(z-2i)\ldots\text{ and etc.}$$
Last thing: by Euler, $\;e^{ix}=\cos x+i\sin x\;$ , so you get two improper integrals, one of the real part , and the other a purely imaginary one (which is your integral). Figure out what happens here (further hit: odd and even functions)