How to prove the result of this integration?

How to prove that?

∫101−e−t−e−1/tt dt=γ\int_0^1 \frac{1 – e^{-t} – e^{-1/t}}{t}\ \text{d}t = \gamma

where γ=0.5772156649015328606065…\gamma = 0.5772156649015328606065\ldots is the Euler-Mascheroni constant.

Additional question: is there a way to evaluate it via Residues Theorem too?

=================

=================

3

=================

Preliminary results.

Let us begin with a definition of the Euler-Mascheroni Constant
γ=limn→∞Hn−ln(n)
\gamma = \lim_{n \to \infty} H_{n} – \mathrm{ln}(n)
\label{eq:1}
\tag{1}

where HnH_{n} are the harmonic numbers defined as
Hn=n∑k=11k
H_{n} = \displaystyle\sum_{k=1}^{n} \frac{1}{k}
\label{eq:2}
\tag{2}

Let
1∫01−(1−x)nxdx=Hn
\int\limits_{0}^{1} \frac{1-(1-x)^{n}}{x} \mathrm{d} x = H_{n}
\label{eq:3}
\tag{3}

Proof:
1∫01−(1−x)nxdx=1∫01−yn1−ydy=1∫011−ydy−1∫0yn1−ydy=1∫0∞∑k=0ykdy−1∫0yn∞∑k=0ykdy=∞∑k=0yk+1k+1|10−∞∑k=0yk+n+1k+n+1|10=(1+12+13+…)−(1n+1+1n+2+1n+3+…)=1+12+13+⋯+1n=Hn\begin{align}
\tag{a}
\int\limits_{0}^{1} \frac{1-(1-x)^{n}}{x} \mathrm{d} x & = \int\limits_{0}^{1} \frac{1-y^{n}}{1-y} \mathrm{d} y \\
& = \int\limits_{0}^{1} \frac{1}{1-y} \mathrm{d} y \, – \int\limits_{0}^{1} \frac{y^{n}}{1-y} \mathrm{d} y \\
\tag{b}
& = \int\limits_{0}^{1} \displaystyle\sum_{k=0}^{\infty} y^{k} \mathrm{d} y \,\, – \int\limits_{0}^{1} y^{n} \displaystyle\sum_{k=0}^{\infty} y^{k} \mathrm{d} y \\
& = \displaystyle\sum_{k=0}^{\infty} \frac{y^{k+1}}{k+1} \Big|_{0}^{1} \,\, – \displaystyle\sum_{k=0}^{\infty} \frac{y^{k+n+1}}{k+n+1} \Big|_{0}^{1} \\
& = (1 + \frac{1}{2} + \frac{1}{3} + \dots) \, – (\frac{1}{n+1} + \frac{1}{n+2} +\frac{1}{n+3} + \dots) \\
& = 1 + \frac{1}{2} + \frac{1}{3} + \dots + \frac{1}{n} = H_{n}
\end{align}

Notes:

a. Let y=1−xy=1-x

b. Expand 11−y=∞∑k=0yk\frac{1}{1-y} = \sum\limits_{k=0}^{\infty} y^{k}

Main result.
γ=1∫01−e−x−e−1/xxdx=1∫01−e−xxdx−1∫0e−1/xxdx=1∫01−e−xxdx−∞∫1e−xxdx\begin{align}
\gamma &= \int\limits_{0}^{1} \frac{1-\mathrm{e}^{-x}-\mathrm{e}^{-1/x}}{x} \mathrm{d}x \\
&= \int\limits_{0}^{1} \frac{1-\mathrm{e}^{-x}}{x} \mathrm{d}x – \int\limits_{0}^{1} \frac{\mathrm{e}^{-1/x}}{x} \mathrm{d}x \\
&= \int\limits_{0}^{1} \frac{1-\mathrm{e}^{-x}}{x} \mathrm{d} x \,\, – \int\limits_{1}^{\infty} \frac{\mathrm{e}^{-x}}{x} \mathrm{d} x
\label{eq:4}
\tag{4}
\end{align}

We made the substitution z=1/xz=1/x, then switched variables back to xx.

Make the substitution x=ynx = \frac{y}{n} in equation (3)\eqref{eq:3} to obtain
Hn=n∫01−(1−yn)nydy=1∫01−(1−yn)nydy+n∫11−(1−yn)nydy=1∫01−(1−yn)nydy+n∫11ydy−n∫1(1−yn)nydy=1∫01−(1−yn)nydy+ln(n)−n∫1(1−yn)nydy\begin{align}
H_{n} & = \int\limits_{0}^{n} \frac{1-(1-\frac{y}{n})^{n}}{y} \mathrm{d} y \\
& = \int\limits_{0}^{1} \frac{1-(1-\frac{y}{n})^{n}}{y} \mathrm{d} y \,\, + \int\limits_{1}^{n} \frac{1-(1-\frac{y}{n})^{n}}{y} \mathrm{d} y \\
& = \int\limits_{0}^{1} \frac{1-(1-\frac{y}{n})^{n}}{y} \mathrm{d} y \,\, + \int\limits_{1}^{n} \frac{1}{y} \mathrm{d} y \,\, – \int\limits_{1}^{n} \frac{(1-\frac{y}{n})^{n}}{y} \mathrm{d} y \\
& = \int\limits_{0}^{1} \frac{1-(1-\frac{y}{n})^{n}}{y} \mathrm{d} y \,\, + \mathrm{ln}(n) \, – \int\limits_{1}^{n} \frac{(1-\frac{y}{n})^{n}}{y} \mathrm{d} y
\label{eq:5}
\tag{5}
\end{align}

Now we invoke the limit defnition of the exponential function

\mathrm{e}^{\pm x} = \lim_{n \to \infty} \left(1 \pm \frac{x}{n} \right)^{n}
\label{eq:6}
\tag{6}

\mathrm{e}^{\pm x} = \lim_{n \to \infty} \left(1 \pm \frac{x}{n} \right)^{n}
\label{eq:6}
\tag{6}

rearrange equation \eqref{eq:5}\eqref{eq:5} and take \lim_{n \to \infty}\lim_{n \to \infty}, we have

\lim_{n \to \infty} \left(H_{n} – \mathrm{ln}(n)\right)
= \lim_{n \to \infty} \left(\int\limits_{0}^{1} \frac{1-(1-\frac{y}{n})^{n}}{y} \mathrm{d}y
– \int\limits_{1}^{n} \frac{(1-\frac{y}{n})^{n}}{y} \mathrm{d}y\right)

\lim_{n \to \infty} \left(H_{n} – \mathrm{ln}(n)\right)
= \lim_{n \to \infty} \left(\int\limits_{0}^{1} \frac{1-(1-\frac{y}{n})^{n}}{y} \mathrm{d}y
– \int\limits_{1}^{n} \frac{(1-\frac{y}{n})^{n}}{y} \mathrm{d}y\right)

The left hand side equals \gamma\gamma by equation \eqref{eq:1}\eqref{eq:1} as does the right hand side by equations
\eqref{eq:6}\eqref{eq:6}, \eqref{eq:5}\eqref{eq:5}, and \eqref{eq:4}\eqref{eq:4}.

You can prove the integral representation of H(n) much simpler by deriving the recursion relation h(n+1) = h(n) + 1/(n+1) directly from the integral. (The factor (1-x) leads to h(n) + trival integral giving 1/(1+n)). This avoids temporary use of divergent integrals.
– Dr. Wolfgang Hintze
yesterday

\int_0^1 \frac{e^{-1/t}}{t}dt = \int_1^\infty \frac{e^{-t}}{t}dt\int_0^1 \frac{e^{-1/t}}{t}dt = \int_1^\infty \frac{e^{-t}}{t}dt