Chapter 3 · Continuity and Differentiability

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

📘 Definition 3.1 — Limit points and isolated points
Let $A\subseteq\mathbb{R}$. A point $c\in\mathbb{R}$ (not necessarily in $A$) is a limit point (cluster point, accumulation point) of $A$ if every interval $(c-\delta,c+\delta)$, $\delta\gt0$, contains a point of $A$ other than $c$. Equivalently, there is a sequence $(a_n)$ in $A\setminus\{c\}$ with $a_n\to c$. A point of $A$ that is not a limit point of $A$ is an isolated point of $A$. Examples: every point of $[0,1]$ is a limit point of $(0,1)$; $0$ is the only limit point of $\{1/n:n\in\mathbb{N}\}$, and every point of that set is isolated; $\mathbb{Z}$ has no limit points; every real number is a limit point of $\mathbb{Q}$.

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$.

📘 Definition 3.2 — Limit of a function; one-sided and infinite limits

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$.

📐 Theorem 3.1 — Uniqueness and the sequential criterion (Heine)
Let $f:A\to\mathbb{R}$ and let $c$ be a limit point of $A$. (a) $f$ has at most one limit at $c$. (b) $\lim_{x\to c}f(x)=L$ if and only if $f(x_n)\to L$ for every sequence $(x_n)$ in $A\setminus\{c\}$ with $x_n\to c$. (c) Consequently, if there are two sequences $x_n\to c$, $y_n\to c$ in $A\setminus\{c\}$ with $f(x_n)\to L_1$, $f(y_n)\to L_2$ and $L_1\ne L_2$, or a single such sequence for which $(f(x_n))$ diverges, then $\lim_{x\to c}f(x)$ does not exist.

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.

📐 Theorem 3.2 — Algebra of limits, order and the squeeze theorem
Let $f,g,h:A\to\mathbb{R}$, $c$ a limit point of $A$, $\lim_{x\to c}f(x)=L$ and $\lim_{x\to c}g(x)=M$. Then
  1. $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$);
  2. 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$;
  3. (squeeze) if $f(x)\le h(x)\le g(x)$ near $c$ and $L=M$, then $\lim_{x\to c}h(x)=L$;
  4. (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$. ∎

✏️ Example 1 — Three $\varepsilon$–$\delta$ proofs
Prove from the definition: (a) $\lim_{x\to2}x^2=4$; (b) $\lim_{x\to2}\dfrac{x^3-8}{x-2}=12$; (c) $\lim_{x\to0}x\sin\dfrac1x=0$. In each case give an explicit $\delta$ for $\varepsilon=0.1$.
(a) Factor $|x^2-4|=|x-2|\,|x+2|$. The factor $|x-2|$ is what we control; the other factor must be bounded first. If $|x-2|\lt1$ then $1\lt x\lt3$ and $|x+2|\lt5$, so $|x^2-4|\lt5|x-2|$.
(a) Choose $\delta$ Put $\delta=\min\left(1,\tfrac{\varepsilon}{5}\right)$. If $0\lt|x-2|\lt\delta$, both restrictions hold and $|x^2-4|\lt5\cdot\tfrac\varepsilon5=\varepsilon$. For $\varepsilon=0.1$: $\delta=0.02$. Check: the largest $\delta$ that works is $\sqrt{4.1}-2=0.0248\ldots\ge0.02$ ✓ — our $\delta$ need not be optimal, only valid.
(b) For $x\ne2$, $\dfrac{x^3-8}{x-2}=x^2+2x+4$, and $x^2+2x+4-12=(x-2)(x+4)$. If $|x-2|\lt1$ then $|x+4|\lt7$. So $\delta=\min\left(1,\tfrac\varepsilon7\right)$ works; for $\varepsilon=0.1$, $\delta=\tfrac1{70}\approx0.0143$. The function is not even defined at $2$ — the limit does not care.
(c) $\left|x\sin\tfrac1x-0\right|\le|x|$ because $|\sin|\le1$. So $\delta=\varepsilon$ works: $0\lt|x|\lt\varepsilon\Rightarrow\left|x\sin\tfrac1x\right|\lt\varepsilon$. For $\varepsilon=0.1$, $\delta=0.1$. (This is the squeeze theorem with $-|x|\le x\sin\tfrac1x\le|x|$.)
✏️ Example 2 — Limits that do not exist
Show that the following limits do not exist: (a) $\lim_{x\to0}\sin\dfrac1x$; (b) $\lim_{x\to0}\operatorname{sgn}x$, where $\operatorname{sgn}x=x/|x|$ for $x\ne0$; (c) $\lim_{x\to c}D(x)$ for every $c\in\mathbb{R}$, where $D$ is the Dirichlet function: $D(x)=1$ for $x\in\mathbb{Q}$ and $D(x)=0$ for $x\notin\mathbb{Q}$.
(a) Two sequences $x_n=\dfrac{1}{2\pi n+\pi/2}\to0$ gives $\sin(1/x_n)=1$; $y_n=\dfrac1{2\pi n}\to0$ gives $\sin(1/y_n)=0$. Different limits along two sequences: by Theorem 3.1(c) there is no limit. The graph oscillates between $-1$ and $1$ infinitely often in every interval around $0$.
(b) One-sided limits $\operatorname{sgn}(0+)=1$ and $\operatorname{sgn}(0-)=-1$. In general $\lim_{x\to c}f(x)$ exists iff both one-sided limits exist and are equal (when $c$ is a limit point from both sides). Here they differ.
(c) Density By density of $\mathbb{Q}$ and of $\mathbb{R}\setminus\mathbb{Q}$ (§1.2) there are rationals $r_n\to c$ and irrationals $t_n\to c$, all different from $c$. Then $D(r_n)=1\to1$ and $D(t_n)=0\to0$: no limit at any point.
Lesson To disprove a limit, find two sequences with different images, or one with a divergent image. To prove a limit, sequences along particular paths are never enough: $\sin(\pi/x)$ is $0$ along $x=1/n$, yet has no limit at $0$.
🧭 Problem-solving strategy — proving or disproving $\lim_{x\to c}f(x)=L$
  1. Guess $L$ by simplifying (cancel factors, rationalise) or by testing a few sequences.
  2. 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.
  3. Disprove with two sequences (Theorem 3.1(c)), or with unequal one-sided limits.
  4. 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.
Interactive 1 — The $\varepsilon$–$\delta$ Game

The amber band is $L\pm\varepsilon$. The lab computes the largest $\delta$ for which every $x$ with $0\lt|x-c|\lt\delta$ has $f(x)$ inside the band, and shades that window green. When no $\delta\gt0$ works, it shows a trial window in red and a point inside it whose value escapes the band. Press Play to shrink $\varepsilon$: for a genuine limit $\delta$ shrinks too but stays positive; for a false limit the game is lost once $\varepsilon$ is small enough.

ε—
largest δ that works—
escaping point—
verdict—

Continuity

📘 Definition 3.3 — Continuity
A function $f:A\to\mathbb{R}$ is continuous at $c\in A$ if $$\forall\varepsilon\gt0\ \exists\delta\gt0:\quad x\in A,\ |x-c|\lt\delta\ \Longrightarrow\ |f(x)-f(c)|\lt\varepsilon.$$ $f$ is continuous on $B\subseteq A$ if it is continuous at every point of $B$, and continuous if it is continuous on $A$. Note: $c$ must belong to $A$; at an isolated point of $A$ every function is continuous (take $\delta$ so small that only $x=c$ is admissible).
📐 Theorem 3.3 — Equivalent forms of continuity; algebra and composition
Let $f:A\to\mathbb{R}$ and $c\in A$. The following are equivalent:
  1. $f$ is continuous at $c$;
  2. (sequential) $f(x_n)\to f(c)$ for every sequence $(x_n)$ in $A$ with $x_n\to c$;
  3. 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)$.
Moreover, (4) $f:\mathbb{R}\to\mathbb{R}$ is continuous on $\mathbb{R}$ iff $f^{-1}(U)$ is open for every open set $U\subseteq\mathbb{R}$. (5) Sums, products, scalar multiples and quotients (where the denominator is nonzero) of functions continuous at $c$ are continuous at $c$; if $f$ is continuous at $c$ and $g$ is continuous at $f(c)$, then $g\circ f$ is continuous at $c$. Hence polynomials, rational functions (off their poles), $|f|$, $\max(f,g)=\tfrac12(f+g+|f-g|)$ and $\min(f,g)$ are continuous.

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|$. ∎

📐 Theorem 3.4 — The Dirichlet and Thomae functions
(a) The Dirichlet function $D=\mathbf 1_{\mathbb{Q}}$ is discontinuous at every point of $\mathbb{R}$. (b) $g(x)=x\,D(x)$ ($=x$ on $\mathbb{Q}$, $0$ off $\mathbb{Q}$) is continuous at $0$ and at no other point. (c) Thomae's function $$T(x)=\begin{cases}\dfrac1q,&x=\dfrac pq,\ p\in\mathbb{Z},\ q\in\mathbb{N},\ \gcd(p,q)=1,\\[4pt] 0,&x\notin\mathbb{Q},\end{cases}$$ (so $T(0)=1$) satisfies $\lim_{x\to c}T(x)=0$ for every $c\in\mathbb{R}$. Hence $T$ is continuous at every irrational point and discontinuous at every rational point.

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.

✏️ Example 3 — Continuity and the rationals: prove or disprove
(a) If $f,g:\mathbb{R}\to\mathbb{R}$ are continuous and $f(r)=g(r)$ for every $r\in\mathbb{Q}$, then $f=g$. (b) The function $h(x)=x$ for $x\in\mathbb{Q}$, $h(x)=-x$ for $x\notin\mathbb{Q}$ is continuous only at $0$. (c) (Cauchy's functional equation) If $f:\mathbb{R}\to\mathbb{R}$ is continuous and $f(x+y)=f(x)+f(y)$ for all $x,y$, then $f(x)=cx$ with $c=f(1)$. (d) A function that is continuous at every rational point is continuous everywhere.
(a) True Given $x$, choose rationals $r_n\to x$. By the sequential criterion $f(x)=\lim f(r_n)=\lim g(r_n)=g(x)$. A continuous function is determined by its values on a dense set.
(b) True $|h(x)-h(0)|=|x|$, so $h$ is continuous at $0$. At $c\ne0$, rationals $r_n\to c$ give $h(r_n)\to c$ and irrationals $t_n\to c$ give $h(t_n)\to-c\ne c$. (General rule: with $g(x)=x$, $k(x)=-x$, continuity holds exactly where $g=k$.)
(c) True $f(0)=f(0)+f(0)$ gives $f(0)=0$, and $f(-x)=-f(x)$. By induction $f(nx)=nf(x)$ for $n\in\mathbb{N}$, hence for $n\in\mathbb{Z}$. With $x=\tfrac1q$: $c=f(1)=qf(\tfrac1q)$, so $f(\tfrac pq)=pf(\tfrac1q)=c\tfrac pq$. Thus $f(r)=cr$ on $\mathbb{Q}$, and by (a) $f(x)=cx$ for all $x$. (Without continuity there are wild non-linear solutions, built with a Hamel basis.)
(d) False Let $f(\sqrt2)=1$ and $f(x)=0$ for $x\ne\sqrt2$. At every $c\ne\sqrt2$ — in particular every rational — $f$ vanishes on an interval around $c$, so it is continuous there; it is discontinuous at $\sqrt2$.

Compactness in ℝ: the Heine–Borel Theorem

📘 Definition 3.4 — Open and closed sets; open covers; compact sets
  • $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.

📐 Theorem 3.5 — Heine–Borel theorem (in ℝ)
For $K\subseteq\mathbb{R}$ the following are equivalent: (a) $K$ is compact; (b) $K$ is closed and bounded; (c) $K$ is sequentially compact. In particular every closed bounded interval $[a,b]$ is compact.

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$.

✏️ Example 4 — Compact or not?
Decide which sets are compact. For each non-compact set give an open cover with no finite subcover. (a) $[0,1]\cup\{2\}$; (b) $(0,1]$; (c) $K=\{0\}\cup\{\tfrac1n:n\in\mathbb{N}\}$ — prove compactness directly from the definition; (d) $\mathbb{Q}\cap[0,1]$; (e) the Cantor set $C=\bigcap_n C_n$, where $C_n$ is the union of the $2^n$ closed intervals left after $n$ steps of removing open middle thirds.
(a) Compact Closed (its complement $(-\infty,0)\cup(1,2)\cup(2,\infty)$ is open) and bounded.
(b) Not compact $U_n=\left(\tfrac1n,2\right)$ covers $(0,1]$ (each $x\gt0$ has $\tfrac1n\lt x$ for large $n$), and the $U_n$ increase, so a finite subfamily is contained in a single $U_N$, which misses $\tfrac1{2N}\in(0,1]$. The culprit is the missing limit point $0$.
(c) Compact, directly Let $\mathcal U$ be an open cover. Some $U_0\in\mathcal U$ contains $0$, hence an interval $(-r,r)$. Choose $N\gt1/r$: then $\tfrac1n\in U_0$ for all $n\ge N$. The finitely many points $1,\tfrac12,\dots,\tfrac1{N-1}$ lie in members $U_1,\dots,U_{N-1}$. So $\{U_0,\dots,U_{N-1}\}$ is a finite subcover. (Interactive 2, last option.)
(d) Not compact It is bounded but not closed: $\tfrac{\sqrt2}2$ is a limit point not in the set. Cover: $U_n=\left(-1,\tfrac{\sqrt2}2-\tfrac1n\right)\cup\left(\tfrac{\sqrt2}2+\tfrac1n,2\right)$. Their union is $(-1,2)\setminus\{\tfrac{\sqrt2}2\}$, which contains every rational of $[0,1]$. The $U_n$ increase, and each misses the rationals within $\tfrac1n$ of $\tfrac{\sqrt2}2$; so no finite subcover exists.
(e) Compact Each $C_n$ is a finite union of closed intervals, hence closed; an intersection of closed sets is closed (its complement is a union of open sets); and $C\subseteq[0,1]$. By Heine–Borel $C$ is compact — although it contains no interval at all (§4.4).
Interactive 2 — Open Covers and Finite Subcovers

The set $K$ is drawn in green on the number line. Each bar is an open interval taken from the given cover; the lab picks them greedily — always the member that pushes the covered region as far as possible — and the newest one is amber. The part of $K$ still uncovered is red. For a compact $K$ the process stops after finitely many steps; for $(0,1]$ and $[0,\infty)$ it never does, because the cover has no finite subcover.

intervals chosen—
covered so far—
still uncovered—
finite subcover?—

Continuous Functions on Compact Sets and Intervals

📐 Theorem 3.6 — Continuous image of a compact set; extreme value theorem
Let $K\subseteq\mathbb{R}$ be compact and $f:K\to\mathbb{R}$ continuous. Then $f(K)$ is compact. In particular (extreme value theorem, Weierstrass) $f$ is bounded on $K$ and, if $K\ne\varnothing$, attains its maximum and minimum: there are $p,q\in K$ with $f(p)\le f(x)\le f(q)$ for all $x\in K$.

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.

📐 Theorem 3.7 — Intermediate value theorem (Bolzano)
Let $f:[a,b]\to\mathbb{R}$ be continuous and let $y$ lie between $f(a)$ and $f(b)$. Then there is $c\in[a,b]$ with $f(c)=y$. In particular, if $f(a)$ and $f(b)$ have opposite signs, $f$ has a zero in $(a,b)$.

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}$.

📐 Theorem 3.8 — Consequences: images of intervals, fixed points, roots
(a) If $I$ is an interval and $f:I\to\mathbb{R}$ is continuous, then $f(I)$ is an interval (possibly a single point). (b) If $f:[a,b]\to\mathbb{R}$ is continuous, then $f([a,b])=[m,M]$, where $m=\min f$ and $M=\max f$. (c) (Fixed point theorem in one dimension) Every continuous $f:[a,b]\to[a,b]$ has a fixed point $f(c)=c$. (d) Every real polynomial of odd degree has a real root.

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. ∎

✏️ Example 5 — The intermediate value theorem at work
(a) Show that $x^3-3x+1=0$ has exactly three real roots and locate each between consecutive integers. (b) (Horizontal chord theorem) Let $f:[0,1]\to\mathbb{R}$ be continuous with $f(0)=f(1)$. Prove that there is $x\in[0,\tfrac12]$ with $f(x+\tfrac12)=f(x)$. (c) Show that $\cos x=x$ has a unique solution and find it to three decimals by bisection.
(a) Sign changes $p(x)=x^3-3x+1$: $p(-2)=-1$, $p(0)=1$, $p(1)=-1$, $p(2)=3$. Three sign changes give roots in $(-2,0)$, $(0,1)$, $(1,2)$ (and $p(-1)=3$ refines the first to $(-2,-1)$). A cubic has at most three roots, so these are all. Numerically: $-1.8794$, $0.3473$, $1.5321$.
(b) Auxiliary function $g(x)=f(x+\tfrac12)-f(x)$ is continuous on $[0,\tfrac12]$, and $g(0)+g(\tfrac12)=f(\tfrac12)-f(0)+f(1)-f(\tfrac12)=f(1)-f(0)=0$. So either $g(0)=0$, or $g(0)$ and $g(\tfrac12)$ have opposite signs and Theorem 3.7 gives a zero in between. (The same works for chords of length $\tfrac1n$; surprisingly it fails for lengths not of this form — e.g. $0.4$.)
(c) Existence and uniqueness $h(x)=x-\cos x$: $h(0)=-1\lt0$, $h(1)=1-\cos1=0.4597\gt0$, so a root lies in $(0,1)$. For uniqueness, let $x\lt y$. Then $\cos x-\cos y=2\sin\tfrac{x+y}2\sin\tfrac{y-x}2$, so $|\cos x-\cos y|\le2\left|\sin\tfrac{y-x}2\right|\lt y-x$ (because $|\sin u|\lt|u|$ for $u\ne0$). Hence $h(y)-h(x)=(y-x)-(\cos y-\cos x)\gt0$: $h$ is strictly increasing and has only one zero.
(c) Bisection $[0,1]\to[0.5,1]\to[0.5,0.75]\to[0.625,0.75]\to[0.6875,0.75]\to[0.71875,0.75]\to[0.734375,0.75]\to[0.734375,0.7421875]\to\cdots$ After ten steps the interval has length $2^{-10}\lt0.001$ and is $[0.73828\ldots,0.73926\ldots]$; the root is $x\approx0.7391$. Check: $\cos(0.7391)=0.73907\ldots$ ✓
✏️ Example 6 — Prove or disprove: what continuous maps can do to intervals
(a) There is a continuous $f:\mathbb{R}\to\mathbb{R}$ with $f(\mathbb{Q})\subseteq\mathbb{R}\setminus\mathbb{Q}$ and $f(\mathbb{R}\setminus\mathbb{Q})\subseteq\mathbb{Q}$. (b) Every continuous $f:[0,1]\to\mathbb{R}$ taking only rational values is constant. (c) There is a continuous map of $(0,1)$ onto $[0,1]$, and there is a continuous map of $[0,1]$ onto $(0,1)$. (d) A continuous periodic function $f:\mathbb{R}\to\mathbb{R}$ attains a maximum and a minimum.
(a) False $f(\mathbb{R})=f(\mathbb{Q})\cup f(\mathbb{R}\setminus\mathbb{Q})$. The first set is countable (image of a countable set) and the second lies in $\mathbb{Q}$, so $f(\mathbb{R})$ is countable. By Theorem 3.8(a) it is an interval, and a countable interval is a single point $\{y\}$. Then $y=f(0)$ is irrational and $y=f(\sqrt2)$ is rational — impossible.
(b) True $f([0,1])$ is an interval contained in $\mathbb{Q}$. Any interval with two distinct points contains an irrational (§1.2), so the image is a single point.
(c) First true, second false $g(x)=\tfrac12\left(1+\sin2\pi x\right)$ maps $(0,1)$ onto $[0,1]$: it equals $1$ at $x=\tfrac14$ and $0$ at $x=\tfrac34$, and by Theorem 3.8(a) takes every value between. But the image of the compact set $[0,1]$ is compact (Theorem 3.6), and $(0,1)$ is not compact.
(d) True If $f$ has period $T\gt0$, then $f(\mathbb{R})=f([0,T])$, which is compact; the max and min of $f$ on $[0,T]$ are its max and min on $\mathbb{R}$.

Monotone Functions and Continuous Inverses

📘 Definition 3.5 — Monotone functions
$f:A\to\mathbb{R}$ is increasing (non-decreasing) if $x\lt y$ in $A$ implies $f(x)\le f(y)$, and strictly increasing if it implies $f(x)\lt f(y)$; decreasing and strictly decreasing are defined dually. $f$ is monotone (strictly monotone) if it is increasing or decreasing (strictly).
📐 Theorem 3.9 — A monotone function with an interval image is continuous
Let $I$ be an interval and $f:I\to\mathbb{R}$ monotone. If $f(I)$ is an interval, then $f$ is continuous on $I$.

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.

📐 Theorem 3.10 — Continuous injective functions on intervals are strictly monotone
Let $I$ be an interval and $f:I\to\mathbb{R}$ continuous and injective. Then $f$ is strictly monotone.

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)$.

📐 Theorem 3.11 — Continuous inverse theorem
Let $I$ be an interval and $f:I\to\mathbb{R}$ continuous and strictly monotone. Then $J=f(I)$ is an interval, $f:I\to J$ is a bijection, and $f^{-1}:J\to I$ is continuous and strictly monotone (in the same sense as $f$). In particular, a continuous bijection between intervals has a continuous inverse.

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.

✏️ Example 7 — When is the inverse continuous?
(a) Show that $f(x)=x^3+x$ is a bijection of $\mathbb{R}$ onto $\mathbb{R}$ with continuous inverse, and find $f^{-1}(2)$ and $f^{-1}(10)$. (b) Let $A=[0,1)\cup[2,3]$ and $f:A\to[0,2]$, $f(x)=x$ on $[0,1)$, $f(x)=x-1$ on $[2,3]$. Show that $f$ is a continuous bijection whose inverse is not continuous. Which hypothesis of Theorem 3.11 fails? (c) Show that a continuous bijection $f:K\to L$ between compact sets $K,L\subseteq\mathbb{R}$ always has a continuous inverse.
(a) For $x\lt y$: $f(y)-f(x)=(y-x)(y^2+xy+x^2+1)$, and $y^2+xy+x^2=\left(y+\tfrac x2\right)^2+\tfrac34x^2\ge0$, so $f$ is strictly increasing. $f(x)\to\pm\infty$ as $x\to\pm\infty$, so $f(\mathbb{R})$ is an interval that is unbounded in both directions: $\mathbb{R}$. By Theorem 3.11, $f^{-1}$ is continuous. $f(1)=2$ and $f(2)=10$, so $f^{-1}(2)=1$, $f^{-1}(10)=2$.
(b) $f$ is continuous on $A$ (it is $x$ or $x-1$ near each point, and $[0,1)$, $[2,3]$ are separated), strictly increasing, and maps $[0,1)$ onto $[0,1)$ and $[2,3]$ onto $[1,2]$: a bijection onto $[0,2]$. The inverse $g$ has $g(y)=y$ for $y\lt1$ and $g(1)=2$; so $g(1-\tfrac1n)\to1\ne2=g(1)$. Theorem 3.11 needs the domain of $f$ to be an interval, and $A$ is not.
(c) Let $g=f^{-1}$, $y_n\to y$ in $L$, $x_n=g(y_n)$, $x=g(y)$. If $x_n\not\to x$, some subsequence stays at distance $\ge\varepsilon_0$ from $x$; by compactness of $K$ a further subsequence converges to some $x'\in K$ with $|x'-x|\ge\varepsilon_0$. Continuity of $f$ gives $f(x')=\lim y_{n_k}=y=f(x)$, contradicting injectivity. So $g$ is continuous. (In (b), $A$ is not compact.)
⚠️ Counterexamples and pitfalls
  1. 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.
  2. 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.
  3. Two-sided limits need equal one-sided limits: $\operatorname{sgn}(0\pm)=\pm1$.
  4. 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).
  5. 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.
  6. 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)$.
  7. Continuous images of bounded sets need not be bounded: $1/x$ on $(0,1)$. Compactness — closed and bounded — is what is preserved.
  8. 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).
  9. 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$.
  10. 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.
  11. 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).
  12. Inverses: a continuous bijection need not have a continuous inverse unless its domain is an interval or compact (Example 7(b)).
  13. Monotone does not imply continuous: $\lfloor x\rfloor$; but monotone with an interval image does (Theorem 3.9).

Exercises

I
Limits of functions.
  • 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 $|(2x+1)-7|=2|x-3|\lt\varepsilon$ when $|x-3|\lt\delta=\varepsilon/2$.
2 $\left|\tfrac1x-1\right|=\tfrac{|x-1|}{|x|}$. If $|x-1|\lt\tfrac12$ then $x\gt\tfrac12$ and the quotient is $\lt2|x-1|$. So $\delta=\min\left(\tfrac12,\tfrac\varepsilon2\right)$.
3 For $x\ge0$, $|\sqrt x-2|=\dfrac{|x-4|}{\sqrt x+2}\le\dfrac{|x-4|}{2}$. So $\delta=2\varepsilon$ works (no restriction is needed, since the domain already forces $x\ge0$).
4 For $x\ne0$, $x\gt-1$: $\dfrac{\sqrt{1+x}-1}{x}=\dfrac{(1+x)-1}{x(\sqrt{1+x}+1)}=\dfrac1{\sqrt{1+x}+1}$. The last expression is continuous at $0$ (composition and quotient, Theorem 3.3), so the limit is $\tfrac12$.
5 $x_n=\tfrac1{2\pi n}$ gives $\cos(1/x_n)=1$; $y_n=\tfrac1{(2n+1)\pi}$ gives $-1$. Theorem 3.1(c).
6 Only at $c=0$. There $|f(x)|\le|x|$, so the limit is $0$. At $c\ne0$, rationals $r_n\to c$ give $f(r_n)\to c$ and irrationals give $0\ne c$.
7 Apply the definition with $\varepsilon=L/2$: $|f(x)-L|\lt L/2$ gives $f(x)\gt L-L/2=L/2$.
8 Necessity: if $f\to L$, take $\delta$ for $\varepsilon/2$; then $|f(x)-f(y)|\le|f(x)-L|+|L-f(y)|\lt\varepsilon$. Sufficiency: as in the proof of Theorem 3.2 — along any sequence $x_n\to c$ ($x_n\ne c$) the images form a Cauchy sequence, hence converge, and interleaving two sequences shows the limits agree. For $\sin(1/x)$: with $\varepsilon=1$, every $\delta$-interval contains $x=\tfrac1{2\pi n+\pi/2}$ and $y=\tfrac1{2\pi n}$ with $|f(x)-f(y)|=1$, so the Cauchy condition fails.
II
Continuity.
  • 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 Both are continuous exactly on $\mathbb{R}\setminus\mathbb{Z}$: near a non-integer $\lfloor x\rfloor$ is locally constant; at $n\in\mathbb{Z}$, $\lfloor n-\rfloor=n-1\ne n$. Since $g=x-\lfloor x\rfloor$ and $x$ is continuous, $g$ is continuous exactly where $\lfloor x\rfloor$ is.
2 Away from $0$, $f$ is a product and composition of continuous functions; at $0$, $|f(x)|\le|x|$. $\lim_{x\to0}\sin(1/x)$ does not exist (Example 2(a)), so no value $a$ makes $g$ continuous at $0$ (Theorem 3.3(3)).
3 By density, $f$ is continuous at $c$ iff $c^2=c$, i.e. $c\in\{0,1\}$. At such $c$: $|f(x)-c|\le\max(|x^2-c^2|,|x-c|)\to0$. At other $c$, rational and irrational sequences give limits $c^2\ne c$.
4 $\max(f,g)=\tfrac12(f+g+|f-g|)$ and $\min(f,g)=\tfrac12(f+g-|f-g|)$ — Theorem 3.3(5).
5 $\{f\gt0\}=f^{-1}((0,\infty))$ is the preimage of an open set; $\{f=0\}=\mathbb{R}\setminus f^{-1}(\mathbb{R}\setminus\{0\})$ is the complement of an open set. (Directly: if $f(c)\gt0$, Theorem 3.2(2) gives an interval around $c$ where $f\gt0$.)
6 $0.375=\tfrac38$, so $T=\tfrac18$; $-\tfrac64=-\tfrac32$, so $T=\tfrac12$; $\tfrac{\sqrt2}2$ is irrational, $T=0$. $T(x)\ge\tfrac14$ only at rationals with denominator $q\le4$; those nearest to $\tfrac{\sqrt2}2=0.70711$ are $\tfrac34=0.75$ (distance $0.04289$) and $\tfrac23=0.6667$ (distance $0.04044$). So exactly the $\delta$ with $0\lt\delta\le\tfrac{\sqrt2}2-\tfrac23\approx0.0404$ work.
7 $f(x)=f(x/2)=f(x/4)=\cdots=f(x/2^n)\to f(0)$ by continuity at $0$, so $f(x)=f(0)$. Continuity at $0$ alone suffices — the argument used nothing else.
8 $f^{-1}(\mathbb{R}\setminus F)=\mathbb{R}\setminus f^{-1}(F)$: preimages of all open sets are open iff preimages of all closed sets are closed. Combine with Theorem 3.3(4).
III
Compactness and the Heine–Borel theorem.
  • 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 $U_n=\left(\tfrac1n,1\right)$, $n\ge2$, increase and cover $(0,1)$; a finite subfamily lies in one $U_N$, which misses $\tfrac1{2N}$.
2 For a finite set pick one member of the cover for each point. For the second set argue as in Example 4(c): the member containing $2$ contains $(2-r,2+r)$, hence all $2+\tfrac1{n^2}$ with $n^2\gt1/r$; finitely many points remain.
3 (a) compact; (b) $x(x-1)(x+1)\le0\iff x\in(-\infty,-1]\cup[0,1]$ — unbounded, not compact; (c) $x^2\le\log2$, i.e. $[-\sqrt{\log2},\sqrt{\log2}]$ — compact; (d) not closed (every rational of $[0,1]$ is a limit point), not compact.
4 Union: a finite subcover for each piece, put together. Intersection: it is closed (an intersection of closed sets) and contained in one compact set, hence compact by Step 2 of Theorem 3.5. (Or: closed and bounded.)
5 If $K$ had no largest element, for each $x\in K$ some $y\in K$ has $y\gt x$, so the open sets $U_y=(-\infty,y)$, $y\in K$, cover $K$. A finite subcover $U_{y_1},\dots,U_{y_m}$ would give $K\subseteq(-\infty,\max y_j)$, yet $\max y_j\in K$ — contradiction.
6 $\mathbb{N}$: $U_n=(n-\tfrac12,n+\tfrac12)$ — each contains exactly one natural number, so none can be dropped. $[0,\infty)$: $U_n=(-1,n)$, increasing, and no single one covers.
7 Pick $x_n\in K_n\subseteq K_1$. By sequential compactness of $K_1$ a subsequence $x_{n_k}\to x$. For fixed $m$, $x_{n_k}\in K_m$ once $n_k\ge m$, and $K_m$ is closed, so $x\in K_m$. Hence $x\in\bigcap K_m$. Closed alone fails: $[n,\infty)$; bounded alone fails: $(0,\tfrac1n)$.
8 If $k_n+l_n$ is a sequence in $K+L$, pass to a subsequence with $k_{n_j}\to k\in K$, then a further one with $l\to l'\in L$; the sums converge to $k+l'\in K+L$. For closed sets it fails: $F=\mathbb{N}$, $G=\{-n+\tfrac1n:n\ge2\}$ are closed, and $F+G\ni\tfrac1n$ for all $n\ge2$ but $0\notin F+G$ (a sum $m-n+\tfrac1n$ with $m,n$ integers is never $0$ for $n\ge2$). So $F+G$ is not closed.
IV
Extreme values, intermediate values, monotone and inverse functions.
  • 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.
1 $p(0)=1\gt0$, $p(1)=-1\lt0$, $p(2)=32-6+1=27\gt0$. The IVT on $[0,1]$ and $[1,2]$. (Roots $\approx0.3347$ and $1.2146$.)
2 $g(x)=f(x+\tfrac13)-f(x)$ on $[0,\tfrac23]$: $g(0)+g(\tfrac13)+g(\tfrac23)=f(1)-f(0)=0$. Three numbers with sum $0$ cannot all be positive or all negative, so either some $g(\cdot)=0$ or two of them have opposite signs, and the IVT gives a zero between those two points.
3 By the EVT $f$ attains its minimum $m=f(p)$, and $m\gt0$ because $f(p)\gt0$. On $(0,1)$ it fails: $f(x)=x$.
4 Suppose it does; take $a\lt b$ with $f(a)=f(b)=y$. Then $f\ne y$ on $(a,b)$, say $f\gt y$ there. Let $M=\max_{[a,b]}f\gt y$. If $M$ is attained at two points $c_1\lt c_2$ of $(a,b)$, then $f\lt M$ somewhere in $(c_1,c_2)$ (else $M$ is attained infinitely often), say $\min_{[c_1,c_2]}f=m'\lt M$; any value $v$ with $\max(y,m')\lt v\lt M$ is taken in $(a,c_1)$ and at least twice in $(c_1,c_2)$ — three times. Otherwise $M$ is attained once in $[a,b]$, at $c$, and once more at some $d\notin[a,b]$, say $d\gt b$; then values $v\in(y,M)$ close to $M$ are taken in $(a,c)$, in $(c,b)$ and in $(b,d)$ — three times. Either way a contradiction.
5 By Theorem 3.10 $f$ is strictly monotone, say increasing; then $f(a)\le f(x)\le f(b)$, and by Theorem 3.8(b) the image is all of $[f(a),f(b)]$.
6 $\tan$ is continuous and strictly increasing on the interval $(-\tfrac\pi2,\tfrac\pi2)$ ($\sin$ increases and $\cos$ decreases on $[0,\tfrac\pi2)$, and $\tan$ is odd), and tends to $\pm\infty$ at the end points, so its image is $\mathbb{R}$. Theorem 3.11 makes $\arctan$ continuous.
7 A continuous bijection $f:[0,1)\to\mathbb{R}$ is strictly monotone (Theorem 3.10), say increasing; then $f(x)\ge f(0)$ for all $x$, so $f(0)-1$ is not attained. But $x\mapsto\tan\left(\pi x-\tfrac\pi2\right)$ is a continuous bijection of $(0,1)$ onto $\mathbb{R}$.
8 Measure position by distance $s$ along the path from the bottom, path length $\ell$. Let $u(t)$, $d(t)$ be her positions at time $t\in[6,18]$ on Monday and Tuesday; both are continuous. $h=u-d$ satisfies $h(6)=0-\ell\lt0$ and $h(18)=\ell-0\gt0$, so $h(t)=0$ for some $t$: same place, same time. (Think of two hikers on the same day, one going up and one coming down — they must meet.)
🎯 Exam corner CSIR Part BCSIR Part CGATE MA

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.

Idea With continuous pieces $g(x)=x^2$ on $\mathbb{Q}$ and $h(x)=2-x^2$ off $\mathbb{Q}$, density forces continuity exactly where $g(c)=h(c)$.
Work $x^2=2-x^2\iff x=\pm1$. At $c=\pm1$, $|f(x)-1|\le\max(|x^2-1|,|1-x^2|)\to0$. Elsewhere rational and irrational sequences give the different limits $c^2$ and $2-c^2$.
Answer (C).

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\}$.

Eliminate (A) not closed ($\tfrac{\sqrt2}{2}$ is a missing limit point); (B) not closed ($0$ is missing); (D) unbounded (contains $[2k\pi,(2k+1)\pi]$ for all $k$).
Why (C) It is the preimage of the closed set $(-\infty,0]$ under a polynomial, hence closed; and $x^4-3x^2+1\le0$ forces $x^2\le\tfrac{3+\sqrt5}2$, so it is bounded. Explicitly it is $\left[-\tfrac{1+\sqrt5}2,-\tfrac{\sqrt5-1}2\right]\cup\left[\tfrac{\sqrt5-1}2,\tfrac{1+\sqrt5}2\right]$.
Answer (C).

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)$.

(A) True $g(x)=f(x+1)-f(x)$ on $[0,1]$ has $g(0)+g(1)=f(2)-f(0)=0$; the IVT gives a zero.
Others fail (B), (D): $f(x)=\sin\pi x$ is not monotone on $[0,1]$ and attains its maximum at $\tfrac12$. (C): $f\equiv5$ has no fixed point in $[0,2]$ — Theorem 3.8(c) needs $f([0,2])\subseteq[0,2]$.
Answer (A).

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.

(A) True $f(x)=\lim f(r_n)=0$ for rationals $r_n\to x$ (Example 3(a)).
(B) True Theorem 3.10 ($\mathbb{R}$ is an interval).
(C) False $\arctan$ is bounded by $\tfrac\pi2$ and never reaches it.
(D) False $e^x$ maps the closed set $\mathbb{R}$ onto $(0,\infty)$, which is not closed.
Answer (A) and (B).

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}$.

(A) True Odd $n$ give $0,-\tfrac23,-\tfrac45,\dots\to-1$; even $n$ give $\tfrac32,\tfrac54,\dots\to1$. The only limit points are $\pm1$, which are included, and the set lies in $[-1,\tfrac32]$: closed and bounded.
(B) False The set is countable, so it is not all of $[-1,1]$; but it is dense in $[-1,1]$ (the points $n$ mod $2\pi$ are dense in $[0,2\pi]$ since $\pi$ is irrational — §1.2, Exercise III.7 there). So its closure $[-1,1]$ is strictly bigger: not closed.
(C) False Not closed: every rational in $[0,1]$ is a limit of irrationals in $[0,1]$.
(D) True Theorem 3.6; in fact $f([0,1])=[m,M]$.
Answer (A) and (D).

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)$.

(A) True Theorem 3.8(b) (a single point $[m,m]$ counts as a degenerate closed interval).
(B) False $g(x)=\sin2\pi x$ attains $1$ at $\tfrac14$ and $-1$ at $\tfrac34$: $g((0,1))=[-1,1]$. Constant maps give a point.
(C) True $\tfrac12(1+\sin2\pi x)$, as in Example 6(c).
(D) False The image of a compact set is compact, and $(0,1)$ is not.
Answer (A) and (C).
🧑‍🏫 For the teacher

Suggested plan — 3 lectures × 60 min.

  1. 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.
  2. 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).
  3. 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–Teaching NexusResearch-tutored · optional, about 45 minutes

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.

  1. 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.)
  2. Show that $D(\theta+\pi/2)=-D(\theta)$ and deduce from the IVT that $D$ vanishes somewhere in $[0,\pi/2]$.
  3. 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$.
  4. 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)$).

Instructor note: for step 1, a quadrilateral whose projection is a square lifts to a planar quadrilateral iff the midpoints of the two lifted diagonals coincide, i.e. $h(P_0)+h(P_2)=h(P_1)+h(P_3)$. For step 3, $D(0)\approx0.0248$, $D(\pi/2)\approx-0.0248$, and the unique root in $[0,\pi/2]$ is $\theta\approx0.9782$ rad $\approx56.04^\circ$. The argument proves the feet can all touch the floor; it does not claim the top is level.

🧪 Self-check quiz

0/5 correct

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