Before we define continuity of functions, we visit a somewhat more general notion of a limit than that of a sequence. Given a function \(f \colon S \to
\R\text{,}\) we want to see how \(f(x)\) behaves as \(x\) tends to a certain point.
Subsection3.1.1Cluster points
First, we return to a concept we have seen previously in an exercise. When moving within the set \(S\text{,}\) we can only approach points that have elements of \(S\) arbitrarily near.
Definition3.1.1.
Let \(S \subset \R\) be a set. A number \(x \in \R\) is called a cluster point of \(S\) if for every \(\epsilon > 0\text{,}\) the set \((x-\epsilon,x+\epsilon) \cap S
\setminus \{ x \}\) is not empty.
That is, \(x\) is a cluster point of \(S\) if there are points of \(S\) arbitrarily close to \(x\text{.}\) Another way to phrase the definition is to say that \(x\) is a cluster point of \(S\) if for every \(\epsilon > 0\text{,}\) there exists a \(y \in S\) such that \(y \not= x\) and \(\abs{x - y} < \epsilon\text{.}\) Note that a cluster point of \(S\) need not lie in \(S\text{.}\)
Let us see some examples.
The set \(\{ \nicefrac{1}{n} : n \in \N \}\) has a unique cluster point zero.
The cluster points of the open interval \((0,1)\) are all points in the closed interval \([0,1]\text{.}\)
The set of cluster points of \(\Q\) is the whole real line \(\R\text{.}\)
The set of cluster points of \([0,1) \cup \{ 2 \}\) is the interval \([0,1]\text{.}\)
The set \(\N\) has no cluster points in \(\R\text{.}\)
Proposition3.1.2.
Let \(S \subset \R\text{.}\) Then \(x \in \R\) is a cluster point of \(S\) if and only if there exists a convergent sequence of numbers \(\{ x_n \}_{n=1}^\infty\) such that \(x_n \not= x\) and \(x_n \in S\) for all \(n\text{,}\) and \(\lim\limits_{n\to\infty} x_n = x\text{.}\)
Proof.
First suppose \(x\) is a cluster point of \(S\text{.}\) For every \(n \in \N\text{,}\) pick \(x_n\) to be an arbitrary point of \((x-\nicefrac{1}{n},x+\nicefrac{1}{n}) \cap S \setminus \{x\}\text{,}\) which is nonempty because \(x\) is a cluster point of \(S\text{.}\) Then \(x_n\) is within \(\nicefrac{1}{n}\) of \(x\text{,}\) that is,
As \(\{ \nicefrac{1}{n} \}_{n=1}^\infty\) converges to zero, \(\{ x_n \}_{n=1}^\infty\) converges to \(x\text{.}\)
On the other hand, if we start with a sequence of numbers \(\{ x_n \}_{n=1}^\infty\) in \(S\) converging to \(x\) such that \(x_n \not= x\) for all \(n\text{,}\) then for every \(\epsilon > 0\) there is an \(M\) such that, in particular, \(\abs{x_M - x} <
\epsilon\text{.}\) That is, \(x_M \in (x-\epsilon,x+\epsilon) \cap S \setminus \{x\}\text{.}\)
Subsection3.1.2Limits of functions
If a function \(f\) is defined on a set \(S\) and \(c\) is a cluster point of \(S\text{,}\) then we define the limit of \(f(x)\) as \(x\) approaches \(c\text{.}\) It is irrelevant for the definition whether \(f\) is defined at \(c\) or not. Even if the function is defined at \(c\text{,}\) the limit of the function as \(x\) goes to \(c\) can very well be different from \(f(c)\text{.}\)
Definition3.1.3.
Let \(f \colon S \to \R\) be a function and \(c\) a cluster point of \(S \subset \R\text{.}\) Suppose there exists an \(L \in \R\) and for every \(\epsilon > 0\text{,}\) there exists a \(\delta > 0\) such that whenever \(x \in S \setminus \{ c \}\) and \(\abs{x - c} < \delta\text{,}\) we have
We then say \(f(x)\)converges to \(L\) as \(x\) goes to \(c\text{,}\) and we write
\begin{equation*}
f(x) \to L \quad\text{as}\quad x \to c .
\end{equation*}
We say \(L\) is a limit of \(f(x)\) as \(x\) goes to \(c\text{,}\) and if \(L\) is unique (it is), we write
\begin{equation*}
\lim_{x \to c} f(x) \coloneqq L .
\end{equation*}
If no such \(L\) exists, then we say that the limit does not exist or that \(f\)diverges at \(c\text{.}\)
Again the notation and language we are using above assumes the limit \(L\text{,}\) if it exists, is unique, which needs to be proved. Note that the fact that \(c\) is a cluster point is important to prove uniqueness.
Proposition3.1.4.
Let \(c\) be a cluster point of \(S \subset \R\) and let \(f \colon S \to \R\) be a function such that \(f(x)\) converges as \(x\) goes to \(c\text{.}\) Then the limit of \(f(x)\) as \(x\) goes to \(c\) is unique.
Proof.
Let \(L_1\) and \(L_2\) be two numbers that both satisfy the definition. Take an \(\epsilon > 0\) and find a \(\delta_1 > 0\) such that \(\abs{f(x)-L_1} < \nicefrac{\epsilon}{2}\) for all \(x \in S \setminus \{c\}\) with \(\abs{x-c} < \delta_1\text{.}\) Also find \(\delta_2 > 0\) such that \(\abs{f(x)-L_2} < \nicefrac{\epsilon}{2}\) for all \(x \in S \setminus \{c\}\) with \(\abs{x-c} < \delta_2\text{.}\) Put \(\delta \coloneqq \min \{ \delta_1, \delta_2 \}\text{.}\) Suppose \(x \in S\text{,}\)\(\abs{x-c} < \delta\text{,}\) and \(x \not= c\text{.}\) As \(\delta > 0\) and \(c\) is a cluster point, such an \(x\) exists. Then
\begin{equation*}
f(x) \coloneqq
\begin{cases}
x & \text{if } x > 0 , \\
1 & \text{if } x = 0 .
\end{cases}
\end{equation*}
Then \(\lim\limits_{x\to 0} f(x) = 0\text{,}\) even though \(f(0) = 1\text{.}\) See Figure 3.1.
Proof: Let \(\epsilon > 0\) be given. Let \(\delta \coloneqq \epsilon\text{.}\) For \(x \in [0,1)\text{,}\)\(x \not= 0\text{,}\) and \(\abs{x-0} < \delta\text{,}\) we get
Let us connect the limit as defined above with limits of sequences.
Lemma3.1.7.
Let \(S \subset \R\text{,}\) let \(c\) be a cluster point of \(S\text{,}\) let \(f \colon S \to
\R\) be a function, and let \(L \in \R\text{.}\)
Then \(f(x) \to L\) as \(x \to c\) if and only if for every sequence \(\{ x_n \}_{n=1}^\infty\) such that \(x_n \in S \setminus \{c\}\) for all \(n\text{,}\) and such that \(\lim_{n\to\infty} x_n = c\text{,}\) we have that the sequence \(\bigl\{ f(x_n) \bigr\}_{n=1}^\infty\) converges to \(L\text{.}\)
Proof.
Suppose \(f(x) \to L\) as \(x \to c\text{,}\) and \(\{ x_n \}_{n=1}^\infty\) is a sequence such that \(x_n \in S \setminus \{c\}\) and \(\lim_{n\to\infty} x_n = c\text{.}\) We wish to show that \(\bigl\{ f(x_n) \bigr\}_{n=1}^\infty\) converges to \(L\text{.}\) Let \(\epsilon > 0\) be given. Find a \(\delta > 0\) such that if \(x \in S \setminus \{c\}\) and \(\abs{x-c} < \delta\text{,}\) then \(\abs{f(x) - L} < \epsilon\text{.}\) As \(\{ x_n \}_{n=1}^\infty\) converges to \(c\text{,}\) find an \(M\) such that for \(n \geq M\text{,}\) we have that \(\abs{x_n - c} < \delta\text{.}\) Therefore, for \(n \geq M\text{,}\)
Thus \(\bigl\{ f(x_n) \bigr\}_{n=1}^\infty\) converges to \(L\text{.}\)
For the other direction, we use proof by contrapositive. Suppose it is not true that \(f(x) \to L\) as \(x \to c\text{.}\) The negation of the definition is that there exists an \(\epsilon > 0\) such that for every \(\delta > 0\) there exists an \(x \in S \setminus \{c\}\text{,}\) where \(\abs{x-c} < \delta\) and \(\abs{f(x)-L} \geq \epsilon\text{.}\)
Let us use \(\nicefrac{1}{n}\) for \(\delta\) in the statement above to construct a sequence \(\{ x_n \}_{n=1}^\infty\text{.}\) We have that there exists an \(\epsilon > 0\) such that for every \(n\text{,}\) there exists a point \(x_n \in S \setminus \{c\}\text{,}\) where \(\abs{x_n-c} < \nicefrac{1}{n}\) and \(\abs{f(x_n)-L} \geq \epsilon\text{.}\) The sequence \(\{ x_n \}_{n=1}^\infty\) just constructed converges to \(c\text{,}\) but the sequence \(\bigl\{ f(x_n) \bigr\}_{n=1}^\infty\) does not converge to \(L\text{.}\) And we are done.
It is possible to strengthen the reverse direction of the lemma by simply stating that “\(\bigl\{ f(x_n) \bigr\}_{n=1}^\infty\) converges,” without requiring a specific limit. See Exercise 3.1.11.
Example3.1.8.
\(\displaystyle \lim_{x \to 0} \sin( \nicefrac{1}{x} )\) does not exist, but \(\displaystyle \lim_{x \to 0} x\sin( \nicefrac{1}{x} ) = 0\text{.}\) See Figure 3.2.
Proof: We start with \(\sin(\nicefrac{1}{x})\text{.}\) Define a sequence by \(x_n \coloneqq \frac{1}{\pi n + \nicefrac{\pi}{2}}\text{.}\) It is not hard to see that \(\lim_{n\to\infty} x_n = 0\text{.}\) Furthermore,
Therefore, \(\bigl\{ \sin ( \nicefrac{1}{x_n} ) \bigr\}_{n=1}^\infty\) does not converge. By Lemma 3.1.7, \(\displaystyle \lim_{x \to 0} \sin( \nicefrac{1}{x} )\) does not exist.
Now consider \(x\sin(\nicefrac{1}{x})\text{.}\) Let \(\{ x_n \}_{n=1}^\infty\) be a sequence such that \(x_n \not= 0\) for all \(n\text{,}\) and such that \(\lim_{n\to\infty} x_n = 0\text{.}\) Notice that \(\abs{\sin(t)} \leq 1\) for all \(t \in \R\text{.}\) Therefore,
As \(x_n\) goes to 0, then \(\abs{x_n}\) goes to zero, and hence \(\bigl\{ x_n\sin(\nicefrac{1}{x_n}) \bigr\}_{n=1}^\infty\) converges to zero. By Lemma 3.1.7, \(\displaystyle \lim_{x \to 0} x\sin( \nicefrac{1}{x} ) = 0\text{.}\)
Keep in mind the phrase “for every sequence” in the lemma. For example, take \(\sin(\nicefrac{1}{x})\) and the sequence given by \(x_n \coloneqq \nicefrac{1}{\pi n}\text{.}\) Then \(\bigl\{ \sin (\nicefrac{1}{x_n}) \bigr\}_{n=1}^\infty\) is the constant zero sequence, and therefore converges to zero, but the limit of \(\sin(\nicefrac{1}{x})\) as \(x \to 0\) does not exist.
Using Lemma 3.1.7, we can start applying everything we know about sequential limits to limits of functions. Let us give a few important examples.
Corollary3.1.9.
Let \(S \subset \R\) and let \(c\) be a cluster point of \(S\text{.}\) Suppose \(f \colon S \to
\R\) and \(g \colon S \to \R\) are functions such that the limits of \(f(x)\) and \(g(x)\) as \(x\) goes to \(c\) both exist, and
\begin{equation*}
f(x) \leq g(x) \qquad \text{for all } x \in S \setminus \{ c \}.
\end{equation*}
Lemma 3.1.7 says that \(\bigl\{ f(x_n) \bigr\}_{n=1}^\infty\) converges to \(L_1\) and \(\bigl\{ g(x_n) \bigr\}_{n=1}^\infty\) converges to \(L_2\text{.}\) We also have \(f(x_n) \leq g(x_n)\) for all \(n\text{.}\) We obtain \(L_1 \leq L_2\) using Lemma 2.2.3.
By applying constant functions, we get the following corollary. The proof is left as an exercise.
Corollary3.1.10.
Let \(S \subset \R\) and let \(c\) be a cluster point of \(S\text{.}\) Suppose \(f \colon S \to
\R\) is a function such that the limit of \(f(x)\) as \(x\) goes to \(c\) exists. Suppose there are two real numbers \(a\) and \(b\) such that
\begin{equation*}
a \leq f(x) \leq b \qquad \text{for all } x \in S \setminus \{ c \}.
\end{equation*}
Then
\begin{equation*}
a \leq \lim_{x\to c} f(x) \leq b .
\end{equation*}
Using Lemma 3.1.7 in the same way as above, we also get the following corollaries, whose proofs are again left as exercises.
Corollary3.1.11.
Let \(S \subset \R\) and let \(c\) be a cluster point of \(S\text{.}\) Suppose \(f \colon S \to \R\text{,}\)\(g \colon S \to \R\text{,}\) and \(h \colon S \to \R\) are functions such that
\begin{equation*}
f(x) \leq g(x) \leq h(x) \qquad \text{for all } x \in S \setminus \{ c \}.
\end{equation*}
Suppose the limits of \(f(x)\) and \(h(x)\) as \(x\) goes to \(c\) both exist, and
Let \(S \subset \R\) and let \(c\) be a cluster point of \(S\text{.}\) Suppose \(f \colon S \to \R\) and \(g \colon S \to \R\) are functions such that the limits of \(f(x)\) and \(g(x)\) as \(x\) goes to \(c\) both exist. Then
Let \(S \subset \R\) and let \(c\) be a cluster point of \(S\text{.}\) Suppose \(f \colon S \to \R\) is a function such that the limit of \(f(x)\) as \(x\) goes to \(c\) exists. Then
Subsection3.1.4Limits of restrictions and one-sided limits
Sometimes we work with the function defined on a subset.
Definition3.1.14.
Let \(f \colon S \to \R\) be a function and \(A \subset S\text{.}\) Define the function \(f|_A \colon A \to \R\) by
\begin{equation*}
f|_A (x) \coloneqq f(x) \qquad \text{for } x \in A.
\end{equation*}
We call \(f|_A\) the restriction of \(f\) to \(A\text{.}\)
The function \(f|_A\) is simply the function \(f\) taken on a smaller domain. The following proposition is the analogue of taking a tail of a sequence. It says that the limit is “local”: The limit only depends on points arbitrarily near \(c\text{.}\)
Proposition3.1.15.
Let \(S \subset \R\text{,}\)\(c \in \R\text{,}\) and let \(f \colon S
\to \R\) be a function. Suppose \(A \subset S\) is such that there is some \(\alpha > 0\) such that \((A \setminus \{ c \}) \cap (c-\alpha,c+\alpha) = (S \setminus \{ c \}) \cap (c-\alpha,c+\alpha)\text{.}\)
The point \(c\) is a cluster point of \(A\) if and only if \(c\) is a cluster point of \(S\text{.}\)
Supposing \(c\) is a cluster point of \(S\text{,}\) then \(f(x) \to L\) as \(x \to c\) if and only if \(f|_A(x) \to L\) as \(x \to c\text{.}\)
Proof.
First, let \(c\) be a cluster point of \(A\text{.}\) Since \(A \subset S\text{,}\) then if \(( A \setminus \{ c\} ) \cap
(c-\epsilon,c+\epsilon)\) is nonempty for every \(\epsilon > 0\text{,}\) then \(( S \setminus \{ c\} ) \cap
(c-\epsilon,c+\epsilon)\) is nonempty for every \(\epsilon > 0\text{.}\) Thus \(c\) is a cluster point of \(S\text{.}\) Second, suppose \(c\) is a cluster point of \(S\text{.}\) Then for \(\epsilon > 0\) such that \(\epsilon < \alpha\) we get that \(( A \setminus \{ c\} ) \cap (c-\epsilon,c+\epsilon) =
( S \setminus \{ c\} ) \cap (c-\epsilon,c+\epsilon)\text{,}\) which is nonempty. This is true for all \(\epsilon < \alpha\) and hence \(( A \setminus \{ c\} ) \cap (c-\epsilon,c+\epsilon)\) must be nonempty for all \(\epsilon > 0\text{.}\) Thus \(c\) is a cluster point of \(A\text{.}\)
Now suppose \(c\) is a cluster point of \(S\) and \(f(x) \to L\) as \(x \to c\text{.}\) That is, for every \(\epsilon > 0\) there is a \(\delta > 0\) such that if \(x \in S \setminus \{ c \}\) and \(\abs{x-c} < \delta\text{,}\) then \(\abs{f(x)-L} < \epsilon\text{.}\) Because \(A \subset S\text{,}\) if \(x \in A \setminus \{ c \}\text{,}\) then \(x \in S \setminus \{ c \}\text{,}\) and hence \(f|_A(x) \to L\) as \(x \to c\text{.}\)
Finally, suppose \(f|_A(x) \to L\) as \(x \to c\) and let \(\epsilon > 0\) be given. There is a \(\delta' > 0\) such that if \(x \in A \setminus \{ c \}\) and \(\abs{x-c} < \delta'\text{,}\) then \(\bigl\lvert f|_A(x)-L \bigr\rvert < \epsilon\text{.}\) Take \(\delta \coloneqq \min \{ \delta', \alpha \}\text{.}\) Now suppose \(x \in S \setminus \{ c \}\) and \(\abs{x-c} < \delta\text{.}\) As \(\abs{x-c} < \alpha\text{,}\) we find \(x \in A \setminus \{ c \}\text{,}\) and as \(\abs{x-c} < \delta'\text{,}\) we get \(\abs{f(x)-L} = \bigl\lvert f|_A(x)-L
\bigr\rvert < \epsilon\text{.}\)
The hypothesis on \(A\) in the proposition is necessary. For an arbitrary restriction we generally get an implication in only one direction, see Exercise 3.1.6. The usual notation for the limit is
A common use of restriction with respect to limits, which does not satisfy the hypothesis in the proposition, is the so-called one-sided limit 1
One sees a plethora of one-sided limit notations. E.g., \(\lim\limits_{\substack{x \to c\\x < c}} f(x)\text{,}\)\(\lim\limits_{x \uparrow c} f(x)\text{,}\) or \(\lim\limits_{x \nearrow c} f(x)\) for \(\lim\limits_{x \to c^-} f(x)\text{.}\)
Definition3.1.16.
Let \(f \colon S \to \R\) be function and let \(c \in \R\text{.}\) If \(c\) is a cluster point of \(S \cap (c,\infty)\) and the limit of the restriction of \(f\) to \(S \cap (c,\infty)\) as \(x \to c\) exists, define
Proposition 3.1.15 does not apply to one-sided limits. It is possible to have one-sided limits, but no limit at a point. For example, define \(f \colon \R \to \R\) by \(f(x) \coloneqq 1\) for \(x < 0\) and \(f(x) \coloneqq 0\) for \(x \geq 0\text{.}\) We leave it to the reader to verify that
All is not lost, however, for we have the following replacement.
Proposition3.1.17.
Let \(S \subset \R\) be such that \(c\) is a cluster point of both \(S \cap (-\infty,c)\) and \(S \cap (c,\infty)\text{,}\) let \(f \colon S \to \R\) be a function, and let \(L \in \R\text{.}\) Then \(c\) is a cluster point of \(S\) and
\begin{equation*}
\lim_{x \to c} f(x) = L
\qquad \text{if and only if} \qquad
\lim_{x \to c^-} f(x) =
\lim_{x \to c^+} f(x) =
L .
\end{equation*}
That is, a limit at \(c\) exists if and only if both one-sided limits exist and are equal. The proof is a straightforward application of the definition of limit and is left as an exercise. The key point is that \(\bigl( S \cap (-\infty,c) \bigr) \cup \bigl( S \cap (c,\infty) \bigr)
= S \setminus \{ c \}\text{.}\)
Exercises3.1.5Exercises
3.1.1.
Find the limit (and prove it of course) or prove that the limit does not exist
a) \(\displaystyle
\lim_{x\to c} \sqrt{x}
\text{,}\) for \(c \geq 0\)
b) \(\displaystyle
\lim_{x\to c} x^2+x+1
\text{,}\) for \(c \in \R\)
c) \(\displaystyle
\lim_{x\to 0} x^2 \cos (\nicefrac{1}{x})\)
Let \(A \subset S\text{.}\) Show that if \(c\) is a cluster point of \(A\text{,}\) then \(c\) is a cluster point of \(S\text{.}\) Note the difference from Proposition 3.1.15.
3.1.6.
Let \(A \subset S\text{.}\) Suppose \(c\) is a cluster point of \(A\) and it is also a cluster point of \(S\text{.}\) Let \(f \colon S \to \R\) be a function. Show that if \(f(x) \to L\) as \(x \to c\text{,}\) then \(f|_A(x) \to L\) as \(x \to c\text{.}\) Note the difference from Proposition 3.1.15.
3.1.7.
Find an example of a function \(f \colon [-1,1] \to \R\text{,}\) where for \(A\coloneqq [0,1]\text{,}\) we have \(f|_A(x) \to 0\) as \(x \to 0\text{,}\) but the limit of \(f(x)\) as \(x \to 0\) does not exist. Note why you cannot apply Proposition 3.1.15.
3.1.8.
Find example functions \(f\) and \(g\) such that the limit of neither \(f(x)\) nor \(g(x)\) exists as \(x \to 0\text{,}\) but such that the limit of \(f(x)+g(x)\) exists as \(x \to 0\text{.}\)
3.1.9.
Let \(c_1\) be a cluster point of \(A \subset \R\) and \(c_2\) be a cluster point of \(B \subset \R\text{.}\) Suppose \(f \colon A \to B\) and \(g \colon B \to \R\) are functions such that \(f(x) \to c_2\) as \(x \to c_1\) and \(g(y) \to L\) as \(y \to c_2\text{.}\) If \(c_2 \in B\text{,}\) also suppose that \(g(c_2) = L\text{.}\) Let \(h(x) \coloneqq g\bigl(f(x)\bigr)\) and show \(h(x) \to L\) as \(x \to c_1\text{.}\) Hint: Note that \(f(x)\) could equal \(c_2\) for many \(x \in A\text{,}\) see also Exercise 3.1.14.
3.1.10.
Suppose that \(f \colon \R \to \R\) be a function such that for every sequence \(\{x_n\}_{n=1}^\infty\) in \(\R\text{,}\) the sequence \(\bigl\{ f(x_n) \bigr\}_{n=1}^\infty\) converges. Prove that \(f\) is constant, that is, \(f(x) = f(y)\) for all \(x,y \in \R\text{.}\)
3.1.11.
Prove the following stronger version of one direction of Lemma 3.1.7: Let \(S \subset \R\text{,}\)\(c\) be a cluster point of \(S\text{,}\) and \(f \colon S \to
\R\) be a function. Suppose that for every sequence \(\{x_n\}_{n=1}^\infty\) in \(S \setminus \{c\}\) such that \(\lim_{n\to\infty} x_n = c\) the sequence \(\bigl\{ f(x_n) \bigr\}_{n=1}^\infty\) is convergent. Then show that the limit of \(f(x)\) as \(x \to c\) exists.
Suppose \(S \subset \R\) and \(c\) is a cluster point of \(S\text{.}\) Suppose \(f \colon
S \to \R\) is bounded. Show that there exists a sequence \(\{ x_n \}_{n=1}^\infty\) with \(x_n \in S \setminus \{ c \}\) and \(\lim_{n\to\infty} x_n = c\) such that \(\bigl\{ f(x_n) \bigr\}_{n=1}^\infty\) converges.
3.1.14.
(Challenging) Show that the hypothesis that \(g(c_2) = L\) in Exercise 3.1.9 is necessary. That is, find \(f\) and \(g\) such that \(f(x) \to c_2\) as \(x \to c_1\) and \(g(y) \to L\) as \(y \to c_2\text{,}\) but \(g\bigl(f(x)\bigr)\) does not go to \(L\) as \(x \to c_1\text{.}\)
3.1.15.
Show that the condition of being a cluster point is necessary to have a reasonable definition of a limit. That is, suppose \(c\) is not a cluster point of \(S \subset \R\text{,}\) and \(f \colon S \to \R\) is a function. Show that every \(L\) would satisfy the definition of limit at \(c\) without the condition on \(c\) being a cluster point.