\begin{frame}
\frametitle{Vertical Line Test}
When does a curve represent a function?
\onslide<2->{
\begin{block}{Vertical Line Test}
A curve in the $xy$-plane represents a function of $x$ if and only if
no vertical line intersects the curve more than once.
\end{block}
}
\begin{center}
\scalebox{.6}{
\begin{tikzpicture}[default]
\diagram{-.5}{5.5}{-.5}{5.5}{1}
\diagramannotatez
\draw[cblue,ultra thick,name path=curve] (0,1) to[in=180] (2,3) to[out=0,in=180] (4,2) to[out=0,in=-120] (5,3);
\onslide<2->{
\draw[cred,dashed,name path=line] (4,-.2) -- node[at start,below] {$a$} (4,5);
\path [name intersections={of = curve and line}];
\node[include=cred] at (intersection-1) {};
\node at (2.5,-1.5) {corresponds to a function of $x$};
}
\end{tikzpicture}
}\hspace{1cm}
\scalebox{.6}{
\begin{tikzpicture}[default]
\diagram{-.5}{5.5}{-.5}{5.5}{1}
\diagramannotatez
\draw[cblue,ultra thick,name path=curve] (0,1) to[in=180] (2,3) to[out=0,in=180] (4,2) to[out=0,in=30,looseness=2] (3,4);
\onslide<2->{
\draw[cred,dashed,name path=line] (4,-.2) -- node[at start,below] {$a$} (4,5);
\path [name intersections={of = curve and line}];
\node[include=cred] at (intersection-1) {};
\node[include=cred] at (intersection-2) {};
\node at (2.5,-1.5) {does not correspond to a function of $x$};
}
\end{tikzpicture}
}
\end{center}
\vspace{-1ex}
\end{frame}