% vim: tw=50
% 11/10/2022 11AM

\myskip
What about differentiation? \\
Here, even uniform convergence is not enough.

\begin{example*}
    $f_n : [-1, 1] \to \RR$, each function
    differentiable, $f_n \to f$ uniformly but $f$
    not differentiable. We will let $f(x) = |x|$.
    Consider:
    \[ f_n(x) = \begin{cases}
        |x| & |x| \ge \frac{1}{n} \\
        \frac{n}{2} x^2 + \left( \frac{1}{n} -
        \frac{1}{2n^2} \right) & |x| < \frac{1}{n}
    \end{cases} \]
    By straightforward calculations, $f_n \to f$ uniformly,
    and all the $f_n$ are differentiable.
\end{example*}

\noindent
In fact we need uniform convergence of the
\emph{derivatives}.

\begin{flashcard}[limit-of-differentiable-functions]
\begin{theorem}[Limit of differentiable functions]
    \cloze{
    Let $f_n : (u, v) \to \RR$ ($n \ge 1$) and
    $f : (u, v) \to \RR$ with $f_n \to f$
    \fcemph{pointwise}.
    Suppose further each function is \fcemph{continuously
    differentiable} and that $f_n' \to g$
    \fcemph{uniformly}.
    Then $f$ is differentiable with $f' = g$.
    }
\end{theorem}
\prompt{

\begin{proof}
\cloze{
    Use Fundamental Theorem of Calculus and the
    fact about uniform limit of integrable
    functions.
}
\end{proof}
}
\end{flashcard}

\begin{proof}
    Fix $a \in (u, v)$. Let $x \in (u, v)$. By
    Fundamental theorem of calculus we have each
    $f_n'$ is integrable over $[a, x]$ and
    $\int_a^x f_n' = f_n(x) - f_n(x)$. But $f_n'
    \to g$ uniformly so by Theorem 5, $g$ is
    integrable over $[a, x]$ and $\int_a^x g =
    \lim_{n \to \infty} \int_a^x f_n'(x) = f(x) -
    f(a)$. So we have shown that for all $x \in
    (u, v)$,
    \[ f(x) = f(a) + \int_a^x g .\]
    By Theorem 4, $g$ is continuous so by
    Fundamental theorem of calculus, $f$ is
    differentiable with $f' = g$.
\end{proof}

\begin{remark*}
    It would have sufficed to assume $f_n(x) \to
    f(x)$ at a single value of $x$ rather than
    $f_n \to f$ pointwise.
\end{remark*}

\begin{definition*}
    Let $X \subset \RR$ and let $f_n : X \to \RR$
    for each $n \ge 1$. We say $(f_n)$ is
    \emph{uniformly Cauchy} if
    \[ \forall \eps > 0 ~\exists N ~\forall m, n \ge
    N ~\forall x \in X \quad |f_m(x) - f_n(x)| <
    \eps \]
\end{definition*}

\noindent
Exercise: uniformly convegent $\implies$ uniformly
Cauchy.

\begin{flashcard}[general-principle-of-uniform-convergence]
\begin{theorem}[General Principle of Uniform
    Convergence]
    \cloze{
    Let $(f_n)$ be a uniformly Cauchy sequence of
    functions $X \to \RR$ ($X \subset \RR$). Then
    $(f_n)$ is uniformly convergent.
}
\end{theorem}
\end{flashcard}

\begin{proof}
    Let $x \in X$. Let $\eps > 0$. Then
    \[ \exists N ~\forall m, n \ge N ~\forall y
    \in X \quad |f_m(y) - f_n(y)| < \eps .\]
    In particular, $\forall m, n \ge N$, $|f_m(x)
    - f_n(x)| < \eps$. So $(f_n(x))_{n \ge 1}$ is
    a Cauchy sequence in $\RR$ so by general
    principle of convergence it converges, say
    $f_n(x) \to f(x)$ as $n \to \infty$. \\
    We have now constructed $f : X \to \RR$ such
    that $f_n \to f$ pointwise. \\
    Let $\eps > 0$. Then we can find an $N$ such
    that
    \[ \forall m, n \ge N ~\forall y \in X \quad
    |f_m(y) - f_n(y)| < \eps .\]
    Fix $y \in X$, keep $m \ge N$ fixed and let $n
    \to \infty$:
    \[ |f_m(y) - f(y)| \le \eps .\]
    So we have shown that $\forall m \ge N$,
    $|f_m(y) - f(y)| \le \eps$. But $y$ was
    arbitrary so
    \[ \forall x \in X ~\forall m \ge N \quad
    |f_m(x) - f(x)| \le \eps .\]
    So $f_n \to f$ uniformly.
\end{proof}

\begin{definition*}
    Let $X \subset \RR$ and let $f_n : X \to \RR$
    for each $n \ge 1$. We say $(f_n)$ is
    \emph{pointwise bounded} if $\forall x ~\exists
    M ~\forall n$, $|f_n(x)| \le M$.
    We say $(f_n)$ is \emph{uniformly bounded} if
    $\exists M ~\forall x ~\forall n$, $|f_n(x)|
    \le M$.
\end{definition*}

\noindent
What would uniform Bolzano Weierstrass say?
``If $(f_n)$ is a uniformly bounded sequence of
functions then it has a uniformly convergent
subsequence.'' \\
But this is \emph{not} true.

\begin{example*}
    $f_n : \RR \to \RR$ defined by
    \[ f_n(x) = \begin{cases}
        1 & x = n \\
        0 & x \neq n
    \end{cases} \]
    Obviously uniformly bounded (by 1). However,
    if $m \neq n$, then $f_m(m) = 1$ and $f_n(m) =
    0$ so $|f_m(m) - f_n(m)| = 1$ so no
    subsequence can be uniformly convergent.
\end{example*}

\subsubsection*{Application to power series}

Recall that if $\sum_n a_n x^n$ is a real power
series with radius of convergence $R > 0$ then can
differentiate / integrate it term-by-term within
$(-R, R)$.

\begin{definition*}
    Let $f_n : X \to \RR$ ($X \subset \RR$) for
    each $n \ge 0$. We say the series $\sum_{n =
    0}^\infty f_n$ \emph{converges uniformly} if
    the sequence of partial sums $(F_n)$ does,
    where $F_n = \sum_{m = 0}^n f_m$.
\end{definition*}

\noindent
Can apply theorem 4 to 6 to get for example if
conditions hold with $f_n$ continuously
differentiable and uniform convergence then $\sum
f_n$ has derivative $\sum f_n'$. \myskip
We hope to prove that $\sum a_n x^n$ converges
uniformly on $(-R, R)$ then hit it with earlier
theorems, but this is not quite true.

\begin{example*}
    $\sum_{n = 0}^\infty x^n$ with radius of
    convergence 1. This does \emph{not} converge
    uniformly on $(-1, 1)$. Let $f(x) = \sum_{n =
    0}^\infty x^n$ and $F_n(x) = \sum_{m = 0}^n
    x^m$. Note $f(x) = \frac{1}{1 - x} \to \infty$
    as $x \to 1$. However, $\forall x \in (-1,
    1)$, $|F_n(x)| \le n + 1$. Fix any $n$. We can
    find a point $x \in (-1, 1)$ where $f(x) \ge n
    + 2$ and so $|f(x) - F_n(X)| \ge 1$. So clearly
    we can't have that $F_n \to f$ uniformly.
\end{example*}

\noindent
Back up plan: it does work if we look at smaller
interval. New plan: show if $0 < r < R$, then we
\emph{do} have uniform convergence on $(-r, r)$.
\myskip
Given $x \in (-R, R)$ there's some $r$ with $|x| <
r < R$: use uniform convergence on $(-r, r)$ to
check everything nice at $x$. `Local uniform
convergence of power series.'
