H n = ∫ 0 1 1 − x n 1 − x d x = ∫ 0 1 1 − ( 1 − u ) n u d u = ∫ 0 1 [ − ∑ k = 1 n ( − 1 ) k ( n k ) u k − 1 ] d u = − ∑ k = 1 n ( − 1 ) k ( n k ) ∫ 0 1 u k − 1 d u = − ∑ k = 1 n ( − 1 ) k 1 k ( n k ) . {\displaystyle {\begin{aligned}H_{n}&=\int _{0}^{1}{\frac {1-x^{n}}{1-x}}\,dx=\int _{0}^{1}{\frac {1-(1-u)^{n}}{u}}\,du\\[6pt]&=\int _{0}^{1}\left[-\sum _{k=1}^{n}(-1)^{k}{\binom {n}{k}}u^{k-1}\right]\,du=-\sum _{k=1}^{n}(-1)^{k}{\binom {n}{k}}\int _{0}^{1}u^{k-1}\,du\\[6pt]&=-\sum _{k=1}^{n}(-1)^{k}{\frac {1}{k}}{\binom {n}{k}}.\end{aligned}}}