0
$\begingroup$

For quite sometime I have been stuck. I do not know how to approach this problem. Bear with me if this is already asked:

How can I evaluate $\int_0^\infty\ln(x)e^{-x} dx$?

My trial so far is to use integration by parts but i have no idea how to do it:

$$ \begin{aligned} \text{let } U=&~\ln(x) &dv=e^{-x}dx\\ du =&~\frac{1}{x}dx&V=-e^{-x}\\ \int_0^\infty \ln(x)e^xdx =& -\ln(x)e^{-x}{\LARGE|}_{0}^\infty +\int_0^\infty \frac{e^{-x}}{x}dx \end{aligned} $$

But this doesn't seem right since the first part seems to go to infinity instead of a constant value. Also iI cannot even do the second part. Using R's integrate(function(x) log(x)*exp(-x), 0, Inf) I get -0.57721567 which shows that this integration exists. Can someone help me out?

$\endgroup$
5
  • 3
    $\begingroup$ Your original integral diverges on the $\to\infty$ side, so this can't have an answer. Did you mean $e^{-x}$ ? $\endgroup$ – Ninad Munshi Aug 28 '20 at 4:14
  • 1
    $\begingroup$ There seems to be a discrepancy. Is it $lnx.e^x$ or $lnx.e^{-x}$ ? $\endgroup$ – gemspark Aug 28 '20 at 4:19
  • $\begingroup$ @NinadMunshi you are right. It should be $e^{-x}$ $\endgroup$ – Onyambu Aug 28 '20 at 4:24
  • $\begingroup$ en.wikipedia.org/wiki/… $\endgroup$ – Andrei Aug 28 '20 at 4:26
  • $\begingroup$ The value of your integral is $-\gamma$, where $\gamma$ is the Euler-Mascheroni Constant. It can be taken as the definition of $\gamma$. $\endgroup$ – Mark Viola Aug 28 '20 at 4:29
4
$\begingroup$

By Feynman trick we have that

$$\int_0^\infty\log x \: e^{-x}\:dx = \frac{d}{da}\int_0^\infty x^a e^{-x}\:dx\Biggr|_{a=0} = \Gamma'(1)$$

where $\Gamma(a)$ is the Gamma function.

$\endgroup$
6
  • $\begingroup$ But what is $a$ ? I need to get -0.57721567 as the answer $\endgroup$ – Onyambu Aug 28 '20 at 4:25
  • $\begingroup$ why did you change the $log(x)$ to $x^a$ ? Are there any links? Sorry I am not that good in math. Also in my trial above, Is there a way to approach the second integral? $\endgroup$ – Onyambu Aug 28 '20 at 4:36
  • $\begingroup$ Thanks for the trick. Looked through and I do understand now $\endgroup$ – Onyambu Aug 28 '20 at 4:55
  • $\begingroup$ @Onyambu because $\log x \cdot x^a \implies \frac{d}{da}x^a$ by derivative rules. We just insert an $x^a$ in the original integral since $x^0=1$ was there all along. Your integral above is a transcendental function called exponential integral function. But the integration by parts adds a divergence at $x=0$ where none existed in the original integral. $\endgroup$ – Ninad Munshi Aug 28 '20 at 4:56
  • $\begingroup$ Thanks so much. If you do not mind, could you share some light with regards to proving the exponential integral function? or do we just take that as a definition? $\endgroup$ – Onyambu Aug 28 '20 at 5:00

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.