Please help me to prove the convergence of $\gamma_{n} = 1+\frac{1}{2}+\frac{1}{3}+....+\frac{1}{n}-\ln n$

The following question addresses the convergence, so assume $\gamma_n$ converges and denote the limit as $\gamma$.

Now consider $\sum_{n=1}^{2m} (-1)^{n+1} \frac{1}{n}$ and split it into even and odd terms $\sum_{n=1}^m \frac{1}{2n-1} - \sum_{n=1}^m \frac{1}{2n}$. Then complete the sum over odd integers to sum over consequtive integers: $\sum_{n=1}^{2m} \frac{1}{n} - 2 \sum_{n=1}^m \frac{1}{2n}$.

Then subtract logarithms to form $\gamma_{2m} - 2 \gamma_m + \log(2)$, like so $$ ( \sum_{n=1}^{2m} \frac{1}{n} - \log(2m)) - ( \sum_{n=1}^m \frac{1}{n} - \log(m)) + \log(2).$$

In the limit $m \to \infty$ it becomes $ \gamma - \gamma + \log(2) = \log(2)$.


You can use the mean value theorem to prove first that $$\frac{1}{n+1}<\ln(n+1)-\ln n<\frac{1}{n}$$ then, $\ln(n+1)<1+\ldots+\frac{1}{n}<1+\ln n$, and finally $$\ln(n+1)-\ln n<\gamma_n<1$$ which implies the convergence of $\gamma_n$ and its limit $\gamma\in[0,1]$.

For the second part, I am not sure if you can use $\gamma_n$ to find the sum $\sum_{n=1}^\infty(-1)^{n+1}\frac{1}{n}$!

I suggest to use the Taylor-Young formula for $x\mapsto\ln(x+1)$ on $[0,1]$ to prove that $$\sum_{n=1}^\infty(-1)^{n+1}\frac{1}{n}=\ln2.$$


The Mean Value Theorem says $$ \frac{1}{k+1}<\log(k+1)-\log(k)<\frac{1}{k} $$ Summing from $m$ to $n-1$ ($m < n$), we get $$ \begin{align} \sum_{k=m}^{n-1}\frac{1}{k+1}<\log(n)-\log(m)<\sum_{k=m}^{n-1}\frac{1}{k} \end{align} $$ Subtracting $\displaystyle{\sum_{k=m}^{n-1}\frac{1}{k+1}=\sum_{k=m+1}^n\frac{1}{k}=\sum_{k=1}^n\frac{1}{k}-\sum_{k=1}^m\frac{1}{k}}$ from all parts, we get $$ 0<\left(\log(n)-\sum_{k=1}^n\frac{1}{k}\right)-\left(\log(m)-\sum_{k=1}^m\frac{1}{k}\right)<\frac{1}{m}-\frac{1}{n} $$ This proves the existence of $\displaystyle{\lim_{n\to\infty}\left(\log(n)-\sum_{k=1}^n\frac{1}{k}\right)}$. If we set $m=1$ and subtract all sides from $1$, we get $$ 1>\left(\sum_{k=1}^n\frac{1}{k}-\log(n)\right)>\frac{1}{n} $$Thus, we have shown that $\displaystyle{\gamma=\lim_{n\to\infty}\left(\sum_{k=1}^n\frac{1}{k}-\log(n)\right)}$ exists, and that $0\le\gamma\le 1$.

Note that $$ \begin{align} \sum_{k=1}^{2n}(-1)^{k+1}\frac{1}{k}&=\sum_{k=1}^{2n}\frac{1}{k}-2\sum_{k=1}^n\frac{1}{2k}\\ &=\sum_{k=1}^{2n}\frac{1}{k}-\sum_{k=1}^n\frac{1}{k}\\ &=\left(\sum_{k=1}^{2n}\frac{1}{k}-\log(2n)\right)-\left(\sum_{k=1}^n\frac{1}{k}-\log(n)\right)+\log(2) \end{align} $$ Taking the limit as $n\to\infty$, we get $$ \sum_{k=1}^\infty(-1)^{k+1}\frac{1}{k}=\gamma-\gamma+\log(2)=\log(2) $$