Integral of Sinc Function Squared Over The Real Line [duplicate]

I am trying to evaluate $$\int_{-\infty}^{\infty} \frac{\sin(x)^2}{x^2} dx $$ Would a contour work? I have tried using a contour but had no success. Thanks.

Edit: About 5 minutes after posting this question I suddenly realised how to solve it. Therefore, sorry about that. But thanks for all the answers anyways.


Why not to try integration by parts? This just gives:

$$\int_{\mathbb{R}}\frac{\sin^2 x}{x^2}\,dx=\int_{\mathbb{R}}\frac{\sin(2x)}{x}\,dx=\pi.$$

With the same approach you can also find the values of $$I_m = \int_{\mathbb{R}}\frac{\sin^m(x)}{x^m}\,dx.$$


This is an approach using contour integration. \begin{align} \int_{\mathbb{R}}\frac{\sin^2{x}}{x^2}{\rm d}x &=-\frac{1}{4}\lim_{\epsilon \to 0}\int_{\mathbb{R}}\frac{e^{2ix}-2+e^{-2ix}}{(x-i\epsilon)^2}{\rm d}x\tag1\\ &=-\frac{1}{4}\lim_{\epsilon \to 0}2\pi i\lim_{z \to i\epsilon}\frac{{\rm d}}{{\rm d}z}(e^{2iz}-2)\tag2\\ &=\frac{1}{4}\lim_{\epsilon \to 0}4\pi e^{-2\epsilon}\\ &=\pi \end{align} Explanation:
$(1)$: Expand $\sin^2{x}$ in terms of complex exponentials and shift the pole upwards.
$(2)$: Split the integral into $2$. Integrate the first along a semicircle in the uhp, and the second along a semicircle in the lhp. The second integral $=0$ since it encloses no poles.

Alternatively, one may use the fact that $$\int^\infty_0t^{n-1}e^{-xt}{\rm d}t=\frac{\Gamma(n)}{x^n}$$ It follows that \begin{align} 2\int^\infty_0\frac{\sin^2{x}}{x^2}{\rm d}x &=2\int^\infty_0t\int^\infty_0e^{-xt}\sin^2{x} \ {\rm d}x \ {\rm d}t\\ &=2\int^\infty_0\int^\infty_0e^{-xt}\sin{2x} \ {\rm d}x \ {\rm d}t \tag{Integrated by parts}\\ &=2\int^\infty_0\frac{2}{t^2+4}{\rm d}t\\ &=\pi \end{align}


Here is another approach. Write the integral as

$$I = {2}\int_{0}^{\infty} \frac{\sin^2(x)}{x^2}. $$

Recalling the Mellin transform of a function $f$

$$ \int_{0}^{\infty} x^{s-1} f(x)dx $$

our integral is the Mellin transform of $\sin(x)^2$ with $s=-1$. The Mellin transform is $\sin(x)^2$ given by

$$ -\frac{1}{2}\,{\frac {\sqrt {\pi }\,\Gamma \left( 1+s/2 \right) }{s\,\Gamma \left( -s/2 + 1/2 \right) }}.$$

Taking the limit as $s\to -1$ gives the desired answer $\frac{\pi}{2}$. See other approaches.