Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

This is my first question in this forum; I hope it is an appropriate question. The Wolframalpha website tells me that $$ \int_0^z\frac{1-e^x}{x} dx = \log (-z)+\Gamma(0, -z)+\gamma\quad \text{for}\quad \Re(z)<0. $$ I tried to prove this for myself, but I would appreciate it if you could give me some help. This is not a homework question, and I would appreciate it if someone could point me to a reference or tell me what you expect to happen when $ℜ(z)>0$. Thanks.

share|improve this question
I know what $\Gamma(z)$ means, but what does $\Gamma(0,z)$ mean? –  Srivatsan Oct 24 '11 at 21:37
@Srivatsan, incomplete gamma function (the "special values" section connects $\Gamma(0,z)$ to the exponential integral; don't know why Wolfram favors the former). –  Henning Makholm Oct 24 '11 at 21:38
@Henning: The incomplete gamma and exponential integral functions are essentially equivalent, anyway. I presume the use incomplete gamma since the internal algorithms for integration start out with hypergeometrics and specialize accordingly, incomplete gamma being one of the more convenient special cases. –  J. M. Oct 25 '11 at 1:21

3 Answers 3

up vote 9 down vote accepted

I believe that this works for both positive and negative $z$.

By definition and change of variables $$ \Gamma(0,-z)=\int_{-z}^\infty e^{-x}\frac{\mathrm{d}x}{x}=-\int_{-\infty}^z e^x\frac{\mathrm{d}x}{x}\tag{1} $$ where the principal value is taken where needed. Applying $(1)$ to the integral from $w$ to $z$: $$ \int_w^z\frac{1-e^x}{x}\mathrm{d}x=\log|z|-\log|w|+\Gamma(0,-z)-\Gamma(0,-w)\tag{2} $$ According to $(2)$, $$ \int_0^z\frac{1-e^x}{x}\mathrm{d}x=\log|z|+\Gamma(0,-z)-C\tag{3} $$ where $$ C=\lim_{w\to0}(\log|w|+\Gamma(0,|w|))\tag{4} $$ We can use $\Gamma(0,|w|)$ in $(4)$ since either $\Gamma(0,w)$ or $\Gamma(0,-w)$ is defined by a principal value integral, so we have $$ \lim_{w\to0}(\Gamma(0,-w)-\Gamma(0,w))=0 $$ Therefore, $$ \begin{align} C &=\lim_{w\to0}(\log|w|+\Gamma(0,|w|))\\ &=\lim_{w\to0}\left(\log|w|+\int_{|w|}^\infty e^{-x}\frac{\mathrm{d}x}{x}\right)\\ &=\lim_{w\to0}\left(\log|w|-\log|w|\;e^{-|w|}+\int_{|w|}^\infty\log(x)e^{-x}\mathrm{d}x\right)\\ &=\int_0^\infty\log(x)e^{-x}\mathrm{d}x\\ &=-\gamma\tag{6} \end{align} $$ where $\gamma$ is the Euler-Mascheroni Constant. Combining $(3)$ and $(6)$, we get $$ \int_0^z\frac{1-e^x}{x}\mathrm{d}x=\log|z|+\Gamma(0,-z)+\gamma\tag{7} $$ If there is interest, I can append a proof that $\int_0^\infty\log(x)e^{-x}\mathrm{d}x=-\gamma$.

share|improve this answer
Thank Robjonh, beautiful explanation! –  Gardel Oct 26 '11 at 0:53

First of all, you misquote WolframAlpha. It give $\int_0^z \left( 1- \mathrm{e}^x \right) \frac{\mathrm{d} x}{x} = \gamma + \log(-z) + \Gamma(0, -z)$. Notice $\Gamma(0, -z)$ instead of $\Gamma(0, z)$.

This is done using the fundamental theorem of calculus:

Let $$ F(x) = \int \left( 1- \mathrm{e}^x \right) \frac{\mathrm{d} x}{x} = \log(x) - \operatorname{Ei}(x) $$ Then, $\int_0^z \left( 1- \mathrm{e}^x \right) \frac{\mathrm{d} x}{x} = F(z) - \lim_{x\to 0^+} F(x) = F(z) + \gamma$. The latter limit follows from the Taylor series for the exponential integral.

The connection between $\Gamma(0,-z) = \int_{-z}^\infty \mathrm{e}^{-x} \frac{\mathrm{d} x}{x}$ and $\operatorname{Ei}(z) = \int_{-\infty}^z \mathrm{e}^{x} \frac{\mathrm{d} x}{x}$ is well known.

share|improve this answer
you are right to say that I quoted the wrong WolframAlpha. Thanks for the reply. One question, their answer is valid for all z? Thank you. –  Gardel Oct 25 '11 at 13:59



$\int_{0}^{z}\frac{1-e^{x}}{x} dx=-z-\frac{z^{2}}{2.2!}-\frac{z^{3}}{3.3!}...$

share|improve this answer
How does this help the OP? –  Pedro Tamaroff Mar 21 '12 at 4:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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