Find the exact value of $\int_{-\infty}^{\infty} \frac{\cos \pi x}{x^{2}-2 x+2} d x$

calculuscontour-integrationimproper-integralsintegration

I am going to evaluate the exact value of the integral
$$
\int_{-\infty}^{\infty} \frac{\cos (\pi x)}{x^{2}-2 x+2} d x
$$

using contour integration along anti-clockwise direction of the path
$$\gamma=\gamma_{1} \cup \gamma_{2} \textrm{ where } \gamma_{1}(t)=t+i 0(-R \leq t \leq R) \textrm{ and } \gamma_{2}(t)=R e^{i t} (0<t<\pi) $$

$$
\begin{aligned}
& \int_{-\infty}^{\infty} \frac{\cos (\pi x)}{x^{2}-2 x+2} d x \\
=& \operatorname{Re}\left[2 \pi i \operatorname{Res}\left(\frac{e^{\pi z i}}{z^{2}-2 z+2}, 1+i\right)\right]\\
=& \operatorname{Re}\left[2 \pi i \frac{e^{\pi(1+i) i}}{2(1+i)-2}\right] \\
=& \pi \operatorname{Re}\left[e^{\pi(i-1)}\right] \\
=& \frac{\pi}{e^{\pi}} \operatorname{Re}\left(e^{\pi i}\right)\\
=&-\pi e^{-\pi}
\end{aligned}
$$

Are there any other methods?

Best Answer

Utilize the known integral $\int_{-\infty}^{\infty} \frac{\cos \pi x}{x^{2}+1} d x=\pi e^{-\pi}$ to integrate

\begin{align} &\int_{-\infty}^{\infty} \frac{\cos \pi x}{x^{2}-2 x+2} dx \overset{x=y+1}=-\int_{-\infty}^{\infty} \frac{\cos \pi y}{y^2+1} d y=-\pi e^{-\pi} \end{align}

Related Question