Integration with exponential constant How can I find $$\int_0^\infty \frac{2\left(e^{-t^2} -e^{-t}\right)}{t}\ dt$$
I have been told the answer is $\gamma$, the Euler-Mascheroni constant, but do not understand how this is derived.
 A: A related technique. Consider the more general integral (see Mellin transform)
$$ I = 2 \int_{0}^{\infty} t^{s-1} (e^{-t^2}-e^{-t})\,dt = \Gamma(s/2)-2\,\Gamma(s). $$
Now, take the limit as $s\to 0$ which gives you the desired result.
Note: 
1) To evaluate the above integral you can use the gamma function.
2) To  find the limit, use the series 

$$ \Gamma(z) = \frac1z-\gamma+\frac16\left(3\gamma^2+\frac {\pi^2}2\right)z+O(z^2). $$

A: $\newcommand{\+}{^{\dagger}}
 \newcommand{\angles}[1]{\left\langle #1 \right\rangle}
 \newcommand{\braces}[1]{\left\lbrace #1 \right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack #1 \right\rbrack}
 \newcommand{\ceil}[1]{\,\left\lceil #1 \right\rceil\,}
 \newcommand{\dd}{{\rm d}}
 \newcommand{\down}{\downarrow}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\equalby}[1]{{#1 \atop {= \atop \vphantom{\huge A}}}}
 \newcommand{\expo}[1]{\,{\rm e}^{#1}\,}
 \newcommand{\fermi}{\,{\rm f}}
 \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,}
 \newcommand{\half}{{1 \over 2}}
 \newcommand{\ic}{{\rm i}}
 \newcommand{\iff}{\Longleftrightarrow}
 \newcommand{\imp}{\Longrightarrow}
 \newcommand{\isdiv}{\,\left.\right\vert\,}
 \newcommand{\ket}[1]{\left\vert #1\right\rangle}
 \newcommand{\ol}[1]{\overline{#1}}
 \newcommand{\pars}[1]{\left( #1 \right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\pp}{{\cal P}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\vphantom{\large A}\,#2\,}\,}
 \newcommand{\sech}{\,{\rm sech}}
 \newcommand{\sgn}{\,{\rm sgn}}
 \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}}
 \newcommand{\ul}[1]{\underline{#1}}
 \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}$
\begin{align}
&\color{#00f}{\int_{0}^{\infty}{2\pars{\expo{-t^{2}} -\expo{-t}}\over t}\,\dd t}
=-2\int_{0}^{\infty}\ln\pars{t}
\bracks{\expo{-t^{2}}\pars{-2t} - \expo{-t}\pars{-1}}\,\dd t
\\[3mm]&=2\lim_{\mu \to 0^{+}}\partiald{}{\mu}\int_{0}^{\infty}
\pars{2t^{\mu + 1}\expo{-t^{2}} - t^{\mu}\expo{-t}}\,\dd t
=2\lim_{\mu \to 0^{+}}\partiald{}{\mu}\int_{0}^{\infty}
\pars{t^{\mu/2}\expo{-t} - t^{\mu}\expo{-t}}\,\dd t
\\[3mm]&=2\lim_{\mu \to 0^{+}}\partiald{}{\mu}
\bracks{\Gamma\pars{{\mu \over 2} + 1} - \Gamma\pars{\mu + 1}}
=2\lim_{\mu \to 0^{+}}
\bracks{\half\,\Gamma'\pars{{\mu \over 2} + 1} - \Gamma'\pars{\mu + 1}}
\\[3mm]&=-\Gamma'\pars{1}=-\Gamma\pars{1}\Psi\pars{1} = \color{#00f}{\Large\gamma}
\end{align}

$\ds{\Gamma\pars{z}}$ and
  $\ds{\Psi\pars{z} \equiv \totald{\ln\pars{\Gamma\pars{z}}}{z}}$ are the
  Gamma and Digamma functions, respectively.
We used the well known results
  $\ds{\Gamma\pars{z} = \int_{0}^{\infty}t^{z - 1}\expo{-t}\,\dd t}$
  $\ds{\pars{~\mbox{with}\ \Re\pars{z} > 1~}}$, $\ds{\Gamma\pars{1} = 1}$ and $\ds{\Psi\pars{1} = - \gamma}$ where $\ds{\gamma}$ is the Euler-Mascheroni Constant.
See this page.

