Contour integration to calculate real integral I want to calculate following integral $$\int_{-\infty}^{\infty}\frac{z\sin 3z}{z^2-4z+5}$$ My idea was to integrate complex integral on half circle upper part of plane with radius $R$ and then go with it to infinity.
So:
$$\int_{-\infty}^{\infty}\frac{z\sin 3z}{z^2-4z+5}=Im(\int_{halfcircle+[-R,R]}\frac{ze^{3iz}}{z^2-4z+5})$$
We clearly see that we have $2$ poles of order $1$, but only $2+i$ is in our halfcircle. 
$$Res(f,2+i)=\lim_{z\rightarrow 2+i}\frac{ze^{3iz}}{z-2+i}=\frac{(2+i)e^{3i(2+i)}}{2i}$$
$$\int_{halfcircle+[-R,R]}\frac{ze^{3iz}}{z^2-4z+5}=\pi(2+i)e^{3i(2+i)}$$ 
And it's left to show that integral $$\int_{halfcircle}\frac{ze^{3iz}}{z^2-4z+5}$$ is zero as $R$ gets bigger, but here I have a problem with estimation.
$$\int_{halfcircle}\frac{ze^{3iz}}{z^2-4z+5}=\int_{0}^{\pi}\frac{Re^{eit}e^{3iRe^{eit}}}{(Re^{eit})^2-4Re^{eit}+5}iRe^{it}$$
Maybe I am doing something wrong but numerator and denominator are both of order $2$ so I get that this integral is not zero at all. 
 A: First, from the triangle inequality we have
$$\begin{align}
|z^2-4z+5|&=|(z-2-i)|\,|z-2+i|\\\\
&\ge ||z|-|2+i||\,||z|-|2-i||\\\\
&=||z|-\sqrt{5}|^2
\end{align}$$
With $z=Re^{it}$, this becomes
$$|(Re^{it})^2-4Re^{it}+5|\ge (R-\sqrt 5)^2 \tag 1$$
Using $(1)$, we can write
$$\begin{align}
\left|\int_0^\pi \frac{Re^{it}e^{i3Re^{it}}}{(Re^{it})^2-4Re^{it}+5}\,(iRe^{it})\,dt\right|&\le \int_0^\pi \frac{R^2e^{-3Rsin(t)}}{|(Re^{it})^2-4Re^{it}+5|}\,dt\\\\
&=\int_0^\pi \frac{R^2e^{-3R\sin(t)}}{|Re^{it}-(2+i)|\,|Re^{it}-(2-i)|}\\\\
&\le \frac{R^2}{(R-\sqrt{5})^2}\int_0^\pi e^{-3R\sin(t)}\,dt\\\\
&=2\frac{R^2}{(R-\sqrt{5})^2}\int_0^{\pi/2} e^{-3R\sin(t)}\,dt\tag2
\end{align}$$
Next, note that for $t\in [0,\pi/2]$, $\sin(t)\ge 2t/\pi$.  Using this estimate in $(2)$ reveals
$$\begin{align}
\left|\int_0^\pi \frac{Re^{it}e^{i3Re^{it}}}{(Re^{it})^2-4Re^{it}+5}\,(iRe^{it})\,dt\right|&\le 2\frac{R^2}{(R-\sqrt{5})^2}\int_0^{\pi/2} e^{-3R(2t/\pi)}\,dt\\\\
&=2\frac{R^2}{(R-\sqrt{5})^2}\left(\frac{1-e^{-3R}}{(6R/\pi)}\right)\\\\
&\to 0\,\,\text{as}\,\,R\to \infty
\end{align}$$
