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

\chapter{Power Series}%
\label{cha:power_series}

\section{The Power Series}%
\label{sec:the_power_series}

A differentiable function can be expressed as an `infinite polynomial' called a power series.

\begin{definition}
	Power Series.
	A \textbf{power series} in $x$ is a series of the form:
	\[
	\sum_{n=0}^{\infty} c_n x^{n} = c_0 + c_1x + c_2x^2 + c_3x^3 + \dotsb
	,\]
	where $x$ is a variable, and the $c_n$'s are constants called the \textbf{coefficients} of the series.
\end{definition}
\begin{note}
	A power series resembles a polynomial in $x$.
	The only difference is that $f$ has infinitely many terms, while a polynomial has only finitely many terms.
\end{note}
\begin{exmp}
	The geometric series:
	\[
	\sum_{n=0}^{\infty} x^{n} = 1 + x + x^2 + x^3 + \dotsb
	,\]
	is an example of a power series which converges when $-1<x<1$ and diverges when $\lvert x\rvert\geqslant 1$.
\end{exmp}
\begin{definition}
	Power series at $x=a$.
	More generally, a series of the form:
	\[
		\sum_{n=0}^{\infty} c_n(x-a)^{n} = c_0 + c_1(x-a) + c_2(x-a)^2 + \dotsb
	\]
	is called a power series in $(x-a)$ or a \textbf{power series at} $x=a$.
\end{definition}
\begin{exmp}
	For what values of $x$ is the series $\ds{\sum_{n=0}^{\infty} n!x^{n}}$ convergent?
	\begin{sol}
		Clearly, the series converges when $x=0$.
		Suppose $x\neq 0$.
		We use the ratio test with $a_n = n!x^{n}$:
		\[
			\lim_{n \to \infty}\left\lvert \frac{a_{n+1}}{a_n}\right\rvert = \lim_{n \to \infty}\left\lvert \frac{(n+1)!x^{n+1}}{n!x^{n}}\right\rvert = \lim_{n \to \infty}(n+1)\lvert x\rvert = \infty
		.\]
		By the ratio test, the series diverges whenever $x\neq 0$.
		So the series converges only when $x=0$.
	\end{sol}
\end{exmp}

\section{Radius of Convergence}%
\label{sec:radius_of_convergence}

\begin{thrm}
	Radius of Convergence.
	For any given power series:
	\[
		\sum_{n=0}^{\infty} c_n(x-a)^{n}
	,\]
	there are only three possibilities:
	\begin{enumerate}
		\item The series converges only when $x=a$.
		\item The series converges for all $x$.
		\item There is a positive number $R$ such that the series converges if $|x-a|<R$, and diverges if $|x-a|>R$.
	\end{enumerate}
	The number $R$ is called the \textbf{radius of convergence} of the power series.
	In the first case, $R=0$, and in the second case, $R=\infty$.
\end{thrm}
\begin{exmp}
	Find the radius of convergence and the interval of convergence of the series:
	\[
		\sum_{n=0}^{\infty} \frac{(-3)^{n}x^{n}}{\sqrt{n+1}}
	.\]
	\begin{sol}
		Let $a_n = \ds{\frac{(-3)^{n}x^{n}}{\sqrt{n+1}}}$.
		Then:
		\begin{align*}
			\lim_{n \to \infty}\left\lvert \frac{a_{n+1}}{a_n}\right\rvert & = \lim_{n \to \infty}\left\lvert \frac{(-3)^{n+1}x^{n+1}}{\sqrt{n+2}}\cdot \frac{\sqrt{n+1}}{(-3)^{n}x^{n}}\right\rvert\\
							 & = \lim_{n \to \infty}\left\lvert (-3x)\sqrt{\frac{n+1}{n+2}}\right\rvert\\
							 & = \lim_{n \to \infty}3\sqrt{\frac{1+\frac{1}{n}}{1+\frac{2}{n}}}\lvert x\rvert\\
			\therefore\rho & = 3\lvert x\rvert.
		\end{align*}
		By the ratio test, we see that the series converges if $3\lvert x\rvert<1$ and diverges if $3\lvert x\rvert>1$.
		This means that the radius of convergence, $R=\frac{1}{3}$.
		However, the ratio test provides no information regarding the cases where $3\lvert x\rvert=1$, that is, when $x=\pm \frac{1}{3}$.
		We consider these cases separately.

		\bigbreak
		\noindent
		If $x=-\frac{1}{3}$, then the series becomes:
		\[
			\sum_{n=0}^{\infty} \frac{(-3)^{n}x^{n}}{\sqrt{n+1}} = \sum_{n=0}^{\infty} \frac{1}{\sqrt{n+1}}
		,\]
		which diverges because:
		\[
			\frac{1}{\sqrt{n+1}}\geqslant \frac{1}{\sqrt{2n}} = \frac{1}{\sqrt{2}}\cdot \frac{1}{\sqrt{n}}
		,\]
		and since $\ds{\frac{1}{\sqrt{n}}}$ diverges, by the comparison test, the series also diverges.

		\bigbreak
		\noindent
		If $x=\frac{1}{3}$, then the series becomes:
		\[
			\sum_{n=0}^{\infty} \frac{(-3)^{n}x^{n}}{\sqrt{n+1}} = \sum_{n=0}^{\infty} \frac{(-1)^{n}}{\sqrt{n+1}}
		,\]
		which converges by the alternating series test.
		In summary, the interval of convergence of the given power series is $(-\frac{1}{3},\frac{1}{3}]$.
	\end{sol}
\end{exmp}
