TITLE: Proving that $\int_{-1}^0 \frac{e^x+e^{1/x}-1}{x}dx=\gamma$
QUESTION [5 upvotes]: 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.

REPLY [3 votes]: 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.