13

Look-alike integrals

$$I_1+I_2=\int_{-\infty}^{\infty}{e^x+1\over (e^x-x+1)^2+\pi^2}\mathrm dx=\int_{-\infty}^{\infty}{e^x+1\over (e^x+x+1)^2+\pi^2}\mathrm dx=1\tag1$$

I just wonder if these integrals $I_1$ and $I_2$ are the same in term of transforming is concern? Or they just only happened to give the same closed form?

If I make a substitution of $u=e^x+1$, nothing much happened

$$\int_{1}^{\infty}{u\over u-1}\cdot{\mathrm du\over (u-\ln{(u-1)})^2+\pi^2}=\int_{1}^{\infty}{u\over u-1}\cdot{\mathrm du\over (u+\ln{(u-1)})^2+\pi^2}\tag2$$

Note: I can't show it but I think $I_1$ and $I_2$ are not related in term of transforming into each other.

Else

How can we show that $I_1$ or $I_2$ has a value of one?

  • 2
    we had this kind of integrals before, i remember that @robjohn once wrote an excellent post about them – tired Jan 25 '17 at 11:46
  • Guess we must use the fact that both functions have nice poles at $x=\pm\pi i$. – Ivan Neretin Jan 25 '17 at 11:55
  • Thank you @tired I check it now – gymbvghjkgkjkhgfkl Jan 25 '17 at 11:57
  • Might be of possible interest: http://math.stackexchange.com/questions/45745/interesting-integral-related-to-the-omega-constant-lambert-w-function/207639#207639 – tired Jan 25 '17 at 12:05
  • 1
    Such integrals appear to be related with Gregory coefficients: https://en.wikipedia.org/wiki/Gregory_coefficients – Jack D'Aurizio Jan 25 '17 at 12:11
  • 1
    And that relation can be hinted from the complex-analytic proof. For instance, here is [(German-version of) a proof of related integrals](https://de.wikibooks.org/wiki/Formelsammlung_Mathematik:_Bestimmte_Integrale:_Form_R(x,exp)#2.5). (See the item 2.5 and then click 'Beweis' to expand the proof.) Certainly a small tweak will give you a proof for that identity. – Sangchul Lee Jan 25 '17 at 12:15

2 Answers2

18

We have that $\frac{e^x-1}{(e^x-x+1)^2+\pi^2}$ has a simple primitive, given by $\frac{1}{\pi}\arctan\frac{1+e^x-x}{\pi}$. It follows that:

$$ I_1 = \int_{-\infty}^{+\infty}\frac{e^x+1}{(e^x-x+1)^2+\pi^2}\,dx= 2\int_{-\infty}^{+\infty}\frac{dx}{(e^x-x+1)^2+\pi^2}$$ and the residue theorem gives the following

Lemma. If $a>0$ and $b\in\mathbb{R}$, $$ \int_{-\infty}^{+\infty}\frac{a^2\,dx}{(e^x-ax-b)^2+(a\pi)^2}=\frac{1}{1+W\left(\frac{1}{a}e^{-b/a}\right)} $$ where $W$ is Lambert's function.

In our case, by choosing $a=1$ and $b=-1$ we get that $I_1$ depends on $W(e)=1$ and equals $\color{red}{\large 1}$.

$I_2$ is easier to compute: $$ I_2 = \int_{-\infty}^{+\infty}\frac{e^x+1}{(e^x+x+1)^2+\pi^2}\,dx = \frac{1}{\pi}\,\left.\arctan\left(\frac{1+x+e^x}{\pi}\right)\right|_{-\infty}^{+\infty} = \color{red}{1}.$$


Addendum. Due to the identity $$\begin{eqnarray*} I_1 &=& \int_{0}^{+\infty}\frac{u+1}{u}\cdot\frac{du}{(u+1-\log u)^2+\pi^2}\\&=&\frac{1}{\pi}\int_{0}^{+\infty}\int_{0}^{+\infty}(u+1)u^{x-1}e^{-(u+1)x}\sin(\pi x)\,dx\,du\\&=&\frac{2}{\pi}\int_{0}^{+\infty} e^{-x} x^{-x}\Gamma(x)\sin(\pi x)\,dx\\&=&2\int_{0}^{+\infty}\frac{e^{-x} x^{-x}}{\Gamma(1-x)}\,dx\end{eqnarray*}$$ the previous Lemma also proves the highly non-trivial identity $$ \int_{0}^{+\infty}\frac{(ex)^{-x}}{\Gamma(1-x)}\,dx = \frac{1}{2} \tag{HNT}$$ equivalent to the claim $I_1=1$. It would be interesting to find an independent proof of $\text{(HNT)}$, maybe based on Glasser's master theorem, Ramanujan's master theorem or Lagrange inversion. There also is an interesting discrete analogue of $\text{(HNT)}$, $$ \sum_{n\geq 1}\frac{n^n}{n!(4e)^{n/2}}=1$$ that comes from the Lagrange inversion formula.

Jack D'Aurizio
  • 353,855
1

Preliminary Notes

This is similar in nature to this answer, where it is shown that $$ \int_{-\infty}^\infty\frac{\mathrm{d}x}{(e^x-x)^2+\pi^2}=\frac1{W_0(1)+1}\tag0 $$ In order to evaluate $$ \int_{-\infty}^\infty\frac{e^x+1}{(e^x+x+1)^2+\pi^2}\,\mathrm{d}x\tag1 $$ we will use $\newcommand{\Res}{\operatorname*{Res}}\newcommand{\W}{\operatorname{W}}\newcommand{\mapsfrom}{\mathrel{\unicode{x21a4}}}$ $$ \Res_{z=\pm\pi i}\left(\frac{e^z+1}{\left(e^z+z+1\right)^2+\pi^2}\right) =\pm\frac1{\pi i}\tag2 $$ and $$ \Res_{\substack{e^z+z+1=\pm i\pi\\z\ne\pm\pi i}}\left(\frac{e^z+1}{\left(e^z+z+1\right)^2+\pi^2}\right) =\pm\frac1{2\pi i}\tag3 $$


Locating the Singularities

In this answer, we are only using the singularities in the upper half plane. Since the integrand is real on the real line, the singularities are reflected in the lower half plane with conjugate residues.

To solve $$ e^z+z+1=\pm i\pi\tag4 $$ we will write $(4)$ as $$ e^x\cos(y)+ie^x\sin(y)+x+iy+1=\pm i\pi\tag5 $$ The real part of $(5)$ can be solved as $$ x=\log\left(\W\left(\frac{\cos(y)}e\right)\sec(y)\right)\tag6 $$ and the imaginary part of $(5)$ can be solved as $$ x=\log\left(\frac{\pm\pi-y}{\sin(y)}\right)\tag7 $$ Combining $(6)$ and $(7)$, we get $$ \W_k\left(\frac{\cos(y)}e\right)\tan(y)+y=\pm\pi\tag8 $$ Since $y$ in $(8)$ is real, we will only be interested in $k\in\{-1,0\}$.

For $k=0$, the only solutions to $(8)$ are $y=\pm\pi$. Since these are solutions for any $k$, we need only consider $k=-1$.


Approximating the Singularities

Using $y=\frac{4k+3}2\pi-\delta$, and $\sin(y)\approx-1$, $\cos(y)\approx-\delta$, and $\tan(\delta)\approx\frac1\delta$, we can approximate solutions to $$ \W\left(\frac{\cos(y)}e\right)\tan(y)+y=\pm\pi\tag9 $$ by $$ \delta=\frac{1+\log\left(\frac{4k+3\mp2}2\pi\right)}{\frac{4k+3\mp2}2\pi}\tag{10} $$ Thus, we have $$ y_k^{\pm}\approx\frac{4k+3}2\pi-\frac{1+\log\left(\frac{4k+3\mp2}2\pi\right)}{\frac{4k+3\mp2}2\pi}\tag{11} $$ and we can use $(7)$ to get $$ x_k^{\pm}\approx\log\left(\frac{4k+3\mp2}2\pi\right)\tag{12} $$ Using $(11)$ and $(12)$ to approximate $z_k^{\pm}=x_k^{\pm}+iy_k^{\pm}$, we can refine the approximation with the Newton's method recursion $$ z\mapsfrom z-\frac{e^z+z+1\mp\pi i}{e^z+1}\tag{13} $$

Furthermore, for $k\ge1$, $(11)$ and $(12)$ lead to $$ \left|\,z_k^+-z_k^-\,\right|\le\frac1k\tag{14} $$


Contour Integration

For $k\ge1$, $z_k^{\pm}$ occur in pairs whose residues cancel and whose imaginary parts are approximately $\frac32\pi$ mod $2\pi$. Therefore, $$ \int_{-\infty}^\infty\frac{e^x+1}{\left(e^x+x+2\pi i+1\right)^2+\pi^2}\,\mathrm{d}x=\int_{-\infty}^\infty\frac{e^x+1}{\left(e^x+x+2k\pi i+1\right)^2+\pi^2}\,\mathrm{d}x\tag{14} $$ The right side tends to $0$ as $k\to\infty$, therefore, the integral on the left is $0$.

The only two residues that do not cancel are those for $$ z_0^+=\pi i\quad\text{with residue}\quad\frac1{\pi i}\tag{15a} $$ and $$ z_0^-=2.0888430156+4.3198966321i\quad\text{with residue}\quad-\frac1{2\pi i}\tag{15b} $$ Applying $(14)$ and $(15)$ and using the contour (as $R\to\infty$) $$ \overbrace{[-R,R]}^{\to(1)}\cup\overbrace{[R,R+2\pi i]}^{\to0}\cup\overbrace{[R+2\pi i,-R+2\pi i]}^{\to0\text{ by }(14)}\cup\overbrace{[-R+2\pi i,-R]}^{\to0} $$ we get $$ \begin{align} \int_{-\infty}^\infty\frac{e^x+1}{(e^x+x+1)^2+\pi^2}\,\mathrm{d}x &=\int_\gamma\frac{e^z+1}{(e^z+z+1)^2+\pi^2}\,\mathrm{d}z\\ &=2\pi i\left(\frac1{\pi i}-\frac1{2\pi i}\right)\\[6pt] &=1 \end{align} $$

robjohn
  • 345,667
  • Note that this is much more complicated than simply using $u=e^x+x+1$. Doh! However, it does display some techniques that are useful in more complicated situations. – robjohn Aug 06 '20 at 21:09