133/209
\begin{frame}
  \frametitle{Maximum and Minimum Values}

  \begin{block}{Fermat's Theorem}
    \alert{If} $f$ has a local maximum or minimum at $c$ and $f'(c)$ exists, \\
    \alert{then} $f'(c) = 0$.
  \end{block}

  \begin{exampleblock}{}
    What are the critical numbers of the function\vspace{-.5ex}
    \begin{talign}
      f(x) = \sqrt{x} + |x-2| \quad\quad\text{?}
    \end{talign}
    \pause
    Due to $|x-2|$\pause, the derivative is not defined at \quad\alert{x = 2} .
    \pause\medskip
    
    For $x < 2$ we have $|x-2| = \pause -(x-2)$\pause, thus:\vspace{-1ex}
    \begin{talign}
      f(x) = \sqrt{x} - (x-2)
      &&
      \mpause[1]{f'(x) = }\mpause[2]{ \frac{1}{2\sqrt{x}} - 1 }
    \end{talign}\vspace{-1.5ex}
    \pause\pause\pause
    
    Thus $f'(x) = 0 \;\iff\; \pause \alert{x = 1/4}$\pause,
    and $f'(x)$ undefined for \alert{$x = 0$}.
    \pause\medskip
    
    For $x > 2$ we have $|x-2| = x-2$\pause, thus:\vspace{-1ex}
    \begin{talign}
      f(x) = \sqrt{x} + (x-2)
      &&
      \mpause[1]{f'(x) = \frac{1}{2\sqrt{x}} + 1}\mpause[2]{ \ge 1}
    \end{talign}
    \pause\pause\pause
    Thus the critical numbers are \alert{$0$}, \alert{$1/4$} and \alert{$2$}.
  \end{exampleblock}
\end{frame}