Real AnalysisLimits of Functions and Continuity

The Sequential Criterion and Discontinuity

f is continuous at a exactly when f(xₙ) → f(a) for every sequence xₙ → a; two sequences giving different limits prove a discontinuity.

Not started Jump to practice

Continuity can be tested with sequences instead of ε and δ, which turns everything you know about limits of sequences into facts about functions. The criterion is especially good at proving that a function is not continuous, where an ε–δ argument would be clumsy. It builds on ε–δ continuity.

Key idea

Sequential criterion. $f$ is continuous at $a$ if and only if $f(x_n) \to f(a)$ for every sequence $x_n \to a$ (in the domain). So to prove a discontinuity, find one sequence $x_n \to a$ with $f(x_n) \not\to f(a)$, or two sequences giving different limits.

Why it works

(Continuous implies the sequence condition.) Let $x_n \to a$ and $\varepsilon > 0$. Take $\delta$ from continuity, then $N$ with $|x_n - a| < \delta$ for $n \ge N$; then $|f(x_n) - f(a)| < \varepsilon$. (Converse, by contrapositive.) If $f$ is not continuous at $a$, some $\varepsilon > 0$ has no working $\delta$. Try $\delta = \frac{1}{n}$: each fails, so there is an $x_n$ with $|x_n - a| < \frac{1}{n}$ but $|f(x_n) - f(a)| \ge \varepsilon$. Then $x_n \to a$ while $f(x_n) \not\to f(a)$. $\blacksquare$

The classic example is $f(x) = \sin\frac{1}{x}$ near $0$. Along $x_n = \frac{1}{2\pi n + \pi/2}$, $f(x_n) = 1$ for every $n$; along $x_n = \frac{1}{2\pi n}$, $f(x_n) = 0$. Both sequences tend to $0$, so no choice of $f(0)$ makes $f$ continuous there. Functions defined differently on rationals and irrationals work the same way, because every interval contains both kinds of numbers.

Worked examples

Worked example: Choosing the sequence

For $f(x) = \cos\frac{1}{x}$ and $x_n = \frac{1}{2\pi n + \pi/3}$, find $\lim f(x_n)$.
  1. $\frac{1}{x_n} = 2\pi n + \frac{\pi}{3}$, so $f(x_n) = \cos\left(\frac{\pi}{3}\right) = \frac{1}{2}$ for every $n$.

Answer: $\frac{1}{2}$. Another sequence gives $1$, so $\cos\frac{1}{x}$ has no limit at $0$.

Worked example: Rational and irrational pieces

Let $f(x) = x^{2}$ for rational $x$ and $f(x) = x + 2$ for irrational $x$. Where is $f$ continuous?
  1. Near any $a$ there are rationals $r_n \to a$ and irrationals $t_n \to a$, giving $f(r_n) \to a^{2}$ and $f(t_n) \to a + 2$.
  2. Continuity at $a$ needs $a^{2} = a + 2$, so $a = 2$ or $a = -1$. At those points every sequence gives the same limit, and $f$ is continuous; everywhere else it is not.

Answer: $\{-1, 2\}$

Worked example: Thomae's function

Let $f\left(\frac{p}{q}\right) = \frac{1}{q}$ for a fraction in lowest terms and $f(x) = 0$ for irrational $x$. Is $f$ continuous at $\frac{2}{3}$?
  1. $f\left(\frac{2}{3}\right) = \frac{1}{3}$.
  2. Irrationals $t_n \to \frac{2}{3}$ have $f(t_n) = 0 \not\to \frac{1}{3}$.

Answer: No. (At irrational points it is continuous: nearby rationals have large denominators.)

Common mistake

One good sequence proves nothing. "$f\left(\frac{1}{n}\right) \to f(0)$, so $f$ is continuous at $0$" is invalid: the criterion requires every sequence. One sequence can only prove a discontinuity. If you want to prove continuity, either handle an arbitrary sequence $x_n \to a$ or go back to ε and δ.

Practice

Pass with 3 right answers, the last 2 in a row. Each right answer earns 3 XP.

Loading practice…

Builds on

Leads to

This is one of the top rungs of Real Analysis.

Sources and further reading

  • Jiří Lebl, Basic Analysis I: Introduction to Real Analysis, sections 3.1 and 3.2 (sequential limits and continuity)
  • William F. Trench, Introduction to Real Analysis (Trinity University), section 2.2
@teddyrookbook GitHub