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

\begin{lemma}
    Let $\sum a_n x^n$ be a real power series with
    radius of convergence $R > 0$. Let $0 < r <
    R$. Then $\sum a_n x^n$ converges uniformly on
    $(-r, r)$.
\end{lemma}

\begin{proof}
    Define $f, f_m : (-r, r) \to \RR$ by $f(x) =
    \sum_{n = 0}^\infty a_n x^n$ and $f_m(x) =
    \sum_{n = 0}^m a_n x^n$. Recall that $\sum
    a_n x^n$ converges absolutely for all $x \in
    (-r, r)$. Then
    \begin{align*}
        |f(x) - f_m(x)|
        &= \left| \sum_{n = m +
        1}^\infty a_n x^n \right| \\
        &\le \sum_{n = m + 1}^\infty |a_n| |x|^n
        \\
        &\le \sum_{n = m + 1}^\infty |a_n| r^n
    \end{align*}
    which converges by absolute convergence at
    $r$. Hence if $m$ sufficiently large, $f -
    f_m$ is bounded and
    \[ \sup_{x \in (-r, r)} |f(x) - f_m(x)| \le
    \sum_{n = m + 1}^\infty |a_n| r^n \to 0 \]
    as $m \to \infty$ by absolute convergence at
    $r$.
\end{proof}

\begin{theorem}
    Let $\sum a_n x^n$ be a real power series with
    radius of convergence $R > 0$. Define $f :
    (-R, R)$ by $f(x) = \sum_{n = 0}^\infty a_n
    x^n$. Then
    \begin{enumerate}[(i)]
        \item $f$ is continuous;
        \item for any $x \in (-R, R)$ $f$ is
            integrable over $[0, x]$ with
            \[ \int_0^x f = \sum_{n = 0}^\infty
            \frac{a_n}{n + 1} x^{n + 1} \]
    \end{enumerate}
\end{theorem}

\begin{proof}
    Let $x \in (-R, R)$. Pick $r$ such that $x < r
    < R$. By Lemma 8, $\sum a_n y^n$ converges
    uniformly on $(-r, r)$. But the partial sum
    functions $y \mapsto \sum_{n = 0}^m a_n y^n$
    ($m \ge 0$) are all continuous functions on
    $(-r, r)$. Hence by Theorem 4, $f_{(-r, r)}$
    is continuous. Hence $f$ is continuous at $x$.
    Thus $f$ is a continuous function on $(-R,
    R)$. More over, $[0, x] \subset (-r, r)$ so
    also have $\sum a_n y^n$ converges uniformly
    on $[0, x]$. Each partial sum function on $[0,
    x]$ is a polynomial so can be integrated with
    \[ \int_0^x \sum_{n = 0}^m a_n y^n \dd y =
    \sum_{n = 0}^m \int_0^x a_n y^n \dd y 
    = \sum_{n = 0}^m \frac{a_n}{n + 1} x^{n + 1} \]
    Hence by Theorem 5, $f$ is integrable over
    $[0, x]$ with
    \begin{align*}
        \int_0^x f
        &= \lim_{m \to \infty} \int_0^x \sum_{n =
        0}^m a_n y^n \dd y \\
        &= \lim_{m \to \infty} \sum_{n = 0}^m
        \frac{a_n}{n + 1} x^{n + 1} \\
        &= \sum_{n = 0}^\infty \frac{a_n}{n + 1}
        x^{n + 1}
        \qedhere
    \end{align*}
\end{proof}

\myskip
For differentiation, need technical lemma:

\begin{lemma}
    Let $\sum a_n x^n$ be a real power series with
    radius of convergence $R > 0$. Then the power
    series $\sum_{n \ge 1} na_n x^{n - 1}$ has
    radius of convergence at least $R$.
\end{lemma}

\begin{proof}
    Let $x \in \RR$, $0 < x < \RR$. Pick $w$ with
    $x < w < R$. Then $\sum a_n w^n$ is absolutely
    convergent, so $a_n w^n \to 0$ so $\exists M$
    such that $\forall n$, $|a_n w^n| \le M$. For
    each $n$,
    \[ |na_n x^{n - 1}| = |a_n w^n| \left|
    \frac{x}{w} \right|^n \frac{1}{|x|} n \]
    Fix $n$. Let $\alpha = \left| \frac{x}{w}
    \right| < 1$. Let $c = \frac{M}{|x|}$ be a
    constant. Then $|n a_n x^{n - 1}| \le
    cn\alpha^n$. By comparison test, sufficient to
    show $\sum na^n$ converges. Note
    \[ \left| \frac{(n + 1)\alpha^{n + 1}}{n
    \alpha^n} \right| = \left( 1 + \frac{1}{n}
    \right) \alpha \to \alpha < 1 \]
    as $n \to \infty$ so done by ratio test.
\end{proof}

\begin{theorem}
    Let $\sum a_n x^n$ be a real power series with
    radius of convergence $R > 0$. Let $f : (-R,
    R) \to \RR$ be defined by $f(x) = \sum_{n =
    0}^\infty a_n x^n$. Then $f$ is differentiable
    and $\forall x \in (-R, R)$, $f'(x) = \sum_{n
    = 1}^\infty na_n x^{n - 1}$.
\end{theorem}

\begin{proof}
    Let $x \in (-R, R)$. Pick $r$ with $|x| < r <
    R$. Then $\sum a_n y^n$ converges uniformly on
    $(-r, r)$. Moreover, the power series $\sum_{n
    \ge 1} na_n y^{n - 1}$ has radius of
    convergence at least $R$ and so also converges
    uniformly on $(-r, r)$. The partial sum
    functions $f_m(y) = \sum_{n = 0}^m a_n y^n$
    are polynomials so differentiable with
    $f_m'(y) = \sum_{n = 1}^m na_n y^{n - 1}$. \\
    We now have $f_m'$ converging uniformly on
    $(-r, r)$ to the function $g(y) = \sum_{n =
    1}^\infty na_n y^{n - 1}$. Hence by Theorem 6,
    $f_{(-r, r)}$ is differentiable and $\forall y
    \in (-r, r)$, $f'(y) = g(y)$. In particular,
    $f$ is differentiable at $x$ with $f'(x) =
    g(x)$. Hence $f$ is a differentiable function
    on $(-R, R)$ with derivative $g$ as described.
\end{proof}

\begin{hiddenflashcard}[power-series-properties]
Let $f(x) = \sum_{n = 0}^\infty a_n x^n$ be a
power series with radius of convergence $R$. Then
$f$ is continuous, integrable and differentiable.
(and the integral and derivative have the expected
power series with radius of convergence $R$).
\\
Proof: \\
\cloze{
For all these facts, pick $0 < r < R$ so that we
get uniform convergence on $(-r, r)$. \\
For the continuity fact, use the fact that uniform
limit of continuous functions is continuous. \\
For the integrable fact, this is immediate from
the fact that uniform limit of integrable
functions is integrable (need to also use the fact
that the limit of the integrals converges to the
integral of the limit). \\
For the derivative fact, it is important to first
show that the derivative of all the partial sums
has radius of convergence $R$ (so that we can get
uniform convergence on $(-r, r)$). We also need to
check that the derivatives are continuous (but
this is clearly true since they are all
polynomials). Now by the fact about uniform limits
of continuously differentiable functions, we
deduce that $f$ is differentiable with the
expected power series representation.
}
\end{hiddenflashcard}

\subsection{Uniform Continuity}

Let $X \subset \RR$. Let $f : X \to \RR$. (May as
well think of $X = \RR$ or $X = (a, b)$). Recall
that $f$ is \emph{continuous} if
\[ \forall \eps > 0 ~ \forall x \in X ~ \exists
\delta > 0 ~ \forall y \in X \quad |x - y| <
\delta \implies |f(x) - f(y)| < \eps \]

\begin{definition*}[Uniform continuity]
    We say that $f$ is \emph{uniformly continuous}
    if
    \[ \forall \eps > 0 ~ \exists \delta > 0 ~
    \forall x, y \in X \quad |x - y| < \delta
    \implies |f(x) - f(y)| < \eps \]
\end{definition*}

\begin{remark*}
    Clearly if $f$ is uniformly continuous then
    $f$ is continuous.
\end{remark*}

\noindent
We would suspect that $f$ is continuous doesn't
imply that $f$ is uniformly continuous.

\begin{example*}
    A function $f : \RR \to \RR$ that is
    continuous but not uniformly continuous.
    Consider $f(x) = x^2$. We know $f$ is
    continuous (as it's a polynomial). Suppose
    $\delta > 0$. Then
    \[ f(x + \delta) - f(x) = (x + \delta)^2 - x^2
    = 2\delta x + \delta^2 \to \infty \]
    as $x \to \infty$. So in particular, $\forall
    \delta > 0$, $\exists x, y \in \RR$ such that
    $|x - y| < \delta$ but $f(x) - f(y)| \ge 1$.
    So condition for uniformly continuous fails
    for $\eps = 1$. So $f$ is not uniformly
    continuous.
\end{example*}

\begin{example*}
    Make domain bounded, and we can still fail.
    Consider $f : (0, 1) \to \RR$, $f(x) =
    \frac{1}{x}$. Clearly continuous. Check not
    uniform continuity as an exercise.
\end{example*}
