Why is:
$$\int_0^\infty\log(x)e^{-x^2}dx=-\frac{\sqrt\pi}4(\gamma+\log4)$$
And does anybody have a reference?
Why is:
$$\int_0^\infty\log(x)e^{-x^2}dx=-\frac{\sqrt\pi}4(\gamma+\log4)$$
And does anybody have a reference?
For $p > -1$, using the change of variables $t = x^2$,
$$ \int_0^\infty x^p \exp(-x^2) \; dx = \dfrac{1}{2} \int_0^\infty t^{(p-1)/2} e^{-t}\; dt = \dfrac{\Gamma((p+1)/2)}{2} $$
Now take the derivative with respect to $p$ at $p=0$.
This answer simply serves to fill in some of the details of Robert Israel's and Claude Leibovici's answers.
Computing the Integral in Terms of $\boldsymbol{\Gamma^{\hspace{.25mm}\prime}\hspace{-1.5mm}\left(\frac12\right)}$
As Robert Israel points out $$ \begin{align} \int_0^\infty x^\alpha\,e^{-x^2}\,\mathrm{d}x &=\frac12\int_0^\infty x^{\frac{\alpha-1}2}\,e^{-x}\,\mathrm{d}x\\ &=\frac12\Gamma\left(\frac{\alpha+1}2\right)\tag{1} \end{align} $$ and taking the derivative at $\alpha=0$ gives $$ \int_0^\infty\log(x)\,e^{-x^2}\,\mathrm{d}x=\frac{\Gamma^{\hspace{.25mm}\prime}\hspace{-1.5mm}\left(\frac12\right)}4\tag{2} $$
Computing $\boldsymbol{\Gamma^{\hspace{.25mm}\prime}\hspace{-1.5mm}\left(\frac12\right)}$
As Claude Leibovici notes, $\Gamma^{\hspace{.25mm}\prime}\hspace{-1.5mm}\left(x\right)$ is related to $\psi(x)$.
Consider the Digamma function $$ \begin{align} \psi(x) &=\frac{\Gamma^{\hspace{.25mm}\prime}\hspace{-1.5mm}\left(x\right)}{\Gamma(x)}\\ &=\frac{\mathrm{d}}{\mathrm{d}x}\log(\Gamma(x))\tag{3} \end{align} $$ The relation $\Gamma(x+1)=x\Gamma(x)$ and $(3)$ yields $$ \psi(x+1)=\frac1x+\psi(x)\tag{4} $$ Thus, using $H(n)=\log(n)+\gamma+O\!\left(\frac1n\right)$, we get $$ \begin{align} \psi\left(n+\tfrac12\right)-\psi\left(\tfrac12\right) &=\sum_{k=1}^n\frac1{k-\frac12}\\ &=2\sum_{k=1}^n\frac1{2k-1}\\[3pt] &=2H(2n)-H(n)\\[6pt] &=\log(n)+2\log(2)+\gamma+O\!\left(\frac1n\right)\tag{5} \end{align} $$ The Mean Value Theorem says that there is a $\xi_-\in(x-1,x)$ so that $$ \begin{align} \log(x-1) &=\log(\Gamma(x))-\log(\Gamma(x-1))\\ &=\frac{\mathrm{d}}{\mathrm{d}x}\log(\Gamma(\xi_-))\tag{6} \end{align} $$ Furthermore, there is a $\xi_+\in(x,x+1)$ so that $$ \begin{align} \log(x) &=\log(\Gamma(x+1))-\log(\Gamma(x))\\ &=\frac{\mathrm{d}}{\mathrm{d}x}\log(\Gamma(\xi_+))\tag{7} \end{align} $$ Since $\log(\Gamma(x))$ is convex, $(6)$ and $(7)$ say that $$ \log(x-1)\le\frac{\mathrm{d}}{\mathrm{d}x}\log(\Gamma(x))\le\log(x)\tag{8} $$ Thus, $(3)$ and $(8)$ imply that $\psi\!\left(n+\frac12\right)=\log(n)+O\!\left(\frac1n\right)$ and therefore, $(5)$ says $$ \psi\left(\tfrac12\right)=-2\log(2)-\gamma\tag{9} $$ Since $\Gamma\!\left(\frac12\right)=\sqrt\pi$, $(3)$ and $(9)$ imply $$ \Gamma^{\hspace{.25mm}\prime}\hspace{-1.5mm}\left(\tfrac12\right)=-\sqrt\pi\,(2\log(2)+\gamma)\tag{10} $$
Summary
Therefore, $(2)$ and $(10)$ yield $$ \int_0^\infty\log(x)\,e^{-x^2}\,\mathrm{d}x=-\frac{\sqrt\pi}4(2\log(2)+\gamma)\tag{11} $$
Another solution is to compute the antiderivative; using integration by parts $$ \int\log (x)\,e^{-x^2}\,dx=\frac{1}{2} \sqrt{\pi } \text{erf}(x) \log (x)-\frac{\sqrt{\pi }}{2}\int\frac{\text{erf}(x)}{x}\,dx$$ $$ \int\log (x)\,e^{-x^2}\,dx=\frac{1}{2} \sqrt{\pi } \text{erf}(x) \log (x)-x \, _2F_2\left(\frac{1}{2},\frac{1}{2};\frac{3}{2},\frac{3}{2};-x^2\right)$$ $$ \int_0^t\log (x)\,e^{-x^2}\,dx=\frac{ \sqrt{\pi }}{2} \text{erf}(t) \log (t)-t \, _2F_2\left(\frac{1}{2},\frac{1}{2};\frac{3}{2},\frac{3}{2};-t^2\right)$$ the asymptotics of which being $$e^{-t^2} \left(-\frac{\log \left(t\right)}{2 t}+O\left(\frac{1}{t^3}\right)\right)+\left(\frac{\sqrt{\pi }}{4} \psi ^{(0)}\left(\frac{1}{2}\right)+O\left(\frac{1}{t^3}\right)\right)$$ Then, if $t\to \infty$, then $$ \int_0^\infty\log (x)\,e^{-x^2}\,dx=\frac{1}{4} \sqrt{\pi } \psi ^{(0)}\left(\frac{1}{2}\right)=-\frac{\sqrt{\pi }}{4} (\gamma +\log (4))$$ It is sure that Robert Israel's solution is faster, simpler and definitely more elegant.