104/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}
  \pause\medskip

  \begin{alertblock}{}
    A local minimum/maximum does not guarantee that $f'(c)$ exists.
  \end{alertblock}
  \pause\bigskip
  
  \begin{minipage}{.4\textwidth}
  \begin{center}
  \scalebox{.7}{
  \begin{tikzpicture}[default,baseline=1cm]
    \diagram{-2}{2}{-2.5}{2.5}{1}
    \diagramannotatey{-1,1,2}
    \diagramannotatex{-1,1}
    \diagramannotatez
    \begin{scope}[cgreen,ultra thick]
      \draw plot[smooth,domain=-2:2,samples=30] function{abs(x)};
    \end{scope}
  \end{tikzpicture}
  }
  \end{center}
  \end{minipage}
  \begin{minipage}{.59\textwidth}
    For example:
    \begin{talign}
      f(x) = |x|
    \end{talign}
    \pause
    Then $f(0) = 0$ is a local minimum.\\
    \pause
    \alert{But $f'(0)$ does not exist.} 
  \end{minipage}
  \pause
  \begin{alertblock}{}
    Care needed for applying the theorem (check both conditions)!
  \end{alertblock}
  
  \vspace{10cm}
\end{frame}