This question already has an answer here:

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.


marked as duplicate by Guy Fsone, Claude Leibovici integration Jan 2 '18 at 11:51

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    $\begingroup$ Very good link. Isn't the integrand an even function? $\endgroup$ – mrs Aug 19 '14 at 15:51
  • $\begingroup$ Check this technique which is not included in the above link. $\endgroup$ – Mhenni Benghorbal Aug 19 '14 at 16:14

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.

  • 1
    $\begingroup$ I think you should have $2$, not $\frac{1}{2}$, on the outside. $\endgroup$ – Ian Aug 19 '14 at 16:24
  • $\begingroup$ @Ian: You are right. Thanks. $\endgroup$ – Mhenni Benghorbal Aug 19 '14 at 16:25
  • 4
    $\begingroup$ I feel like this is circular because you are assuming the result of a more general integral and then deriving your answer from that. I don't think it is any different from using a table to look up the answer. $\endgroup$ – user157227 Aug 19 '14 at 16:28
  • $\begingroup$ @user157227: It is a very powerful techniques which allows you to handle very difficult problems. $\endgroup$ – Mhenni Benghorbal Aug 19 '14 at 18:32

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.$$

  • 1
    $\begingroup$ This is precisely the method I found. :) $\endgroup$ – Asier Calbet Aug 19 '14 at 20:56
  • $\begingroup$ @Assaultous2 I know this is not an obligation on M.SE but it would be nice if you upvote the one who gives an answer to your OP to show your appreciation to him. +1 Jack! $\endgroup$ – Tunk-Fey Aug 20 '14 at 10:59

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}

  • $\begingroup$ There isn't really a "pole" because the discontinuity is removable. $f(z) = \begin{cases} \frac{\sin(z)}{z} & \text{ if } z \neq 0 \\ 1 & \text{ if } z=0 \\ \end{cases}$ defines an entire function. $\endgroup$ – Mike F Jun 6 '15 at 18:33
  • $\begingroup$ Oh hmmm maybe you mean there are poles after you split $\frac{\sin^2(x)}{x^2}$ as a sum of three functions using $\sin(x) = \frac{e^{ix}-e^{-ix}}{2i}$. I guess that makes sense. $\endgroup$ – Mike F Jun 6 '15 at 19:06

What happens if you split $\cos2x$ into $e^{2ix}$ and $e^{-2ix}$? The two pieces need different contours - one above the real line, the other below.


Not the answer you're looking for? Browse other questions tagged or ask your own question.