# Integral $\int_0^{\infty} \left( \frac{\sin x}{x} \right)^2dx$. [duplicate]

Consider the contour $C_{\epsilon,R} = \Gamma_R \cup \gamma_{\epsilon} \cup [-R,-\epsilon] \cup [\epsilon, R]$ and $f(z)=\frac{1-e^{2iz}}{z^2}$. By Cauchy's Theorem we have $$\int_{C_{\epsilon,R}}f(z)dz=0$$ It is easy to see that $\int_{\Gamma_R}f(z)dz \rightarrow \infty$ as $R \rightarrow \infty$. Therefore $\int_{-\infty}^\infty \frac{1-e^{2ix}}{x^2}dx=\int_{\gamma_\epsilon} f(z)dz = \frac{1}{2}2\pi i \operatorname{Res}(f,0) =2\pi$. My question here is why the integral on $\gamma_\epsilon$ is exactly half of the residue of $f$ at $0$. I can't see why the integral of $f$ on the upper semi-circle and the lower semi-circle are the same. I know there is an alternative way to compute $\int_{\gamma_\epsilon} f(z)dz$ but I want to know why $\int_{\gamma_\epsilon} f(z)dz = \frac{1}{2}2\pi i \operatorname{Res}(f,0)$ holds.

## marked as duplicate by GNUSupporter 8964民主女神 地下教會, caverac, Chappers, Claude Leibovici, Mark McClureMay 17 '18 at 11:44

• Dumb question of a computer scientist which stumbled upon your question but what is $f(z)$ standing for ? – ThePassenger May 17 '18 at 11:07
Note that, what you have shown is that $$\int_{-\infty}^\infty \frac{1-\mathrm{e}^{2ix}}{x^2}dx=\lim_{\varepsilon\to 0}\int_{\gamma_\varepsilon}f(z)\ dz,$$ and $\int_{\gamma_\varepsilon}f(z)\ dz\ne \frac{1}{2}\cdot 2\pi i\ \mathrm{Res}(\ f,0)$ but $$\lim_{\varepsilon\to 0}\int_{\gamma_\varepsilon}f(z)\ dz =\frac{1}{2}\cdot 2\pi i\ \mathrm{Res}(\ f,0).$$ The above is obtainable by studying the Laurent series of $f$ around $z=0$.
We have that $$\frac{1-\mathrm{e}^{2iz}}{z^2}=-\frac{2i}{z}-\frac{(2i)^2}{2!}-\frac{(2i)^3z}{3!}-\cdots$$ and so $$\int_{\gamma_\varepsilon}f(z)\ dz=\sum_{n=1}^\infty \int_0^\pi \frac{i(2i)^n\varepsilon^{n-1}\mathrm{e}^{2i(n-1)t}}{n!}dt$$ and as $\varepsilon\searrow 0$, only the first term of the sum survives.