An integral representation of Euler's constant $\gamma$ This is from wiki:
$$\gamma = - \int_0^\infty e^{-x} \ln x   d x .  $$
It is interesting as initially $\gamma $ is defined as a summation. But how to prove it? in an elementary way? 
 A: Hint:
By differentiating under the integral sign
$$\int_0^\infty x^te^{-x}\,dx=\Gamma(t+1)$$
you get
$$\int_0^\infty \log x\,e^{-x}\,dx=\Gamma'(1)=-\gamma.$$
A: $$
\begin{align}
\int_0^\infty\log(x)\,e^{-x}\,\mathrm{d}x
&=\lim_{n\to\infty}\int_0^n\log(x)\,\left(1-\frac xn\right)^n\,\mathrm{d}x\tag{1}\\
&=\lim_{n\to\infty}n\int_0^1\log(nx)\,(1-x)^n\,\mathrm{d}x\tag{2}\\
&=\lim_{n\to\infty}\left(\frac{n\log(n)}{n+1}+n\int_0^1\log(x)\,(1-x)^n\,\mathrm{d}x\right)\tag{3}\\
&=\lim_{n\to\infty}\left(\frac{n\log(n)}{n+1}+n\int_0^1\log(1-x)\,x^n\,\mathrm{d}x\right)\tag{4}\\
&=\lim_{n\to\infty}\left(\frac{n\log(n)}{n+1}-n\int_0^1\sum_{k=1}^\infty\frac{x^k}k\,x^n\,\mathrm{d}x\right)\tag{5}\\
&=\lim_{n\to\infty}\left(\frac{n\log(n)}{n+1}-n\sum_{k=1}^\infty\frac1{k(n+k+1)}\right)\tag{6}\\
&=\lim_{n\to\infty}\left(\frac{n\log(n)}{n+1}-\frac{n}{n+1}\sum_{k=1}^\infty\left(\frac1k-\frac1{n+k+1}\right)\right)\tag{7}\\
&=\lim_{n\to\infty}\left(\frac{n\log(n)}{n+1}-\frac{n}{n+1}H_{n+1}\right)\tag{8}\\[9pt]
&=-\gamma\tag{9}
\end{align}
$$
Explanation:
$(1)$: Monotone Convergence
$(2)$: substitute $x\mapsto nx$
$(3)$: $\log(nx)=\log(n)+\log(x)$
$(4)$: substitute $x\mapsto1-x$
$(5)$: use the series for $\log(1-x)$
$(6)$: integrate term by term
$(7)$: Partial Fractions
$(8)$: use formula for Extended Harmonic Numbers
$(9)$: definition of $\gamma$
A: The Laplace transform of $x^p$ (for $p > -1$) is $\Gamma(p+1) s^{-p-1}$.  Now 
$\ln x = \left. \dfrac{d}{dp} x^p \right|_{p=0}$, so (after justifying some interchange of limits) 
the Laplace transform of $\ln x$ is 
$$\eqalign{\left.\dfrac{d}{dp} \Gamma(p+1) s^{-p-1} \right|_{p=0} &= \left.\left(\Psi(p+1) \Gamma(p+1) s^{-p-1} -\Gamma(p+1) s^{-p-1} \ln(s)\right)\right|_{p=0}\cr
=\frac{-\gamma - \ln(s)}{s} }$$
Now take $s=1$.
A: We start by the fact 
$$\gamma = \lim_{n\to \infty} H_n -\log(n)$$
Then one can use it to prove
$$\tag {1}\Gamma(z) = \int^\infty_0 x^{z-1} e^{-x} \,dx= \frac{e^{-\gamma z}}{z} \prod_{n=1}^\infty \left(1+\frac{z}{n} \right)^{-1}e^{z/n}$$
Then we can deduce by taking log and differentiation
$$ \int^\infty_0 e^{-x} \log(x) dx = -\gamma$$
(1) is proven http://advancedintegrals.com/2016/12/weierstrass-representation-of-gamma-function-proof/
