# Sum of the alternating harmonic series $\sum_{k=1}^{\infty}\frac{(-1)^{k+1}}{k} = \frac{1}{1} - \frac{1}{2} + \cdots$

I know that the harmonic series $$\sum_{k=1}^{\infty}\frac{1}{k} = \frac{1}{1} + \frac{1}{2} + \frac{1}{3} + \frac{1}{4} + \frac{1}{5} + \frac{1}{6} + \cdots + \frac{1}{n} + \cdots \tag{I}$$ diverges, but what about the alternating harmonic series

$$\sum_{k=1}^{\infty}\frac{(-1)^{k+1}}{k} = \frac{1}{1} - \frac{1}{2} + \frac{1}{3} - \frac{1}{4} + \frac{1}{5} - \frac{1}{6} + \cdots + \frac{(-1)^{n+1}}{n} + \cdots \text{?} \tag{II}$$

Does it converge? If so, what is its sum?

• $$\ln(1-x)=-\sum_{n=1}^\infty\frac{x^n}n\quad\iff\quad\sum_{n=1}^\infty\frac{(-1)^{n+1}}n=-\sum_{n=1}^\infty\frac{(-1)^n}n=\ln(1-[-1])=\ln2$$ Nov 19, 2013 at 7:39
• I know a non-calculus way, but you have to assume $e^x\ge x+1$. Would you like me to share it with you? Mar 24, 2015 at 17:37
• @AkivaWeinberger If not the OP, I am most certainly interested. Sep 10, 2017 at 22:38
• @Lucian, this is not a proof. You are assuming that the Taylor series for ln(1+x) converges for x=1, which is basically what OP is asking you to prove. May 27, 2021 at 15:31
• @Andrea: I never said it were, nor does the OP ask for any. May 27, 2021 at 22:19

There are actually two "more direct" proofs of the fact that this limit is $\ln (2)$.

First Proof Using the well knows (typical induction problem) equality:

$$\frac{1}{1}-\frac{1}{2}+\frac{1}{3}-\frac{1}{4}+...+\frac{1}{2n-1}-\frac{1}{2n}=\frac{1}{n+1}+\frac{1}{n+2}+..+\frac{1}{2n} \,.$$

The right side is $\frac{1}{n} \left[ \frac{1}{1+\frac{1}{n}}+ \frac{1}{1+\frac{2}{n}}+..+\frac{1}{1+\frac{n}{n}} \right]$ which is the standard Riemann sum associated to $\int_0^1 \frac{1}{1+x} dx \,.$

Second Proof Using $\lim_n \frac{1}{1}+\frac{1}{2}+...+\frac{1}{n}-\ln (n) =\gamma$.

Then

$$\frac{1}{1}-\frac{1}{2}+\frac{1}{3}-\frac{1}{4}+...+\frac{1}{2n-1}-\frac{1}{2n}= \left[ \frac{1}{1}+\frac{1}{2}+\frac{1}{3}+\frac{1}{4}+...+\frac{1}{2n-1}+\frac{1}{2n} \right]-2 \left[\frac{1}{2}+\frac{1}{4}...+\frac{1}{2n} \right]$$

$$= \left[ \frac{1}{1}+\frac{1}{2}+\frac{1}{3}+\frac{1}{4}+...+\frac{1}{2n-1}+\frac{1}{2n} \right]-\ln(2n) - \left[\frac{1}{1}+\frac{1}{2}...+\frac{1}{n} \right]+\ln(n) + \ln 2 \,.$$

Taking the limit we get $\gamma-\gamma+\ln(2)$.

• First equation, right-hand side: Should the first fraction be $\frac{1}{n+1}$? Jun 2, 2011 at 5:09
• I don't consider the second a proof because it is totally not apparent why that limit should exist, and it is no easier. Apr 3, 2015 at 11:35
• @user21820 The existence of the limit $\lim_n \frac{1}{1}+\frac{1}{2}+...+\frac{1}{n}-\ln (n)$ is well known and an easy consequence of the estimates of the integral test. Apr 3, 2015 at 15:05
• @N.S.: Yes indeed but so is $\frac{1}{1}-\frac{1}{2}+\frac{1}{3}-\cdots$ well known and provable without even using the existence of $\gamma$ that you used. My point is that what you left unproven is as hard or even harder than the original problem. Apr 4, 2015 at 5:07
• @user21820 Harder is relative. This limit together with the standard $\lim_n (1+\frac{1}{n})^n$ were the two first non-trivial limits I actually learned in highschool... And I don't think the proof is that hard : $$a_n = \frac{1}{1}+\frac{1}{2}+...+\frac{1}{n}-\ln (n) \,;\, b_n = \frac{1}{1}+\frac{1}{2}+...+\frac{1}{n}-\ln (n+1)$$ then $b_n \leq a_n$ is trivial and $a_n$ decreasing, $b_n$ increasing are immediate... Apr 4, 2015 at 15:41

Call a series $a_n$ absolutely convergent if $\sum|a_n|$ converges. If $a_n$ converges but is not absolutely convergent we call $a_n$ conditionally convergent The Riemann series theorem states that any conditionally convergent series can be reordered to converge to any real number.

Morally this is because both the positive and negative parts of your series diverge but the divergences cancel each other out, one or other's canceling the other can be staggered by adding on, say, the negative bits every third term in stead of every other term. This means that in the race for the two divergences to cancel each other out, we give the positive bit something of a head-start and will get a larger positive outcome. Notice how, even in this rearranged version of the series, every term will still come up exactly once.

It is also worth noting, on the Wikipedia link Mau provided, that the convergence to $\ln 2$ of your series is at the edge of the radius of convergence for the series expansion of $\ln(1-x)$- this is a fairly typical occurrence: at the boundary of a domain of convergence of a Taylor series, the series is only just converging- which is why you see this conditional convergence type behavior.

• This doesn't seem to answer the question. Apr 3, 2017 at 19:13

In this answer, I used only Bernoulli's inequality to show that $$\left(\frac{2n+1}{n+1}\right)^\frac{n}{n+1} \le\left(1+\frac1n\right)^{n\left(\frac1{n+1}+\frac1{n+2}+\dots+\frac1{2n}\right)} \le\frac{2n+1}{n+1}\tag{1}$$ The squeeze theorem and $(1)$, show that $$\exp\left[\lim\limits_{n\to\infty}\left(\frac1{n+1}+\frac1{n+2}+\dots+\frac1{2n}\right)\right]=2\tag{2}$$ That is, \begin{align} \lim_{n\to\infty}\left(1-\frac12+\frac13-\frac14+\dots-\frac1{2n}\right) &=\lim_{n\to\infty}\left(\frac1{n+1}+\frac1{n+2}+\dots+\frac1{2n}\right)\\[6pt] &=\log(2)\tag{3} \end{align}

• Is it the change in form of the series, across the = in the line above (3), that is dependent on the ordering of the series? Apr 16, 2013 at 16:14
• @Isaac: The stuff inside the parentheses is equal. There is no problem about the ordering when summing a finite number of terms.
– robjohn
Apr 16, 2013 at 16:21
• This is really very unusual and new for me. +1. Mar 29, 2016 at 4:19
• @xFioraMstr18: Both left and right side of $(1)$ tend to $2$; therefore, the middle part of $(1)$ tends to $2$ by the Squeeze Theorem. Now we know that $\left(1+\frac1n\right)^n$ can be made as close to $e$ as we wish by setting $n$ large enough. Therefore, the middle part of $(1)$ can be made as close to $(2)$ as we wish.
– robjohn
Jun 29, 2018 at 12:33
• If that is too many things "close to ..." for you, we can take the log of $(1)$ divided by $n\log\left(1+\frac1n\right)$: $$\frac{\overbrace{\ \ \ \ \frac{n}{n+1}\vphantom{\frac21}\ \ \ \ }^{\to1}\overbrace{\log\left(\frac{2n+1}{n+1}\right)}^{\to\log(2)}}{\underbrace{n\log\left(1+\frac1n\right)}_{\to1}} \le\frac1{n+1}+\frac1{n+2}+\dots+\frac1{2n} \le\frac{\overbrace{\log\left(\frac{2n+1}{n+1}\right)}^{\to\log(2)}}{\underbrace{n\log\left(1+\frac1n\right)}_{\to1}}$$ Thus, the middle part tends to $\log(2)$ by the Squeeze Theorem.
– robjohn
Jun 29, 2018 at 12:33

it is not absolutely convergent (that is, if you are allowed to reorder terms you may end up with whatever number you fancy).

If you consider the associated series formed by summing the terms from 1 to n of the original one, that is you fix the order of summation of the original series, that series (which is not the original one...) converges to $\ln(2)$ See Wikipedia.

• But rearranging terms on pretty much anything that goes out infinitely allows any possible answer, hence changing what you are summing. Jan 7, 2016 at 22:55
• this is why I wrote "If you consider the associated series [...]" and I computed that sum.
– mau
Jan 8, 2016 at 12:14
• and indeed my first sentence says "(that is, if you are allowed to reorder terms you may end up with whatever number you fancy)."
– mau
Jan 9, 2016 at 9:53
• @SimplyBeautifulArt adding to your comment, for unconditionally convergent series any rearrangement converges and gives the same value. Mar 26 at 6:43

Here is another proof, based on the formula

$$\frac{1}{1+x}=\frac{(-1)^nx^n}{1+x}+\sum_{k=0}^{n-1}(-1)^kx^k.$$

Integrating both sides over $$[0,t]$$ gives

$$\ln(1+t)=\int_0^t\frac{(-1)^nx^n}{1+x}\,dx+\sum_{k=1}^n(-1)^{k+1}\frac{t^k}{k}.$$

Setting $$t=1$$ shows that the partial sums $$s_n$$ of the alternating harmonic series are given by

$$s_n=\ln2+(-1)^n\int_0^1\frac{x^n}{1+x}\,dx.$$

But on $$[0,1]$$, we have $$0\leq x^n(1+x)^{-1}\leq x^{n}$$, so

$$0\leq\int_0^1\frac{x^n}{1+x}\,dx\leq\int_0^1x^{n}\,dx=\frac{1}{n+1}.$$

Hence $$\ln2-\frac{1}{n+1}\leq s_n\leq\ln2+\frac{1}{n+1}.$$ So $$s_n\to\ln 2$$ as $$n\to\infty$$.

• $\sum_{k=0}^n(-x)^k= \frac{1-(-x)^n}{1+x}$. You're missing some $(-1)^n$ at several places. Also, $s_n=\ln2-\int_0^1\frac{x^n}{1+x}\,dx$ cannot be right because $s_n-\ln2$ alternates in sign. Sep 12, 2018 at 8:18
• @GabrielRomon: Thanks for pointing out the problems; I wrote this up too quickly, probably on my phone. Fixed now. Sep 12, 2018 at 20:29
• Of course, this begs the question what is the inspiration for the original formula? Easily verified by induction, however it does go against a student's habit of partial decomposition in that you're making the numerator more complicated to get more polynomial out front. I suspect it's based upon $1/(1-x)=1+x+x^2+x^3+\cdots$ and scaled to cut this off at some point. Is there further explanation for the inspiration?
– user123641
Dec 21, 2018 at 6:22
• (1) “begs the question” isn’t the phrase you want; that means the argument is circular. You mean “raises the question. (2) No, the formula isn’t based on an infinite series; just do the polynomial long division. Dec 21, 2018 at 14:50
• @NewBornMATH: just like Robert Wolfe above, you are not reading my argument correctly; I don’t use the infinite geometric series for $1/(1+x)$. All I do is integrate a formula derived from (finite) polynomial division, and then estimate the integral that results. Jan 23, 2019 at 18:54

A proof without words by Matt Hudleson

Let's say you have a sequence of nonnegative numbers $a_1 \geq a_2 \geq \dots$ tending to zero. Then it is a theorem that the alternating sum $\sum (-1)^i a_i$ converges (not necessarily absolutely, of course). This in particular applies to your series.

Incidentally, if you're curious why it converges to $\log(2)$ (which seems somewhat random), it's because of the Taylor series of $\log(1+x)$ while letting $x \to 1$.

• To add to Akhil's answer, one needs to invoke Abel's theorem (en.wikipedia.org/wiki/Abel%27s_theorem), since 1 is at the border of the interval of convergence. This is a delicate test that ensures that the numerical series converges to the number the power series predicts. Jun 2, 2011 at 5:12
• @Andres: Thanks for fixing my grammar and for the comment! Jun 6, 2011 at 13:22

$\sum_{k=1}^{n} ( \frac{1}{2k-1}-\frac{1}{2k} ) = \sum_{k=1}^{n} ( \frac{1}{2k-1}+\frac{1}{2k} ) - 2 \sum_{k=1}^{n} \frac{1}{2k} = \sum_{k=1}^{2n} \frac{1}{k} - \sum_{k=1}^{n} \frac{1}{k} = \sum_{k=n+1}^{2n} \frac{1}{k}$.

$\ln(2) \overset{n\to\infty}{\leftarrow} \ln(2) + \ln(\frac{2n+1}{2n+2}) = \ln(2n+1)-\ln(n+1)$

$= \int_{n+1}^{2n+1} \frac{1}{x}\ dx \le \sum_{k=n+1}^{2n} \frac{1}{k} \le \int_{n}^{2n} \frac{1}{x}\ dx$

$= \ln(2n)-\ln(n) = \ln(2)$.

So by squeeze theorem we are done.

I want to use the infinite series expansion of the integral of a function to compute the sum. If you repeat the process of integration by parts over and over again: $$\int f(x) dx = xf(x)-\int xf'(x)dx = xf(x) - \frac{x^2}{2}f'(x)+\int \frac{x^2}{2}f''(x)dx$$ $$\Rightarrow \int f(x) dx = xf(x) - \frac{x^2}{2}f'(x) + \frac{x^3}{6}f''(x)-\int \frac{x^3}{6}f''(x)dx$$ $$\Rightarrow \int f(x) dx = xf(x) - \frac{x^2}{2}f'(x) + \frac{x^3}{6}f''(x)-\frac{x^4}{24}f'''(x)+ \int \frac{x^4}{24}f'''(x)dx$$ Continuing this pattern we can prove using Mathematical Induction (for all $$n\ \epsilon\ \mathbb{Z}^+$$)that: $$\int f(x)dx = \sum_{k=0}^{n}\left[\frac{(-1)^kf^{(k)}(x)x^{k+1}}{(k+1)!}\right]+\frac{(-1)^n}{n!}\int x^n f^{(n)}(x)dx \rightarrow (1)$$ Limiting both sides of equation (1) as $$n \rightarrow \infty$$ we can write the infinite series expansion: $$\int f(x)dx = \sum_{k=0}^{\infty}\left[\frac{(-1)^kf^{(k)}(x)x^{k+1}}{(k+1)!}\right] + C=C+xf(x) - \frac{x^2}{2}f'(x) + \frac{x^3}{6}f''(x)-+...\rightarrow (2)$$ We can certainly remove the integration constant $$C$$ from both sides by taking the definite integral: $$\int_{0}^{x} f(t)dt =xf(x) - \frac{x^2}{2}f'(x) + \frac{x^3}{6}f''(x)-\frac{x^4}{24}f'''(x)+-...\rightarrow (3)$$ We can prove the Taylor series expansion for functions using this idea. Now let $$f(x)=\frac{1}{1+x}$$ and we get: $$\ln(1+x)=\frac{1}{1+\frac{1}{x}}+\frac{1/2}{(1+\frac{1}{x})^2}+\frac{1/3}{(1+\frac{1}{x})^3}+\frac{1/4}{(1+\frac{1}{x})^4}+\frac{1/5}{(1+\frac{1}{x})^5}+...\rightarrow (4)$$ $$y=\frac{x}{x+1} \Rightarrow \ln (\frac{1}{1-y})=y+\frac{y^2}{2}+\frac{y^3}{3}+\frac{y^4}{4}+\frac{y^5}{5}+...\rightarrow (5)$$ By letting $$y=-1$$ and multiplying both sides of equation $$(5)$$ by $$-1$$ we get the sum we desired: $$\ln 2 = 1 - \frac{1}{2} + \frac{1}{3} - \frac{1}{4} + \frac{1}{5}-\frac{1}{6}+-...$$ P.S. You can also use $$(4)$$ to get another interesting expansion for $$\ln 2$$ by putting $$x=1$$: $$\ln 2 = \frac{1}{1 \cdot 2^1}+\frac{1}{2 \cdot 2^2}+\frac{1}{3 \cdot 2^3}+\frac{1}{4 \cdot 2^4}+\frac{1}{5 \cdot 2^5}+...$$

Grant Sanderson, aka 3Blue1Brown, has a good explanation of this in one of his Lockdown Math videos. His explanation, summarized:

• $$1 - \frac{1}{2} + \frac{1}{3} - \frac{1}{4} + \frac{1}{5} - \ldots = f(1)$$, where $$f(x) = x - \frac{x^2}{2} + \frac{x^3}{3} - \frac{x^4}{4} + \frac{x^5}{5} -\ldots$$
• $$\frac{df}{dx} = 1 - x + x^2- x^3 + x^4 - \ldots = \frac{1}{1+x}$$ (when $$-1 ≤ x ≤ 1$$)
• $$f(x) = \ln(1+x)$$
• $$\therefore f(1) = 1 - \frac{1}{2} + \frac{1}{3} - \frac{1}{4} + \frac{1}{5} - \ldots = \ln(2)$$
• Doesn't your argument run afoul at the second line? When $x=1$, then $\frac{1}{1+x} = \frac12$ but the series $1-1+1-1+1-\cdots$ does not converge. When $x=-1$, then $\frac{1}{1+x}$ is not even defined and the series $1+1+1+1+\cdots$ diverges. May 27, 2021 at 15:28
• Hmm... I guess my argument does fail. I thought I found a simple explanation. I guess one can argue that the equality still holds in a way when $x = 1$ but that doesn't look like a rigorous argument to me. May 31, 2021 at 17:33

Proving that this series converges can be done using the alternating series test: any series that alternates forever between positive and negative terms, where each term is smaller than the preceding term, and the terms approach a limit of 0 converges.

Why this test works:

• The odd partial sums decrease forever. Every odd partial sum (except the first) is less than the one before it: $$S_{2n+1} = S_{2n-1} + \left(-\frac{1}{2n} + \frac{1}{2n+1} \right)$$ (where $$S_n$$ is the $$n$$th partial sum) and $$-\frac{1}{2n} + \frac{1}{2n+1} < 0$$ for all $$n$$.
• Similarly, the even partial sums increase forever.
• Every odd partial sum is greater than the (even) partial sum before it, since all the terms at odd positions are positive.
• Similarly, every even partial sum is less than the (odd) partial sum before it.
• Since the odd partial sums decrease forever but never go below the first even partial sum $$\left( 1 - \frac{1}{2} \right)$$, they must approach a limit.
• Similarly, since the even partial sums increase forever but never go above the first term $$\left( 1 \right)$$, they must approach a limit.
• The odd partial sums and the even partial sums must approach the same limit, since the difference between each odd partial sum and the even partial sum before it approaches 0: $$\lim\limits_{n \to \infty}\frac{1}{n} = 0$$. Similarly, the difference between each even partial sum and the odd partial sum before it approaches 0.
• ∴ the series converges.

Here is one proof, using how $${ \log (1+x) }$$ is "sandwiched" between its Taylor polynomials on $${ [0,1] }.$$

Consider $${ \log(1+x) }$$ on $${ (-1, \infty) }.$$ Its Taylor polynomials about $$0$$ are $${ S _n (x) = x - \frac{x ^2}{2} + \ldots + (-1) ^{n+1} \frac{x ^n}{n}. }$$

Notice errors $${ \varepsilon _n (x) := \log(1+x) - \left( x - \frac{x ^2}{2} + \ldots + (-1) ^{n+1} \frac{x ^n}{n} \right) }$$ satisfy $${ \varepsilon _n (0) = 0, }$$ and $${ \varepsilon _n ' (x) }$$ $${ = \frac{1}{1+x} -(1-x + \ldots + (-1) ^{n+1} x ^{n-1}) }$$ $${ = \frac{1 - (1+ (-1) ^{n+1} x ^n)}{1+x} }$$ $${ = \frac{ (-1) ^n x ^n}{1+x} }$$ is $$\geq 0$$ for $${ \lbrace x \in [0, \infty); n \text{ even} \rbrace }$$ and $$\leq 0$$ for $${ \lbrace x \in [0, \infty); n \text{ odd} \rbrace }.$$
So $${ \varepsilon _{n} (x) }$$ is $${ \geq 0 }$$ for $${ \lbrace x \in [0, \infty); n \text{ even} \rbrace }$$ and $${ \leq 0 }$$ for $${ \lbrace x \in [0, \infty); n \text{ odd} \rbrace }.$$

So $${ S _{2n-1} (x) \geq \log(1+x) \geq S _{2n} (x) }$$ for $${ x \in [0, \infty), n \in \mathbb{Z} _{\gt 0} }.$$
Further $${ S _{2(n+1) -1} (x) - S _{2n-1} (x) }$$ $${ = - \frac{x ^{2n}}{2n} + \frac{x ^{2n+1}}{2n+1} }$$ $${ = x ^{2n} ( \frac{x}{2n+1} - \frac{1}{2n}) \leq 0}$$ if $${ \underline{ x \in [0,1] } },$$ ie sequence $${ (S _{2n-1} (x)) _{n \geq 1} }$$ is decreasing if $${ x \in [0,1] }.$$
Similarly $${ S _{2(n+1)} (x) - S _{2n} (x) }$$ $${ = \frac{x ^{2n+1}}{2n+1} - \frac{x ^{2n+2}}{2n+2} }$$ $${ = x ^{2n+1} (\frac{1}{2n+1} - \frac{x}{2n+2}) \geq 0 }$$ if $${ \underline{ x \in [0,1] } },$$ ie sequence $${ (S _{2n} (x) ) _{n \geq 1} }$$ is increasing if $${ x \in [0,1] }.$$

Fix $${ x \in [0,1] }.$$
Now sequence $${ (S _{2n} (x) ) _{n \geq 1} }$$ is increasing and $${ (S _{2n-1} (x) ) _{n \geq 1} }$$ decreasing, with $${ S _{2n-1} (x) \geq \log(1+x) \geq S _{2n} (x) }.$$
So say $${ \lim _{n \to \infty} S _{2n} (x) = \ell _e }$$ and $${ \lim _{n \to \infty} S _{2n-1} (x) = \ell _o }.$$ But $${ S _{2n-1} (x) - S _{2n} (x) = \frac{x ^{2n}}{2n} \leq \frac{1}{2n} \to 0 }$$ as $${ n \to \infty }.$$ So $${ \ell _o - \ell _e = 0 },$$ ie $${ \ell _o = \ell _e }.$$
This gives $${ \ell _o = \ell _e = \log(1+x), }$$ making $${ \log(1+x) = \lim _{j \to \infty} S _j (x). }$$

Especially $${ 1 - \frac{1}{2} + \frac{1}{3} - \frac{1}{4} + \ldots }$$ converges, and to $${ \log(2) }.$$