20 Answers
20

Here's another way of finishing off Derek's argument. He proves
$$\int_0^{\pi/2}\frac{\sin(2n+1)x}{\sin x}dx=\frac\pi2.$$
Let
$$I_n=\int_0^{\pi/2}\frac{\sin(2n+1)x}{x}dx=
\int_0^{(2n+1)\pi/2}\frac{\sin x}{x}dx.$$
Let
$$D_n=\frac\pi2-I_n=\int_0^{\pi/2}f(x)\sin(2n+1)x\ dx$$
where
$$f(x)=\frac1{\sin x}-\frac1x.$$
We need the fact that if we define $f(0)=0$ then $f$ has a continuous
derivative on the interval $[0,\pi/2]$. Integration by parts yields
$$D_n=\frac1{2n+1}\int_0^{\pi/2}f'(x)\cos(2n+1)x\ dx=O(1/n).$$
Hence $I_n\to\pi/2$ and we conclude that
$$\int_0^\infty\frac{\sin x}{x}dx=\lim_{n\to\infty}I_n=\frac\pi2.$$

I would like to present yet another simple proof that goes through Fourier series. However, we will need the following theorem; we denote by $S_n(x;f)$ the $n$-th partial sum of the Fourier series of $f(\in L^1[-\pi,\pi]$ and $2\pi$-periodic) at $x$. Then:

I got linked to this old question from a more recent one, and I hope that you don't mind me adding a somewhat bizarre way of doing calculating this integral, using Bessel functions.

I'm aware of that this way is not the shortest way of obtaining the result, and the facts I give on Bessel functions are standard, and can be found in (probably) any book on Bessel functions. Therefore, some details will be left to be checked by the interested reader.

I have never seen this way to calculate the integral $\int_0^{+\infty}\frac{\sin x}{x}\,dx$, but I claim no originality. If someone has seen it, please tell in a comment. Here it goes:

Let us define the $n$th Bessel function $J_n$ by the integral
$$
J_n(x)=\frac{1}{\pi}\int_0^\pi \cos(n\theta-x\sin \theta)\,d\theta.
$$
We will only work with the cases $n=0$ and $n=1$. The function $J_n$ solves the Bessel differential equation
$$
x^2y''(x)+xy'(x)+(x^2-n^2)y(x)=0,
$$
and moreover $D J_0(x)=-J_1(x)$ and $D(xJ_1(x))=xJ_0(x)$.

$$\int_{0}^{\infty} \Big(\frac{\sin x}{x} \Big) \,dx = \int_{0}^{\infty} \Bigg(\int_{0}^{\infty} e^{-xy} \sin x \,dx \Bigg)\,dy$$
Now the right hand side can be found easily, using integration by parts.

@Americo: I heard of this one a long time back from one of my teachers. I thought this will be well known, but I guess I could be mistaken about that.
–
AryabhataSep 23 '10 at 16:26

20

This is also the technique used in R. Durrett (2005), Probability theory and examples, 3rd ed., Duxbury, p. 470. It is Exercise 6.6 on that page. The justification of exchanging the order of integration actually comes from considering the strip $(0,a) \times (0,\infty)$ and observing that $\int_0^a \int_0^\infty |e^{-xy} \sin x| \,\mathrm{d} y\,\mathrm{d} x \leq a$, from whence Fubini's theorem can be applied. To get the result, we take $a \to \infty$.
–
cardinalSep 18 '11 at 12:09

Let's consider the integrals
$$I_1(t)=\int_t^{\infty}\frac{\sin(x-t)}{x}dx\qquad\mbox{ and }\qquad
I_2(t)=\int_0^{\infty}\frac{e^{-tx}}{1+x^2}dx,\qquad t\geq 0.$$
A direct calculation shows that $I_1(t)$ and $I_2(t)$ satisfy the ordinary differential equation
$$y''+y=\frac{1}{t},\qquad t>0.$$
Therefore, the difference $I(t)=I_1(t)-I_2(t)$ satisfy the homogeneous differential equation
$$y''+y=0,\qquad t>0,$$
hence it should be of the form
$$I(t)=A\sin (t+B) $$
with some constants $A$, $B$. But $I_1(t)$ and $I_2(t)$ both converge to $0$ as $t\to\infty$. This implies that $A=0$ and $I_1(t)=I_2(t)$ for all $t\geq 0$. Finally, we have that
$$\int_0^{\infty}\frac{\sin x}{x}dx=\int_{0}^{\infty}\frac{1}{1+x^2}dx=\lim_{n\to\infty}\left(\arctan(n)\right)-\arctan(0)=\frac{\pi}{2}.$$

Here's one more, just for the fun of it. For $\theta$ not an integer multiple of $2 \pi$, we have
$$\sum \frac{e^{i n \theta}}{n} = -\log(1-e^{i \theta}).$$
Taking imaginary parts, for $0 < \theta < \pi$, we have
$$\sum \frac{\sin (n \theta)}{n} = -\mathrm{arg}(1-e^{i \theta}) = \pi/2-\frac{\theta}{2}.$$
Draw the isosceles triangle with vertices at $0$, $1$ and $e^{i \theta}$ to see the second equality.

It is an answer to an ancient question which already has many answers. Moreover, it bears more than a passing resemblance to one of the other answers. So yes, it bothers me.
–
user1729Aug 9 '13 at 21:14

1

@user1729: By the way, I do not see any problem for posting an answer for an ancient question. There are other answers posted lately too.
–
Mhenni BenghorbalAug 10 '13 at 0:03

3

@user1729: I don't think there is anything wrong with adding a 17th answer, so long as it contributes something new. On the surface, it appears that it does. Nevertheless, if one ponders where the LT relation above comes from, one will see that this method is precisely that of Aryahbata below, but packaged a little differently. If this method referenced Aryahbata's solution and pointed out how it could be formalized, and under what conditions, then this would be genuinely new. But as it doesn't, it appears to be a rehash.
–
Ron GordonAug 10 '13 at 0:30

I evaluated this integral in this answer where I started with
$$
\begin{align}
\sum_{k=1}^\infty\frac{\sin(2kx)}{k}
&=\sum_{k=1}^\infty\frac{e^{i2kx}-e^{-i2kx}}{2ik}\\
&=\frac1{2i}\left(-\log(1-e^{i2x})+\log(1-e^{-i2x})\right)\\
&=\frac1{2i}\log(-e^{-i2x})\\[4pt]
&=\frac\pi2-x\quad\text{for }x\in\left(0,\pi\right)\tag{1}
\end{align}
$$
Setting $x=\frac a2$, we get
$$
\sum_{k\in\mathbb{Z}}\frac{\sin(ka)}{ka}=\frac\pi a\tag{2}
$$
where we set $\frac{\sin(ka)}{ka}=1$ when $k=0$. Multiplying $(2)$ by $a$ and setting $a=\frac1n$ yields
$$
\sum_{k\in\mathbb{Z}}\frac{\sin(k/n)}{k/n}\frac1n=\pi\tag{3}
$$
and $(3)$ is a Riemann Sum for the integral
$$
\int_{-\infty}^\infty\frac{\sin(x)}{x}\,\mathrm{d}x=\pi\tag{4}
$$

@xpaul: You are assuming that the function is continuous, which it isn't. Note what happens when you approach $\pi^-$, which, since the function is $\pi$-periodic, is the same as $0^-$. This makes sense, since the function is odd.
–
robjohn♦Jul 6 '14 at 14:10

One easiest way to get this integral is to evaluate the following improper integral with parameter $a$:
$$ I(a)=\int_0^\infty e^{-ax}\frac{\sin x}{x}dx, a\ge 0.$$
It is easy to see
$$I'(a)=-\int_0^\infty e^{-ax}\sin xdx=\frac{e^{-ax}}{a^2+1}(a\sin x+\cos x)\big|_0^\infty=-\frac{1}{a^2+1}.$$
Thus
$$I(\infty)-I(0)=-\int_0^\infty\frac{1}{a^2+1}da=-\frac{\pi}{2}.$$
Note $I(\infty)=0$ and hence $I(0)=\frac{\pi}{2}$.

@xpaul: I've worked out why $I(\infty) = 0$: $|e^{-ax} \sin x| \leq e^{-x}$ for $a \geq 1$, so the integrand of $I(a)$ is $L^1$ for large $a$, and we can use the dominated convergence theorem.
–
LucasSilvaMay 20 at 15:35

I'd add here the Feynman way, a very powerful, elegant and fast method to work out such things. You find here the example from $-\infty$ to $\infty$, but since the integrand is even, by dividing the result by 2 we get our required result.

Another iteration of this question came up, and I have an answer that isn't currently here. So I present yet another solution.

We want to show that $\int_{0} ^{\infty} \frac{\sin x }{x} \mathrm{d}x = \pi/2.$

First, let's show that it converges. We let $I_{ab} = \int_a^b \frac{\sin x}{x}$, and consider the limits $a \to 0, b \to \infty$. $a \to 0$ is easy, so we don't worry about it. $\frac{\sin x}{x}$ is continuous on this domain, so all we really want is for the upper limit to behave nicely.

Note that $I_{ab} = \int \frac{\sin x}{x} = \int \frac{1}{x} \frac{\mathrm{d} (1 - \cos x)}{\mathrm{d} x}$, and so we can use integration by parts. We then get

These proofs looked very intriguing the multiple ways to go about the same problem. I looked up toward the ceiling and then it dawned on me that there was another way to do this with this particular function as follows:

$~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~$The method of attack of use would be Laplace Transforms

Often proofs of the Fourier inversion theorem use the value of the sine integral. Certainly the one I learned as an undergraduate did. To me this is reminiscent of the argument that $\lim_{x\to0}(\sin x)/x=1$ by L'Hopital's rule :-(
–
Robin ChapmanOct 13 '10 at 10:14

1

@Robin Chapman: Hmm, that's true. Very good point. Maybe that's why nobody gave this answer! PS. You need to get rid of the reflex to hit the Return key before you're done writing your comments. :)
–
Hans LundmarkOct 13 '10 at 10:33

5

+1, because posts like these make me want to properly learn fourier analysis as soon as possible. Ps. the proof of the inversion formula in Rudin's book doesn't get anywhere near of making use of the value in this integral, as far as I can remeber.
–
SamApr 22 '11 at 14:00

Hence we have $I_n = u_0 – u_1 + u_2 \cdots + (-1)^{n-1}u_{n-1},$ where $u_k$ is a decreasing sequence of positive terms. We can see this from the shape of the curve
$y = \sin(2n+1)x / \sin x,$ which crosses the x-axis at $\pi/(2n+1), 2\pi/(2n+1),\ldots,n\pi/(2n+1).$ (I said that this is just a sketch, you have to check the details.)

Hence the sequence $I_n$ converges, and by (1) it converges to $\pi/2.$

Now if we make the substitution $y=(2n+1)x$ we see that
$$u_k = \int_{k\pi}^{(k+1)\pi} {\sin y \over (2n+1) \sin (y/(2n+1))} dy,$$

and since $I_n$ can be written as an alternating sequence of decreasing positive terms we can truncate the sequence wherever we like and the value of $I_n$ lies between two successive partial summations. Hence