Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This integral is surprisingly difficult to evaluate, and I have looked in several references and none contain a single integral of this type. Any help would be greatly appreciated.

Evaluate $\displaystyle \int_0^\infty \frac{\sin(z)}{1 + z^2}dz$.

share|cite|improve this question
@syxiao: Evaluate $\int_{\Gamma} \frac{e^{iz}}{1 + z^2}dz$, where the contour $\Gamma$ is a large semicircle in the upperhalf plane. – JavaMan May 31 '11 at 21:32
@DJC: if the semicircle is where I think it is, won't the integrals over the positive and negative parts cancel? You want a quarter-circle, I think. – Qiaochu Yuan May 31 '11 at 21:51
@DJC: The problem with using that integrand is precisely because the imaginary part is 0; or that the integral $\displaystyle \int_{-\infty}^\infty \frac{sin(x)}{1+x^2}dx = 0$. This doesn't give any information on the integral of only one side. – syxiao May 31 '11 at 21:54
@syxiao: Not interested in accepting answers to your other posts? – Did May 31 '11 at 22:03
Similar:… – Aryabhata Jun 1 '11 at 0:38

Edit: Since the definition of the exponential integral incorporates Cauchy principle values, I did not previously write which integrals were in fact principle values. This has now been changed.

We can evaluate it as a sum of exponential integrals by integrating along the quarter circle contour:

Consider $$\int_0^\infty \frac{e^{iz}}{1+z^2}dz.$$ The residue at $x=i$ is $\frac{\pi}{e}$ which in particular tells us the value of the related integral $$\int_0^\infty \frac{\cos(x)}{1+x^2}dx=\frac{\pi}{2e}.$$ However, we care about the imaginary part, not the real part. Lets integrate on the contour which is the quarter circle of radius $R$ in the right half plane which avoids the point $z=i$ by going around a half circle of radius $\epsilon$. Then, in the limit as $\epsilon\rightarrow 0$ and $R\rightarrow \infty$ we have that $$\int_0^\infty \frac{e^{iz}}{1+z^2}dz=i\left(p.v.\int_0^\infty \frac{e^{-z}}{1-z^2}dz\right)+\frac{2\pi}{e}.$$ The portion on the circle of radius $R$ goes to zero by Jordans lemma, and the $\frac{\pi}{2e}$ comes from the fractional residue theorem.

Looking at the imaginary parts of both sides we conclude $$\int_0^\infty \frac{\sin(z)}{1+z^2}dx=\int_0^\infty \frac{e^{-z}}{1-z^2}dz$$ Split this up using partial fractions to get $$\frac{1}{2}\left(\int_{0}^{\infty}\frac{e^{-u}}{u+1}du-p.v.\int_{0}^{\infty}\frac{e^{-u}}{u-1}du\right).$$ Lets turn each of these into an exponential integral by shifting the lower limit of integration to $0$. We then have $$\frac{1}{2}\left(e\int_{1}^{\infty}\frac{e^{-t}}{t}dt-e^{-1}\left(p.v.\int_{-1}^{\infty}\frac{e^{-t}}{t}dt\right)\right).$$ This last line is then equal to $$\frac{e^{-1}Ei(1)-eEi(-1)}{2}$$ by definition, and we have evaluated the integral in terms of known functions.

It is highly unlikely that you can write this in a more satisfying way without in turn implying relations about exponential integrals. Also, the term $-eEi(-1)$ is a constant called Gompertz Constant.

Hope that helps,

share|cite|improve this answer
Eric: Your first step (where you replace sin by sinh) lacks justification. As a matter of fact (unless a miracle occurs in this specific case, which you should explain), this step is false. – Did May 31 '11 at 23:05
@Didier: You are completely right. I edited to provide a complete solution. I don't know why, but when I was looking this over I thought I saw using $\sinh(z)$ as a shortcut.... – Eric Naslund Jun 1 '11 at 1:07
Hmmm... Either you are supremely confident in your contour integration skills, or the revised version goes too fast. For example, you could write precisely which contour you use (i.e. a closed path avoiding the pole at i (or else...), but how does it avoid this point), explain why the |z|=R and |z-i|=epsilon parts of the contour do no contribute to the end result (if indeed they do not), and avoid writing integrals which simply do not exist (or in a very specific sense which you should explain), like int(exp(-t)/t,t=-1..+infty). .../... – Did Jun 1 '11 at 6:04
.../... Note in particular that Gompertz constant appears in the first integral, the one where you divide by u+1, and certainly not in the second integral, which does not exist. Sorry. :-) – Did Jun 1 '11 at 6:05
@Didier: I am supremely confident in my contour integration skills. Partly joking, but yes this version does go fast, I leave out many steps, and the fact that some of these integrals are principle values. Some details: The integral clearly dies on the circle radius $R$ by Jordan's lemma. The contour does a half circle at $z=i$ and this contributes by the fractional residue theorem. Because we are taking limits to approach $i$, this integral is then a Cauchy principle value. Since $Ei(z)$ incorporates principle values by definition, I did not mention it. – Eric Naslund Jun 1 '11 at 15:28

Wolfram Alpha (and so I suppose Mathematica) gives for the indefinite integral

$$\int \frac{\sin(x)}{1+x^2} dx = $$

$$ \frac{(e^2 - 1) (Ci(i+x) + Ci(i-x)) + i (e^2 + 1) (Si(i+x) + Si(i-x))}{4 e} + \text{constant}$$

where $Ci(x)$ is the Cosine integral and $Si(x)$ is the Sine integral.

Looking at the graph of this, the imaginary part seems to be constant for real $x$ and the real part seems to tend to $0$ for large $x$, and if so the the answer to original question is the negative of the real part of this expression when $x=0$, i.e. about $0.64676112277913$.

share|cite|improve this answer
Remark: When we evaluate at $x=0$, by using the fact that $$Ei(-x)=\text{ci}(ix)+i\left(\frac{\pi}{2}+\text{si}(ix)\right)$$ it is possible to rewrite this expression in the form given in my answer. – Eric Naslund May 31 '11 at 22:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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