# How to prove the result of this definite integral?

During my work I came up with this integral:

$$\mathcal{J} = \int_0^{+\infty} \frac{\sqrt{x}\ln(x)}{e^{\sqrt{x}}}\ \text{d}x$$

Mathematica has a very elegant and simple numerical result for this, which is

$$\mathcal{J} = 12 - 8\gamma$$

where $\gamma$ is the Euler-Mascheroni constant.

I tried to make some substitutions, but I failed. Any hint to proceed?

-

Enforce the substitution $x\to x^2$. Then, we have

\begin{align} \mathcal{I}&=4\int_0^\infty x^2\log(x)e^{-x}\,dx\\\\ &=4\left.\left(\frac{d}{da}\int_0^\infty x^{2+a}e^{-x}\,dx\right)\right|_{a=0}\\\\ &=4\left.\left(\frac{d}{da}\Gamma(a+3)\right)\right|_{a=0}\\\\ &=4\Gamma(3)\psi(3)\\\\ &=4(2!)(3/2-\gamma)\\\\ &=12-8\gamma \end{align}

as was to be shown!

Note the we used (i) the integral representation of the Gamma function

$$\Gamma(x)=\int_0^\infty t^{x-1}e^{-t}\,dt$$

(ii) the relationship between the digamma and Gamma functions

$$\psi(x)=\frac{\Gamma'(x)}{\Gamma(x)}$$

and (iii) the recurrence relationship

$$\psi(x+1)=\psi(x)+\frac1x$$

In addition, we used the special values

$$\Gamma(3)=2!$$

and

$$\psi(1)=-\gamma$$

-
Our answers are closed, but slightly different:) Tell me if you want me to remove mine. Thanks! – Olivier Oloa Mar 12 at 20:02
Awesome method! So fast and elegant haha, I should have thought about >.< Well.. this is more experience! Thanks!! – Beta Mar 12 at 20:03
@OlivierOloa Olivier, we are friends here on MSE. I would not begin to ask that you remove your very solid answer. - Mark – Dr. MV Mar 12 at 20:05
@1over137 Thank you! And you're welcome. My pleasure. - Mark – Dr. MV Mar 12 at 20:06
@Dr.MV Good answer! (+1) – Olivier Oloa Mar 12 at 20:07

Hint. One may recall that $$\int_0^\infty u^{s}e^{-u}\:du=\Gamma(s+1), \quad s>0,\tag1$$ giving, by differentiating under the integral sign, \begin{align} \int_0^\infty u^{2}\ln u \:e^{-u}\:du&=\left.\left(\Gamma(s+1)\right)'\right|_{s=2}\\\\ &=\left.\left(s(s-1)\Gamma(s-1)\right)'\right|_{s=2}\\\\ &=3+2\Gamma'(1)\\\\ &=3-2\gamma,\tag2 \end{align} where we have used $\Gamma'(1)=-\gamma$.

Then, one may rewrite the initial integral as $$2\int_0^\infty \sqrt{x}\:(\ln \sqrt{x}) \:e^{-\sqrt{x}}\:dx,$$ then perform the change of variable $x=u^2$, $dx=2udu$, obtaining \begin{align} \int_0^\infty \sqrt{x}\ln x \:e^{-\sqrt{x}}\:dx&=4\int_0^\infty u^{2}\ln u \:e^{-u}\:du.\tag3 \end{align} Considering $(2)$ and $(3)$ gives the announced result.

-
Cool way to solve it! Don't remove please, it's useful. I like to have more than 1 perspective! – Beta Mar 12 at 20:02
@1over137 Thank you. – Olivier Oloa Mar 12 at 20:04

Start from the well-known integral

$$-\gamma=\int_0^\infty\exp(-x)\log x\,\mathrm dx$$

A round of integration by parts yields

\begin{align*} -\gamma&=\int_0^\infty\exp(-x)\log x\,\mathrm dx\\ &=\int_0^\infty x\exp(-x)\log x\,\mathrm dx-\int_0^\infty x\exp(-x)\,\mathrm dx\\ 1-\gamma&=\int_0^\infty x\exp(-x)\log x\,\mathrm dx \end{align*}

A second round gives

\begin{align*} 1-\gamma&=\int_0^\infty x\exp(-x)\log x\,\mathrm dx\\ &=\int_0^\infty x\exp(-x)(x-1)(\log x-1)\,\mathrm dx\\ &=\int_0^\infty x\exp(-x)\,\mathrm dx-\int_0^\infty x^2\exp(-x)\,\mathrm dx-\int_0^\infty x\exp(-x)\log x\,\mathrm dx+\int_0^\infty x^2\exp(-x)\log x\,\mathrm dx\\ 3-2\gamma&=\int_0^\infty x^2\exp(-x)\log x\,\mathrm dx \end{align*}

where the last integral is the one obtained by Dr. MV after an appropriate substitution. Thus, the original integral is equal to $12-8\gamma$.

-