# Lecture 25

## Review

Are the following statements true or false? You do not need to give a rigorous proof.

1. $\exists N\in \mathbb{N}$, $\forall n\geq N$, $\left(\frac{1}{2}\right)^n < 0.001$
    - True, let $N = 10$
2. $\forall \epsilon > 0$, $\exists N\in \mathbb{N}$, $\forall n\geq N$, $\left(\frac{1}{2}\right)^n < \epsilon$
    - True, let $N = \lceil \log_{\frac{1}{2}} \epsilon \rceil$
3. $\forall x\in [0, 1)$, $\forall \epsilon > 0$, $\exists N\in \mathbb{N}$, $\forall n\geq N$, $x^n < \epsilon$
    - True, let $N = \lceil \log_x \epsilon \rceil$
4. $\forall \epsilon > 0$, $\exists N\in \mathbb{N}$, $\forall n\geq N$, $\forall x\in [0, 1)$, $x^n < \epsilon$
    - False, $x$ can be arbitrarily close to 1
5. $\forall \epsilon > 0$, $\forall x\in \left[0, \frac{1}{2}\right]$, $\exists N\in \mathbb{N}$, $\forall n\geq N$, $x^n < \epsilon$
    - True, let $N = \lceil \log_{\frac{1}{2}} \epsilon \rceil$

## New Materials

### Sequences and series of functions

#### Definition 7.1

Let $(f_n)$ be a sequence of functions $E\to \mathbb{R}$. Let $f:E\to \mathbb{R}$ be a function. We say $(f_n)$ converges pointwise to $f$ if $\forall x\in E$, $\lim_{n\to \infty} f_n(x) = f(x)$.

i.e. $\forall x\in E$, $\forall \epsilon > 0$, $\exists N\in \mathbb{N}$, $\forall n\geq N$, $|f_n(x) - f(x)| < \epsilon$.

Example:

The sequence from the warm up exercise converges pointwise to $f(x) = \begin{cases} 0 & x\in [0, 1) \\ 1 \text{ otherwise} \end{cases}$.

To check if a series of functions converges pointwise, we can take the limit of the series as $n\to \infty$.

Example:

Let $g_n(x):\mathbb{R}\to \mathbb{R}$ be defined by $g_n(x) = \sum_{k=0}^{n} \frac{x^2}{(1+x^2)^n}$.

$$
g_n(x) = \sum_{k=0}^{n} \left(\frac{x^2}{(1+x^2)^n}\right)
$$

And this is a geometric series with first term $\frac{x^2}{1+x^2}$ and common ratio $\frac{x^2}{1+x^2}$.

Then $\left(g_n\right)$ converges pointwise to $g(x) =\begin{cases} 0 & x = 0 \\ 1+x^2 & \text{otherwise} \end{cases}$.

This example shows that pointwise convergence does not preserve continuity. But if $(f_n)$ converges uniformly to $f$, then $f$ is continuous.

#### Definition 7.7

Let $(f_n)$ be a sequence of functions $E\to \mathbb{R}$. We say $(f_n)$ converges uniformly to $f$ if $\forall \epsilon > 0$, $\exists N\in \mathbb{N}$, $\forall n\geq N$, $\forall x\in E$, $|f_n(x) - f(x)| < \epsilon$.

i.e. $\forall \epsilon > 0$, $\exists N\in \mathbb{N}$, such that $\forall n\geq N$, $\forall x\in E$, $|f_n(x) - f(x)| < \epsilon$.

> $f_n$ must always be within $[f-\epsilon, f+\epsilon]$ for all $n\geq N$.

Example:

Let $f_n(x) = \frac{1}{n}\sin(n^2 x)$.

Ideas of proof:

Given $\epsilon > 0$, let $N = \lceil \frac{1}{\epsilon} \rceil$. (This choice of $N$ does not depend on $x$.)

Then $\forall n\geq N$, $\forall x\in \mathbb{R}$, $|\frac{1}{n}\sin(n^2 x)| < \epsilon$.

Example:

Let $f_n:[0, 1]\to \mathbb{R}$, $f_n(x) = x^n$.

Then $(f_n)$ does not converge uniformly to $f(x) = \begin{cases} 0 & x<1 \\ 1 & x = 0 \end{cases}$.

$f_n$ does not lie in the region $[0, 1]$ for all $n$.

#### Theorem 7.12 (Corollary of Theorem 7.11) (Uniform limit theorem)

Let $(f_n)$ be a sequence of continuous functions $E\to \mathbb{R}$. If $(f_n)$ converges uniformly to $f$ on $E$, then $f$ is continuous.

Proof:

Suppose $f_n\to f$ uniformly and $\forall n$, $f_n$ is continuous.

Let $p\in E$ and $\epsilon > 0$.

Since $f_n\to f$ uniformly, $\exists N\in \mathbb{N}$, $\forall n\geq N$, $\forall x\in E, |f_n(x) - f(x)| < \epsilon$.

Since $f_N$ is continuous at $p$, $\exists \delta > 0$, such that $\forall x\in E$, if $|f_N(x) - f_N(p)| < \epsilon$.

Suppose $x\in B_\delta(p)$. Then

$$
\begin{aligned}
|f(x) - f(p)| &= |f(x) - f_N(x) + f_N(x) - f_N(p) + f_N(p) - f(p)| \\
&\leq |f(x) - f_N(x)| + |f_N(x) - f_N(p)| + |f_N(p) - f(p)| \\
&< 3\epsilon
\end{aligned}
$$

_The $\epsilon$ bound would not hold if we only had pointwise convergence._

$|f_N(x) - f_N(p)| < 3\epsilon$.

QED

> Recall: If $(s_n)$ is a sequence in $\mathbb{R}$, then $(s_n)$ converges to $s$ if and only if it is Cauchy.  
> i.e. $\forall \epsilon > 0$, $\exists N\in \mathbb{N}$, $\forall n, m\geq N$, $|s_n - s_m| < \epsilon$.

#### Theorem 7.9 (Cauchy criterion for uniform convergence)

Let $(f_n)$ be a sequence of functions $E\to \mathbb{R}$. $(f_n)$ converges uniformly to $f$ on $E$ if and only if $(f_n)$ is uniformly Cauchy.

i.e. $\forall \epsilon > 0$, $\exists N\in \mathbb{N}$, $\forall n, m\geq N$, $\forall x\in E$, $|f_n(x) - f_m(x)| < \epsilon$.

Proof:

Exercise.

#### Theorem 7.10 (Weierstrass M-test)

Let $(f_n)$ be a sequence of functions $E\to \mathbb{R}$ (or $\mathbb{C}$). Suppose 

- $\forall n$, $\exists M_n\in \mathbb{R}_{\geq 0}$, such that $\forall x\in E$, $|f_n(x)| \leq M_n$.
- $\sum_{n=1}^{\infty} M_n$ converges.

Then $\sum_{n=1}^{\infty} f_n(x)$ converges uniformly on $E$.

i.e. The sequence of partial sums $s_n(x) = \sum_{k=1}^{n} f_k(x)$ converges uniformly on $E$.

Remark:

The proof is nearly identical to the proof of the comparison test in Chapter 3.

Proof:

By Theorem 7.8, it's enough to show that $(s_n)$ is uniformly Cauchy.

i.e. $\forall \epsilon > 0$, $\exists N\in \mathbb{N}$, $\forall m\geq n\geq N$, $\forall x\in E$, $|\sum_{k=n}^{m} f_k(x)| < \epsilon$.

Let $\epsilon > 0$. Since $\sum_{n=1}^{\infty} M_n$ converges, $\exists N\in \mathbb{N}$, $\forall m\geq n\geq N$, $\sum_{k=n}^{m} M_k < \epsilon$.

Suppose $m\geq n\geq N$ and $x\in E$.

$$
\begin{aligned}
|\sum_{k=n}^{m} f_k(x)| &\leq \sum_{k=n}^{m} |f_k(x)| \\
&\leq \sum_{k=n}^{m} M_k \\
&< \epsilon
\end{aligned}
$$

QED

Example:

Let $f_n(x) = \sum_{n=0}^{\infty} \frac{1}{2^n} \cos(3^n x)$.

$$
\left|\frac{1}{2^n} \cos(3^n x)\right| \leq \frac{1}{2^n}=M_n
$$

By Weierstrass M-test, $f_n(x)$ converges uniformly on $\mathbb{R}$.

By **Theorem 7.12**, $f(x) = \sum_{n=0}^{\infty} \frac{1}{2^n} \cos(3^n x)$ is continuous on $\mathbb{R}$.

Fun fact: $f(x)$ is not differentiable at any $x\in \mathbb{R}$.