# The sum of $(-1)^n \frac{\ln n}{n}$

I’m stuck trying to show that $$\sum_{n=2}^{\infty} (-1)^n \frac{\ln n}{n}=\gamma \ln 2- \frac{1}{2}(\ln 2)^2$$

This is a problem in Calculus by Simmons. It’s in the end of chapter review and it’s associated with the section about the alternating series test. There’s a hint: refer to an equation from a previous section on the integral test. Specifically:

$$L=\lim_{n\to\infty} F(n)=\lim_{n\to\infty}\left[a_1+a_2+\cdots+a_n-\int_1^n\! f(x)\,\mathrm{d}x\right]$$

Here, $\{a_n\}$ is a decreasing sequence of positive numbers and $f(x)$ is a decreasing function such that $f(n)=a_n$, and $\gamma$ is this limit in the case that $a_n=\frac{ 1}{n}$.

New users can’t answer their own questions inside of 8 hours, so I’m editing my question to reflect the answer.

Ok, I got it.

Following the hint in the book

$$L=\lim_{n\to\infty}\left[\frac{\ln 2}{2}+\frac{\ln 3}{3}+\cdots+\frac{\ln n}{n}-\int_2^n\! \frac{\ln x}{x}\,\mathrm{d}x\right]$$

$$=\lim\left[\frac{ \ln 2}{2}+\cdots+\frac{ \ln n}{n}-\left.\frac{ \ln^2x}{2}\right|_2^n\right]$$

The partial sum for the positive series is:
$$\left(\frac{\ln^2n}{2}-\frac{\ln^2}{2}\right)+L+o(1)$$

Returning to the original, alternating series:
$$-S_{2n}=\frac{ -\ln 2}{2}+\frac{ \ln 3}{3}-\frac{\ln 4}{4}+\frac{\ln 5}{5}-\cdots$$
$$=\frac{\ln 2}{2}+\frac{\ln 3}{3}+\cdots+\frac{\ln 2n}{2n}-2\left(\frac{\ln 2}{2}+\frac{\ln 4}{4}+\cdots+\frac{\ln 2n}{2n}\right)$$

Consider the partial sum in parentheses
$$\frac{\ln 2}{2}+\frac{\ln 4}{4}+\cdots+\frac{\ln 2n}{2n}=\frac{\ln 2}{2}+\frac{\ln 2 +\ln 2}{4}+\frac{\ln 2+\ln 3}{6}+\cdots+\frac{\ln 2+\ln n}{2n}$$
$$=\frac{1}{2}\left(\ln 2\left(1+\frac{ 1}{2}+\cdots+\frac{ 1}{n}\right)+\left(\frac{ \ln 2}{2}+\frac{ \ln 3}{3}+\cdots+\frac{ \ln n}{n}\right)\right)$$

Now, plug that back in
$$-S_{2n}=\left(\frac{\ln 2}{2}+\cdots+\frac{ \ln 2n}{2n}\right)-\ln 2\left(1+\frac{ 1}{2}+\cdots+\frac{ 1}{n}\right)-\left(\frac{ \ln 2}{2}+\frac{ \ln 3}{3}+\cdots+\frac{ \ln n}{n}\right)$$
$$=\frac{ \ln^2(2n)}{2}-\frac{ \ln^2 2}{2}+L+o(1)-\ln 2\left(\ln n +\gamma+o(1)\right)-\left(\frac{ \ln^2 n}{2}-\frac{ \ln^2 2}{2}+L+o(1)\right)$$
$$=\frac{ (\ln 2 +\ln n)^2}{2}-(\ln 2)(\ln n)-\gamma\ln 2-\frac{ \ln^2 n}{2}+o(1)$$
$$=\frac{ \ln^2 2}{2}+(\ln 2)(\ln n)+\frac{ \ln^2 n}{2}-(\ln 2)(\ln n)-\gamma \ln 2 – \frac{ \ln^2 n}{2}+o(1)$$
$$-S_{2n}\to\frac{ \ln^2}{2}-\gamma\ln 2$$
Which gives the desired result
$$\sum_2^{\infty}(-1)^n \frac{ \ln n}{n}=\gamma\ln 2 -\frac{ \ln^2 2}{2}$$

#### Solutions Collecting From Web of "The sum of $(-1)^n \frac{\ln n}{n}$"

Let’s evaluate this more generally. What is $$\sum_{n=1}^\infty \frac{(-1)^n \log^k (n)}{n}$$ for integers $k$? Recall the Dirichlet eta function $$\eta(s)=\sum_{n=1}^\infty \frac{(-1)^n}{n^s}=\left(1-2^{1-s}\right)\zeta(s).$$
Lets look at the expansion around $s=1$.
We have that

$$1-2^{1-s}=1-e^{-(s-1)\log2}=\sum_{n=1}^{\infty}\frac{(-1)^{n-1}\left(\log2\right)^{n}}{n!}(s-1)^{n},$$ and $$\zeta(s)=\frac{1}{s-1}+\sum_{n=0}^{\infty}(-1)^{n}\gamma_{n}\frac{(s-1)^{n}}{n!}.$$ The $\gamma_i$ are the Stieltjes Constants which we expect should come up in this problem since $$\gamma_m:=\lim_{r\to\infty} \sum_{k=1}^r \left(\frac{\log^m k}{k}-\frac{\log^m r}{(m+1)}\right).$$ Upon multiplying the two expansions we get $$\left(1-2^{1-s}\right)\zeta(s)=\sum_{n=0}^{\infty}\left(\frac{(-1)^{n}\left(\log2\right)^{n+1}}{(n+1)!}+(-1)^{n-1}\sum_{k=0}^{n-1}\gamma_{k}\frac{\log^{n-k}2}{k!(n-k)!}\right)(s-1)^{n}.$$ Notice that $$\sum_{n=1}^{\infty}\frac{(-1)^{n}\log^{k}n}{n}=\eta^{(k)}(1)$$ which is the $k^{th}$ derivative of the above expression evaluated at $1$. Consequently, it is the $k^{th}$ coefficient above multiplied by $k!$. That is we have the closed form $$\sum_{n=1}^{\infty}\frac{(-1)^{n}\log^{k}n}{n}=\frac{(-1)^{n}\left(\log2\right)^{k+1}}{k+1}+(-1)^{k-1}\sum_{j=0}^{k-1}\gamma_{j}\binom{k}{j}\log^{k-j}2.$$

Hope that helps,

Here is an another way to show the identity in calculus level, although not as simple as the solution from the hint. A brutal force works here. Let
$$H_n = \sum_{k=1}^{n} \frac{1}{k}$$
be the $n$-th harmonic number and
$$A_{r,n} = \sum_{k=1}^{n} \frac{1}{n} \frac{\left( \log ( 1 + \frac{k}{n} ) \right)^{r}}{1 + \frac{k}{n}}.$$
Then we have
$$\sum_{k=1}^{2n} \frac{(-1)^{k} \log k}{k} = (H_n – \log n) \log 2 + (\log 2 – A_{0, n}) \log n – A_{1,n}.$$
It is not hard to see that if $f$ is of class $C^1$ on $[0, 1]$, then by mean value theorem,
$$\lim_{n\to\infty} n \left( \sum_{k=1}^{n} f\left( \frac{k}{n}\right) \frac{1}{n} – \int_{0}^{1} f(x) \; dx \right) = \frac{f(1) – f(0)}{2}.$$
Thus assuming the identity above, taking $n \to \infty$, we have
$$\sum_{k=1}^{\infty} \frac{(-1)^{k} \log k}{k} = \gamma \log 2 – \frac{1}{2} (\log 2)^{2}.$$
So it remains to show the identity. The key observation that leads to this result is the identity
$$\sum_{k=1}^{2n} \frac{(-1)^{k} \log k}{k} = \sum_{k=1}^{n} \frac{\log (2k)}{k} – \sum_{k=1}^{2n} \frac{\log k}{k},$$
which is obtained by splitting even terms and odd terms.

Hint: Consider $\frac{\ln(2k)}{2k} – \frac{\ln(2k+1)}{2k+1}$.

For more literate solution:
Consider $$\kappa(s)=\sum_{n=2}^{\infty} \frac{(-1)^{n+1}\ln n}{n^s}$$

when $s=1$ we can use abel’s theorem to verified the convergence since the above series is absolutely convergent for $s\geq 1$ Now suppose that $s>1$. Define $$\psi(s)=\sum_{n=1}^{\infty} (-1)^{n+1} \frac{1}{n^s}$$ The absolute convergence justified the integration of the series $\kappa(s)$, so that we have $\psi'(s)= \kappa(s)$.

And so we wish to estimate $\psi'(1+)$. Notice also that $\phi(s)=(1-2^{1-s})\zeta(s)$, where $\zeta(s)$ is Riemann Zeta Function. We use the following result
$$\gamma = \lim_{s\rightarrow 1+} \zeta(s) – \frac{1}{s-1}$$
or we can say $$\zeta(s)=\gamma+\left(\frac{1}{s-1}\right)+O({s-1})$$
For proof see: J. Sondow, An antisymmetric formula for Euler’s constant, Mathematics Magazine, (1998), vol. 71, number 3, pp. 219-220.

Consider the expansion of

$$1- 2^{1-s}=1-e^{\ln 2^{1-s}}=(s-1) \ln 2 – \frac{(s-1)^2 \ln ^2 2 }{2} + \cdots$$

and for $s\rightarrow 1^+$ we can write $\displaystyle 1-2^{1-s}=(s-1) \ln 2 – \frac{(s-1)^2 \ln ^2 2 }{2}+O(s^3)$. So that

$$\psi(s)=(1-2^{1-s})\zeta(s)=\left((s-1) \ln 2 – \frac{(s-1)^2 \ln ^2 2 }{2}+ O(s^3)\right)\left(\gamma+\left(\frac{1}{s-1}\right)+O({s-1})\right)$$

finishing the expansion, differentiate and taking $s\rightarrow 1^+$ we have the result.

Consider
$$P=\frac{\ln 2}{2}+\frac{\ln 3}{3}+\frac{\ln 4}{4}+…+\frac{\ln 2n}{2n}$$
$$Q=\frac{2\ln 2}{2}+\frac{2\ln 4}{4}+\frac{2\ln 6}{6}+…+\frac{2\ln 2n}{2n}=\left( 1+\frac{1}{2}+\frac{1}{3}+…+\frac{1}{n} \right)\ln 2+\frac{\ln 2}{2}+\frac{\ln 3}{3}+\frac{\ln 4}{4}+…+\frac{\ln n}{n}$$

$$Q-P=\sum\limits_{j=2}^{2n}{\frac{\left( -1 \right)^{j}}{j}\ln j}=\left( 1+\frac{1}{2}+\frac{1}{3}+…+\frac{1}{n} \right)\ln 2-\left( \frac{\ln \left( n+1 \right)}{n+1}+\frac{\ln \left( n+2 \right)}{n+2}+\frac{\ln \left( n+3 \right)}{n+3}+…+\frac{\ln 2n}{2n} \right)$$

$$=\left( 1+\frac{1}{2}+\frac{1}{3}+…+\frac{1}{n}-\ln n \right)\ln 2+\ln 2\ln n-\sum\limits_{j=1}^{n}{\frac{\ln n}{n+j}}-\sum\limits_{j=1}^{n}{\frac{1}{n}\cdot \frac{\ln \left( 1+\frac{j}{n} \right)}{1+\frac{j}{n}}}$$

$$\sum\limits_{j=2}^{+\infty }{\frac{\left( -1 \right)^{j}}{j}\ln j}=\gamma \ln 2-\int\limits_{0}^{1}{\frac{\ln \left( 1+x \right)}{1+x}dx}=\gamma \ln 2-\frac{\ln ^{2}2}{2}$$

Done