28/111
\begin{frame}
  \frametitle{The Definite Integral}

  \begin{center}
  \scalebox{.7}{
  \begin{tikzpicture}[default]
    \def\mfun{(-.9 + (\x-3+\mfunshift)^2 - .1*(\x-3+\mfunshift)^4)}

    \diagram[1]{-.5}{6}{-1}{1.7}{1}
    \diagramannotatez
    \def\mfunshift{0}
    \begin{scope}[ultra thick]
      \draw[fill=cgreen,draw=none,opacity=.5] plot[smooth,domain=.5:2,samples=100] (\x,{\mfun}) -- (.5,0) -- cycle;
      \draw[fill=cred,draw=none,opacity=.5] plot[smooth,domain=2:4,samples=100] (\x,{\mfun}) -- cycle;
      \draw[fill=cgreen,draw=none,opacity=.5] plot[smooth,domain=4:5.5,samples=100] (\x,{\mfun}) -- (5.5,0) -- cycle;
      \draw[cred] plot[smooth,domain=.5:5.5,samples=100] (\x,{\mfun});
      \node[anchor=north] at (.5,0) {$a$};
      \node[anchor=north] at (5.5,0) {$b$};
      \node[scale=1.8] at (.9,.5) {+};
      \node[scale=1.8] at (5.15,.5) {+};
      \node[scale=3] at (3,-.5) {-};
    \end{scope}
  \end{tikzpicture}
  }
  \end{center}

  \begin{exampleblock}{}
    \begin{minipage}{.7\textwidth}
    Evaluate the integral 
    \begin{talign}
      \int_0^1 \sqrt{1-x^2}dx 
    \end{talign}
    by interpreting it in terms of the area.
    \end{minipage}
    \pause
    \begin{minipage}{.29\textwidth}
    \begin{center}
      \scalebox{.9}{
      \begin{tikzpicture}[default]
      \def\diaborderx{.25cm}
      \def\diabordery{.25cm}
      \diagram[1]{-.5}{1.5}{-.5}{1.5}{1}
      \diagramannotatez
      \diagramannotatex{1}
      \diagramannotatey{1}
      
      \begin{scope}[cgreen,ultra thick]
        \draw[fill=cgreen,draw=none,opacity=.5] plot[smooth,domain=0:1,samples=50] function{(1-x**2)**(.5)} -- (0,0) -- cycle;
        \draw[cgreen,ultra thick] plot[smooth,domain=0:1,samples=50] function{(1-x**2)**(.5)};
      \end{scope}
      \end{tikzpicture}
      }
    \end{center}
    \end{minipage}
    \pause\medskip
    
    Thus the area is $1/4$ of the area of a circle with radius $1$:
    \begin{talign}
      \int_0^1 \sqrt{1-x^2}dx  = \frac{\pi}{4}
    \end{talign}
  \end{exampleblock}
\end{frame}