# Alternating series

## Alternating series

• Definition. An alternating series is a series whose terms are alternately positive and negative.
• Examples: $\begin{gather*} 1-\frac12+\frac13-\frac14+\frac15-\frac16+\dotsb=\sum_{n=1}^\infty(-1)^{n-1}\frac{1}{n}\\ -\frac12+\frac23-\frac34+\frac45-\frac56+\frac67-\dotsb=\sum_{n=1}^\infty(-1)^n\frac{n}{n+1}. \end{gather*}$
• In general, $$\sum a_n$$ is an alternating series, if for every $$n$$, we have $a_n=(-1)^{n-1}b_n\text{ or }a_n=(-1)^nb_n$ where $$b_n>0$$ for all $$n$$. Note that we have $$b_n=|a_n|$$.

## Alternating series test

• Alternating series test.
• Let $$\sum a_n$$ be an alternating series, and let $$b_n=|a_n|$$.
• Suppose that the sequence $$\{b_n\}$$ is decreasing.
• Suppose also that we have $$\lim_{n\to\infty}b_n=0$$.
• Then the series $$\sum a_n$$ is convergent.
• Example. Consider the series $$\sum_{n=1}^\infty(-1)^{n-1}\frac{1}{n}$$.
• Since $$\frac{1}{n}\ge\frac{1}{n+1}$$ for all $$n\ge1$$, the sequence $$\{b_n\}=\left\{\frac{1}{n}\right\}$$ is decreasing.
• We have $$\lim_{n\to\infty}\frac{1}{n}=0$$.
• Therefore, the series $$\sum_{n=1}^\infty(-1)^{n-1}\frac{1}{n}$$ is convergent.
• Exercises. 11.5: 3, 5, 11, 13, 17, 19

## Alternating series estimation theorem

• Alternating series estimation theorem. Suppose that $$s=\sum(-1)^nb_n$$, where $$\{b_n\}$$ is a sequence that is positive, decreasing, and converges to 0.
• Then for any $$n$$, we have $|R_n|=|s-s_n|\le b_{n+1}.$
• Example. Consider the series $$\sum_{n=0}^\infty(-1)^n\frac{2^n}{3\cdot 5^n}$$.
• You can check that is satisfies the conditions of the Alternating series test.
• Let's find an approximation of $$s=\sum_{n=0}^\infty(-1)^n\frac{2^n}{3\cdot 5^n}$$ correct to 3 decimal places.
• For this, we need to find an $$n$$ such that $$\frac{2^n}{3\cdot 5^n}<0.0005$$.
• For $$n=8$$, we have $$\frac{2^8}{3\cdot 5^8}\approx0.0002$$.
• This means that $$s_8\approx0.5554$$ is correct up to 3 decimal places.
• Click here for the minimalistic SAGE code I used to perform the approximation.
• Exercises. 11.5: 23, 27.

# Absolute convergence. The Ratio and Root tests.

## Absolute convergence

• Definition. Let $$\sum a_n$$ be a series.
• Suppose that the series $$\sum|a_n|$$ is convergent.
• Then we say that the series $$\sum a_n$$ is absolutely convergent.
• Examples.
• The series $\sum_{n=1}^\infty(-1)^{n-1}\frac{1}{n^3}=1-\frac18+\frac{1}{27}-\frac{1}{64}+\dotsb$ is absolutely convergent, because the series $\sum_{n=1}^\infty\frac{1}{n^3}$ is convergent as $$3>1$$.
• We have seen that by the Alternating series test, the alternating harmonic series $$\sum_{n=1}^\infty(-1)^{n-1}\frac{1}{n}$$ is convergent. But it's not absolutely convergent, because the harmonic series $$\sum_{n=1}^\infty\frac{1}{n}$$ is divergent.

## Conditional convergence

• Definition. If a series is convergent but not absolutely convergent, we say it is conditionally convergent.
• Theorem. If a series is absolutely convergent, then it is convergent.
• Example. Consider the series $$\sum_{n=1}^\infty\frac{\sin n}{n^2}$$.
• Since we have $0\le\frac{|\sin n|}{n^2}\le\frac{1}{n^2},$ the Comparison theorem implies that $$\sum_{n=1}^\infty\frac{\sin n}{n^2}$$ is absolutely convergent, and therefore it is convergent.

## The Ratio test

• Ratio test. Let $$\sum a_n$$ be a series.
• If $$\lim_{n\to\infty}\left|\frac{a_{n+1}}{a_n}\right|=L<1$$, then $$\sum a_n$$ is absolutely convergent.
• If $$\lim_{n\to\infty}\left|\frac{a_{n+1}}{a_n}\right|=L>1$$ or $$\infty$$, then $$\sum a_n$$ is divergent.
• If $$\lim_{n\to\infty}\left|\frac{a_{n+1}}{a_n}\right|=1$$ or divergent, then the Ratio test is inconclusive.
• Example. Consider the series $$\sum_{n=1}^\infty\frac{n^2}{3^n}$$.
• We have $$\left|\frac{a_{n+1}}{a_n}\right|=\frac{(n+1)^2}{n^2}\cdot\frac{3^n}{3^{n+1}}\to\frac13<1$$, therefore the series is convergent.
• Example. Let's revisit the series $$\sum_{n=1}^\infty\frac{n^n}{n!}$$.
• We have $$\left|\frac{a_{n+1}}{a_n}\right|=\frac{(n+1)^{n+1}}{(n+1)!}\cdot\frac{n!}{n^n}$$==()n=(1+)ne>1\$, therefore the series is divergent.
• Exercises. 11.6: 7, 9, 17, 21.

## The Root test

• Root test. Let $$\sum a_n$$ be a series.
• If $$\lim_{n\to\infty}\sqrt[n]{|a_n|}=L<1$$, then $$\sum a_n$$ is absolutely convergent.
• If $$\lim_{n\to\infty}\sqrt[n]{|a_n|}=L>1$$ or $$\infty$$, then $$\sum a_n$$ is divergent.
• If $$\lim_{n\to\infty}\sqrt[n]{|a_n|}=1$$ or divergent, then the Root test is inconclusive.
• Note that the Ratio and Root tests yield a limit of 1 at the same time. That is, if the limit is 1 for one of the tests, then you shouldn't try the other test, but some other method.
• Example. Consider the series $$\sum_{n=1}^\infty\left(\frac{n-1}{n^2+2n+8}\right)^{2n}$$.
• Since we have $$\sqrt[n]{a_n}=\left(\frac{n-1}{n^2+2n+8}\right)^2\to0$$, the series is absolutely convergent.
• Exercises. 11.6: 27, 29.
• More exercises. 11.6: 31, 33, 35, 37.

## Rearrangements

• Now let's look at something very weird.
• Let $$\sum a_n$$ be a series. A rearrangement of $$\sum a_n$$ is a series $$\sum b_n$$, with exactly the same terms, but in a different order. For example, we could have $\sum b_n=a_2+a_4+a_1+a_5+a_3+\dotsb$
• Theorem. If $$\sum a_n$$ is absolutely convergent, then any rearrangement of it will have the same sum.
• It turns out that this is not true if $$\sum a_n$$ is conditionally convergent!
• Theorem. Let $$\sum a_n$$ be a conditionally convergent series, and $$r$$ any real number. Then there exists a rearrangement of $$\sum a_n$$ with sum $$r$$.
• If you're interested, you can find a proof sketch in 11.6.52.

## Rearrangements

• Example. Consider the alternating harmonic series $$\sum_{n=1}^\infty(-1)^{n-1}\frac{1}{n}$$.
• We have $$$\tag{I} 1-\frac12+\frac13-\frac14+\frac15-\dotsb=\ln2.$$$
• Multiplying by $$\frac12$$, we get $\frac12-\frac14+\frac16-\frac18+\frac{1}{10}-\dotsb=\frac12\ln2.$
• We can insert zeros in this to get $$$\tag{II} 0+\frac12+0-\frac14+0+\frac16+\dotsb=\frac12\ln2.$$$
• Now (I)$$+$$(II) is $1+\frac13-\frac12+\frac15+\frac17-\frac14+\dotsb=\frac32\ln2,$ which you can check is a rearrangement of $$\sum_{n=1}^\infty(-1)^{n-1}\frac{1}{n}$$.