Proving that $\int_{-1}^0 \frac{e^x+e^{1/x}-1}{x}dx=\gamma$

226 Views Asked by At

This came up while I was looking at the asymptotic behavior of $f(x)=\int_0^x \frac{e^t-1}{t}dt=\sum_{h=1}^\infty\frac{x^h}{h\cdot h!}$, which is a nice and entire function, as $x\to -\infty$, namely that I think $f(x)\sim -\ln(-x)-\gamma$ as $x\to -\infty$. I've reduced that to the problem of proving $$\int_{-1}^0 \frac{e^x+e^{1/x}-1}{x}dx=\gamma$$ where $\gamma\approx 0.577$ is the Euler-Mascheroni constant.

2

There are 2 best solutions below

5
On BEST ANSWER

First, enforce the substitution $x\to -1/x$, we obtain

$$\int_{-1}^0\frac{e^{1/x}}{x}\,dx=-\int_1^\infty \frac{e^{-x}}{x}\,dx \tag 1$$


Second, integrating by parts the integral on the right-hand side of $(1)$ with $u=e^{-x}$ and $v=\log(x)$ reveals

$$\begin{align} \int_{-1}^0\frac{e^{1/x}}{x}\,dx&=-\int_1^\infty e^{-x}\log(x)\,dx\\\\ &=-\int_0^\infty e^{-x}\log(x)\,dx+\int_0^1 e^{-x}\log(x)\,dx\\\\ &=\gamma +\int_0^1 e^{-x}\log(x)\,dx\tag 2 \end{align}$$


Finally, integrating by parts the integral on the right-hand side of $(2)$ with $u=\log(x)$ and $v=-(e^{-x}-1)$ reveals

$$\begin{align} \int_{-1}^0\frac{e^{1/x}}{x}\,dx&=\gamma +\int_0^1 \frac{e^{-x}-1}{x}\,dx\\\\ &=\gamma -\int_{-1}^0\frac{e^x-1}{x}\,dx \tag 3 \end{align}$$

whence solving $(3)$ for $\gamma$ yields the coveted relationship

$$\bbox[5px,border:2px solid #C0A000]{\gamma=\int_{-1}^0 \frac{e^x+e^{1/x}-1}{x}\,dx}$$

And we are done!


At the end of THIS ANSWER, I showed that $\gamma$ as given by $-\int_0^\infty \log(x)e^{-x}\,dx=\lim_{n\to \infty}\left(-\log(n)+\sum_{k=1}^n \frac1k\right)$, the latter of which is often given as the definition of $\gamma$.

2
On

I'm going to take a different approach than Dr. MV, and evaluate the integral directly. First, due to the singularity at $x=0$, the integral should be interpreted as $\displaystyle \lim_{\epsilon\to 0^-}\int_{-1}^\epsilon \frac{e^x+e^{1/x}-1}x dx$. With this in mind, we can integrate. $$\int\frac{e^x+e^{1/x}-1}x dx=\mathrm{Ei}(x)-\mathrm{Ei}\left(\frac1x\right)-\ln{x}+C\tag{1}$$ It's easy to see that the value at $x=-1$ is $-i\pi$, but the value near $0$ is a tad more complex (no pun intended). Luckily, the first term can be quickly disposed of: $$-\lim_{x\to 0^-}\mathrm{Ei}\left(\frac1x\right)=-\lim_{t\to\infty}\mathrm{Ei}(-t)=0.$$ This leaves us with $\displaystyle\lim_{x\to 0^-}\left[\mathrm{Ei}(x)-\ln{x}\right]$. For $x<0$, we can use the series expansion for $E_1(z)$ to write $$\mathrm{Ei}(x)=\gamma+\ln(-x)+\sum_{n=1}^\infty\frac{x^n}{n\,n!}.\tag{2}$$ We now have $$\lim_{x\to 0^-}\left[\mathrm{Ei}(x)-\ln{x}\right]=\lim_{x\to 0^-}\left[\gamma+\ln(-x)-\ln{x}+\sum_{n=1}^\infty\frac{x^n}{n\,n!}\right]=\gamma-i\pi\tag{3}$$ and may conclude that $$\int_{-1}^0\frac{e^x+e^{1/x}-1}x dx=\gamma+i\pi-i\pi=\gamma.\tag{4}$$ Q.E.D.