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

\chapter{Absolute \& Conditional Convergence}%
\label{cha:absolute_&_conditional_convergence}

\section{Absolute Convergence}%
\label{sec:absolute_convergence}

\begin{definition}
	Absolute Convergence.
	A series $\sum a_n$ is \textbf{absolutely convergent} if the series:
	\[
	\sum |a_n|
	\]
	converges.
\end{definition}

\begin{exmp}
	The series
	\[
	\frac{1}{1^2}-\frac{1}{2^2}+\frac{1}{3^2}-\frac{1}{4^2}+\dotsb
	\]
	is absolutely convergent because the corresponding series with absolute values is the convergent $p$-series:
	\[
	\frac{1}{1^2}+\frac{1}{2^2}+\frac{1}{3^2}+\frac{1}{4^2}+\dotsb
	\]
\end{exmp}

The following result states that if the series of absolute values converges, then the original series converges.

\begin{thrm}
	Absolute Convergence implies Convergence.
	If $\sum a_n$ is absolutely convergent, then $\sum a_n$ converges.
\end{thrm}
\begin{proof}
	We have:
	\[
	0\leqslant a_n+|a_n|\leqslant 2|a_n|
	.\]
	Thus, $\sum (a_n+|a_n|)$ is a series with positive terms (dropping all 0's).

	\bigbreak
	\noindent
	Now, suppose that $\sum a_n$ is absolutely convergent, that is, $\sum |a_n|$ converges.
	Then, $\sum 2|a_n|$ also converges.
	Then, by the series comparison test, we can say that $\sum (a_n+|a_n|)$ is convergent.

	\bigbreak
	Our original series is the difference of two convergent series and hence it converges:
	\[
		\sum a_n = \sum ((a_n+|a_n|)-|a_n|) = \underbrace{\sum (a_n+|a_n|)}_{\text{convergent}} - \underbrace{\sum |a_n|}_{\text{convergent}}
	.\]
	
\end{proof}
\begin{exmp}
	Determine whether the series:
	\[
	\sum_{n=1}^{\infty} \frac{\cos n}{n^2} = \frac{\cos 1}{1^2} + \frac{\cos 2}{2^2} + \frac{\cos 3}{3^2} + \dotsb
	\]
	is convergent or divergent.
	\begin{sol}
		The series has both positive and negative terms, but it is not alternating:
		The first term is positive, yet the next three are negative.
		The series of absolute values is:
		\[
			\sum_{n=1}^{\infty} \left\lvert\frac{\cos n}{n^2}\right\rvert = \sum_{n=1}^{\infty} \frac{\lvert\cos n\rvert}{n^2}
		.\]
		Since $\lvert\cos n\rvert\leqslant 1$ for all $n$, we have:
		\[
		\frac{\lvert\cos n\rvert}{n^2}\leqslant \frac{1}{n^2}
		.\]
		We know that $\displaystyle{\sum_{n=1}^{\infty} \frac{1}{n^2}}$ is convergent.
		Therefore, by the series comparison test:
		\[
		\sum_{n=1}^{\infty} \frac{\lvert\cos n\rvert}{n^2}
		\]
		is also convergent.
		This implies that the series in question is absolutely convergent, and therefore is convergent itself.
	\end{sol}
\end{exmp}
\begin{exmp}
	Does the series $\displaystyle{\sum_{n=2}^{\infty} \frac{(-1)^{n}}{n\ln n}}$ converge absolutely?
	\begin{sol}
		We apply the integral test to the series of absolute values:
		\[
			\sum_{n=2}^{\infty} \left\lvert \frac{(-1)^{n}}{n\ln n}\right\rvert = \sum_{n=2}^{\infty} \frac{1}{n\ln n}
		.\]
		Using the substitution $u=\ln x$, $\upd u=x^{-1}\ud x$, we have:
		\begin{align*}
			\int_{2}^{\infty} \frac{1}{x\ln x} \ud x & = \int_{\ln 2}^{\infty} \frac{1}{u} \ud u\\
								 & = \lim_{t \to \infty}\int_{\ln 2}^{t} \frac{1}{u} \ud u\\
								 & = \lim_{t \to \infty}(\ln t - \ln(\ln 2))\\
								 & = \infty.
		\end{align*}
		Therefore, $\displaystyle{\sum_{n=2}^{\infty} \frac{1}{n\ln n}}$ diverges, so $\displaystyle{\sum_{n=2}^{\infty} \frac{(-1)^{n}}{n\ln n}}$ is not absolutely convergent.
	\end{sol}
\end{exmp}

\section{Conditional Convergence}%
\label{sec:conditional_convergence}

\begin{definition}
	Conditional Convergence.
	A series $\sum a_n$ is called \textbf{conditionally convergent} if it converges but $\sum |a_n|$ diverges.
\end{definition}

The following theorem provides a test for conditional convergence if a series is not absolutely convergent.

\begin{thrm}
	Alternating Series Test.
	Let $\left\{ a_n \right\}$ be a decreasing positive sequence that converges to 0:
	\[
	a_1\geqslant a_2\geqslant a_3\geqslant a_4\geqslant\dotsb\geqslant 0,\quad \lim_{n \to \infty}a_n = 0
	.\]
	Then the following alternating series converges:
	\[
		\sum_{n=1}^{\infty} (-1)^{n-1}a_n = a_1-a_2+a_3-a_4+\dotsb
	.\]
	\begin{note}
		This alternating series starts with a positive term and then alternates.
		This result also applies if it starts with a negative term, which then alternates.
	\end{note}
\end{thrm}

\begin{note}
	The proof of this theorem is beyond the scope for this course.
\end{note}
\begin{exmp}
	Show that $S=\displaystyle{\sum_{n=1}^{\infty} \frac{(-1)^{n-1}}{\sqrt{n}}}$ is conditionally convergent.
	\begin{sol}
		The terms:
		\[
			a_n = \frac{1}{\sqrt{n}}
		,\]
		form a decreasing sequence that converges to 0.
		The alternating series test implies that $S$ is convergent.
		However, $S$ is only conditionally convergent because the series of absolute values:
		\[
			\sum_{n=1}^{\infty} \left\lvert \frac{(-1)^{n-1}}{\sqrt{n}}\right\rvert = \sum_{n=1}^{\infty} \frac{1}{\sqrt{n}}
		\]
		is a divergent $p$-series.
	\end{sol}
\end{exmp}
\begin{exmp}
	Is the series $S=\displaystyle{\sum_{n=1}^{\infty} (-1)^{n+1}\frac{n^2}{n^3+1}}$ convergent?
	\begin{sol}
		Let:
		\[
		a_n = \frac{n^2}{n^3+1}
		.\]
		In view of the alternating series test, we want to show that $\left\{ a_n \right\}^{\infty}_{n=1}$ is decreasing and $a_n \to 0$.
		Let's consider the related function $f(x)$, where $f(n)=a_n$.
		Its derivative is:
		\[
			f(x) = \frac{x^2}{x^3+1}\xrightarrow{\text{differentiation}} f^{\prime}(x) = \frac{2x(x^3+1)-x^2(3x^2)}{(x^3+1)^2} = \frac{x(2-x^3)}{(x^3+1)^2}
		.\]
		Since we are considering only positive $x$, we see that:
		\[
			f^{\prime}(x)<0\iff 2-x^3<0\iff x>2^{\frac{1}{3}}
		.\]
		Thus, $f$ is strictly decreasing on the interval $(2^{\frac{1}{3}},\infty)$.
		This means that $f(n+1)<f(n)$ and therefore $a_{n+1}<a_n$ for all $n\geqslant 2$.
		On the other hand, it is clear that:
		\[
		a_2 = \frac{2^2}{2^3+1}= \frac{4}{9}<\frac{1}{2} = a_1
		.\]
		So the sequence $\left\{ a_n \right\}^{\infty}_{n=1}$ is decreasing.
		The limit of $\left\{ a_n \right\}$ is readily verified:
		\[
		\lim_{n \to \infty}a_n = \lim_{n \to \infty}\frac{n^2}{n^3+1} = \lim_{n \to \infty}\frac{\frac{1}{n}}{1+\frac{1}{n^3}} = 0
		.\]
		Hence, the given series is convergent by the alternating series test.
	\end{sol}
\end{exmp}
