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

\chapter{Series: A Special Sequence}%
\label{cha:series}

\section{Series}%
\label{sec:series}

\begin{definition}
	Partial Sums \& Infinite Series.
	Consider a sequence $\{a_n\}$.
	A \textbf{partial sum} or an $n$-th \textbf{partial sum} is the sum $s_n$ of finite number of ordered terms defined by:
	\begin{align*}
		s_n & = a_1 + a_2+\dotsb+a_n\\
		    & = \sum_{k=1}^{n}a_{k}
	\end{align*}
	A series or an \textbf{infinite series} is an expression of the form:
	\[
	\sum_{n=1}^{\infty}a_n = a_1+a_2+a_3+\dotsb+a_n+\dotsb+
	.\]
\end{definition}
Note that $\{s_n\}$ forms a sequence of partial sums:
\[
s_1,s_2,s_3,\dotsc,s_n,\dotsc
.\]
Using the limit symbol, we have:
\[
	\sum_{n=1}^{\infty}a_n = \lim_{m \to \infty}\left(\sum_{n=1}^{m}a_n\right)
.\]
which may or may not exist in general.
\begin{definition}
	Convergent Series \& Sum.
	Given a sequence $\{a_n\}$, if the sequence of partial sums $\{s_n\}$ converges to a number $s$, then the series $\sum_{n=1}^{\infty}a_n$is said to be \textbf{convergent} and its sum is $s$:
	\[
		\sum_{n=1}^{\infty}a_n=s
	.\]
	The number $s$ is called the sum of the series.
\end{definition}

\section{Geometric Series}%
\label{sec:geometric_series}

\begin{definition}
	Geometric Series.
	A \textbf{geometric sequence} is a sequence $\{ar^{n}\}^{\infty}_{n=0}$, where $a\neq 0$ is a constant and $\frac{a_{n+1}}{a_{n}}=r$ is a constant, known as the common ratio $r$:
	\[
	a,ar,ar^2,ar^3,\dotsc,ar^{n},\dotsc
	.\]
	The corresponding series:
	\[
	\sum_{n=0}^{\infty} ar^{n} = a + ar + ar^2 + ar^3 + \dotsb + ar^{n} + \dotsb
	\]
	is called a \textbf{geometric series}.
\end{definition}
\begin{exmp}
	The series:
	\[
		\frac{1}{2}+ \frac{1}{4} + \frac{1}{8} + \dotsb + \frac{1}{2^{n}} + \dotsb = \sum_{n=0}^{\infty} \frac{1}{2}\left(\frac{1}{2}\right)^{n}
	.\]
	is a geometric series with $a=\frac{1}{2}$ and the common ratio $r=\frac{1}{2}$.
\end{exmp}
\begin{exmp}
	The series:
	\[
		1 - 1 + 1 -1 + \dotsb + (-1)^{n-1} + \dotsb = \sum_{n=0}^{\infty} (-1)^{n}
	.\]
	is a geometric series with $a=1$ and the common ratio $r=-1$.
\end{exmp}
\begin{thrm}
	The geometric series:
	\[
	\sum_{n=0}^{\infty} ar^{n} = a + ar + ar^2 + ar^3 + \dotsb + ar^{n} + \dotsb
	.\]
	where $a\neq 0$ is convergent if $|r|<1$.
	Its limit is:
	\[
	\frac{a}{1-r}
	.\]
	The geometric series is divergent if $|r|\geqslant 1$.
\end{thrm}
\begin{proof}
	Equation for limit of a convergent series.
	If $r=1$, the series is of the form:
	\[
	a + a + a + \dotsb + a + \dotsb
	.\]
	which diverges to $\infty$.
	Whereas if $r=-1$, the series is of the form:
	\[
	a -a +a-\dotsb+a-\dotsb
	.\]
	which never converges to a number.
	For $|r|\neq 1$, we let:
	\begin{equation}
		\label{geom_1}
		s_n = a + ar + ar^2 + ar^3 + \dotsb + ar^{n}.
	\end{equation}
	When multiplied by $r$ gives:
	\begin{equation}
		\label{geom_2}
		rs_n = ar + ar^2 + ar^3 + \dotsb + ar^{n+1}.
	\end{equation}
	And if we take \cref{geom_2} away from \cref{geom_1}, we get the following:
	\[
		(1-r)s_n= a-ar^{n+1}
	.\]
	Which therefore gives us:
	\[
		s_n = \frac{a(1-r^{n+1})}{1-r}
	.\]
	If $|r|<1$, then $\lim_{n \to \infty}r^{n+1}=0$.
	It follows that:
	\[
		\lim_{n \to \infty}s_{n}= \lim_{n \to \infty}\frac{a(1-r^{n+1})}{1-r}=\frac{a}{1-r}
	.\]
	Therefore:
	\[
	\sum_{n=0}^{\infty} ar^{n} = \frac{a}{1-r}
	.\]
	If $|r|>1$, then the geometric series diverges since $\lim_{n \to \infty}r^{n+1}$ does not exist.
\end{proof}

\section{Telescoping Series}%
\label{sec:telescoping_series}

A \textbf{telescoping series} is a series which can be expressed as:
\[
\sum_{n=1}^{\infty} a_n-a_{n+m}
,\]
for some $m$.
\begin{exmp}
	Evaluate $a_n$ and $m$ in the following telescoping series:
	\[
		\sum_{n=1}^{\infty} \left(\frac{1}{n^2+9}-\frac{1}{(n+3)^2+9}\right)
	.\]
	We see that $a_n = \frac{1}{n^2+9}$, $m=3$.
\end{exmp}
\begin{exmp}
	Evaluate $a_n$ and $m$ in the following telescoping series:
	\[
		\sum_{n=1}^{\infty} \left(\cos\left(\frac{\pi}{n}\right)-\cos\left(\frac{\pi}{n+2}\right)\right)
	.\]
	We see that $a_n = \cos\left(\frac{\pi}{n}\right)$, $m=2$.
\end{exmp}

\noindent
Consider a telescoping series:
\[
\sum_{n=1}^{\infty} a_n-a_{n+m}
,\]
where $m$ is a fixed integer.
Let $s_n$ be the partial sum which is evidently of the following form:
\[
s_n = \sum_{n=1}^{N} (a_n-a_{n+m})
.\]
For $N>m$, we have:
\begin{align*}
	s_n & = \sum_{n=1}^{N} (a_n-a_{n+m})\\
	    & = \left(\sum_{n=1}^{N} a_n\right) - \left(\sum_{n=1}^{N} a_{n+m}\right)\\
	    & = \left(\sum_{n=1}^{m} a_n + \sum_{n=m+1}^{N} a_n\right) - \left(\sum_{n=m+1}^{N} a_n + \sum_{n=N+1}^{N+m} a_n\right)\\
	    & = \left(\sum_{n=1}^{m} a_n\right) - \left(\sum_{n=N+1}^{N+m} a_n\right)
\end{align*}
which is simply the sum of the first $m$ terms minus the sum of the last $m$ terms.
Note that as $N\to \infty$, we have:
\[
	\sum_{n=1}^{\infty} (a_n-a_{n+m}) = \lim_{N \to \infty}\underbrace{\sum_{n=1}^{N} (a_n-a_{n+m})}_{s_n} = \lim_{N \to \infty}s_n
.\]
Therefore if $\lim_{N \to \infty}a_n = L$ exists, then:
\begin{align*}
	\sum_{n=1}^{\infty} (a_n-a_{n+m}) & = \lim_{N \to \infty}\left(\sum_{n=1}^{m} a_n-\sum_{n=N=1}^{N+m} a_n\right)\\
					  & = \sum_{n=1}^{m} a_n - \lim_{N \to \infty}\sum_{n=N+1}^{N+m} a_n\\
					  & = \sum_{n=1}^{m} a_n - \lim_{N \to \infty}(a_{N+1}+a_{N+2}+\dotsb+a_{N+m})\\
					  & = \left(\sum_{n=1}^{m} a_n\right) - mL.
\end{align*}
If $\lim_{N \to \infty}a_N$ does not exist, then the telescoping series is divergent.
\begin{exmp}
	Consider the telescoping series:
	\[
		\sum_{n=1}^{\infty} \left(\cos\left(\frac{\pi}{n}\right) - \cos\left(\frac{\pi}{n+2}\right)\right)
	.\]
	Note that $a_n= \cos\left(\frac{\pi}{n}\right)$, and $m=2$.
	For $N>2$, we have:
	\[
		s_n = \sum_{n=1}^{2} \cos\left(\frac{\pi}{n}\right) - \sum_{n=N+1}^{N+2} \cos\left(\frac{\pi}{n}\right)
	.\]
	\begin{note}
		$\lim_{n \to \infty}\cos\left(\frac{\pi}{n}\right)=\cos 0=1$.
	\end{note}
	Therefore we have:
	\begin{align*}
		\sum_{n=1}^{\infty} \left(\cos\left(\frac{\pi}{n}\right) - \cos\left(\frac{\pi}{n+2}\right)\right) & = \sum_{n=1}^{2} \cos\left(\frac{\pi}{n}\right) - \lim_{N \to \infty}\sum_{n=N+1}^{N+2} \cos\left(\frac{\pi}{n}\right)\\
														   & = \left(\cos(\pi)+\cos\left(\frac{\pi}{2}\right)\right) - 2(1)\\
														   & = -1 -2\\
														   & = -3
	\end{align*}
	The given telescoping series converges to $-3$.
\end{exmp}
