28/50
\begin{frame}
\frametitle{Average Value of a Function}

\begin{block}{}
The average value $f_{\text{avg}}$of a function $f$ on an interval $[a,b]$ is:
\begin{talign}
f_{\text{avg}} = \frac{1}{b-a} \int_a^b f(x) \, dx
\end{talign}
\end{block}
\pause\medskip

This is \emph{easy to remember}:
\begin{center}
\scalebox{.9}{
\begin{tikzpicture}[default,yscale=.7]
\def\mfun{(-.9 + 1.2+ (\x-3+\mfunshift)^2 - .1*(\x-3+\mfunshift)^4)}

\diagram[1]{-.5}{6}{-.25}{2.75}{1}
\diagramannotatez
\def\mfunshift{0}
\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$};

\mpause[3]{
\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);
}
\end{scope}
\end{tikzpicture}
}
\end{center}\vspace{-.75ex}

\begin{itemize}
\pause
\item Think of the area below the function as water.
\pause
\item Then the amount of water is $A = \int_a^b f(x) dx$
\pause
\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}$
\end{itemize}
\vspace{10cm}
\end{frame}