% This is lecture no. 11 of MH3100/: Real Analysis I.

\chapter{Comparison \& Alternating Series Test}%
\label{cha:comparison_&_alternating_series_test}

\section{Comparison Test}%
\label{sec:comparison_test}

\begin{thrm}
	Comparison Test.
	If the two sequences $\left\{a_n\right\}$ and $\left\{b_n\right\}$ satisfy $0\leqslant a_n\leqslant b_n$ for all $n\in\mathbb{N}$, then
	\[
		\sum b_n\textbf{ is convergent}\implies\sum a_n\textbf{ is convergent}
	.\]
\end{thrm}

\begin{proof}
	The Cauchy Criterion for the convergence of $\sum b_n$ is
	\[
	\forall\varepsilon>0,\exists N\in\mathbb{N}\suchthat\forall n\in\mathbb{N}\quad n>N\implies\abs{b_{N+1}+b_{N+2}+\dotsb+b_n}<\varepsilon
	.\]
	Therefore, $\forall n,N\in\mathbb{N}$,
	\begin{align*}
		n>N  \implies \abs{a_{N+1}+a_{N+2}+\dotsb+a_n} & = a_{N+1}+a_{N+2}+\dotsb+a_n\\
						  & \leqslant b_{N+1}+b_{N+2}+\dotsb+b_n\\
						  & = \abs{b_{N+1}+b_{N+2}+\dotsb+b_n}
	\end{align*}
	which shows that the Cauchy Criterion for the convergence of $\sum b_n$ implies the Cauchy Criterion for the convergence of $\sum a_n$.
\end{proof}

\section{Alternating Series Test}%
\label{sec:alternating_series_test}

\begin{thrm}
	Alternating Series Test.
	If a sequence $\left\{b_n\right\}$ is \textbf{decreasing} and \textbf{converges to} 0, then the \textbf{alternating series} 
	\[
	\sum_{n=1}^{\infty} (-1)^{n-1}b_n
	\]
	is \textbf{convergent}.
\end{thrm}

\begin{proof}
	For each $N$, $n\in\mathbb{N}$ with $n>N$,
	\begin{multline*}
		b_{N+1}-b_{N+2}+b_{N+3}-b_{N+4}+\dotsb+(-1)^{n-N-1}b_n =\\
		\begin{cases}
			\begin{aligned}
				(b_{N+1}-b_{N+2})& + (b_{N+3}-b_{N+4})+{}\\
				\dotsb&+(b_{n-1}-b_n)
			\end{aligned}
			& \text{if } n-N\text{ even},\\
			\begin{aligned}
				(b_{N+1}-b_{N+2})& + (b_{N+3}-b_{N+4})+{}\\
				\dotsb&+(b_{n-2}-b_{n-1}) + b_n
			\end{aligned}
			& \text{if } n-N\text{ odd}\\
		\end{cases}
		\geqslant 0,
	\end{multline*}
	and hence
	\begin{multline*}
		\abs*{(-1)^{N}b_{N+1} + (-1)^{N+1}b_{N+2} + (-1)^{N+2}b_{N+3} + \dotsb + (-1)^{n-1}b_n}\\
		\begin{aligned}
			& = \abs*{b_{N+1} - b_{N+2} + b_{N+3} - \dotsb + (-1)^{n-N-1}b_n}\\
			& = b_{N+1} - b_{N+2} + b_{N+3} - \dotsb + (-1)^{n-N-1}b_n\\
			& = b_{N+1} - (b_{N+2} - b_{N+3} + \dotsb - (-1)^{n-N-1}b_n)\leqslant b_{N+1}.\\
		\end{aligned}
	\end{multline*}
	The definition of $\lim b_n = 0$ is
	\[
	\forall\varepsilon > 0,\exists N\in\mathbb{N}\suchthat\forall n\in\mathbb{N}\quad n>n\implies\abs{b_n}<\varepsilon
	.\]
	Therefore, $\forall\varepsilon>0$, $\exists N\in\mathbb{N}\suchthat\forall n\in\mathbb{N}$,
	\[
	n>N\implies\abs*{(-1)^{N}b_{N+1}+(-1)^{N+1}b_{N+2}+\dotsb+(-1)^{n-1}b_n}\leqslant b_{N+1}<\varepsilon
	,\]
	which is the Cauchy Criterion for the convergence of $\sum (-1)^{n-1}b_n$.
\end{proof}
