% vim: tw=50
% 03/02/2023 10AM

\begin{flashcard}[complex-FTC]
\begin{theorem*}[Fundamental Theorem of Calculus]
    \cloze{If $f : \mathcal{U} \to \CC$ is a continuous
    function on open $\mathcal{U} \subseteq \CC$
    with $F' = f$ an antiderivative of $f$ in
    $\mathcal{U}$. Then for any curve $\gamma :
    [a, b] \to \mathcal{U}$,
    \[ \int_\gamma f(z) \dd z = F(\gamma(b)) -
    F(\gamma(a)) .\]
    In particular, if $\gamma$ is closed then
    $\int_\gamma f = 0$.}
\end{theorem*}

\begin{proof}
\cloze{
    \begin{align*}
        \int_\gamma f(z) \dd z
        &= \int_a^b f(\gamma(t)) \gamma'(t) \dd t
        \\
        &= \int_a^b (F \circ \gamma)'(t) \dd t \\
        &= F(\gamma(b)) - F(\gamma(a))
    \end{align*}
    by the real Fundamental Theorem of Calculus.
}
\end{proof}
\end{flashcard}

\begin{note*}
    In the $z \mapsto z^{-1}$ integral computation
    and FTC implies that there does not exist a
    branch of the logarithm on any open
    neighbourhood of $0$.
\end{note*}

\begin{theorem*}
    Let $f : D \to \CC$ be continuous on a domain
    $D$. If $\int_\gamma f = 0$ for all closed
    curves $\gamma$ in $D$, then there exists
    holomorphic $F : D \to \CC$ with $F' = f$.
\end{theorem*}

\begin{proof}
    Fix $a_0 \in D$. If $w \in D$, choose any
    curve $\gamma_w : [0, 1] \to D$ with
    $\gamma_w(0) = a_0$, $\gamma_w(1) = w$. Define
    \[ F(W) \defeq \int_{\gamma_w} f(z) \dd z \]
    \begin{center}
        \includegraphics[width=0.6\linewidth]
        {images/f6c709e8a3ad11ed.png}
    \end{center}
    Find $r_w > 0$ such that $\DD(w, r_w)
    \subseteq D$. For $|h| < r$, let $\delta_h :
    [0, 1] \to D$ be the line segment from $w$ to
    $w + h$. Then
    \[ F(w + h) = \int_{\gamma_{w + h}} f(z) \dd z
    = \int_{\gamma_w + \delta_h} f(z) \dd z \]
    So
    \begin{align*}
        F(w + h)
        &= F(w) + \int_{\delta_h} f(z) \dd z \\
        &= F(w) + hf(w) + \int_{\delta_h} f(z) -
        f(w) \dd z
    \end{align*}
    So
    \begin{align*}
        \left| \frac{F(w + h) - F(w)}{h} - f(w) \right|
        &= \left| \frac{1}{h} \int_{\delta_h} f(z)
        - f(w) \dd z \right| \\
        &\le \frac{\length(\delta_h)}{|h|} \cdot
        \sup_{\delta_h} |f(z) - f(w)| \\
        &\le \sup_{z \in \DD(w, r_w)} |f(z) -
        f(w)| \\
        &\to 0
    \end{align*}
    as $r_w \to 0$. So $F'(w) = f(w)$.
\end{proof}

\begin{definition*}
    An open subset $\mathcal{U} \subseteq \CC$ is
    \emph{convex} if $\forall a, b \in
    \mathcal{U}$ the line segment between $a$ and
    $b$ is in $\mathcal{U}$. $\mathcal{U}$ is
    \emph{starlike} (sometimes instead called
    \emph{starshaped}) if $\exists a_0 \in
    \mathcal{U}$ such that $\forall b \in
    \mathcal{U}$ the line segment from $a_0$ to
    $b$ is in $\mathcal{U}$.
\end{definition*}

\[ \{\text{disks}\} \subseteq \{\text{convex
sets}\} \subseteq \{\text{starlike sets}\}
\subseteq \{\text{domains}\} \]
A simplification of previous theorem:

\begin{lemma*}
    Suppose $\mathcal{U}$ is starlike domain, and
    $f : \mathcal{U} \to \CC$ continuous with
    $\int_{\partial T} f(z) \dd z = 0$ for all
    triangles $T$ in $\mathcal{U}$, then $f$ has
    an antiderivative in $\mathcal{U}$.
\end{lemma*}

\begin{proof}
    Exactly the same, choosing $\gamma_w$ to be
    the segment from a basepoint $a_0$ of the
    starlike.
\end{proof}

\begin{flashcard}[Cauchy-in-triangle]
\begin{theorem*}[Cauchy's Theorem in a triangle]
    \cloze{If $f : \mathcal{U} \to \CC$ is holomorphic on
    an open $\mathcal{U} \subseteq \CC$, and $T
    \subseteq \mathcal{U}$ is a triangle in
    $\mathcal{U}$, then
    \[ \int_{\partial T} f(z) \dd z = 0 .\]}
\end{theorem*}
\end{flashcard}

\begin{remark*}
    Curves are oriented anticlockwise.
\end{remark*}

\begin{proof}
    Call $\left| \int_{\partial T} f \right|
    \eqdef I$, and $L = \length(\partial T)$. We
    subdivide $T$ by bisecting the sides to
    obtain $T_1, T_2, T_3, T_4$:
    \begin{center}
        \includegraphics[width=0.6\linewidth]
        {images/56369f58a3b111ed.png}
    \end{center}
    $\partial T_1 + \partial T_2 + \partial T_3 =
    \partial T - \partial T_4$, so
    \[ \int_{\partial T} f(z) \dd z = \sum_{i =
    1}^4 \int_{\partial T_i} f(z) \dd z \]
    By triangle inequality, there exists $i \in
    \{1, 2, 3, 4\}$ such that
    \[ \left| \int_{\partial T_i} f(z) \dd z
    \right| \ge \frac{1}{4} I \]
    call $T^{(1)}$ and note $\length(\partial
    T^{(1)}) = \half$.

    \myskip
    Proceeding in this way, we obtain triangles
    \[ T \ge T^{(1)} \ge T^{(2)} \ge T^{(3)} \ge
    \cdots \]
    with $\length(T^{(n)}) = 2^{-N} \length(T) =
    \frac{L}{2^n}$, and
    \[ \left| \int_{\partial T^{(n)}} f(z) \dd z
    \right| \ge \frac{1}{4^n} I \]
    Since $\length(T^{(n)}) \to 0$,
    \[ \bigcap_{n = 1}^\infty T^{(n)} = \{\omega\}
    .\]
    Note: $z$, $1$ have holomorphic
    antiderivatives.
    \[ \frac{1}{4^n}I \le \left| \int_{\partial
    T^{(n)}} f(z) \dd z \right| = \left|
    \int_{\partial T^{(n)}} f(z) - f(w) - (z - w)f'(w)
    \dd z \right|  \]
    Since $f$ is differentiable at $w$, $\forall
    \eps > 0$, $\exists \delta . 0$ such that $|w
    - z| < \delta \implies |f(z) - f(w) - (z -
    w)f'(w)| < \eps|z - w|$. So if $n \gg 1$, we
    have
    \[ \left| \int_{\partial T^{(n)}} f(z) - f(w)
    - (z - w) f'(w) \dd z \right| \le
    \frac{L}{2^n} \cdot \sup_{z \in \partial
    T^{(n)}} |z - w| \cdot \eps \]
    So
    \[ \frac{I}{4^n} \le \frac{L}{2^n} \cdot
    \frac{L}{2^n} \cdot \eps \]
    and $I \le L^2 \eps$. Letting $\eps \to 0$, we
    have $I = 0$.
\end{proof}

\begin{hiddenflashcard}[Cauchy-in-triangle-proof]
Proof of Cauchy's theorem in a triangle? \\
\begin{proof}
\cloze{
    Subdivide the triangle $T$ into 4 smaller
    congruent triangles $T_1, T_2, T_3, T_4$ such
    that
    \[ I = \int_{\partial T} f(z) \dd z = \sum_{i =
    1}^4 \int_{\partial T_i} f(z) \dd z \]
    Pick the $T_i$ with the largest integral and call
    it $T^{(1)}$. Repeat this inductively, and let
    $w$ be the intersection of all the triangles.
    We have that
    \[ \left| \int_{\partial T^{(n)}} f(z) \dd z
    \right| \ge \frac{1}{4^n} I \]
    by induction, and the length of the integral
    of each $T^{(n)}$ is $\frac{L}{2^n}$. Then
    since $1$ and $z$ have holomorphic
    antiderivatives,
    \begin{align*}
        \frac{1}{4^n} I
        &\le \left| \int_{\partial T^{(n)}} f(z) \dd z
        \right| \\
        &= \left| \int_{\partial T^{(n)}} f(z) - f(w)
        - (z - w) f'(w) \dd z \right| \\
        &\le \int_{\partial T^{(n)}} |f(z) - f(w) -
        (z - w) f'(w)| \dd z \\
        &\le \int_{\partial T^{(n)}} \eps |z - w|
        \dd z \\
        &\le \frac{L}{2^n} \cdot \sup_{z \in \partial
        T^{(n)}} |z - w| \cdot \eps \\
        &= \frac{L}{2^n} \cdot \frac{L}{2^n} \cdot
        \eps \\
        \implies I \le L^2 \eps
    \end{align*}
    for all $n$ large enough such that
    \[ \left| \frac{f(z) - f(w)}{z - w} - f'(w)
    \right| < \eps \]
    for all $z \in \partial T^{(n)}$. Letting
    $\eps \to 0$, we get $I = 0$.
}
\end{proof}
\end{hiddenflashcard}

\begin{theorem*}
    Let $S \subseteq \mathcal{U}$ be a finite set
    and $f : \mathcal{U} \to \CC$ be continuous on
    $\mathcal{U}$ and holomorphic on $\mathcal{U}
    \setminus S$. Then $\int_{\partial T} f = 0$
    for all triangles $T$ in $\mathcal{U}$.
\end{theorem*}

\begin{proof}
    Using triangle subdivision, assume WLOG that
    $S = \{a\}$, $a \in T$. If $a \in T' \subseteq
    T$ for another triangle T', then by triangular
    subdivision
    \begin{center}
        \includegraphics[width=0.6\linewidth]
        {images/47292bb0a3b211ed.png}
    \end{center}
    and previous theorem,
    \[ \int_{\partial T} f = \int_{\partial T'} =
    f \]
    since $f$ is holomorphic on $T \setminus T'$
    we have
    \begin{align*}
        \left| \int_{\partial T} f \right|
        &= \left| \int_{\partial T'} f \right|
        &\le \length(T') \cdot \sup_{\partial T'}
        |f| \\
        &\le \length(T') \cdot \sup_T |f|
    \end{align*}
    so letting $\length(T') \to 0$, we have
    $\int_{\partial T} f = 0$.
\end{proof}

\begin{flashcard}[cauchy-thm-in-disk]
\begin{theorem*}[Cauchy's theorem in a disk]
    \cloze{Let $D$ be a disk (or any starlike domain) and
    $f : D \to \CC$ a continuous function,
    holomorphic away from at most a finite set of
    points in $D$, then $\int_\gamma f = 0$ for
    any closed curve $\gamma$ in $D$.}
\end{theorem*}

\prompt{
\begin{proof}
\cloze{
    By Cauchy's theorem in a triangle, and
    converse of Fundamental Theorem of Calculus,
    there exists an antiderivative $F$ for $f$ on
    $D$. So by Fundamental Theorem of Calculus,
    Cauchy's Theorem follows.
}
\end{proof}
}
\end{flashcard}

\begin{proof}
    By previous theorem and converse Fundamental
    Theorem of Calculus for starlike domains,
    there exists antiderivative $F$ for $f$ on
    $D$. So by FTC, Cauchy's Theorem follows.
\end{proof}
