# Definite integral - possible evaluation using real methods?

The book "inside interesting integrals" gives the following exercise for the chapter about contour integration and the residue theorem: $$\int_{0}^\infty \frac{e^{\cos x}\sin(\sin x)}{x}dx=\space\space ?$$ This can be solved using the function $$f(z)=\frac{\exp(e^{iz})}{z}$$ on a quarter-circular contour, and is pretty straightforward. The answer turns out to be $$\frac{\pi}{2}(e-1)$$ However, in the book, the author makes the following comment:

Edward Copson (1901-1980), who was professor of mathematics at the University of St. Andrews in Scotland, wrote "A definite integral which can be evaluated using Cauchy's method of residues can always be evaluated by other means, though generally not so simply." Here's an example of what Copson meant, an integral attributed to the great Cauchy himself. It is easily done with contour integration, but would (I think) otherwise be pretty darn tough.

Does anyone know how to evaluate this integral using real methods?

• This question should actually get more attention... I already grabbed my popcorn to see how real methods come in action. If this does not get attention I'm considering to put a bounty on it (if that is possible, I don't know how that works). Jan 7, 2018 at 21:14
• I have put a bounty on this question. @Nilknarf Are there some updates concerning this question? Jan 8, 2018 at 20:47
• @Shashi No... Do you suggest that I add anything in particular to the question? Jan 8, 2018 at 23:55
• I was curious whether you have solved it in the mean time Jan 9, 2018 at 8:00

$$e^{\cos x}\sin(\sin x) = \text{Im}\, e^{\cos x+i\sin x} = \text{Im}\exp\left(e^{ix}\right) = \text{Im}\sum_{n\geq 0}\frac{e^{nix}}{n!}=\sum_{n\geq 1}\frac{\sin(nx)}{n!}$$ and since $\int_{0}^{+\infty}\frac{\sin(nx)}{x}\,dx = \frac{\pi}{2}$ for any $n>0$, we have $$\int_{0}^{+\infty}\frac{e^{\cos x}\sin(\sin x)}{x}\,dx = \frac{\pi}{2}\sum_{n\geq 1}\frac{1}{n!}=\color{red}{\frac{\pi}{2}(e-1)}.$$

• Is it true that interchanging series and integral is allowed since the series with sine is uniformly convergent? The answer is so neat. I guess it is even easier with Real methods after seeing the answers. Jan 9, 2018 at 7:55
• "Real methods=without Residue Theorem " in the last comment Jan 9, 2018 at 8:06
• @Shashi: indeed, this is a small variation on the improper Riemann-integrability of $\frac{\sin x}{x}$ on $\mathbb{R}^+$, which can be proved by real (Fourier-analytic), almost-real (Laplace transform) or complex techniques (residue theorem) in few steps, anyway. Jan 9, 2018 at 14:45

Perhaps surprisingly, a straightforward trick works. To this end we refer to the following easy-to-prove lemma.

Lemma. Define $\operatorname{Si}(x) = \int_{0}^{x} \frac{\sin t}{t} \, dt$. Then

1. $\int_{0}^{x} \frac{\sin(yt)}{t} \, dt = \operatorname{Si}(xy)$, and
2. $\operatorname{Si}(x) = \frac{\pi}{2} + \mathcal{O}(x^{-1})$ as $x \to \infty$.

Then for $R > 0$,

\begin{align*} \int_{0}^{R} \frac{e^{\cos x}\sin(\sin x)}{x} \, dx &= \int_{0}^{R} \frac{1}{x}\operatorname{Im}(e^{e^{ix}}) \, dx \\ &= \int_{0}^{R} \frac{1}{x}\sum_{n=1}^{\infty} \frac{\sin(nx)}{n!} \, dx \\ &= \sum_{n=1}^{\infty} \frac{1}{n!} \int_{0}^{R} \frac{\sin(nx)}{x} \, dx \\ &= \sum_{n=1}^{\infty} \frac{1}{n!} \operatorname{Si}(nR) \\ &= \sum_{n=1}^{\infty} \frac{1}{n!} \left( \frac{\pi}{2} + \mathcal{O}\left( (nR)^{-1} \right) \right) \\ &= \frac{\pi}{2}(e - 1) + \mathcal{O}(R^{-1}) \end{align*}

Letting $R \to \infty$ proves the claim.

• Not thought about a single contour and yet so simple! Conclusion: the author of the book lied lol (jk I know one does not have full vision on everything) Jan 9, 2018 at 8:03

More generally, if $$f(z)$$ is any function that has a Maclaurin series expansion that converges absolutely on the unit circle, then \begin{align} \int_{0}^{\infty} \frac{f(e^{ix}) - f(e^{-ix})}{x} \, \mathrm dx &= 2i \int_{0}^{\infty} \frac{1}{x} \sum_{n=0}^{\infty} \frac{f^{n}(0)}{n!} \, \sin(nx) \, \mathrm dx \\ &=2i \int_{0}^{\infty} \frac{1}{x} \sum_{n=1}^{\infty} \frac{f^{n}(0)}{n!} \, \sin(nx) \, \mathrm dx \\ &\overset{\spadesuit}{=} 2i \sum_{n=1}^{\infty} \frac{f^{(n)}(0)}{n!} \int_{0}^{\infty} \frac{\sin (nx)}{x} \, \mathrm dx \\ &= \pi i \sum_{n=1}^{\infty} \frac{f^{n}(0)}{n!} \\ &= \pi i \left(f(1) - f(0) \right). \end{align}

($$\spadesuit$$ See the addendum of Sangchul Lee's answer here.)

It's the case $$\alpha =0$$ of the formula I derived here.

If the Maclaurin series has a radius of converge greater than $$1$$, it will necessarily converge absolutely on the unit circle.

For $$f(z) = e^{z}$$, which is an entire function, we have $$\int_{0}^{\infty} \frac{e^{e^{ix}}-e^{e^{ix}}}{x} \, \mathrm dx= 2i \int_{0}^{\infty} \frac{e^{\cos x}\sin(\sin x)}{x} \, \mathrm dx = \pi i \left(e-1 \right).$$

Some other examples:

$$\int_{0}^{\infty} \frac{\sin(e^{ix})-\sin(e^{-ix})}{x} \, \mathrm dx = 2i \int_{0}^{\infty} \frac{\cos (\cos x) \sinh(\sin x)}{x} \, \mathrm dx = \pi i \sin(1)$$

$$\int_{0}^{\infty} \frac{\cos(e^{ix})-\cos(e^{-ix}) }{x} \, \mathrm dx = -2i\int_{0}^{\infty} \frac{\sin( \cos x) \sinh(\sin x)}{x} \, \mathrm dx = \pi i \left(\cos(1) - 1 \right)$$

$$\int_{0}^{\infty} \frac{\frac{1}{\Gamma(e^{ix})}-\frac{1}{\Gamma(e^{-ix})}}{x} \, \mathrm dx = \pi i$$

Due to the fact that these integrals don't converge absolutely, they're not easy to approximate numerically. Sometimes Wolfram Alpha returns bizarre approximations.

To get a rough approximation, you can make the upper limit "large" and tell Wolfram Alpha to use the midpoint method/rule with lots of intervals.

See here , here and here.

• $\displaystyle +1$. Quite nice. Nov 9 at 18:02
• @FelixMarin Thanks. Nov 9 at 18:32