% This is lecture no. 18 of MH1101/: Calculus II.

\chapter{The Comparison Tests}%
\label{cha:the_comparison_tests}

\section{The Series Comparison Test}%
\label{sec:the_series_comparison_test}

If we have a series whose terms are smaller than those of a known convergent series, then our series is also convergent.
If we have a series whose terms are bigger than those of a known divergent series, then our series is also divergent.

\begin{thrm}
	The Series Comparison Test.
	Suppose that $\sum a_n$ and $\sum b_n$ are series with positive terms.
	Then the following implications hold true:
	\begin{align*}
		\sum b_n\ \text{is convergent}\ \land\ a_n\leqslant b_n \ \forall n & \implies \sum a_n\ \text{is convergent}\\
		\sum b_n\ \text{diverges to}\ \infty\ \land\ a_n\geqslant b_n\ \forall n & \implies \sum a_n\ \text{diverges to}\ \infty
	\end{align*}
\end{thrm}
\begin{proof}
	Let:
	\[
	s_k = \sum_{n=1}^{k} a_n,\ t_k = \sum_{n=1}^{k} b_n
	,\]
	denote the $k$-th partial sums of the series.
	Now, suppose $\sum b_n$ is convergent, and $a_n\leqslant b_n\ \forall n$.
	The sequence $\{s_k\}$ and $\left\{ t_k \right\} $ are increasing, since each term in $a_n$ and $b_n$ are positive.
	Since $a_n\leqslant b_n\ \forall n$, we have:
	\[
	s_k = \sum_{n=1}^{k} a_n \leqslant \sum_{n=1}^{k} b_n = t_k
	.\]
	But $\sum b_n$ is convergent, that is, $\lim_{k \to \infty}t_k = t$ for some $t\in\mathbb{R}$.
	This implies that $t_k\leqslant t$ for all $k$ since $\left\{ t_k \right\}$ is increasing.
	So:
	\[
	s_k\leqslant t_k\leqslant t
	.\]
	We have shown that $\left\{ s_k \right\} $ is increasing and bounded.
	By the monotonic convergence theorem, $\lim_{k \to \infty}s_k$ exists, that is:
	\[
	\sum_{n=1}^{\infty} a_n = \lim_{k \to \infty}s_k=s
	,\]
	for some $s\in\mathbb{R}$.
	Therefore the series is convergent.
	Now, suppose $\sum b_n$ diverges to $\infty$, and $a_n\geqslant b_n\ \forall n$.
	Since $a_n\geqslant b_n\ \forall n$, we have:
	\[
	s_k \geqslant t_k
	.\]
	Since $\lim_{k \to \infty}t_k = \infty$, we deduce that:
	\[
	\lim_{k \to \infty}s_k = \infty
	.\]
	Therefore, the series $\sum a_n$ also diverges to $\infty$.
\end{proof}
\begin{exmp}
	Determine whether the series $\displaystyle{\sum_{n=1}^{\infty} \frac{100}{2n^2+5n+4}}$ is convergent.
	\begin{sol}
		Set $\displaystyle{a_n = \frac{100}{2n^2+5n+4}}$.
		Note that:
		\[
		a_n = \frac{100}{2n^2+5n+4}<\frac{100}{2n^2}=\frac{50}{n^2}
		.\]
		Set $\displaystyle{b_n = \frac{50}{n^2}}$.
		We know that:
		\[
		\sum_{n=1}^{\infty} b_n = \sum_{n=1}^{\infty} \frac{50}{n^2} = 50 \sum_{n=1}^{\infty} \frac{1}{n^2}
		,\]
		which is convergent since $\displaystyle{\sum_{n=1}^{\infty} \frac{1}{n^2}}$ is a $p$-series with $p>1$.
		Therefore, by the series comparison test, the series is convergent.
	\end{sol}
\end{exmp}

\section{The Limit Comparison Test}%
\label{sec:the_limit_comparison_test}

Sometimes, the following limit version of the series comparison test is easier to apply.
\begin{thrm}
	The Limit Comparison Test.
	Suppose that $\sum a_n$ and $\sum b_n$ are series with positive terms.
	Then the following implications hold true:
	\begin{align*}
		& \lim_{n \to \infty} \frac{a_n}{b_n}=c>0  \implies \left(\substack{\displaystyle{\text{both series}} \\ \displaystyle{\text{converge}}}\right) \veebar \left(\substack{\displaystyle{\text{both series}} \\ \displaystyle{\text{diverge to $\infty$}}}\right)\\
		& \lim_{n \to \infty} \frac{a_n}{b_n} = 0 \land \sum b_n\ \text{converges}\  \implies \sum a_n\ \text{converges}\\
		& \lim_{n \to \infty} \frac{a_n}{b_n} = \infty \land \sum b_n\ \text{diverges}  \implies \sum a_n\ \text{diverges}
	\end{align*}
\end{thrm}
\begin{proof}
	We first prove the first implication.
	Let $m$ and $M$ be positive numbers such that $m<c<M$.
	Since $\displaystyle{\frac{a_{n}}{b_n}}$ converges to $c$, for a large enough $n$, we would have:
	\[
	m < \frac{a_n}{b_n}<M,\ \forall n>N
	.\]
	Thus,
	\[
	mb_n < a_n < Mb_n,\ \forall n>N
	.\]
	Now, if $\sum b_n$ converges, then so does $\sum Mb_n$.
	Therefore, by the series comparison test, $\sum a_n$ is convergent since $a_n<Mb_n$.

	\bigbreak
	Then, if $\sum a_n$ converges, then by the series comparison test, $\sum mb_n$ converges since $mb_n<a_n$.
	This implies that $\sum b_n$ also converges.
	Thus we have proved the following:
	\[
		\sum a_n\ \text{converges}\ \iff \sum b_n\ \text{converges}
	.\]
	Now, if $\sum b_n$ diverges to $\infty$, then so does $\sum mb_n$.
	Then, by the series comparison test, $\sum a_n$ diverges to $\infty$ since $a_n>mb_n$.

	\bigbreak
	Then, if $\sum a_n$ diverges to $\infty$, then by the series comparison test, $\sum Mb_n$ diverges to $\infty$ since $Mb_n>a_n$.
	This implies that $\sum b_n$ also diverges to $\infty$.
	Thus we have also proved the following:
	\[
		\sum a_n\ \text{diverges to}\ \infty \iff \sum b_n\ \text{diverges to}\ \infty
	.\]
	For the second implication in the theorem, we have:
	\[
	\lim_{n \to \infty}\frac{a_n}{b_n}=0
	,\]
	so, we let $M$ be a positive number.
	Thus, there exists a number $N$ such that:
	\[
	0< \frac{a_n}{b_n}<M,\ \forall n>N
	.\]
	Therefore, we have:
	\[
	0<a_n<Mb_n,\ \forall n>N
	.\]
	Since $\sum b_n$ converges, then so does $\sum Mb_n$.
	So, by the series comparison test, $\sum a_n$ is convergent.

	\bigbreak
	\noindent
	For the last implication, we have:
	\[
	\lim_{n \to \infty}\frac{a_n}{b_n}=\infty
	,\]
	so, we let $M$ be a positive number.
	Thus there exists a number $N$ such that:
	\[
	M< \frac{a_n}{b_n}<\infty,\ \forall n > N
	.\]
	Therefore, we have:
	\[
	Mb_n < a_n < \infty,\ \forall n > N
	.\]
	Since $\sum b_n$ diverges to $\infty$, then so does $\sum Mb_n$.
	So, by the series comparison test, $\sum a_n$ diverges to $\infty$.
\end{proof}
\begin{exmp}
	Test the series $\displaystyle{\sum_{n=1}^{\infty} \frac{1}{2^{n}-1}}$ for convergence.
	\begin{sol}
		We use the limit comparison test with:
		\[
		a_n = \frac{1}{2^{n}-1},\quad b_n = \frac{1}{2^{n}}
		.\]
		Thus we have:
		\begin{align*}
			\lim_{n \to \infty}\frac{a_n}{b_n} & = \lim_{n \to \infty} \frac{1/(2^{n}-1)}{1/2^{n}}\\
							   & = \lim_{n \to \infty} \frac{2^{n}}{2^{n}-1}\\
							   & = \lim_{n \to \infty} \frac{1}{1-1/2^{n}}=1>0.
		\end{align*}
		Since $b_n$ is convergent, the series $a_n$ is also convergent by the limit comparison test.
	\end{sol}
\end{exmp}
\begin{exmp}
	Determine if the series $\displaystyle{\sum_{n=1}^{\infty} \frac{2n^2+3n}{\sqrt{5+n^5}}}$ is convergent.
	\begin{sol}
		The dominant part of the numerator is $2n^2$, and the dominant part of the denominator is $\sqrt{n^{5}}=n^{\frac{5}{2}}$.
		This suggests taking:
		\[
			a_n = \frac{2n^2 + 3n}{\sqrt{5+n^{5}}},\quad b_n = \frac{2n^2}{n^{\frac{5}{2}}}=\frac{2}{\sqrt{n}}
		.\]
		Thus we have:
		\begin{align*}
			\lim_{n \to \infty}\frac{a_n}{b_n} & = \lim_{n \to \infty}\frac{2n^2 + 3n}{\sqrt{5+n^{5}}}\cdot \frac{n^{\frac{1}{2}}}{2}\\
							   & = \lim_{n \to \infty}\frac{2n^{\frac{5}{2}}+3n^{\frac{3}{2}}}{2\sqrt{5+n^{5}}}\\
							   & = \lim_{n \to \infty}\frac{2+\frac{3}{n}}{2\sqrt{\frac{5}{n^{5}}+1}}\\
							   & = \frac{2+0}{2\sqrt{0+1}}=1.
		\end{align*}
		Since the sum of $b_n$ is divergent($p$-series with $p=\frac{1}{2}$), the limit comparison test tells us that $a_n$ is also divergent.
	\end{sol}
\end{exmp}

