42

I am looking for real analytic methods to prove the following: $$\int_{-\infty}^{\infty} \frac{dx}{(e^x+x+1)^2+\pi^2}=\frac{2}{3}$$ I have seen a similar problem on the website but if I remember correctly, the posted solution uses contour integration.

Using $\int_0^{\infty} e^{-ax}\sin(bx)\,dx=\frac{b}{a^2+b^2}$, I wrote the integral as:

$$\frac{1}{\pi}\int_{-\infty}^{\infty} \int_0^{\infty} e^{-(e^x+x+1)t}\sin(\pi t)\,dt\,dx=\frac{1}{\pi}\int_0^{\infty} e^{-t}\sin(\pi t)\left(\int_{-\infty}^{\infty} e^{-e^x t}e^{-xt}\,dx\right)\,dt$$ Next, I tried the substitution $e^{x}t=y$ but that didn't make things easier.

Any help is appreciated. Thanks!

Harry Peter
  • 8,193
Pranav Arora
  • 11,315

3 Answers3

32

I hate to do this because the OP asked for real methods, but the only way I see to do this integral is using an inherently complex method, i.e., the residue theorem. Nor could I find the problem solved on this site in that way.

First sub $x=\log{u}$ in the integral and get that the integral is equal to

$$\int_0^{\infty} \frac{du}{u \left [(u+1+\log{u})^2 + \pi^2\right ]} $$

Now consider the following contour integral in the complex plane

$$\oint_C \frac{dz}{z (z+1+\log{z}-i \pi)} $$

where $C$ is a keyhole contour of outer radius $R$ and inner radius $\epsilon$ about the positive real axis. The contour integral is equal to

$$\int_{\epsilon}^R \frac{dx}{x (x+1+\log{x}-i \pi )} + i R \int_0^{2 \pi} d\theta \, \frac{e^{i \theta}}{R e^{i \theta} (R e^{i \theta} + 1 + \log{\left ( R e^{i \theta}\right )-i \pi)}} \\ + \int_R^{\epsilon} \frac{dx}{x (x+1+\log{x}+i \pi )}+i \epsilon \int_{2 \pi}^0 d\phi \, \frac{e^{i \phi}}{\epsilon e^{i \phi} (\epsilon e^{i \phi} + 1 + \log{\left ( \epsilon e^{i \phi}\right )-i \pi)}} $$

In the limit as $R \to \infty$, the magnitude of the second integral vanishes as $2 \pi/R$. As $\epsilon \to 0$, the magnitude of the fourth integral vanishes as $2 \pi/\log{\epsilon}$. Thus, in this limit, the contour integral is equal to

$$\int_0^{\infty} \frac{dx}{x(x+1+\log{x}-i \pi)} - \int_0^{\infty} \frac{dx}{x(x+1+\log{x}+i \pi)} \\= i 2 \pi \int_0^{\infty} \frac{dx}{x \left[(x+1+\log{x})^2+\pi^2\right]}$$

By the residue theorem, the contour integral is also equal to $i 2 \pi$ times the sum of the residues at the poles of the integrand inside $C$, i.e. outside the origin and the positive real axis. Now, the only pole inside $C$ is at $z=-1$ (this may be verified by examining the polar form of $z$). Also, the pole at $z=-1$ is a double pole; this may be seen by observing that $y+\log{(1-y)} \sim -y^2/2$ as $y \to 0$.

Thus, we need to compute the residue at $z=-1$ as follows:

$$\begin{align}\operatorname*{Res}_{z=-1} \frac{1}{z (z+1+\log{z}-i \pi)} &= \lim_{z\to -1}\left [\frac{d}{dz} \frac{(z+1)^2}{z (z+1+\log{z}-i \pi)} \right ]\\ &= -\lim_{y\to 0} \left [\frac{d}{dy} \frac{y^2}{(1-y) [y+\log{(1-y)}]} \right ] \\ &= -\lim_{y\to 0} \left [ \frac{y (2 y+(2-y) \log (1-y))}{(1-y)^2 (y+\log (1-y))^2}\right ] \end{align}$$

This limit is a tricky one. The numerator may be expanded in a series as follows:

$$\begin{align}-y (2 y +(2-y) \log{(1-y)}) &= -y \left (2 y - 2 y + y^2 - y^2 - \frac{2}{3} y^3 + \frac12 y^3 + O(y^4)\right )\\ &= \frac16 y^4 + O(y^5)\end{align}$$

The denominator is $y^4/4+O(y^5)$; thus we may say that the limit in question, and therefore the residue, is $2/3$. By the residue theorem

$$i 2 \pi \int_0^{\infty} \frac{dx}{x \left[(x+1+\log{x})^2+\pi^2\right]} = i 2 \pi \frac{2}{3}$$

or

$$\int_{-\infty}^{\infty} \frac{dx}{(e^x+x+1)^2+\pi^2} = \frac{2}{3}$$

Ron Gordon
  • 141,538
  • 2
    Two related problems: $[1]$ and $[2]$. – Venus Dec 07 '14 at 12:17
  • 1
    @Venus: Sort of. This problem is fantastic because we don't have to go near anything as complicated as Lambert W-functions. By defining the contour integral correctly, we get a pole at $z=-1$. Simple and beautiful, yet highly nontrivial. – Ron Gordon Dec 07 '14 at 12:24
  • +1. At first sight it seems there is not any other method besides the present one. – Felix Marin Dec 07 '14 at 23:17
  • @FelixMarin: I imagine you gave it the old college try. I did too. – Ron Gordon Dec 07 '14 at 23:18
  • It's true but I was not aware of the pole which is the right key to get the solution. – Felix Marin Dec 08 '14 at 18:49
  • @FelixMarin: it's kind of weird but my first instinct was to induce the log and factor as I did. It wasn't until after I solved the problem did it occur to me that the pole of the original integrand was at $\pm i \pi$. (Slaps forehead.) – Ron Gordon Dec 08 '14 at 18:51
  • 2
    With regard to the addendum, there are actually infinitely many poles in the upper half-plane. The denominator has zeroes at $z= -W_{k} \left(-\frac{1}{e} \right)-1 \pm i \pi$ where $W_{k}$ is the $k$th branch of the Lambert W function. And infinitely many of those points are in the upper half-plane. I noticed this a while ago, but I was reluctant to say anything. – Random Variable Dec 26 '14 at 17:45
  • @RandomVariable: Thanks for pointing this out. I need to have a look to verify this, but I have not had time yet. – Ron Gordon Dec 31 '14 at 19:22
  • @RonGordon I apologize, I made a mistake. Your solution and the solution in Wikipedia is correct. –  Feb 12 '16 at 22:44
6

Here's a partial answer that uses differentiation under the integral sign and the Lambert $W$ function. (Note: I'm an amateur at best when it comes to these challenging integrals, so I'd be delighted to be corrected at any time if anyone sees a mistake.)

First, parameterize the integral by $$\mathcal{I}_a=\int_{-\infty}^\infty \frac{\mathrm{d}x}{\pi^2+\left(e^{ax}+ax+1\right)^2}\,\mathrm{d}x$$ Differentiating with respect to $a$ yields $$\frac{\partial}{\partial a}\mathcal{I}_a=\int_{-\infty}^\infty \frac{-2x\left(e^{ax}+ax+1\right)\left(e^{ax}+1\right)}{\left(\pi^2+\left(e^{ax}+ax+1\right)^2\right)^2}\,\mathrm{d}x$$ Substituting $u=e^{ax}+ax+1$ gives $\mathrm{d}u=a\left(e^{ax}+1\right)\,\mathrm{d}x$, so we have $$\frac{\partial}{\partial a}\mathcal{I}_a=-\frac{2}{a^2}\int_{-\infty}^\infty\frac{u^2-u+u\,W\left(e^{u-1}\right)}{\left(\pi^2+u^2\right)^2}\,\mathrm{d}u$$ Integrating with respect to $a$, we get $$\mathcal{I}_a=\frac{2}{a}\int_{-\infty}^\infty\frac{u^2-u+u\,W\left(e^{u-1}\right)}{\left(\pi^2+u^2\right)^2}\,\mathrm{d}u+C$$ and noting that $\mathcal{I}_a\to0$ as $a\to\infty$, we have that $C=0$.

So, we're left with $$\mathcal{I}_1=\mathcal{I}=2\int_{-\infty}^\infty\frac{u^2-u+u\,\color{red}{W\left(e^{u-1}\right)}}{\left(\pi^2+u^2\right)^2}\,\mathrm{d}u=\mathcal{J}_1+\mathcal{J}_2+\mathcal{J}_3$$ where the red term is obtained by solving $u=e^{ax}+ax+1$ for $x$.

It's easy to show that $$\mathcal{J}_1=\int_{-\infty}^\infty \frac{u^2}{\left(\pi^2+u^2\right)^2}\,\mathrm{d}u=\frac{1}{2}$$ and $$\mathcal{J}_2=\int_{-\infty}^\infty \frac{u}{\left(\pi^2+u^2\right)^2}\,\mathrm{d}u=0$$ but I'm not yet sure how to tackle the remaining integral, $$\mathcal{J}_3=\int_{-\infty}^\infty \frac{u\,W\left(e^{u-1}\right)}{\left(\pi^2+u^2\right)^2}\,\mathrm{d}u$$ In any case, we see that $$\mathcal{I}=2\left(\frac{1}{2}-0+\mathcal{J}_3\right)=1+2\mathcal{J}_3$$ so it suffices to verify that $\mathcal{J}_3=\dfrac{1}{6}$. (Like I said - partial answer.)

user170231
  • 25,320
0

We consider the integral:

$$ I = \int_{ - \infty }^{ + \infty } \frac{1}{\left( e^x + x + 1 \right)^2 + \pi^2} \, dx $$

We express the denominator as a product of conjugates:

\begin{align} I &= \int_{ - \infty }^{ + \infty } \frac{1}{\left( e^x + x + 1 + i\pi \right)\left( e^x + x + 1 - i\pi \right)} \, dx \\ &= \frac{1}{2i\pi} \int_{ - \infty }^{ + \infty } \left( \frac{1}{e^x + x + 1 - i\pi} - \frac{1}{e^x + x + 1 + i\pi} \right) dx \end{align}

We make the substitution $x = z \pm i\pi$ in the integrals:

\begin{align} I &= \frac{1}{2i\pi} \left( \int_{ - \infty }^{ + \infty } \frac{1}{-e^{x - i\pi} + (x - i\pi) + 1} \, dx - \int_{ - \infty }^{ + \infty } \frac{1}{-e^{x + i\pi} + (x + i\pi) + 1} \, dx \right) \\ &= \frac{1}{2i\pi} \left( \int_{ -\infty - i\pi }^{ +\infty - i\pi } \frac{1}{ -e^z + z + 1 } \, dz - \int_{ -\infty + i\pi }^{ +\infty + i\pi } \frac{1}{ -e^z + z + 1 } \, dz \right) \\ &= \frac{1}{2i\pi} \left( \int_{ -\infty - i\pi }^{ +\infty - i\pi } \frac{1}{ -e^z + z + 1 } \, dz + \int_{ +\infty + i\pi }^{ -\infty + i\pi } \frac{1}{ -e^z + z + 1 } \, dz \right) \end{align}

Let $f(z) = \frac{1}{ -e^z + z + 1 }$, and consider the rectangle $\gamma$ with vertices at $A(-M, -\pi)$, $B(M, -\pi)$, $C(M, \pi)$, and $D(-M, \pi)$, where $M > 0$.

Since $f(z)$ is analytic inside $\gamma$ except at poles, and $f(z) \ne 0$ on $\gamma$, and $\lim_{M \to \pm \infty} f(z) = 0$, we apply the residue theorem:

$$ I = \frac{1}{2i\pi} \cdot \lim_{M \to \infty} \oint_\gamma f(z) \, dz $$

By the residue theorem:

$$ \oint_\gamma f(z) \, dz = 2i\pi \sum_k \text{Res}(f(z), z_k) $$

We solve the pole condition:

$$ -e^z + z + 1 = 0 \Rightarrow e^{x+iy} = x + iy + 1 $$

Equating real and imaginary parts:

$$ e^x (\cos y + i \sin y) = x + 1 + iy \Rightarrow \begin{cases} e^x \cos y = x + 1 \\ e^x \sin y = y \end{cases} \quad \text{(System } \Sigma \text{)} $$

An obvious solution is $z = 0$. Also, $y \ne \pm \pi, \pm \frac{\pi}{2}$ since these don't satisfy system $\Sigma$.

Solving $\Sigma$:

$$ \begin{cases} e^x = \dfrac{y}{\sin y} \\ \dfrac{y}{\sin y} \cos y - \log\left( \dfrac{y}{\sin y} \right) - 1 = 0 \end{cases} $$

So it's enough to analyze the function:

$$ g(y) = \frac{y}{\sin y} \cos y - \log\left( \frac{y}{\sin y} \right) - 1 $$

We restrict to $D^* = \left(-\frac{\pi}{2}, \frac{\pi}{2} \right) \setminus \{0\}$ since on $D - D^*$ it's clear $g(y) < 0$.

Compute derivative:

$$ g'(y) = -\frac{1}{y} \left( \frac{(\sin y - y \cos y)^2}{\sin^2 y} + y^2 \right) $$

So:

\begin{cases} g'(y) < 0 &\text{for } y \in (0, \frac{\pi}{2}) \\ g'(y) > 0 &\text{for } y \in (-\frac{\pi}{2}, 0) \end{cases}

And since $\lim_{y \to 0} g(y) = 0$, we conclude $g(y) < 0$ for all $y \in D^*$.

Hence, $f(z)$ has only a real pole at $z = 0$ in the strip.

We solve:

$$ e^x - x - 1 = 0 \Rightarrow \text{only solution is } x = 0 $$

And since

$$ e^x - x - 1 = \frac{x^2}{2} + \frac{x^3}{6} + \frac{x^4}{24} + \cdots $$

$x=0$ is a double root.

Therefore:

$$ \oint_\gamma f(z) \, dz = 2i\pi \cdot \text{Res}(f(z), 0) = 2i\pi \cdot \lim_{z \to 0} \frac{d}{dz} \left( \frac{z^2}{ -e^z + z + 1 } \right) = \frac{4i\pi}{3} $$

Finally:

$$ I = \frac{1}{2i\pi} \cdot \oint_\gamma f(z) \, dz = \frac{1}{2i\pi} \cdot \frac{4i\pi}{3} = \frac{2}{3} $$