% vim: tw=50
% 09/02/2022 11AM

\newpage
\section{Differentiability [5]}

Let $f : E \subseteq \CC \to \CC$, most of the
time $E = \text{interval} \subseteq \RR$.

\begin{definition*}
    Let $x \in E$ be a point such that $\exists
    x_n \in E$ with $x_n \neq x \,\,\forall\,\,n$
    and $x_n \to x$ (i.e. a limit point). $f$ is
    said to be \emph{differentiable} at $x$ with
    derivative $f'(x)$ if
    \[ \lim_{y \to x} \frac{f(y) - f(x)}{y - x} =
    f'(x) \]
    If $f$ is differentiable at each $x \in E$
    then we say that $f$ is differentiable on $E$.
    (Think of $E$ as an interval or a disc in the
    case of $\CC$).
\end{definition*}

\subsubsection*{Important Remarks}

\begin{enumerate}[(1)]
    \item Other common notations:
        \[ \dfrac{y}{x} \qquad \dfrac{f}{x} \]
    \item $f'(x) = \lim_{h \to 0} \frac{f(x + h) -
        f(x)}{h}$ ($y = x + h$)
    \item Another look at the definition: Let
        \[ \eps(h) := f(x + h) - f(x) - hf'(x) \]
        then
        \[ \lim_{h \to 0} \frac{\eps(h)}{h} = 0 \]
        \[ f(x + h) = f(x) + hf'(x) + \eps(h) \]
        Alternative definition of
        differentiability:
        \begin{definition*}
            $f$ is differentiable at $x$ if
            $\exists A$ and $\eps$ such that
            \[ f(x + h) = f(x) + hA + \eps(h) \]
            where
            \[ \lim_{h \to 0} \frac{\eps(h)}{h} =
            0 \]
            If such an $A$ exists, then it is
            \emph{unique} since
            \[ A = \lim_{h \to 0} \frac{f(x + h) -
            f(x)}{h} \]
        \end{definition*}
        \begin{center}
            \includegraphics[width=0.6\linewidth]
            {images/eab92a48975411ec.png}
        \end{center}
    \item If $f$ is differentiable at $x$ then $f$
        is continuous at $x$ since $\eps(h) \to
        0$, so $f(x + h) \to f(x)$ as $h \to 0$.
    \item Alternative ways of writing things:
        \[ f(x + h) = f(x) + hf'(x) + h\eps_f(h) \]
        with $\eps_f(h) \to 0$ as $h \to 0$. Or
        \[ f(x) = f(a) + (x - a)f'(a) + (x -
        a)\eps_f(x) \]
        where $\lim_{x \to a} \eps_f(x) = 0$ as $x
        \to a$.
\end{enumerate}

\begin{example*}
    $f(x) = |x|$, $f : \RR \to \RR$.
    \begin{center}
        \includegraphics[width=0.6\linewidth]
        {images/9eced2a8975511ec.png}
    \end{center}
    Clearly $f'(x) = 1$ for $x > 0$ and $f'(x) = -1$
    for $x < 0$. Now for $x = 0$: \\
    Take $h_n > 0$:
    \[ \lim_{n \to \infty} \frac{f(h_n) -
    f(0)}{h_n} = \lim \frac{h_n}{h_n} = 1 \]
    Take $h_n < 0$:
    \[ \lim_{n \to \infty} \frac{f(h_n) -
    f(0)}{h_n} = \lim -\frac{h_n}{h_n} = -1 \]
    so \emph{not} differentiable at $x = 0$.
\end{example*}

\subsubsection*{Differentiation of Sums, Products, etc}

\begin{proposition}
    \begin{enumerate}[(i)]
        \item If $f(x) = c$ for all $x \in E$ then
            $f$ is differentiable with $f'(x) =
            0$.
        \item $f, g$ differentiable at $x$, then
            so is $f + g$ and
            \[ (f + g)'(x) = f'(x) + g'(x) \]
        \item $f, g$ differentiable at $x$, then
            so is $fg$ and
            \[ (fg)'(x) = f'(x)g(x) + f(x)g'(x) \]
        \item $f$ differentiable at $x$ and $f(x)
            \neq 0 \,\,\forall\,\,x \in E$, then
            $\frac{1}{f}$ is differentiable at $x$
            and
            \[ \left( \frac{1}{f} \right)'(x) =
            -\frac{f'(x)}{[f(x)]^2} \]
    \end{enumerate}
\end{proposition}

\begin{proof}
    \begin{enumerate}[(i)]
        \item $\lim_{h \to 0} \frac{c - c}{h} = 0$
        \item
            \[ \lim_{h \to 0} \frac{f(x + h) + g(x +
            h) - f(x) - g(x)}{h} = \lim_{h \to 0}
            \frac{f(x + h) - f(x)}{h} + \lim_{h
            \to 0} \frac{g(x + h) - g(x)}{h} \]
            \[ = f'(x) + g'(x) \]
            using properties of limits
        \item $\phi(x) = f(x)g(x)$.
            \[ \lim_{h \to 0} \frac{\phi(x + h) -
            \phi(x)}{h} =  \lim_{h \to 0}
            \frac{f(x + h)g(x + h) - f(x)g(x)}{h} \]
            \[ = \lim_{h \to 0} f(x + h) \left[
            \frac{g(x + h) - g(x)}{h} \right] +
            g(x) \left[ \frac{f(x + h) - f(x)}{h}
            \right] = f(x)g'(x) + f'(x)g(x) \]
            using standard properties of limits
            and the fact that $f$ is continuous at
            $x$.
        \item $\phi(x) = \frac{1}{f(x)}$
            \[ \lim_{h \to 0} \frac{\phi(x + h) -
            \phi(x)}{h} = \lim_{h \to 0}
            \frac{\frac{1}{f(x + h)} -
            \frac{1}{f(x)}}{h} \]
            \[ = \lim_{h \to 0} \frac{f(x) = f(x)
            + h}{h} \times \frac{1}{f(x)f(x + h)}
            = -\frac{f'(x)}{[f(x)]^2} \]
    \end{enumerate}
\end{proof}

\begin{remark*}
    from (iii) and (iv) we get
    \[ \left( \frac{f(x)}{g(x)} \right)' =
    \frac{f'(x)g(x) - f(x)g'(x)}{[g(x)]^2} \]
\end{remark*}
