# Evaluate $\int_{\gamma_R}f(z) dz$ when $R>2$

Let $$f(z)=\frac{e^{\pi iz}}{z^2-2z+2}$$ and $\gamma _R$ is the closed contour made up by the semi-circular contour $\sigma_1$ given by, $\sigma_1(t)=Re^{it}$, and $0\leq t\leq\pi$ the straight line $\sigma_2$ from $-R$ to $R$ (a semi circle).

When $R>2$, evaluate $$\int_{\gamma_R}f(z) dz.$$

-

$$f(z)=\frac{e^{\pi i z}}{[z-(1+i)][z-(1-i)]}\Longrightarrow \operatorname{Res}\limits_{z=1+i}(f)\lim_{z\to 1+i}(z-(1+i))f(z)=$$

$$=\lim_{z\to 1+i}\frac{e^{\pi i z}}{z-z+i}=\frac{e^{-\pi(1-i)}}{2i}=-\frac{e^{-\pi}}{2i}$$

Thus, by Cauchy's Residue Theorem:

$$\int\limits_{\gamma_R}f(z)\,dz=2\pi i\left(-\frac{e^{-\pi}}{2i}\right)=-\pi e^{-\pi}$$

OTOH, using the estimation theorem (with $\,z=x+yi\,\,\,,\,\,x^2+y^2=R^2\,\,,\,y\geq 0$):

$$\left|\int\limits_{\sigma_1}f(z)\,dz\right|\leq \max\frac{e^{-\pi y}}{R^2+2R+2}\cdot\pi R\xrightarrow[R\to\infty]{}0$$

You can also use Jordan's Lemma in the above , so that

$$\int\limits_{\gamma_R}f(z)\,dz=\int\limits_{-\infty}^\infty\frac{e^{\pi i x}}{x^2-2x+2}\,dx\xrightarrow[R\to\infty]{}-\pi e^{-\pi}$$

Comparing real parts (which is probably what you want), we get

$$\int\limits_{-\infty}^\infty\frac{\cos \pi x}{x^2-2x+2}dx=-\frac{\pi}{e^\pi}$$

Check that you have to justify some little things above: for example, why we only did look at one of the two poles of the functions, how to justify the use of the several theorems and etc.

-