\frametitle{Average Value of a Function}
    The average value $f_{\text{avg}}$of a function $f$ on an interval $[a,b]$ is:
      f_{\text{avg}} = \frac{1}{b-a} \int_a^b f(x) \, dx
  This is \emph{easy to remember}:
    \def\mfun{(-.9 + 1.2+ (\x-3+\mfunshift)^2 - .1*(\x-3+\mfunshift)^4)}

    \begin{scope}[ultra thick]
      \draw[draw=none,fill=cblue!30] plot[smooth,domain=.5:5.5,samples=100] (\x,{\mfun}) -- (5.5,0) -- (.5,0) -- cycle;
      \draw[cblue] 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$};
      \draw[draw=none,fill=cblue,opacity=.3] (.5,1.2+2.01042/5) -- (5.5,1.2+2.01042/5) -- (5.5,0) -- (.5,0) -- cycle;
      \draw[cblue] (.5,1.2+2.01042/5) -- (5.5,1.2+2.01042/5);

    \item Think of the area below the function as water.
    \item Then the amount of water is $A = \int_a^b f(x) dx$
    \item When the waves calm, the water settles in the shape of a rectangle 
        \pause with area $A$ \pause and width $b-a$; \pause thus height $\frac{A}{b-a}$