4.6 Limits of functions vs limits of sequences

Limits of functions are closely related to limits of sequences. A precise connection between the two concepts is provided by the following lemma.

Lemma 4.59.

Let II\subseteq\mathbb{R} be an interval and aIa\in I. Let f:Ef\colon E\to\mathbb{R} where either E=IE=I or E=I{a}E=I\setminus\{a\}. Suppose limxaf(x)=\displaystyle\lim_{x\to a}f(x)=\ell.

If (an)n(a_{n})_{n\in\mathbb{N}} satisfies anI{a}a_{n}\in I\setminus\{a\} for all nn\in\mathbb{N} and anaa_{n}\to a as nn\to\infty, then

limnf(an)=.\lim_{n\to\infty}f(a_{n})=\ell.
Proof.

Let ε>0\varepsilon>0. Since limxaf(x)=\lim_{x\to a}f(x)=\ell, there exists some δ>0\delta>0 such that

(4.11) (4.11) |f(x)|<εfor all xI with 0<|xa|<δ.|f(x)-\ell|<\varepsilon\qquad\text{for all $x\in I$ with $0<|x-a|<\delta$.}

Since anI{a}a_{n}\in I\setminus\{a\}, we must have |ana|>0|a_{n}-a|>0 for all nn\in\mathbb{N}. Moreover, since anaa_{n}\to a as nn\to\infty, there exists some NN\in\mathbb{N} such that

(4.12) (4.12) 0<|ana|<δfor all n>N.0<|a_{n}-a|<\delta\qquad\text{for all $n>N$.}

By combining (4.12) with (4.11), we see that for all n>Nn>N we have |f(an)|<ε|f(a_{n})-\ell|<\varepsilon. Hence, by the ε\varepsilon-NN definition, f(an)f(a_{n})\to\ell as nn\to\infty. ∎

As a special case of the above result, we deduce the following important property of continuous functions.

Theorem 4.60 (Sequential continuity).

Let II\subseteq\mathbb{R} be an interval and f:If\colon I\to\mathbb{R} be continuous at aIa\in I. If (an)n(a_{n})_{n\in\mathbb{N}} satisfies anIa_{n}\in I for all nn\in\mathbb{N} and anaa_{n}\to a as nn\to\infty, then

limnf(an)=f(limnan)=f(a).\lim_{n\to\infty}f(a_{n})=f\big{(}\lim_{n\to\infty}a_{n}\big{)}=f(a).
Proof.

Since ff is continuous at aa, it follows that limxaf(x)=f(a)\lim_{x\to a}f(x)=f(a) by the characterisation from Lemma 4.42. The result then follows from Lemma 4.59 with =f(a)\ell=f(a). ∎

Example 4.61.

Since sin:\sin\colon\mathbb{R}\to\mathbb{R} is continuous at 0 and 1/n01/n\to 0 as nn\to\infty, it follows from Theorem 4.60 that sin(1/n)sin(0)=0\sin(1/n)\to\sin(0)=0 as nn\to\infty.

The following example shows that continuity is needed to guarantee the conclusion of the theorem!

Example 4.62.

Recall from Exercise 4.31 that the function f:f\colon\mathbb{R}\to\mathbb{R} defined by

f(x):={0if x0,1if x>0f(x):=\begin{cases}0&\text{if $x\leq 0$,}\\ 1&\text{if $x>0$}\end{cases}

is not continuous at 0. Let an:=1na_{n}:=\frac{1}{n} for all nn\in\mathbb{N}. Then an0a_{n}\to 0 as nn\to\infty and, since an>0a_{n}>0, we have f(an)=1f(a_{n})=1 for all nn\in\mathbb{N}. Thus,

limnf(an)=limn1=1\lim_{n\to\infty}f(a_{n})=\lim_{n\to\infty}1=1

while

f(limnan)=f(0)=0.f\big{(}\lim_{n\to\infty}a_{n}\big{)}=f(0)=0.

Thus, the conclusion of Theorem 4.60 does not necessarily hold when ff is discontinuous.

Exercise 4.63.

For each of the following sequences, evaluate the limit as nn\to\infty by using the theory of continuous functions. Here e:=exp(1)e:=\exp(1).

  1. (i)

    exp(1/n2)\exp(-1/n^{2});

  2. (ii)

    log(2ne+n2n+4)\displaystyle\log\Big{(}\frac{2^{n}e+n}{2^{n}+4}\Big{)}.