\begin{frame}
\frametitle{Computing Limits: Function Replacement}
\begin{block}{Function Replacement}
If $f(x) = g(x)$ for all $x \ne a$, then $\lim_{x \to a} f(x) = \lim_{x \to a} g(x)$
(provided that the limit exists).
\end{block}
\pause
Actually it suffices $f(x) = g(x)$ when $x$ is close to $a$.
\pause
\begin{exampleblock}{}
Find $\lim_{x \to 1} \frac{x^2 - 1}{x-1}$.
\pause
\begin{itemize}
\item
Direct substitution is not applicable because $x = 1$ is not in the domain.
\end{itemize}
\pause We replace the function:
\begin{talign}
\frac{x^2 - 1}{x-1}
\mpause[1]{ = \frac{(x+1)(x-1)}{x-1}}
\mpause[2]{ \stackrel{\text{\alert{for $x\ne 1$}}}{=} x+1}
\end{talign}
\pause\pause\pause
As a consequence
\begin{talign}
\lim_{x\to 1} \frac{x^2 - 1}{x-1}
= \lim_{x\to 1} x+1 \mpause[1]{ = 1 + 1 = 2 }
\end{talign}
\end{exampleblock}
\end{frame}