Calculating $\int_0^\infty \frac {\sin^2x}{x^2}dx$ using the Residue Theorem. I am trying to compute the following integral using the Residue Theorem but am quite stuck:
$$\int_0^\infty \frac{\sin^2x}{x^2}dx$$
I have tried applying Jordan's lemma, having written $\sin(x)$ as $\dfrac{\mathrm{e}^{ix}-\mathrm{e}^{-ix}}{2i}$, to not much avail. I have also tried using a rectangular integration path but it didn't get me far. I'd be grateful for an insightful advice.
 A: Hint. First note that
$$
\sin^2x=\frac{1}{2}\mathrm{Re}\, \big(1-\mathrm{e}^{2xi}\big),
$$
and hence your integral equals
$$
\frac{1}{4}\int_{-\infty}^{\infty}\frac{1-\mathrm{e}^{2xi}}{x^2}dx
$$
Then define the curve $\gamma_{\varepsilon,R}$ to be the union of:


*

*$\gamma_R(t)=R\mathrm{e}^{it}, \,\,t\in[0,\pi]$. 

*$\gamma_-(t)=t, \,\,t\in[-R,\varepsilon],$

*$\gamma_\varepsilon(\pi-t),\,\,t\in[0,\pi],$

*$\gamma_+(t)=t,\,\,t\in[\varepsilon,R]$.
Then use Residue Theorem (here the function DOES NOT have poles in the interior of 
$\gamma_{\varepsilon,R}$), and let $\varepsilon\to0$, $R\to\infty$.
ANSWER. $\dfrac{\pi}{2}$.
A: Hint: Write $\sin^2(x) = \frac{1}{2}Re(1 - e^{2ix})$.
Take the integration as $$\int \frac{1 - e^{2iz}}{z^2} dz$$
Take the contour s.t. $0 + 0i$ is out of your closed region. 
Find residue and solve.
A: In this answer, it is shown using contour integration and the binomial theorem that
$$
\int_0^\infty\left(\frac{\sin(z)}{z}\right)^n\mathrm{d}z
=\frac{\pi}{2^n(n-1)!}\sum_{k=0}^{\lfloor n/2\rfloor}(-1)^k\binom{n}{k}(n-2k)^{n-1}
$$
Plugging in $n=2$ gives $\dfrac\pi2$.
