Convergence

A Taylor series can be thought of as an infinite polynomial. Up until now, we have not worried about the issues that come up when adding up infinitely many things. This module deals with two main issues:

1. A function may not have a Taylor series at all;
2. A function's Taylor series may not converge everywhere, even within the function's domain.

Functions without a Taylor series
The first problem is that some functions cannot be expressed in the form
$$
f(x)=\sum_{k=0}^{\infty} c_k x^k=c_0+c_1 x+c_2 x^2+\cdots
$$

Examples include tan, which has vertical asymptotes, and $\ln$, which is not defined for $x \leq 0$. Polynomials are not able to capture these sorts of discontinuities and asymptotes.

THE GEOMETRIC SERIES
The geometric series is an example of a Taylor series which is well behaved for some values of $x$ and nonsensical for other values of $x$. The claim is that
$$
1+x+x^2+x^3+x^4+\cdots=\frac{1}{1-x},
$$
for $|x|<1$.
Justification
Example Compute the Taylor series for $f(x)=\frac{1}{1-x}$ directly from the definition.

\textbf{Answer}

\noindent\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black]

$$
\begin{array}{rlrl}
	f(x) & =\frac{1}{1-x} & f(0) & =1 \\
	f^{\prime}(x) & =\frac{1}{(1-x)^2} & f^{\prime}(0)=1 \\
	f^{\prime \prime}(x) & =\frac{2}{(1-x)^3} & f^{\prime \prime}(0)=2 \\
	f^{\prime \prime \prime}(x) & =\frac{6}{(1-x)^4} & f^{\prime \prime \prime}(0)=6 .
\end{array}
$$

Notice the pattern that
$$
f^{(k)}(x)=\frac{k!}{(1-x)^{k+1}},
$$
at least for the first few $k$. To see that the pattern continues, assume it holds for some $k$, and show that it holds for $k+1$ (this is a proof technique known as mathematical induction). If $f^{(k)}(x)=\frac{k!}{(1-x)^{k+1}}$, then
$$
f^{(k+1)}(x)=\frac{(k+1) k!}{(1-x)^{k+2}}=\frac{(k+1)!}{(1-x)^{k+2}},
$$
as desired. Then $f^{(k)}(0)=k!$, so according to the definition of Taylor series, it follows that
$$
\begin{aligned}
	\frac{1}{1-x} & =0!+1!x+\frac{2!}{2!} x^2+\frac{3!}{3!} x^3+\cdots \\
	& =1+x+x^2+x^3+\cdots,
\end{aligned}
$$
which agrees with the above.
\end{tcolorbox}




Note The geometric series only holds when $|x|<1$. This makes sense, because if $|x|>1$, the powers of $x$ are getting bigger and bigger and so the series should not converge. If $x=1$, then the series is adding 1 infinitely many times, which diverges. If $x=-1$, then the series oscillates between 1 and 0 , and hence does not converge.

The takeaway is that every Taylor series has a convergence domain where the series is well-behaved, and outside that domain the series will not converge. For many functions, the domain is the whole real number line (e.g. the series for $e^x$, sin, cos, cosh, and sinh all converge everywhere), but be aware that there are functions whose Taylor series do not converge everywhere. This will be covered more formally in Series Convergence And Divergence.

\textbf{Example} A beam of light of intensity $L$ hits a pane of glass. Half of the light is reflected, and a third of the light is transmitted; the rest is absorbed. When a beam of light of intensity $L$ hits two parallel panes with an air gap between them, how much light is transmitted through both panes? (The following figure shows how the light gets reflected and rereflected. The first transmitted and reflected beams of light are labeled with their respective intensities. The question asks for the total of the beams of light emerging on the right side of the right pane of glass).

\begin{figure}[h]
	\centering
	\includegraphics[width=0.5\linewidth]{Upenn010}
	\caption{}
	\label{fig:upenn010}
\end{figure}

\textbf{Answer}

\noindent\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black]
By labeling more of the transmitted and reflected beams of light, a pattern emerges among the beams of light on the right side of the right pane:
\end{tcolorbox}

\begin{figure}[h]
	\centering
	\includegraphics[width=0.5\linewidth]{Upenn010a}
	\caption{}
	\label{fig:upenn010a}
\end{figure}

\noindent\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black]
$\frac{1}{9}, \frac{1}{36}, \frac{1}{144}, \ldots$ Note that each beam is $\frac{1}{4}$ the previous beam. Thus, the total light emerging on the right side of the right pane of glass is
$$
\begin{aligned}
	\frac{L}{9}+\frac{L}{36}+\frac{L}{144}+\cdots & =\frac{L}{9}\left(1+\frac{1}{4}+\frac{1}{16}+\cdots\right) \\
	& =\frac{L}{9}\left(\frac{1}{1-1 / 4}\right) \\
	& =\frac{L}{9} \frac{4}{3} \\
	& =\frac{4 L}{27}
\end{aligned}
$$
by using the formula for the geometric series.

\end{tcolorbox}

Example Use the Taylor series of $\frac{1}{1-x}$ to derive the Taylor series of $\ln (1+x)$. Hint: recall that $\ln (1+x)=\int \frac{1}{1+x} d x$. \textbf{Answer}

\noindent\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black]
Note that
$$
\begin{aligned}
	\frac{1}{1+x} & =\frac{1}{1-(-x)} \\
	& =1-x+x^2-x^3+x^4-\cdots
\end{aligned}
$$

Now, integrating gives $\int \frac{d x}{1+x}=\ln (1+x)+C$ on the one hand, and
$$
\begin{aligned}
	\int\left(1-x+x^2-x^3+x^4-\cdots\right) d x & =x-\frac{x^2}{2}+\frac{x^3}{3}-\cdots \\
	& =\sum_{k=1}^{\infty}(-1)^{k-1} \frac{x^k}{k}
\end{aligned}
$$
on the other hand. Plugging in $x=0$ shows that $C=0$, and so
$$
\begin{aligned}
	\ln (1+x) & =x-\frac{x^2}{2}+\frac{x^3}{3}-\cdots \\
	& =\sum_{k=1}^{\infty}(-1)^{k+1} \frac{x^k}{k}
\end{aligned}
$$

Note that because this relied on the geometric series, which only holds for $|x|<1$, the same restriction holds for the Taylor series for $\ln (1+x)$.
\end{tcolorbox}

Example Use the fact that
$$
\arctan x=\int \frac{1}{1+x^2} d x
$$
to find the Taylor series for arctan $x$. \textbf{Answer}

\noindent\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black]
Using the fact, and the geometric series, we find that
$$
\begin{aligned}
	\arctan (x) & =\int \frac{1}{1+x^2} d x \\
	& =\int \frac{1}{1-\left(-x^2\right)} d x \\
	& =\int\left(1-x^2+x^4-x^6+\cdots\right) d x \\
	& =x-\frac{x^3}{3}+\frac{x^5}{5}-\frac{x^7}{7}+\cdots+C .
\end{aligned}
$$

Plugging in $x=0$ gives that $C=0$, since arctan $0=0$. Thus,
$$
\begin{aligned}
	\arctan (x) & =x-\frac{x^3}{3}+\frac{x^5}{5}-\cdots \\
	& =\sum_{k=0}^{\infty}(-1)^k \frac{x^{2 k+1}}{2 k+1}
\end{aligned}
$$
$$
(|x|<1) \text {. }
$$

So even though arctan is defined for all $x$, its Taylor series only converges for $|x|<1$.
\end{tcolorbox}

Example Another important function is the binomial series $(1+x)^\alpha$, where $\alpha$ is some constant. Show that
$$
\begin{gathered}
	(1+x)^\alpha=1+\alpha x+\frac{\alpha(\alpha-1)}{2!} x^2+\frac{\alpha(\alpha-1)(\alpha-2)}{3!} x^3+\cdots \\
	=\sum_{k=0}^{\infty}\binom{\alpha}{k} x^k \\
	\text { where }\binom{\alpha}{k}=\frac{\alpha(\alpha-1)(\alpha-2) \cdots(\alpha-k+1)}{k!} .
\end{gathered}
$$

This series also only holds for $|x|<1$.
\textbf{Answer}

\noindent\begin{tcolorbox}[colback=red!5!white,colframe=red!75!black]
For fixed $\alpha$ we have $f(x)=(1+x)^\alpha$. Then proceeding from the definition of the Taylor series, one computes
$$
\begin{array}{rlrl}
	f(x) & =(1+x)^\alpha & f(0) & =1 \\
	f^{\prime}(x) & =\alpha(1+x)^{\alpha-1} & f^{\prime}(0) & =\alpha \\
	f^{\prime \prime}(x) & =\alpha(\alpha-1)(1+x)^{\alpha-2} & f^{\prime \prime}(0) & =\alpha(\alpha-1) \\
	f^{\prime \prime \prime}(x) & =\alpha(\alpha-1)(\alpha-2)(1+x)^{\alpha-3} & f^{\prime \prime \prime}(0) & =\alpha(\alpha-1)(\alpha-2) \\
	\vdots & & \vdots
\end{array}
$$

One finds that, in general, $f^{(k)}(0)=\alpha(\alpha-1)(\alpha-2) \cdots(\alpha-k+1)$. Thus, the Taylor expansion for $(1+x)^\alpha$ is
$$
\begin{aligned}
	(1+x)^\alpha & =1+\alpha x+\frac{\alpha(\alpha-1)}{2!} x^2+\frac{\alpha(\alpha-1)(\alpha-2)}{3!} x^3+\cdots \\
	& =1+\binom{\alpha}{1} x+\binom{\alpha}{2} x^2+\binom{\alpha}{3} x^3+\cdots \\
	& =\sum_{k=0}^{\infty}\binom{\alpha}{k} x^k
\end{aligned}
$$
as claimed.

\end{tcolorbox}


Summary
Here are all the series we have found so far. The following hold for all $x$ :
$$
\begin{aligned}
	e^x & =\sum_{k=0}^{\infty} \frac{x^k}{k!} \\
	\cos x & =\sum_{k=0}^{\infty}(-1)^k \frac{x^{2 k}}{(2 k)!} \\
	\sin x & =\sum_{k=0}^{\infty}(-1)^k \frac{x^{2 k+1}}{(2 k+1)!} \\
	\cosh x & =\sum_{k=0}^{\infty} \frac{x^{2 k}}{(2 k)!} \\
	\sinh x & =\sum_{k=0}^{\infty} \frac{x^{2 k+1}}{(2 k+1)!} .
\end{aligned}
$$

The following hold for $|x|<1$ :
$$
\begin{aligned}
	\frac{1}{1-x} & =\sum_{k=0}^{\infty} x^k \\
	\ln (1+x) & =\sum_{k=1}^{\infty}(-1)^{k+1} \frac{x^k}{k} \\
	\arctan x & =\sum_{k=0}^{\infty}(-1)^k \frac{x^{2 k+1}}{2 k+1} \\
	(1+x)^\alpha & =\sum_{k=0}^{\infty}\binom{\alpha}{k} x^k
\end{aligned}
$$


Electrostatics example
Here we use the geometric series and the binomial series from above in an example from electrostatics. An electric dipole is a pair of equally and oppositely charged particles separated by a short distance. One question of interest in electrostatics is the electrostatic potential, which is the sum of the point charge potentials from each pole.

The point charge potential from a single particle with charge $q$, at a distance $d$ from the particle, is
$$
V=\frac{k q}{d}
$$
where $k$ is a constant called the Coulomb constant. Then a dipole with particles of charge $q$ and $-q$ has net electrostatic potential
$$
V=\frac{k q}{d_{+}}-\frac{k q}{d_{-}}
$$
where $d_{+}$is the distance to the positively charged particle, and $d_{-}$is the distance to the negatively charged particle:

\begin{figure}[h]
	\centering
	\includegraphics[width=0.4\linewidth]{Upenn011}
	\caption{}
	\label{fig:upenn011}
\end{figure}

We will calculate the first order term for the electrostatic potential at two different locations: $p_1$ and $p_2$ :

\begin{figure}[h]
	\centering
	\includegraphics[width=0.4\linewidth]{Upenn012}
	\caption{}
	\label{fig:upenn012}
\end{figure}

First consider $p_1$, located directly above and distance $d$ from the positive particle. Let $r$ be the distance between the charged particles. Then $d_{+}=d$, and by the Pythagorean theorem, $d_{-}=\sqrt{d^2+r^2}$. It follows that the electrostatic potential is
$$
\begin{aligned}
	V & =\frac{k q}{d_{+}}-\frac{k q}{d_{-}} \\
	& =\frac{k q}{d}-\frac{k q}{\sqrt{d^2+r^2}} .
\end{aligned}
$$

Now, factoring out $\frac{k q}{d}$, and applying the binomial series with $\alpha=-\frac{1}{2}$, we find
$$
\begin{aligned}
	V & =\frac{k q}{d}\left[1-\frac{1}{\sqrt{1+(r / d)^2}}\right] \\
	& =\frac{k q}{d}\left[1-\left(1+(r / d)^2\right)^{-1 / 2}\right] \\
	& =\frac{k q}{d}\left[1-\left(1-\frac{1}{2}(r / d)^2+\text { HOT }\right)\right] \\
	& =\frac{1}{2} \frac{k q \tau^2}{d^3}+\text { HOT. }
\end{aligned}
$$

At position $p_2$, which is directly left of and distance $d$ from the positive particle, we have $d_{+}=d$, and $d_{-}=d+\tau$, so we find that the electrostatic potential at $p_2$ is
$$
\begin{aligned}
	V & =\frac{k q}{d_{+}}-\frac{k q}{d_{-}} \\
	& =\frac{k q}{d}-\frac{k q}{d+r} .
\end{aligned}
$$

Again, factoring out $\frac{k q}{d}$ and expanding using the geometric series gives

$\begin{aligned} V & =\frac{k q}{d}\left(1-\frac{1}{1+\frac{r}{d}}\right) \\ & =\frac{k q}{d}\left(1-\left(1-\frac{r}{d}+\text { HOT }\right)\right) \\ & =\frac{k q r}{d^2}+\text { HOT. }\end{aligned}$

----------------------------------------------------------

EXERCISES
- Consider a snowman built from solid snowballs of radius $2^{-n}$, for $n=0,1,2, \ldots$, all stacked on top of one another. How many units tall is the snowman? How many cubic units of snow was required to build it?
- Compute the Taylor series about zero of
$$
\ln \frac{1+3 x}{1-3 x}
$$
- Compute the Taylor series about zero of
$$
\frac{1}{\sqrt{1-x^2}}
$$
- Using your answer to the previous problem, compute the Taylor series about zero of arcsin $x$, using termwise integration and the fact that
$$
\arcsin x=\int \frac{d x}{\sqrt{1-x^2}}
$$
- For which values $z$ is the Taylor series of $\sqrt[4]{3-2 z^2}$ guaranteed to converge?
- Use the binomial series to give the Taylor expansion of $(1+x)^3$. Now, do it with your head: easier, right? Recall, we have said that the binomial series only converges when $|x<1|$, but, clearly, that cannot be a *sharp* constraint, since $(1+x)^3$ is good for all $x$, right? Well, Horatio, there are more things... By the end of this course, we will learn when and how to bend some of these restrictions.

