3.1 Limits and Continuity; Compactness in ℝ
From the ε–δ definition of a limit to the two great theorems about continuous functions on $[a,b]$ — the extreme value theorem and the intermediate value theorem — and the property of $[a,b]$ that makes them work: compactness.
Calculus speaks of "the value that $f(x)$ approaches as $x$ approaches $c$" and of functions "with no breaks in their graphs". These phrases are good intuition and poor mathematics: they cannot decide whether $\sin(1/x)$ has a limit at $0$, whether a function can be continuous at every irrational point and at no rational point, or why a continuous function on $(0,1)$ may fail to have a maximum while one on $[0,1]$ cannot. In 1817 Bolzano proved the intermediate value theorem by careful reasoning about least upper bounds; forty years later Weierstrass gave the $\varepsilon$–$\delta$ definitions we use today, which turn "approaches" into a precise game: you choose a tolerance $\varepsilon$, and I must find a $\delta$ that guarantees it.
This section sets up that language and proves the classical theorems about continuous functions on intervals. The common thread is completeness of $\mathbb{R}$ (§1.2), which appears in three disguises: the sequential criterion (through Bolzano–Weierstrass, §2.2), the Heine–Borel theorem (closed bounded sets are compact), and Bolzano's supremum argument for the intermediate value theorem. CSIR NET tests this material constantly: points of continuity of functions defined differently on $\mathbb{Q}$ and $\mathbb{R}\setminus\mathbb{Q}$, "which of these sets is compact", fixed points and roots via the IVT, and true/false statements about images of open, closed, bounded and connected sets under continuous maps.
Limits of Functions
The equivalence is worth one line: if every $(c-\tfrac1n,c+\tfrac1n)$ contains some $a_n\in A$ with $a_n\ne c$, then $|a_n-c|\lt\tfrac1n$, so $a_n\to c$; conversely a sequence in $A\setminus\{c\}$ converging to $c$ eventually enters every interval around $c$.
Let $f:A\to\mathbb{R}$ and let $c$ be a limit point of $A$. We say $f(x)\to L$ as $x\to c$, written $\displaystyle\lim_{x\to c}f(x)=L$, if
$$\forall\varepsilon\gt0\ \exists\delta\gt0:\quad x\in A,\ 0\lt|x-c|\lt\delta\ \Longrightarrow\ |f(x)-L|\lt\varepsilon.$$- Right-hand limit $f(c+)=\lim_{x\to c^+}f(x)=L$: the same with $c\lt x\lt c+\delta$ (requires $c$ to be a limit point of $A\cap(c,\infty)$). The left-hand limit $f(c-)$ uses $c-\delta\lt x\lt c$.
- $\lim_{x\to\infty}f(x)=L$ means: $\forall\varepsilon\gt0\ \exists M:\ x\in A,\ x\gt M\Rightarrow|f(x)-L|\lt\varepsilon$ (for $A$ not bounded above).
- $\lim_{x\to c}f(x)=+\infty$ means: $\forall K\ \exists\delta\gt0:\ x\in A,\ 0\lt|x-c|\lt\delta\Rightarrow f(x)\gt K$. An infinite limit is a way of saying the limit does not exist in $\mathbb{R}$, in a particular manner.
The value $f(c)$ — and even whether $c\in A$ — plays no role in the definition: only points $x\ne c$ are tested.
Read the definition as a game. The challenger names a tolerance $\varepsilon$; the defender must produce a $\delta$ such that every admissible $x$ within $\delta$ of $c$ (other than $c$) has $f(x)$ within $\varepsilon$ of $L$. The limit is $L$ when the defender can always win. The negation, which you need for every "the limit does not exist" proof, is: there is an $\varepsilon_0\gt0$ such that for every $\delta\gt0$ some $x\in A$ with $0\lt|x-c|\lt\delta$ has $|f(x)-L|\ge\varepsilon_0$.
Proof. (a) Suppose $L\ne L'$ are both limits and put $\varepsilon=|L-L'|/2\gt0$. There are $\delta_1,\delta_2$ for $L$ and $L'$; since $c$ is a limit point, some $x\in A$ has $0\lt|x-c|\lt\min(\delta_1,\delta_2)$. Then $|L-L'|\le|L-f(x)|+|f(x)-L'|$, and the right side is $\lt2\varepsilon=|L-L'|$, a contradiction.
(b) ($\Rightarrow$) Let $x_n\to c$ with $x_n\in A\setminus\{c\}$, and let $\varepsilon\gt0$. Choose $\delta$ from the definition, then $N$ with $|x_n-c|\lt\delta$ for $n\ge N$. Since $x_n\ne c$, we have $0\lt|x_n-c|\lt\delta$, hence $|f(x_n)-L|\lt\varepsilon$ for $n\ge N$. ($\Leftarrow$) Suppose the limit is not $L$. By the negation of the definition there is $\varepsilon_0\gt0$ such that, taking $\delta=\tfrac1n$ for each $n$, some $x_n\in A$ has $0\lt|x_n-c|\lt\tfrac1n$ and $|f(x_n)-L|\ge\varepsilon_0$. Then $(x_n)$ is a sequence in $A\setminus\{c\}$ converging to $c$ along which $f(x_n)\not\to L$. (c) follows from (a) and (b): if the limit $L$ existed, both $f(x_n)$ and $f(y_n)$ would converge to $L$. ∎
The sequential criterion converts every limit theorem for sequences (§2.1) into a limit theorem for functions.
- $f+g\to L+M$, $\ fg\to LM$, $\ \alpha f\to\alpha L$, and $f/g\to L/M$ provided $M\ne0$ (then $g\ne0$ on $A\cap(c-\delta,c+\delta)\setminus\{c\}$ for some $\delta\gt0$);
- if $f(x)\le g(x)$ for all $x\in A\setminus\{c\}$ near $c$, then $L\le M$; if $L\gt0$, then $f(x)\gt L/2\gt0$ for all $x\in A$ with $0\lt|x-c|\lt\delta$, for some $\delta\gt0$;
- (squeeze) if $f(x)\le h(x)\le g(x)$ near $c$ and $L=M$, then $\lim_{x\to c}h(x)=L$;
- (Cauchy criterion) $\lim_{x\to c}f(x)$ exists in $\mathbb{R}$ iff for every $\varepsilon\gt0$ there is $\delta\gt0$ with $|f(x)-f(y)|\lt\varepsilon$ whenever $x,y\in A$, $0\lt|x-c|\lt\delta$, $0\lt|y-c|\lt\delta$.
Proof. (1)–(3): take any sequence $x_n\to c$ in $A\setminus\{c\}$; then $f(x_n)\to L$ and $g(x_n)\to M$ by Theorem 3.1, and the corresponding results for sequences (§2.1) give $f(x_n)+g(x_n)\to L+M$, and so on; Theorem 3.1 converts back. For the quotient, $M\ne0$ gives, with $\varepsilon=|M|/2$, a $\delta$ with $|g(x)|\gt|M|/2$ near $c$, so $f/g$ is defined there. The second claim of (2) is the definition with $\varepsilon=L/2$. (4) The condition is necessary by the triangle inequality ($\varepsilon/2$ for each of $x,y$). Conversely, assume it and take any sequence $x_n\to c$ in $A\setminus\{c\}$: for $n,m$ large, $0\lt|x_n-c|\lt\delta$ and $0\lt|x_m-c|\lt\delta$, so $(f(x_n))$ is Cauchy and converges (completeness, §2.1) to some $L$. If $y_n\to c$ is another such sequence, the interleaved sequence $x_1,y_1,x_2,y_2,\dots$ also converges to $c$, so its image converges; its two subsequences $f(x_n)$ and $f(y_n)$ therefore have the same limit $L$. By Theorem 3.1(b), $\lim_{x\to c}f(x)=L$. ∎
- Guess $L$ by simplifying (cancel factors, rationalise) or by testing a few sequences.
- Prove it by estimating $|f(x)-L|\le K|x-c|$ (or $\le K|x-c|^\alpha$) after first restricting to $|x-c|\lt1$ to bound the troublesome factor; then $\delta=\min(1,\varepsilon/K)$. Or squeeze between two functions with the same limit.
- Disprove with two sequences (Theorem 3.1(c)), or with unequal one-sided limits.
- Mixed definitions ($f=g$ on $\mathbb{Q}$, $f=h$ off $\mathbb{Q}$, with $g,h$ continuous): the limit at $c$ exists iff $g(c)=h(c)$, by density.
Continuity
- $f$ is continuous at $c$;
- (sequential) $f(x_n)\to f(c)$ for every sequence $(x_n)$ in $A$ with $x_n\to c$;
- either $c$ is an isolated point of $A$, or $c$ is a limit point of $A$ and $\lim_{x\to c}f(x)=f(c)$.
Proof. (1)⇒(2) is the argument of Theorem 3.1(b, ⇒), now allowing $x_n=c$ (harmless, since $|f(c)-f(c)|=0$). (2)⇒(1): if $f$ is not continuous at $c$, there is $\varepsilon_0\gt0$ and, for each $n$, a point $x_n\in A$ with $|x_n-c|\lt\tfrac1n$ and $|f(x_n)-f(c)|\ge\varepsilon_0$; so $x_n\to c$ but $f(x_n)\not\to f(c)$. (1)⇔(3): at an isolated point both hold; at a limit point the definitions of "continuous at $c$" and "$\lim_{x\to c}f(x)=f(c)$" differ only in whether $x=c$ is tested, which changes nothing.
(4) (Here a set $U$ is open if each of its points is the centre of an interval contained in $U$ — Definition 3.4 below.) Suppose $f$ is continuous and $U$ is open; let $c\in f^{-1}(U)$. Some $(f(c)-\varepsilon,f(c)+\varepsilon)\subseteq U$, and continuity gives $\delta$ with $f((c-\delta,c+\delta))\subseteq(f(c)-\varepsilon,f(c)+\varepsilon)\subseteq U$; so $(c-\delta,c+\delta)\subseteq f^{-1}(U)$, which is therefore open. Conversely, given $c$ and $\varepsilon$, the set $f^{-1}\big((f(c)-\varepsilon,f(c)+\varepsilon)\big)$ is open and contains $c$, so it contains some $(c-\delta,c+\delta)$ — which is exactly continuity at $c$. (5) The algebra follows from (2) and the algebra of limits of sequences. For the composition, if $x_n\to c$ then $f(x_n)\to f(c)$ by (2) applied to $f$, hence $g(f(x_n))\to g(f(c))$ by (2) applied to $g$. Finally $|f|$ is the composition of $f$ with $t\mapsto|t|$, which is continuous because $\big||t|-|s|\big|\le|t-s|$. ∎
Proof. (a) Example 2(c): $D$ has no limit anywhere. (b) $|g(x)-g(0)|=|g(x)|\le|x|$, so $\delta=\varepsilon$ works at $0$. At $c\ne0$ take rationals $r_n\to c$ and irrationals $t_n\to c$: $g(r_n)=r_n\to c$ and $g(t_n)=0$, two different limits, so $g$ is not continuous at $c$.
(c) Fix $c$ and $\varepsilon\gt0$; choose $N\in\mathbb{N}$ with $\tfrac1N\lt\varepsilon$. In the bounded interval $(c-1,c+1)$ there are only finitely many rationals $p/q$ with $q\le N$ — for each $q\le N$ at most $2q+1$ numerators $p$ give $p/q$ in an interval of length $2$. Let $\delta\gt0$ be smaller than $1$ and than the distance from $c$ to each of these finitely many points that differ from $c$. If $0\lt|x-c|\lt\delta$, then either $x$ is irrational and $T(x)=0$, or $x=p/q$ in lowest terms with $q\gt N$, so $T(x)=\tfrac1q\lt\tfrac1N\lt\varepsilon$. Either way $|T(x)-0|\lt\varepsilon$. Thus $\lim_{x\to c}T(x)=0$ everywhere, and by Theorem 3.3(3) $T$ is continuous at $c$ iff $T(c)=0$, i.e. iff $c$ is irrational. ∎
Can we turn this around — a function continuous exactly at the rationals? No. The set of points of continuity of any $f:\mathbb{R}\to\mathbb{R}$ is a countable intersection of open sets (a $G_\delta$ set), and the Baire category theorem (§7.1) shows that $\mathbb{Q}$ is not such a set. Thomae's function reappears in Chapter 4: it is Riemann integrable although it is discontinuous at a dense set of points.
Compactness in ℝ: the Heine–Borel Theorem
- $U\subseteq\mathbb{R}$ is open if for every $x\in U$ there is $r\gt0$ with $(x-r,x+r)\subseteq U$. $F\subseteq\mathbb{R}$ is closed if $\mathbb{R}\setminus F$ is open; equivalently, $F$ contains all its limit points; equivalently, whenever $x_n\in F$ and $x_n\to x$, then $x\in F$.
- An open cover of $K\subseteq\mathbb{R}$ is a family $\{U_\alpha\}_{\alpha\in I}$ of open sets with $K\subseteq\bigcup_\alpha U_\alpha$. A subcover is a subfamily that still covers $K$.
- $K$ is compact if every open cover of $K$ has a finite subcover. $K$ is sequentially compact if every sequence in $K$ has a subsequence converging to a point of $K$.
The three descriptions of "closed" agree: if $\mathbb{R}\setminus F$ is open and $p\notin F$, some interval around $p$ misses $F$, so $p$ is not a limit point of $F$; conversely, if $F$ contains its limit points and $p\notin F$, then $p$ is not a limit point, so some interval around $p$ misses $F$. The sequence form is the same statement through Definition 3.1. Compactness is the precise sense in which a set is "finite up to $\varepsilon$": however we try to cover it with open sets, finitely many already suffice.
Proof. Step 1: $[a,b]$ is compact. Let $\mathcal U$ be an open cover of $[a,b]$ and let $S=\{x\in[a,b]:\ [a,x]$ is covered by finitely many members of $\mathcal U\}$. Then $a\in S$ (one member contains $a$), and $S$ is bounded above by $b$; let $s=\sup S$ (completeness). The point $s\in[a,b]$ lies in some $U\in\mathcal U$, so $(s-r,s+r)\subseteq U$ for some $r\gt0$. By the $\varepsilon$-characterisation of the supremum (§1.2) there is $x\in S$ with $s-r\lt x\le s$; $[a,x]$ is covered by finitely many members, and adding $U$ covers $[a,y]$ for every $y\in[a,b]$ with $y\lt s+r$. Hence every such $y$ lies in $S$. If $s\lt b$, this puts points $y\gt s$ into $S$, contradicting $s=\sup S$; so $s=b$, and taking $y=b$ shows $b\in S$: $[a,b]$ is covered by finitely many members.
Step 2: a closed subset $F$ of a compact set $K$ is compact. Given an open cover $\mathcal U$ of $F$, add the open set $\mathbb{R}\setminus F$: this covers $K$, so finitely many of these sets cover $K$, and discarding $\mathbb{R}\setminus F$ (which contains no point of $F$) leaves finitely many members of $\mathcal U$ covering $F$. With Step 1 this proves (b)⇒(a): a closed bounded $K$ sits inside some $[-M,M]$.
Step 3: (a)⇒(b). The open intervals $(-n,n)$, $n\in\mathbb{N}$, cover $\mathbb{R}$, hence $K$; finitely many cover $K$, and since they increase, one of them does: $K\subseteq(-n,n)$ is bounded. If $K$ were not closed, there would be a limit point $p\notin K$ of $K$. The open sets $U_n=\{x:|x-p|\gt\tfrac1n\}$ cover $\mathbb{R}\setminus\{p\}\supseteq K$ and increase with $n$; a finite subcover would give $K\subseteq U_n$ for one $n$, so $(p-\tfrac1n,p+\tfrac1n)$ would contain no point of $K$, contradicting that $p$ is a limit point.
Step 4: (b)⇔(c). If $K$ is closed and bounded, a sequence in $K$ is bounded, so it has a convergent subsequence by the Bolzano–Weierstrass theorem (§2.2); its limit lies in $K$ because $K$ is closed. Conversely, if $K$ is unbounded, choose $x_n\in K$ with $|x_n|\gt n$: no subsequence converges. If $K$ is not closed, choose $x_n\in K$ converging to some $p\notin K$: every subsequence also converges to $p\notin K$. ∎
The open-cover definition looks abstract, but it is what carries local information to global conclusions: "near each point $f$ is bounded" plus compactness gives "$f$ is bounded" (Theorem 3.6), and "near each point a $\delta$ works" gives "one $\delta$ works everywhere" (uniform continuity, §3.2). In general metric spaces "closed and bounded" is not enough (§7.2) — Heine–Borel is special to $\mathbb{R}^n$.
Continuous Functions on Compact Sets and Intervals
Proof. Let $(y_n)$ be a sequence in $f(K)$, say $y_n=f(x_n)$ with $x_n\in K$. By Theorem 3.5(c) some subsequence $x_{n_k}\to x\in K$, and by continuity $y_{n_k}=f(x_{n_k})\to f(x)\in f(K)$. So $f(K)$ is sequentially compact, hence compact by Theorem 3.5. A nonempty compact subset of $\mathbb{R}$ is bounded and closed, so $M=\sup f(K)$ is finite and, being a limit of points of $f(K)$ (§1.2), belongs to $f(K)$: $M=f(q)$. The minimum is similar. ∎
An open-cover proof of boundedness, to see the definition at work: for each $c\in K$, continuity with $\varepsilon=1$ gives an open interval $I_c\ni c$ on which $|f|\lt|f(c)|+1$. Finitely many $I_{c_1},\dots,I_{c_m}$ cover $K$, so $|f|\lt1+\max_j|f(c_j)|$ on $K$. Every hypothesis matters: $f(x)=x$ on $(0,1)$ has no maximum, $1/x$ on $(0,1]$ is unbounded, $x$ on $[0,\infty)$ is unbounded, and $\arctan$ on $\mathbb{R}$ is bounded with no maximum.
Proof. Replacing $f$ by $f-y$ or by $y-f$ we may assume $f(a)\lt0\lt f(b)$ (if $f(a)=y$ or $f(b)=y$ there is nothing to prove). Let $S=\{x\in[a,b]:f(x)\lt0\}$; then $a\in S$ and $S$ is bounded above by $b$. Let $c=\sup S\in[a,b]$. We show $f(c)=0$.
$f(c)\gt0$ is impossible: then $c\gt a$ (as $f(a)\lt0$), and continuity gives $\delta\gt0$ with $f\gt0$ on $(c-\delta,c]\cap[a,b]$. No point of $S$ lies in $(c-\delta,c]$, and none lies above $c$, so $c-\delta$ (or $a$, if larger) is an upper bound of $S$ smaller than $c$ — contradiction.
$f(c)\lt0$ is impossible: then $c\lt b$ (as $f(b)\gt0$), and continuity gives $\delta\gt0$ with $f\lt0$ on $[c,c+\delta)\cap[a,b]$. Then $\min(c+\delta/2,b)\in S$ exceeds $c$ — contradicting that $c$ is an upper bound. Hence $f(c)=0$, and $c\ne a,b$. ∎
A second proof, by bisection, is also an algorithm: halve $[a,b]$, keep a half on which $f$ changes sign, and repeat; the nested intervals (§1.2) shrink to a point $c$, and continuity forces $f(c)\le0\le f(c)$. After $n$ steps the root is known to within $(b-a)2^{-n}$.
Proof. (a) A set $J\subseteq\mathbb{R}$ is an interval iff $u,v\in J$, $u\lt y\lt v$ imply $y\in J$. If $u=f(s)$, $v=f(t)$ and $u\lt y\lt v$, apply Theorem 3.7 to $f$ on the closed interval with end points $s,t$ (contained in $I$): some $c$ between them has $f(c)=y$. (b) By Theorem 3.6 the image is compact and contains $m$ and $M$; by (a) it is an interval; so it is $[m,M]$. (c) $g(x)=f(x)-x$ is continuous with $g(a)=f(a)-a\ge0$ and $g(b)=f(b)-b\le0$; Theorem 3.7 gives $g(c)=0$. (d) Let $p(x)=a_nx^n+\cdots+a_0$ with $n$ odd and $a_n\gt0$ (otherwise use $-p$). Then $p(x)=a_nx^n\left(1+\tfrac{a_{n-1}}{a_nx}+\cdots+\tfrac{a_0}{a_nx^n}\right)$ and the bracket tends to $1$ as $|x|\to\infty$; so $p(x)\gt0$ for large positive $x$ and $p(x)\lt0$ for large negative $x$ ($x^n\lt0$ there because $n$ is odd). Theorem 3.7 gives a root. ∎
Monotone Functions and Continuous Inverses
Proof. Take $f$ increasing (otherwise use $-f$) and $c\in I$, $\varepsilon\gt0$. We find a $\delta$ that works on the right of $c$; the left is symmetric. If $c$ is the right end point of $I$ there is nothing to do. Otherwise pick $x_1\in I$ with $x_1\gt c$. If $f(x_1)\lt f(c)+\varepsilon$, put $\delta=x_1-c$: for $c\le x\lt x_1$, $f(c)\le f(x)\le f(x_1)\lt f(c)+\varepsilon$. If $f(x_1)\ge f(c)+\varepsilon$, then $y=f(c)+\varepsilon/2$ lies strictly between $f(c)$ and $f(x_1)$, both in the interval $f(I)$; so $y=f(x_2)$ for some $x_2\in I$. Since $f(x_2)\gt f(c)$ and $f$ is increasing, $x_2\gt c$. Put $\delta=x_2-c$: for $c\le x\lt x_2$, $f(c)\le f(x)\le f(x_2)\lt f(c)+\varepsilon$. In both cases $|f(x)-f(c)|\lt\varepsilon$ for $x\in I\cap[c,c+\delta)$. ∎
The idea in one sentence: a monotone function can only be discontinuous by jumping, and a jump leaves a gap in the image. §3.2 studies these jumps in detail.
Proof. If $I$ has only one point there is nothing to prove. Fix $a\lt b$ in $I$; by injectivity $f(a)\ne f(b)$, and replacing $f$ by $-f$ if necessary we may assume $f(a)\lt f(b)$. We show $f(s)\lt f(t)$ for every pair $s\lt t$ in $I$, i.e. $f$ is strictly increasing. Slide the pair $(a,b)$ to the pair $(s,t)$: for $\lambda\in[0,1]$ put $p(\lambda)=(1-\lambda)a+\lambda s$ and $q(\lambda)=(1-\lambda)b+\lambda t$. Both lie in $I$ (an interval contains every point between two of its points), and $$q(\lambda)-p(\lambda)=(1-\lambda)(b-a)+\lambda(t-s)\gt0 .$$ So $\varphi(\lambda)=f(q(\lambda))-f(p(\lambda))$ is continuous on $[0,1]$ (a composition of continuous maps) and never $0$, because $p(\lambda)\ne q(\lambda)$ and $f$ is injective. Since $\varphi(0)=f(b)-f(a)\gt0$, the IVT forbids $\varphi(1)\lt0$ — otherwise $\varphi$ would vanish in between. Hence $\varphi(1)=f(t)-f(s)\gt0$. ∎
A useful by-product: a continuous injective $f$ on an interval can have no "peak". If $x\lt y\lt z$ and $f(y)\gt\max(f(x),f(z))$, every value slightly below $f(y)$ would be taken once in $(x,y)$ and once in $(y,z)$.
Proof. $J$ is an interval by Theorem 3.8(a), and strict monotonicity makes $f$ injective, hence a bijection onto $J$. If $f$ is strictly increasing and $u\lt v$ in $J$, then $f^{-1}(u)\ge f^{-1}(v)$ would give $u\ge v$; so $f^{-1}$ is strictly increasing. Its image is $I$, an interval, so $f^{-1}$ is continuous by Theorem 3.9. ∎
This single theorem gives continuity of $\sqrt[n]{x}$ on $[0,\infty)$, of $\log$ on $(0,\infty)$ (inverse of $\exp$), and of $\arcsin$, $\arccos$, $\arctan$ on their domains — with no $\varepsilon$–$\delta$ work at all.
- The limit ignores $f(c)$: $\tfrac{x^2-1}{x-1}\to2$ at $1$ although it is undefined there; redefining $f$ at one point never changes a limit, but can destroy continuity.
- Special paths prove nothing: $\sin(\pi/x)=0$ along $x=\tfrac1n$, yet $\lim_{x\to0}\sin(\pi/x)$ does not exist. Only all sequences (Theorem 3.1) decide.
- Two-sided limits need equal one-sided limits: $\operatorname{sgn}(0\pm)=\pm1$.
- The continuity zoo: Dirichlet's $D$ is nowhere continuous; $xD(x)$ is continuous only at $0$; Thomae's $T$ is continuous exactly at the irrationals; no function is continuous exactly at the rationals (Baire).
- Continuous images of open sets need not be open: $x^2$ maps $(-1,1)$ onto $[0,1)$. Preimages of open sets are open — images are not.
- Continuous images of closed sets need not be closed: $e^x$ maps the closed set $\mathbb{R}$ onto $(0,\infty)$; $\arctan$ maps it onto $(-\tfrac\pi2,\tfrac\pi2)$.
- Continuous images of bounded sets need not be bounded: $1/x$ on $(0,1)$. Compactness — closed and bounded — is what is preserved.
- The extreme value theorem needs a compact domain: $x$ on $(0,1)$; $1/x$ on $(0,1]$; $x$ on $[0,\infty)$; $\arctan$ on $\mathbb{R}$ (bounded, no maximum).
- The IVT needs an interval and continuity, and has no converse: $\operatorname{sgn}$ skips $\tfrac12$; on $[0,1]\cup[2,3]$ the function $x$ skips $1.5$; but $\sin(1/x)$ with value $0$ at $0$ has the intermediate value property on every interval and is discontinuous at $0$.
- Not compact: $(0,1]$ (missing limit point), $\mathbb{Q}\cap[0,1]$ (not closed), $\mathbb{N}$ and $[0,\infty)$ (unbounded), $\{\tfrac1n\}$ without $0$. Compact: finite sets, $\{0\}\cup\{\tfrac1n\}$, the Cantor set.
- Heine–Borel is special to $\mathbb{R}^n$: in the discrete metric or in $\ell^2$, closed bounded sets need not be compact (§7.2).
- Inverses: a continuous bijection need not have a continuous inverse unless its domain is an interval or compact (Example 7(b)).
- Monotone does not imply continuous: $\lfloor x\rfloor$; but monotone with an interval image does (Theorem 3.9).
Exercises
- 1 Prove from the definition that $\lim_{x\to3}(2x+1)=7$.
- 2 Prove from the definition that $\lim_{x\to1}\dfrac1x=1$, giving $\delta$ in terms of $\varepsilon$.
- 3 Prove that $\lim_{x\to4}\sqrt x=2$ (domain $[0,\infty)$).
- 4 Compute $\lim_{x\to0}\dfrac{\sqrt{1+x}-1}{x}$ and justify each step.
- 5 Show that $\lim_{x\to0}\cos\dfrac1x$ does not exist.
- 6 Let $f(x)=x$ for $x\in\mathbb{Q}$ and $f(x)=0$ otherwise. For which $c$ does $\lim_{x\to c}f(x)$ exist?
- 7 Prove: if $\lim_{x\to c}f(x)=L\gt0$, then $f(x)\gt L/2$ for all $x\ne c$ in some interval around $c$ (in the domain).
- 8 Prove the Cauchy criterion, Theorem 3.2(4), directly, and use it to show again that $\lim_{x\to0}\sin(1/x)$ does not exist.
- 1 Where is $f(x)=\lfloor x\rfloor$ continuous? Where is $g(x)=x-\lfloor x\rfloor$ continuous?
- 2 Show that $f(x)=x\sin(1/x)$, $f(0)=0$, is continuous on $\mathbb{R}$, but that $g(x)=\sin(1/x)$, $g(0)=a$, is discontinuous at $0$ for every $a$.
- 3 Find all points of continuity of $f(x)=x^2$ for $x\in\mathbb{Q}$, $f(x)=x$ for $x\notin\mathbb{Q}$.
- 4 Prove that if $f,g$ are continuous then $\max(f,g)$ and $\min(f,g)$ are continuous.
- 5 Let $f:\mathbb{R}\to\mathbb{R}$ be continuous. Prove that $\{x:f(x)\gt0\}$ is open and $\{x:f(x)=0\}$ is closed.
- 6 For Thomae's function $T$, compute $T(0.375)$, $T(-\tfrac{6}{4})$, $T(\tfrac{\sqrt2}{2})$, and find all $\delta\gt0$ such that $T(x)\lt\tfrac14$ for every $x$ with $0\lt|x-\tfrac{\sqrt2}2|\lt\delta$.
- 7 Let $f:\mathbb{R}\to\mathbb{R}$ be continuous with $f(2x)=f(x)$ for all $x$. Prove that $f$ is constant. Is continuity at $0$ alone enough?
- 8 Prove that $f:\mathbb{R}\to\mathbb{R}$ is continuous iff $f^{-1}(F)$ is closed for every closed set $F$.
- 1 Show directly from the definition that $(0,1)$ is not compact.
- 2 Show directly from the definition that every finite set is compact, and that $\{2\}\cup\{2+\tfrac1{n^2}:n\in\mathbb{N}\}$ is compact.
- 3 Which are compact? (a) $[0,1]\cup[2,3]$; (b) $\{x:x^3-x\le0\}$; (c) $\{x:e^{-x^2}\ge\tfrac12\}$; (d) $\{x\in[0,1]:x\notin\mathbb{Q}\}$.
- 4 Prove that a finite union of compact sets is compact and that any intersection of compact sets is compact.
- 5 Prove from the open-cover definition that a compact set $K\ne\varnothing$ has a largest element.
- 6 Give an open cover of $\mathbb{N}$ and one of $[0,\infty)$ with no finite subcover.
- 7 (Cantor's intersection theorem) Let $K_1\supseteq K_2\supseteq\cdots$ be nonempty compact sets. Prove $\bigcap_nK_n\ne\varnothing$. Show that "compact" cannot be replaced by "closed" or by "bounded".
- 8 Prove that if $K$ and $L$ are compact, so is $K+L=\{k+l:k\in K,\ l\in L\}$. Is $F+G$ closed for closed $F,G$?
- 1 Show that $x^5-3x+1=0$ has a root in $(0,1)$ and a root in $(1,2)$.
- 2 Let $f:[0,1]\to\mathbb{R}$ be continuous with $f(0)=f(1)$. Prove that $f(x+\tfrac13)=f(x)$ for some $x\in[0,\tfrac23]$.
- 3 Let $f:[0,1]\to\mathbb{R}$ be continuous and $f(x)\gt0$ for all $x$. Prove that there is $m\gt0$ with $f(x)\ge m$ for all $x$. Does this hold on $(0,1)$?
- 4 (Challenge) Prove that no continuous $f:\mathbb{R}\to\mathbb{R}$ takes every one of its values exactly twice.
- 5 Prove: if $f:[a,b]\to\mathbb{R}$ is continuous and injective, then $f([a,b])$ is the closed interval with end points $f(a)$ and $f(b)$.
- 6 Prove that $\tan:(-\tfrac\pi2,\tfrac\pi2)\to\mathbb{R}$ has a continuous inverse, using Theorem 3.11 only.
- 7 Show that there is no continuous bijection from $[0,1)$ onto $\mathbb{R}$, but there is one from $(0,1)$ onto $\mathbb{R}$.
- 8 Applied. A hiker walks up a mountain path from 6 a.m. to 6 p.m. on Monday and walks down the same path from 6 a.m. to 6 p.m. on Tuesday, at varying speeds and with rests. Prove that there is a time of day at which she is at exactly the same point of the path on both days.
E1. CSIR Part B GATE MA Let $f(x)=x^2$ if $x\in\mathbb{Q}$ and $f(x)=2-x^2$ if $x\notin\mathbb{Q}$. The number of points at which $f$ is continuous is (A) $0$; (B) $1$; (C) $2$; (D) infinite.
E2. CSIR Part B Which of the following subsets of $\mathbb{R}$ is compact? (A) $\mathbb{Q}\cap[0,1]$; (B) $\{\tfrac1n:n\in\mathbb{N}\}$; (C) $\{x\in\mathbb{R}:x^4-3x^2+1\le0\}$; (D) $\{x\in\mathbb{R}:\sin x\ge0\}$.
E3. CSIR Part B Let $f:[0,2]\to\mathbb{R}$ be continuous with $f(0)=f(2)$. Which statement is necessarily true? (A) $f(x)=f(x+1)$ for some $x\in[0,1]$; (B) $f$ is monotone on $[0,1]$; (C) $f$ has a fixed point in $[0,2]$; (D) $f$ does not attain its maximum in $(0,2)$.
E4. CSIR Part C Let $f:\mathbb{R}\to\mathbb{R}$ be continuous. Which of the following are true? (One or more options may be correct.) (A) If $f(r)=0$ for every $r\in\mathbb{Q}$, then $f\equiv0$. (B) If $f$ is injective, then $f$ is strictly monotone. (C) If $f$ is bounded, then $f$ attains its maximum. (D) $f$ maps closed sets onto closed sets.
E5. CSIR Part C Which of the following subsets of $\mathbb{R}$ are compact? (A) $\{(-1)^n+\tfrac1n:n\in\mathbb{N}\}\cup\{-1,1\}$; (B) $\{\sin n:n\in\mathbb{N}\}$; (C) $[0,1]\setminus\mathbb{Q}$; (D) $f([0,1])$ for an arbitrary continuous $f:[0,1]\to\mathbb{R}$.
E6. CSIR Part C GATE MA Which of the following statements are true? (A) For every continuous $f:[0,1]\to\mathbb{R}$, the image $f([0,1])$ is a closed bounded interval. (B) For every continuous $g:(0,1)\to\mathbb{R}$, the image $g((0,1))$ is an open interval. (C) There is a continuous map of $(0,1)$ onto $[0,1]$. (D) There is a continuous map of $[0,1]$ onto $(0,1)$.
Suggested plan — 3 lectures × 60 min.
- Limits. Limit points; Definition 3.2 as a game between challenger and defender; Example 1(a) on the board, insisting on the "first restrict to $|x-c|\lt1$" step. Project Interactive 1 with $x^2$ (δ shrinks but survives) and then $\lfloor x\rfloor$ and $\sin(1/x)$ (the game is lost). Theorem 3.1 with full proof; Example 2; Theorem 3.2 quickly via sequences.
- Continuity. Definition 3.3, Theorem 3.3 (prove (1)⇔(2) and (4)); the Dirichlet and Thomae functions (Theorem 3.4 — do the Thomae proof slowly, it is a model of finite-versus-infinite reasoning); Example 3, especially (c). Open sets, covers, compactness; Theorem 3.5 with the supremum proof of Step 1 in full; Interactive 2: first $(0,1]$ (never finishes), then the same cover plus one interval around $0$ (finishes in three steps).
- Big theorems. EVT via sequential compactness and via covers; IVT by the supremum proof and by bisection; Theorem 3.8 and Example 5. Monotone functions: Theorems 3.9–3.11 and Example 7(b) as the warning. End with E1 and E4 as a live poll.
Discussion questions. (1) In Definition 3.2, what changes if we drop the condition $0\lt|x-c|$? Which theorems break? (2) Why does the supremum proof that $[a,b]$ is compact fail for $[a,b]\cap\mathbb{Q}$ inside $\mathbb{Q}$? (3) Is there a continuous function from $\mathbb{R}$ onto $\mathbb{R}\setminus\{0\}$? Onto $\mathbb{Q}$?
Misconceptions to watch for. Choosing $\delta$ before $\varepsilon$; letting $\delta$ depend on $x$; testing a limit along one sequence; believing continuous maps preserve open sets or closed sets; confusing "closed" with "not open"; applying the EVT on open intervals; thinking the IVT characterises continuity; forgetting that Theorem 3.11 needs an interval domain.
Suggested homework. I(2, 3, 5, 8), II(3, 6, 7), III(1, 3, 5, 7), IV(2, 4, 7, 8); Exam corner E2, E5, E6.
Research question. Can a wobbly four-legged table on an uneven floor always be steadied just by rotating it — and how does the intermediate value theorem prove it?
Why it matters. Café tables, surveying tripods versus four-legged instrument stands, field laboratory benches and legged robots all face the same problem: four contact points on a curved surface need not lie in a plane. The mathematical answer is a pure IVT argument, and the modelling choices (what "uneven" means, what "steady" means) are a good exercise in turning a physical claim into a theorem.
What to do.
- Model the floor as a continuous height function $z=h(x,y)$ and the feet of a square table as the points $P_k(\theta)=0.5\,(\cos(\theta+k\pi/2),\sin(\theta+k\pi/2))$, $k=0,1,2,3$ (metres). Explain why the four lifted points $(P_k,h(P_k))$ lie in one plane exactly when $D(\theta)=h(P_0)-h(P_1)+h(P_2)-h(P_3)=0$. (Hint: the diagonals of a parallelogram bisect each other.)
- Show that $D(\theta+\pi/2)=-D(\theta)$ and deduce from the IVT that $D$ vanishes somewhere in $[0,\pi/2]$.
- Take $h(x,y)=0.04\sin(2x+1)+0.03\cos3y+0.02xy$. Tabulate $D(\theta)$ and locate a root by bisection to within $0.1^\circ$.
- Which hidden assumptions does the argument use (legs of equal length, no leg sinking into a hole, slopes not too steep)? Find a floor for which the "steady" position tilts the tabletop by more than $5^\circ$.
Tools: Python or a spreadsheet; graph paper for a sketch of $D(\theta)$.
Hand in: A one-page note with the proof for steps 1–2, your table and root for step 3, and a paragraph on the modelling assumptions.
Going further. Read about the stronger "rotate without tilting" version for floors of bounded slope, and about the related Borsuk–Ulam theorem: at any moment there are two antipodal points on the Earth's equator with the same temperature (another IVT argument, with $g(\theta)=T(\theta)-T(\theta+\pi)$).
🧪 Self-check quiz
Q1. Thomae's function is continuous at
Q2. Which set is compact?
Q3. $f(x)=x$ on $(0,1)$ has no maximum. Which hypothesis of the extreme value theorem fails?
Q4. $\lim_{x\to0}x\sin(1/x)$ equals
Q5. A continuous injective function on an interval is necessarily