Proofs surrounding Euler's constant Show that 
$$
1 + \frac{1}{2} + \frac{1}{3}  + \cdots + \frac{1}{n} =
\int_{0}^{1}{1 - \left(1 - t\right)^{n} \over t}\,\mathrm{d}t
$$
and hence that Euler's $\gamma$ constant is given by
$$
\gamma =
\lim_{n \to \infty}\left\{%
\int_{0}^{1}\left[1 - \left(1 - {t \over n}\right)^{n}\,\right]
\,{\mathrm{d}t \over t} -
\int_{1}^{n}\left(1 - {t \over n}\right)^{n}\,{\mathrm{d}t \over t}\right\}
$$
then deduce that
$$
\gamma = \int_{0}^{1}\frac{1 - \,\mathrm{e}^{-t} -
\,\mathrm{e}^{-1/t}}{t}\,\mathrm{d}t
$$
For the first part it's pretty obvious that
$$
\int_{0}^{1}{1 - \left(1 - t\right)^{n} \over t}\,\mathrm{d}t =
\int_{0}^{1}{1 \over t}\,\mathrm{d}t -
\int_{0}^{1}{\left(1 - t\right)^{n} \over t}\,\mathrm{d}t
$$
and the first part can easily be integrated to get  $\log\left(t\right)$. 
However, I am having major problems when trying to integrate the second part of the integral. Integration by parts and substitution gets me nowhere, and considering this comes from a complex analysis course, I'm kind of assuming there must be some technique in here that needs to be used, maybe the residue theorem, or perhaps looking at the limit ?.
Thanks in advance !.
 A: Set $$I_n=\int_{0}^{1} \frac{1-(1-t)^{n}}{t}\,dt.$$
Observe that
$$I_0=0$$
and
\begin{align}
I_{n+1}-I_n&=\int_{0}^{1} \frac{(1-t)^{n}-(1-t)^{n+1}}{t}\,dt 
\\&=\int_{0}^{1} (1-t)^n\frac{1-(1-t)}{t}\,dt
\\&=\int_{0}^{1} (1-t)^n dt
\\&=\int_{0}^{1}u^n du
\\&=\frac1{n+1}.
\end{align}
It follows by induction that
$$I_n=\sum_{k=1}^n \frac{1}{k}.$$
Of course, $H_n$ is just $\sum_{k=1}^n \frac{1}{k},$ so we now have 
\begin{align}
\gamma&=\lim_{n\to\infty}(H_n-\ln n)
\\&=\lim_{n\to\infty}(I_n+\ln \frac1{n})
\\&=\lim_{n\to\infty}\left(\int_{0}^{1} \frac{1-(1-t)^n}{t}\,dt + \int_1^\frac1{n} \frac{dt}{t}   \right)
\\&=\lim_{n\to\infty}\left(\int_{0}^{1} \frac{1-(1-t)^n}{t}\,dt - \int_\frac1{n}^1 \frac{dt}{t}   \right)
\\&=\lim_{n\to\infty}\left(\int_{0}^\frac1{n} \frac{1-(1-t)^n}{t}\,dt-\int_\frac1{n}^1 \frac{(1-t)^n}{t}dt\right)
\\&=\lim_{n\to\infty}\left(\int_{0}^1 \frac{1-(1-\frac{u}{n})^n}{u/n}\,\frac1{n}du-\int_1^n \frac{(1-\frac{u}{n})^n}{u/n}\frac1{n}du\right)
\\&=\lim_{n\to\infty}\int_{0}^1 \frac{1-(1-\frac{u}{n})^n}{u}\,du-\lim_{n\to\infty}\int_1^n \frac{(1-\frac{u}{n})^n}{u}du
\\&=\int_{0}^1 \frac{1-e^{-u}}{u}\,du-\int_1^\infty \frac{e^{-u}}{u}du
\\&=\int_{0}^1 \frac{1-e^{-u}}{u}\,du-\int_1^0 \frac{e^{-1/u}}{1/u}\frac{-1}{u^2}du
\\&=\int_{0}^1 \frac{1-e^{-u}}{u}\,du-\int_0^1 \frac{e^{-1/u}}{u}du
\\&=\int_{0}^1 \frac{1-e^{-u}-e^{-1/u}}{u}du,
\end{align}
as desired.
A: We have that 
\begin{align*}
H_n-\ln n&= \int_{0}^{1} \frac{1-(1-t)^{n}}{t}\,dt-\int_1^n\frac{dt}{t}=\int_{0}^{n} \frac{1-(1-s/n)^{n}}{s/n}\,d(s/n)-\int_1^n\frac{dt}{t}\\
&=\int_{0}^{1} \frac{1-(1-s/n)^{n}}{s}\,ds+\int_{1}^{n} \frac{1-(1-s/n)^{n}}{s}\,ds-\int_1^n\frac{ds}{s}\\
&=\int_{0}^{1} \frac{1-(1-s/n)^{n}}{s}\,ds-\int_{1}^{n} \frac{(1-s/n)^{n}}{s}\,ds\\
&=\int_{0}^{1} \frac{1-(1-s/n)^{n}}{s}\,ds-\int_{1}^{n} \frac{(1-(1/r)/n)^{n}}{1/r}\,d(1/r)\\
&=\int_{0}^{1} \frac{1-(1-s/n)^{n}}{s}\,ds-\int_{1/n}^{1} \frac{(1-1/(rn))^{n}}{r}\,dr\\
&=\int_{0}^{1/n} \frac{1-(1-s/n)^{n}}{s}\,ds-\int_{1/n}^{1} \frac{1-(1-s/n)^{n}-(1-1/(sn))^{n}}{s}\,ds.
\end{align*}
Finally taking the limit as $n\to \infty$, we get
$$\gamma=0+\int_{0}^{1} \frac{1-e^{-s}-e^{-1/s}}{s}\,ds.$$
A: I have a very simple solution to the first part of your question.
Note the following: 
$$\frac{1-(1-x)^n}{x}=\sum_{k=0}^{n-1} (1-x)^k$$
This can be easily verified using the sum of a geometric series.
So,
$$\int_0^1\frac{1-(1-x)^n}{x}=\sum_{k=1}^n -\frac{1}{k}(1-x)^k\bigg|^{x=1}_{x=0}=\sum_{k=1}^n\frac{1}{n}$$
