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.

  • $\begingroup$ Are you familiar with the exponential integral? $\endgroup$ – teadawg1337 Jan 21 '17 at 17:52
  • $\begingroup$ @Dr.MV That's true if $x$ is positive, but what about $\displaystyle\lim_{x\to 0^-}e^{1/x}$? $\endgroup$ – teadawg1337 Jan 21 '17 at 17:55
  • 1
    $\begingroup$ Mathematica shows that result, so it's converge. $\endgroup$ – Nosrati Jan 21 '17 at 17:57

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$.

  • $\begingroup$ OK. Good job... $\endgroup$ – Nosrati Jan 21 '17 at 19:51
  • $\begingroup$ @myglasses Thank you! Much appreciative. $\endgroup$ – Mark Viola Jan 21 '17 at 19:55
  • $\begingroup$ You beat me to the punch... I became distracted in the midst of writing up my answer, but I've posted it anyway as a second approach. Your proof is better than mine, though! $\endgroup$ – teadawg1337 Jan 21 '17 at 20:12
  • 1
    $\begingroup$ How did you find $\int_0^\infty e^{-x}\ln(x)dx=-\gamma$? By using the power series of $e^{-x}$, switching the sum and integral and integrating termwise I got $\int_0^z e^{-x}\ln(x)dx=(1-e^{-z})\ln(z)+f(-z)$ which means the asymptotic statement I'm after and this integral are equivalent. $\endgroup$ – Sophie Jan 21 '17 at 20:46
  • 2
    $\begingroup$ Sophie. How do you define $\gamma$? If one uses the limit definition, $\gamma=\lim_{n\to \infty}\left(H_n-\log(n)\right)$,then have a look at the following. $$\int_0^\infty \log(x) e^{-x}\,dx=\lim_{n\to \infty}\int_0^n \left(1-\frac xn \right)^n\,\log(x)\,dx$$Now, let $u=1-x/n$, expand the logarithm in a Taylor series, integrate term by term and you will recover the limit definition of $\gamma$. $\endgroup$ – Mark Viola Jan 21 '17 at 20:57

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.

  • $\begingroup$ This works. My resistance to appealing to the Exponential Integral and its expansion ia that one might ask, "How does one arrive at the leading term?" But (+1) for the solution. $\endgroup$ – Mark Viola Jan 21 '17 at 20:26
  • $\begingroup$ @Dr.MV Fair enough. From my limited understanding, it appears to have something to do with the derivative of the Gamma function. In fact, the expansion for $\displaystyle\int\frac{\mathrm{Ei}(x)}{x}dx$ includes $\displaystyle\frac{\partial^2}{\partial x^2}\left[\frac{\Gamma(x)}2\right]_{x=1}$ $\endgroup$ – teadawg1337 Jan 21 '17 at 20:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.