Let $$f(z)=\frac{\cos (z)e^{-2iz}}{z^2+2z+2}$$
Why is $\lim\limits_{r\rightarrow\infty}\int\limits_{C_r}f(z)dz=0$ where $C_r$ is the half circle $\{|z|=r,~\text{Im}(z)<0\}$?
I was trying to estimate the modulus of $f(re^\theta)$ and I'm not even sure if $|\cos(z)|$ is bounded by $1$. Seems like it's not necessarily the case: $$|\cos(z)|=|\frac{e^{iz}+e^{-iz}}{2}|={1\over2}|e^{ix-y}+e^{-ix+y}|\le{1\over2}(|e^{-y}|+|e^y|)$$
Here $$z=r\cos\theta+ir\sin\theta$$
so $$|\cos z|\le{1\over2}(|e^{-r\sin\theta}|+|e^{r\sin\theta}|)$$
Thankfully the numerator seems stay rather constant because of the $$|e^{-iz}|=|e^{2r\sin\theta}| (\theta\in[\pi,2\pi]\implies \sin(\theta)\le0)$$
So $f(z)$ goes to zero as $r$ approaches $\infty$. Is that sufficient to say $$\lim\limits_{r\rightarrow\infty}\int\limits_{C_r}f(z)dz=0 ~?$$
For context: the exercise asks to compute $\int\limits_{-\infty}^\infty f(x)dx$ and we have to use the residue theorem and the border of the semi disc $|z|=r$
On the lower half plane $$\left|e^{-2iz}\cos z\right|=\left|\frac{e^{-iz}+e^{-3iz}}2\right|\le1$$ as $|e^{-iz}|\le1$ on the lower half plane. So the integral is bounded in absolute value by $$\frac{\pi r}{r^2-2r-2}$$ for large enough $r$.