# $\int_{0}^{\infty} \frac{e^{-x} \sin(x)}{x} dx$ Evaluate Integral

Compute the following integral:

$$\int_{0}^{\infty} \frac{e^{-x} \sin(x)}{x} dx$$

Any hint, suggestion is welcome.

• this looks like something that could be done with complex contour integration. en.wikipedia.org/wiki/Methods_of_contour_integration – Dennis Gulko Jun 18 '12 at 10:08
• http://www.wolframalpha.com/input/?i=Integrate[%28e^-x*Sin[x]%2Fx%29%2C{x%2C0%2CInfinity} Ans = Pi/4=0.785398. In case you don't want to use limits and make it indefinite than use "Integrate[(e^-x*Sin[x]/x)]". This is not step by step solution obviously but may be helpful to you. – Rorschach Jun 18 '12 at 10:17
• Consider $I(p)=\int_{0}^{\infty}\frac{e^{-px}\sin(x)}{x}dx$,then $\frac{d}{dp}I(p)=-\int_{0}^{\infty}e^{-px}\sin(x)dx$.$I(p)$ tends to zero when $p$ tends to infinity.Solve this differential equation and work out $I(1)$.That is the answer. – zy_ Jun 18 '12 at 10:21
• @yzhao Would you consider writing that as an answer? – anon Jun 18 '12 at 10:38

Yet a different approach: parametric integration. Let $$F(\lambda)=\int_{0}^{\infty} \frac{e^{-\lambda x} \sin(x)}{x}\,dx,\qquad\lambda>0.$$ Then $$F'(\lambda)=-\int_{0}^{\infty} e^{-\lambda x} \sin(x)\,dx=-\frac{1}{1+\lambda^2}.$$ Integrating and taking into account that $\lim_{\lambda\to\infty}F(\lambda)=0$ we have $$F(\lambda)=\frac\pi2-\arctan\lambda$$ and $$\int_{0}^{\infty} \frac{e^{-x} \sin(x)}{x}\,dx=F(1)=\frac\pi4.$$

• @Chris:I'm sorry for just noticing you comment,but Julian gives a detailed description of my idea. – zy_ Jun 18 '12 at 11:21
• Nice answer (+1). I enjoy seeing a variety of solutions! – robjohn Jun 18 '12 at 11:44

Using Laplace Transform, $$\mathcal{L}(\sin(x)) = \frac{1}{s^2 + 1}$$ $$\mathcal{L}\left(\frac{\sin(x)}{x}\right) = \int_r^\infty \frac{1}{s^2 + 1} ds = \frac{\pi}{2} - \arctan(r)$$ Therefore, $$\int_0^\infty e^{-rx} \frac{\sin(x)}{x} dx = \frac{\pi}{2} - \arctan(r)$$ Substituting r = 1, $$\int_0^\infty e^{-x} \frac{\sin(x)}{x} dx = \frac{\pi}{4}$$

• thanks for your delicate solution! – user 1357113 Jun 18 '12 at 10:57

Another approach: $$\begin{eqnarray*} \int_{0}^{\infty} dx\, \frac{e^{-x} \sin(x)}{x} &=& \int_{0}^{\infty}dx\, \frac{e^{-x}}{x} \sum_{k=0}^\infty \frac{(-1)^k x^{2k+1}}{(2k+1)!} \\ &=& \sum_{k=0}^\infty \frac{(-1)^k}{(2k+1)!} \int_{0}^{\infty}dx\, x^{2k} e^{-x} \\ &=& \sum_{k=0}^\infty \frac{(-1)^k}{(2k+1)!}(2k)! \\ &=& \sum_{k=0}^\infty \frac{(-1)^k}{2k+1} \hspace{5ex} \textrm{(Leibniz series for \pi)}\\ &=& \frac{\pi}{4}. \end{eqnarray*}$$

• this is another magic shot! Nice job! Thanks! :-) – user 1357113 Jun 19 '12 at 5:52
• @Chris: Thanks, Chris. Another good question! – user26872 Jun 19 '12 at 7:40

Write this as $$\lim_{\epsilon\to0}\int_\epsilon^{1/\epsilon}\frac{e^{-(1-i)x}-e^{-(1+i)x}}{2ix}\,\mathrm{d}x\tag{1}$$ and then consider the path integral $$\frac{1}{2i}\int_{\gamma_\epsilon} e^{-z}\,\frac{\mathrm{d}z}{z}\tag{2}$$ where $\gamma_\epsilon$ comes in along the line $(1+i)x$, makes a quarter circle clockwise along $|z|=\epsilon$, goes out along the line $(1-i)x$ and then back a quarter circle counter-clockwise along $|z|=1/\epsilon$. There are no poles inside this path, so the integral in $(2)$ is $0$.

The part along $|z|=1/\epsilon$ dies away exponentially as $\epsilon\to0$. The two parts along the lines sum to our integral, $(1)$, and the part along $|z|=\epsilon$ tends to $\frac14$ of the integral of $\frac{1}{2iz}$ clockwise around the origin; that is, $-\pi/4$. Since the sum of these parts is $0$, the limit in $(1)$ must be $\pi/4$. That is, $$\int_0^\infty\frac{e^{-x}\sin(x)}{x}\mathrm{d}x=\frac{\pi}{4}\tag{3}$$

• @robjohn that's a nice solution! But I think that you should also justify that principal value of the integral equals integral itself. – qoqosz Jun 18 '12 at 11:08
• @qoqosz: I am not using a principal value since $\frac{\sin(x)}{x}$ is a nice bounded function. I use the $\epsilon$ and $1/\epsilon$ to connect with the contour integral. Perhaps I am missing your concern. – robjohn Jun 18 '12 at 11:17
• @robjohn $\frac{x}{1+x^2}$ is also bounded but when integrating over $\mathbb{R}$ it exists only in P.V. sense. Well, maybe it's not a 'nice' function ;). – qoqosz Jun 18 '12 at 11:21
• @qoqosz: $e^{-x}\frac{\sin(x)}{x}$ is a nice bounded function that dies away exponentially. It converges absolutely over $[0,\infty)$. In fact, all of the integrals above converge absolutely. What am I missing? – robjohn Jun 18 '12 at 11:31
• @qoqosz: Ah, I just saw the improper-integral tag. In the Riemann integral sense, it is improper because the domain of integration is not bounded, but it is not improper in the Lebesgue sense. – robjohn Jun 18 '12 at 11:36

If you know a bit about Fourier theory. You could Parseval's theorem $$\int \!dx \,f(x) g(x)^* = \int \!d\xi\,\hat f(\xi) \hat g(\xi)^*$$ with $f(x) = \sin(x)/x$, $g(x) = \Theta(x) e^{-x}$ and $\hat{f}$, $\hat{g}$ their Fourier transforms and $\Theta(x)$ the Heaviside step function.

Hint: $\hat{f}(\xi) = \tfrac12\sqrt{\frac{\pi}{2}} [\Theta(1-\xi) + \Theta(1+\xi)] =\sqrt{\frac{\pi}{2}} \mathop{\rm rect}(\xi)$.

Let

$$f(z) = \frac{e^{-z+iz}}{z}$$

and let $C$ be the contour that travels along $0$ to $R$, makes a quarter of a circle around to $iR$ and back to $0$, properly indented around $0$ with a quarter circle of radius $\delta$ to avoid the pole.

As $R \to \infty$, the integral over rounded part of the contour tends to $0$ and the part around $0$ tends to $-i\frac{\pi}{2}$ (N.B. this is $-i\frac{\pi}{2}$ of the residue at $z=0$) as $\delta \to 0$. Then by Cauchy's theorem:

$$0=\oint_C f(z)\,dz =\\ \int_0^\infty \frac{e^{-z+iz}}{z}\,dz -\int_0^{\infty} \frac{e^{-iz-z}}{z}\,dz - i\frac{\pi}{2}$$

And upon taking imaginary parts and solving:

$$\frac{\pi}{4}=\int_0^\infty \frac{e^{-z}\sin(z)}{z}\,dx$$

• hehe (+1). Glad to have the opportunity to learn more on complex analysis. :-) – user 1357113 Jul 4 '13 at 16:06
• @Chris'swisesister I thought you may be interested in a slightly different contour for variety – Argon Jul 4 '13 at 16:06
• sure. I'm always interested in various ways. Thanks! :-) – user 1357113 Jul 4 '13 at 16:07
• Could you also add the contour (a picture) in case you have one ready? – user 1357113 Jul 4 '13 at 16:09
• @Chris'swisesister I could try and draw one, I will update this soon. – Argon Jul 4 '13 at 16:11

$$\int_0^{\infty} \frac{e^{-x}\sin x}{x}\,dx=\int_0^{\infty}\int_0^{\infty} e^{-x}\sin x \,e^{-xy}\,dy\,dx=\int_0^{\infty} \int_0^{\infty} e^{-x(1+y)}\sin x\,dx\,dy$$ From integration by parts or otherwise, one can show that: $$\int_0^{\infty}e^{-x(1+y)}\sin x\,dx=\frac{1}{1+(1+y)^2}$$ Hence $$\int_0^{\infty} \int_0^{\infty} e^{-x(1+y)}\sin x\,dx\,dy=\int_0^{\infty} \frac{dy}{1+(1+y)^2}=\left(\arctan(1+y)\right|_0^{\infty}=\boxed{\dfrac{\pi}{4}}$$

• Neat, but isn't that more or less the same as Julián Aguirre's answer? – IAmNoOne May 9 '14 at 0:12
