% This is lecture no. 18 of MH3100/: Real Analysis I.

\chapter{Limits of Functions}%
\label{cha:limits_of_functions}

\section{Function Limits}%
\label{sec:function_limits}

\begin{definition}
	Function Limit.
	A function $f\vcentcolon D\subseteq\mathbb{R}\mapsto\mathbb{R}$ is said to have the \textbf{limit} $L\in\mathbb{R}$ at a limit point $a$ of $D$ if
	\[
	\forall\varepsilon>0,\exists\delta>0\suchthat\forall x\in D\setminus\left\{a\right\}\quad \abs{x-a}<\delta\implies\abs{f(x)-L}<\varepsilon
	.\]
	We use the notation $\lim_{x \to a}f(x)$ to denote the limit.
	We write $L=\lim_{x \to a}f(x)$ or $f(x)\to L$ \textbf{as} $x\to a$ to mean that $f$ has the limit $L$ at $a$.
\end{definition}

\noindent
Intuitively, a function $f$ has the limit $L$ at $a$ if:
\begin{center}
	$f$ is arbitrarily close to $L$ near $a$.
\end{center}

\section{Sequential Criterion for Function Limits}%
\label{sec:sequential_criterion_for_function_limits}

\begin{thrm}
	Sequential Criterion for Function Limits.
	For any function $f\vcentcolon D\subseteq\mathbb{R}\mapsto\mathbb{R}$, any limit point $a$ of $D$, and any number $L\in\mathbb{R}$, the function $f$ has a \textbf{limit} $L$ \textbf{at} $a$ iff the sequence $\left\{f(x_n)\right\}$ \textbf{has limit} $L$ for \emph{every} sequence $\left\{x_n\right\}$ \textbf{in} $D\setminus\left\{a\right\}$ \textbf{converging to} $a$.
\end{thrm}

\begin{proof}
	The definition of $L=\lim_{x \to a}f(x)$ is
	\[
	\forall\varepsilon>0,\exists\delta>0\suchthat\forall x\in D\setminus\left\{a\right\}\quad\abs{x-a}<\delta\implies\abs{f(x)-L}<\varepsilon
	.\]
	The definition of $a=\lim x_n$ is
	\[
		\forall\delta>0,\quad\left\{x_n\right\}\text{ eventually satisfies }\abs{x_n-a}<\delta
	.\]
	Therefore, $\forall\varepsilon>0$,
	\[
		\left\{f(x_n)\right\}\text{ eventually satisfies }\abs{f(x_n)-L}<\varepsilon
	,\]
	which is the definition of $L=\lim f(x_n)$.

	Let $\left\{\delta_n\right\}$ denote a sequence of positive number that converges to 0.
	The negatoin of the definition of $L=\lim_{x \to a}f(x)$ implies that there is a number $\varepsilon>0$ for which $\forall n\in\mathbb{N}$,
	\[
	\exists x_n\in D\setminus\left\{a\right\}\suchthat\abs{x_n-a}<\delta_n\land\abs{f(x_n)-L}\geqslant\varepsilon
	.\]
	This forms a sequence $\left\{x_n\right\}$ contained in $D\setminus\left\{a\right\}$.
	Since
	\[
	-\delta_n<x_n-a<\delta_n,\quad\forall n\in\mathbb{N}
	\]
	and $0=\lim\delta_n$, the Squeeze Theorem and the Algebraic Limit Theorem imply that $a=\lim x_n$.
	On the other hand, since $\left\{f(x_n)\right\}$ is of a distance of at least $\varepsilon$ away from $L$, the Order Limit Theorem implies that its limit, if it exists, is of a distance of at least $\varepsilon$ away from $L$.
	This shows that $\left\{f(x_n)\right\}$ does not have limit $L$.
\end{proof}
