# A Complex approach to sine integral

this integral:

$$\int_0^{+\infty}\frac{\sin x}{x}\text{d}x=\frac{\pi}{2}$$

is very famous and had been discussed in the past days in this forum. and I have learned some elegant way to computer it. for example: using the identity: $\int_0^{+\infty}e^{-xy}\sin x\text{d}x=\frac{1}{1+y^2}$ and $\int_0^{\infty}\int_0^{\infty}e^{-xy}\sin x\text{d}y\text{d}x$ and Fubini theorem. the link is here:Post concern with sine integral

In this post, I want to discuss another way to computer it. since$$\int_0^{+\infty}\frac{\sin x}{x}\text{d}x=\frac{1}{2i}\int_{-\infty}^{+\infty}\frac{e^{ix}-1}{x}\text{d}x$$ this fact inspire me to consider the complex integral:$$\int_{\Gamma}\frac{e^{iz}-1}{z}\text{d}z$$
and $\Gamma$ is the red path in the above figure, with counter-clockwise orientation, by Cauchy's theorem, we have $$\int_{\Gamma}\frac{e^{iz}-1}{z}\text{d}z=0$$ the above integral can be written as:$$\int_{-R}^{-\epsilon}\frac{e^{ix}-1}{x}\text{d}x+\int_{\Gamma_{\epsilon}}\frac{e^{iz}-1}{z}\text{d}z+\int_{\epsilon}^{R}\frac{e^{ix}-1}{x}\text{d}x+\int_{\Gamma_{R}}\frac{e^{iz}-1}{z}\text{d}z$$ Let $R\rightarrow +\infty$ and $\epsilon \rightarrow 0$, we have: $$\int_{-R}^{-\epsilon}\frac{e^{ix}-1}{x}\text{d}x+\int_{\epsilon}^{R}\frac{e^{ix}-1}{x}\text{d}x \rightarrow \int_{-\infty}^{+\infty}\frac{e^{ix}-1}{x}\text{d}x=2i\int_0^{+\infty}\frac{\sin x}{x}\text{d}x$$ and $$\int_{\Gamma_{\epsilon}}\frac{e^{iz}-1}{z}\text{d}z=\int_\pi^0\frac{e^{i\epsilon e^{i\theta}}-1}{\epsilon e^{i\theta}}i\epsilon e^{i\theta}\text{d}\theta=i\int_\pi^0(\cos(\epsilon e^{i\theta})+i\sin(\epsilon e^{i\theta})-1)\text{d}\theta \rightarrow 0$$ as $\epsilon \rightarrow 0$
so I am expecting that:$$\int_{\Gamma_{R}}\frac{e^{iz}-1}{z}\text{d}z=-i\pi$$ when $$R \rightarrow +\infty$$ but I can't find it. Could you help me? Thanks very much.

-
$\frac{e^{iz}}{z}$ can be integrated, therefore the integral around the full circle is 0. $\int_{K_R(0)}\frac{1}{z}dz=2\pi i$. Now argument that the functions are symmetric. This would be my approach, not sure about it however – CBenni Feb 4 '13 at 13:28
$|\exp(i R e^{i\theta})| \le \exp(-R\sin\theta)$ on $\Gamma_R$. – achille hui Feb 4 '13 at 13:34
How are you getting an integrand of $\frac{e^{iz}-1}{z}$? Isn't $\int_{-\infty}^\infty\frac{\sin z}{z}dz$ the imaginary part of $\int_{-\infty}^\infty\frac{e^{iz}}{z}dz=\pi i$? – Ben West Feb 4 '13 at 13:42
@BenW: I think he means $\frac{1}{2i}\Im{\int_{-\infty}^{+\infty}\frac{e^{ix}-1}{x}\text{d}x}$. And I think his point is that $\frac{1}{2i}\int_{-\infty}^{+\infty}\frac{e^{ix}}{x}\text{d}x$ diverges. – Ron Gordon Feb 4 '13 at 14:16
Nope, the point is $|e^{iz}| \to 0$ as $\Im z \to +\infty$. If one use $\sin z$ in the integrand, the integrand will blow up on $\Gamma_R$. – achille hui Feb 4 '13 at 14:44

Way too messy: just take

$$f(z):=\frac{e^{iz}}{z}\;\;,\;\;C_R:=[-R,-\epsilon]\cup \gamma_\epsilon\cup [\epsilon, R]\cup \gamma_R\,\,,\,\,0<\epsilon<<R\,\,,\,\,\epsilon\,,\,R\in\Bbb R\,$$

$$\gamma_h:=\{z\in\Bbb C\;;\;z=he^{it}\,\,,\,0\le t\le \pi\,\,,\,0<h\in\Bbb R\}$$

We use the lemma, and specially its collorary, in the first answer here , to get:

$$\lim_{\epsilon\to 0}\int\limits_{\gamma_\epsilon}f(z)\,dz=\pi i$$

Also

$$\left|\int\limits_{\gamma_R}f(z)\,dz\right|\le \max\frac{e^{-R\sin t}}{R}\pi R\xrightarrow[R\to\infty]{}0$$

so that by Cauchy's Integral Theorem

$$0=\lim_{R\to\infty}\oint f(z)\,dz=\int\limits_{-\infty}^\infty\frac{e^{ix}}{x}dx-\pi i+0\Longrightarrow$$

$$\int\limits_{-\infty}^\infty\frac{\cos x+i\sin x}{x}dx=\pi i$$

Now just compare real and imaginary parts, and take into account that our integrand is an even function...

-
Not to be nit-picky, but that last integral (and the one above it for that matter) doesn't converge. – Ron Gordon Feb 4 '13 at 14:18
Never mind: that's just the real fomr of the complex function whose integral was calculated above and we're just interested in the imaginary part, which of course converges. – DonAntonio Feb 4 '13 at 14:57
Technically what we have is $\text{PV} \int_{-\infty}^{\infty} \frac{\sin x}{x} \ dx = \pi$ and $\text{PV} \int_{-\infty}^{\infty} \frac{\cos x}{x} \ dx = 0$. But you can drop the principal value label for the first integral since it converges in the traditional sense. – Random Variable Feb 4 '13 at 16:06
17 hours to final exam, you sir, should be rewarded, as its 1000-fold times simpler than my textbook. – Danny Jun 29 '14 at 22:47

There is the formula $$\mathrm{pr.v.}\int_{-\infty}^\infty R(x)e^{ix}dx=2\pi i\sum_{y>0}\operatorname{Res} R(z)e^{iz}+\pi i\sum_{y=0}\operatorname{Res} R(z)e^{iz}$$ where the LHS is the principal value, and the RHS is the sum of the residues in the upper half plane, and along the real axis, respectively. This is under the assumption that all poles on the real axis are simple, and $R(\infty)=0$. This is found in Section 5.3, page 158 of Ahlfor's Complex Analysis.

In fact, your question is his first example. Since $\frac{e^{iz}}{z}$ has a single simple pole at $0$ with residue $1$, applying the above formula shows $$\mathrm{pr.v.}\int_{-\infty}^\infty\frac{e^{ix}}{x}dx=\pi i.$$ Separating into real and imaginary parts, we find $$\int_{-\infty}^\infty\frac{\sin x}{x}dx=\pi$$ where we drop the principal value since the integral converges. Since $\displaystyle\frac{\sin x}{x}$ is an even function, it follows that $$\int_0^\infty\frac{\sin x}{x}dx=\frac{\pi}{2}.$$

-