Chapter 3 · Continuity and Differentiability

3.2 Uniform Continuity, Monotone Functions and Discontinuities

When one $\delta$ works at every point at once: uniform continuity, Lipschitz and Hölder functions, the Heine–Cantor theorem and continuous extension — then monotone functions, their jumps, the types of discontinuity and Froda's theorem.

Continuity is a local promise: at each point $c$, for each $\varepsilon$, some $\delta$ works — but that $\delta$ may depend on $c$. For $f(x)=x^2$ near $c=1000$ the graph is so steep that $\delta$ must be about $\varepsilon/2000$; for $\sin(1/x)$ near $0$ it must shrink faster still. In practice we often need a single $\delta$ that serves the whole domain at once: to approximate a continuous function by step functions or polynomials, to prove that continuous functions are Riemann integrable (§4.1), to pass limits through integrals, to control rounding errors in a computation. This stronger, global promise is uniform continuity. The Heine–Cantor theorem says that on compact sets the local promise automatically becomes global — another victory for compactness (§3.1).

The second half of the section studies the opposite phenomenon — how functions can fail to be continuous. A monotone function can only jump, and since the jumps of an increasing function on $[a,b]$ add up to at most $f(b)-f(a)$, there can be only countably many of them. A general function can also oscillate (like $\sin(1/x)$), and Froda's theorem shows that, once again, the "jump-like" discontinuities form a countable set. CSIR NET questions here are almost always of the form "which of these functions is uniformly continuous on this domain" or "what can the set of discontinuities of a monotone function be" — and every trap is one of the counterexamples collected below.

Uniform Continuity

📘 Definition 3.6 — Uniform continuity
A function $f:A\to\mathbb{R}$ is uniformly continuous (UC) on $A$ if for every $\varepsilon\gt0$ there is a $\delta\gt0$ such that $$x,y\in A,\ |x-y|\lt\delta\ \Longrightarrow\ |f(x)-f(y)|\lt\varepsilon .$$ Compare with continuity on $A$: "for every $y\in A$ and every $\varepsilon\gt0$ there is $\delta\gt0$…". The only difference is the order of the quantifiers: in uniform continuity $\delta$ is chosen before the point, so it depends on $\varepsilon$ alone. Every uniformly continuous function is continuous.

Negating carefully: $f$ is not uniformly continuous on $A$ iff there is $\varepsilon_0\gt0$ such that for every $\delta\gt0$ there are $x,y\in A$ with $|x-y|\lt\delta$ and $|f(x)-f(y)|\ge\varepsilon_0$. Taking $\delta=\tfrac1n$ turns this into a test with sequences.

📐 Theorem 3.12 — Sequential criterion for uniform continuity
$f:A\to\mathbb{R}$ fails to be uniformly continuous on $A$ if and only if there are $\varepsilon_0\gt0$ and sequences $(x_n),(y_n)$ in $A$ with $$|x_n-y_n|\to0\quad\text{and}\quad|f(x_n)-f(y_n)|\ge\varepsilon_0\ \text{ for all }n.$$ Equivalently, $f$ is UC iff $|f(x_n)-f(y_n)|\to0$ whenever $|x_n-y_n|\to0$.

Proof. If $f$ is not UC, the negation above with $\delta=\tfrac1n$ gives $x_n,y_n$ with $|x_n-y_n|\lt\tfrac1n$ and $|f(x_n)-f(y_n)|\ge\varepsilon_0$. Conversely, suppose such sequences exist and $f$ were UC: for $\varepsilon=\varepsilon_0$ take $\delta$; for large $n$, $|x_n-y_n|\lt\delta$, so $|f(x_n)-f(y_n)|\lt\varepsilon_0$ — a contradiction. The "equivalently" is the same statement read the other way: if $|x_n-y_n|\to0$ but $|f(x_n)-f(y_n)|\not\to0$, then some subsequence has $|f(x_{n_k})-f(y_{n_k})|\ge\varepsilon_0$. ∎

✏️ Example 1 — Finding one $\delta$ for the whole domain
Prove uniform continuity and give an explicit $\delta(\varepsilon)$, then evaluate it for $\varepsilon=0.1$: (a) $f(x)=x^2$ on $[-3,3]$; (b) $g(x)=\sqrt x$ on $[0,\infty)$; (c) $h(x)=1/x$ on $[1,\infty)$.
(a) For $x,y\in[-3,3]$: $|x^2-y^2|=|x+y|\,|x-y|\le6|x-y|$. So $\delta=\varepsilon/6$ works for every pair at once; for $\varepsilon=0.1$, $\delta=\tfrac1{60}\approx0.0167$. The bound $|x+y|\le6$ used the boundedness of the domain — on $\mathbb{R}$ no such constant exists.
(b) A key inequality For $x\ge y\ge0$: $\sqrt x\le\sqrt y+\sqrt{x-y}$, because squaring gives $x\le y+2\sqrt{y(x-y)}+(x-y)$. Hence $$|\sqrt x-\sqrt y|\le\sqrt{|x-y|}\quad\text{for all }x,y\ge0.$$
(b) $\delta$ $|x-y|\lt\varepsilon^2\Rightarrow|\sqrt x-\sqrt y|\lt\varepsilon$: $\delta=\varepsilon^2=0.01$. This is sharp near $0$: $\sqrt{\delta}-\sqrt0=\varepsilon$. So $\sqrt x$ is UC on $[0,\infty)$ even though its graph is vertical at $0$.
(c) For $x,y\ge1$: $\left|\tfrac1x-\tfrac1y\right|=\tfrac{|x-y|}{xy}\le|x-y|$. So $\delta=\varepsilon=0.1$. (On $(0,1]$ the factor $1/(xy)$ is unbounded and uniform continuity fails — Example 2.)
✏️ Example 2 — Continuous but not uniformly continuous
Use Theorem 3.12 to show that the following continuous functions are not uniformly continuous: (a) $x^2$ on $\mathbb{R}$; (b) $1/x$ on $(0,1)$; (c) $\sin(1/x)$ on $(0,1)$; (d) $\sin(x^2)$ on $\mathbb{R}$.
(a) $x_n=n+\tfrac1n$, $y_n=n$: $|x_n-y_n|=\tfrac1n\to0$ but $x_n^2-y_n^2=2+\tfrac1{n^2}\ge2$. Steepness growing without bound defeats every fixed $\delta$.
(b) $x_n=\tfrac1n$, $y_n=\tfrac1{n+1}$ ($n\ge2$): $|x_n-y_n|=\tfrac1{n(n+1)}\to0$ and $|f(x_n)-f(y_n)|=1$. Here the domain is bounded but $f$ is unbounded.
(c) $x_n=\tfrac{1}{2\pi n+\pi/2}$, $y_n=\tfrac1{2\pi n}$: both $\to0$, so $|x_n-y_n|\to0$, while $|\sin(1/x_n)-\sin(1/y_n)|=1$. Bounded function, bounded domain — the oscillation is the problem.
(d) $x_n=\sqrt{2\pi n+\pi/2}$, $y_n=\sqrt{2\pi n}$: $x_n-y_n=\dfrac{\pi/2}{x_n+y_n}\to0$ and $|\sin x_n^2-\sin y_n^2|=|1-0|=1$. A bounded function on $\mathbb{R}$ that oscillates faster and faster.
📘 Definition 3.7 — Lipschitz and Hölder functions
$f:A\to\mathbb{R}$ is Lipschitz (with constant $K\ge0$) if $|f(x)-f(y)|\le K|x-y|$ for all $x,y\in A$. More generally, for $0\lt\alpha\le1$, $f$ is Hölder continuous of order $\alpha$ if $|f(x)-f(y)|\le K|x-y|^\alpha$ for all $x,y\in A$; order $1$ is the Lipschitz case. A Lipschitz $f$ with $K\lt1$ is a contraction.
📐 Theorem 3.13 — Lipschitz and Hölder functions are uniformly continuous
(a) If $f$ is Hölder of order $\alpha$ with constant $K\gt0$ on $A$, then $f$ is UC on $A$, with $\delta=(\varepsilon/K)^{1/\alpha}$; in particular Lipschitz functions are UC with $\delta=\varepsilon/K$. (b) If $I$ is an interval and $f$ is differentiable on $I$ with $|f'(x)|\le K$ for all $x\in I$, then $f$ is $K$-Lipschitz on $I$. (c) The converses fail: $\sqrt x$ is UC on $[0,1]$ (indeed Hölder of order $\tfrac12$) but not Lipschitz.

Proof. (a) If $|x-y|\lt(\varepsilon/K)^{1/\alpha}$ then $|f(x)-f(y)|\le K|x-y|^\alpha\lt K\cdot\varepsilon/K=\varepsilon$. (b) For $x\lt y$ in $I$ the mean value theorem (§3.3) gives $c\in(x,y)$ with $f(y)-f(x)=f'(c)(y-x)$, so $|f(y)-f(x)|\le K|y-x|$. (c) Example 1(b) gives the Hölder bound. If $|\sqrt x-\sqrt y|\le K|x-y|$ held on $[0,1]$, then $y=0$, $x=\tfrac1{n^2}$ would give $\tfrac1n\le\tfrac K{n^2}$, i.e. $n\le K$ for every $n$ — impossible. ∎

Part (b) is the everyday test: $\sin$, $\cos$, $\arctan$ ($|f'|\le1$), $\tfrac{x}{1+x^2}$ ($|f'|\le1$), $e^x$ on $(-\infty,0]$ and $\log x$ on $[1,\infty)$ are all Lipschitz, hence UC. But an unbounded derivative does not rule out uniform continuity — $\sqrt x$ again.

📐 Theorem 3.14 — Heine–Cantor theorem
Let $K\subseteq\mathbb{R}$ be compact and $f:K\to\mathbb{R}$ continuous. Then $f$ is uniformly continuous on $K$. In particular every continuous function on a closed bounded interval $[a,b]$ is uniformly continuous.

Proof (by sequences). Suppose not. By Theorem 3.12 there are $\varepsilon_0\gt0$ and $x_n,y_n\in K$ with $|x_n-y_n|\to0$ and $|f(x_n)-f(y_n)|\ge\varepsilon_0$. By sequential compactness (Heine–Borel, §3.1) a subsequence $x_{n_k}\to p\in K$; then $y_{n_k}=x_{n_k}+(y_{n_k}-x_{n_k})\to p$ as well. By continuity at $p$, $f(x_{n_k})\to f(p)$ and $f(y_{n_k})\to f(p)$, so $|f(x_{n_k})-f(y_{n_k})|\to0$ — contradicting $|f(x_{n_k})-f(y_{n_k})|\ge\varepsilon_0$. ∎

Proof (by open covers). Fix $\varepsilon\gt0$. For each $c\in K$ continuity gives $\delta_c\gt0$ with $|f(x)-f(c)|\lt\varepsilon/2$ for $x\in K$, $|x-c|\lt\delta_c$. The intervals $I_c=(c-\tfrac12\delta_c,c+\tfrac12\delta_c)$ cover $K$; choose a finite subcover $I_{c_1},\dots,I_{c_m}$ and let $\delta=\tfrac12\min_j\delta_{c_j}\gt0$. If $x,y\in K$ and $|x-y|\lt\delta$, then $x\in I_{c_j}$ for some $j$, so $|x-c_j|\lt\tfrac12\delta_{c_j}$, and $|y-c_j|\le|y-x|+|x-c_j|\lt\delta+\tfrac12\delta_{c_j}\le\delta_{c_j}$. Hence $|f(x)-f(y)|\le|f(x)-f(c_j)|+|f(c_j)-f(y)|\lt\varepsilon$. ∎

The second proof shows exactly where compactness acts: the infinitely many local $\delta_c$ are replaced by the minimum of finitely many, which is positive. (The number $\delta$ is a Lebesgue number of the cover; §7.2.)

Interactive 1 — How Small Must $\delta$ Be, Point by Point?

Left: the graph of $f$, the amber band $f(x_0)\pm\varepsilon$ and the green window $(x_0-\delta,x_0+\delta)$ with the largest $\delta=\delta(x_0)$ that keeps every point of the domain in the window inside the band. Right: the whole curve $x_0\mapsto\delta(x_0)$. Uniform continuity means exactly that this curve stays above a positive level — one $\delta$ for all $x_0$. Press Play to move $x_0$; change $\varepsilon$ with the slider.

$f$ with the band and the window at $x_0$
$\delta(x_0)$ across the domain
ε—
x₀—
δ(x₀)—
smallest δ on the plot—
🧭 Problem-solving strategy — is $f$ uniformly continuous on $A$?
  1. Compact domain? Continuous on a closed bounded set ⇒ UC (Theorem 3.14). Done.
  2. Bounded derivative on an interval? ⇒ Lipschitz ⇒ UC (Theorem 3.13). Also check Hölder bounds such as $|\sqrt x-\sqrt y|\le\sqrt{|x-y|}$.
  3. Bounded open interval $(a,b)$? UC iff $f(a+)$ and $f(b-)$ exist and are finite (Theorem 3.16). So $x\sin\tfrac1x$ yes, $\sin\tfrac1x$ and $\tfrac1x$ no.
  4. Unbounded interval? Split it: compact piece + tail. A finite limit at $\infty$, or a bounded derivative on the tail, gives UC on the tail; glue with Theorem 3.17.
  5. Suspect failure? Look for points $x_n,y_n$ getting closer while $f$ changes by a fixed amount: where the slope blows up ($x^2$ at $\infty$, $1/x$ at $0$) or the oscillation speeds up ($\sin x^2$, $\sin\tfrac1x$). Then apply Theorem 3.12. Growth faster than linear always fails (Exercise II.4).

Cauchy Sequences, Boundedness and Continuous Extension

📐 Theorem 3.15 — Uniformly continuous functions preserve Cauchy sequences
Let $f:A\to\mathbb{R}$ be uniformly continuous. (a) If $(x_n)$ is a Cauchy sequence in $A$, then $(f(x_n))$ is Cauchy. (b) If $A$ is bounded, then $f$ is bounded on $A$. (c) Conversely, if $A$ is bounded and $f$ maps every Cauchy sequence in $A$ to a Cauchy sequence, then $f$ is uniformly continuous on $A$.

Proof. (a) Given $\varepsilon\gt0$, take $\delta$ from uniform continuity, then $N$ with $|x_n-x_m|\lt\delta$ for $n,m\ge N$; then $|f(x_n)-f(x_m)|\lt\varepsilon$ for $n,m\ge N$.

(b) Take $\delta$ for $\varepsilon=1$ and $A\subseteq[\alpha,\beta]$. Cut $[\alpha,\beta]$ into finitely many intervals $J_1,\dots,J_m$ of length $\lt\delta$. For each $J_i$ that meets $A$ pick $a_i\in A\cap J_i$. Every $x\in A$ lies in some $J_i$, so $|x-a_i|\lt\delta$ and $|f(x)|\le|f(a_i)|+1\le1+\max_i|f(a_i)|$.

(c) If $f$ is not UC, Theorem 3.12 gives $x_n,y_n\in A$ with $|x_n-y_n|\to0$ and $|f(x_n)-f(y_n)|\ge\varepsilon_0$. Since $A$ is bounded, Bolzano–Weierstrass (§2.2) gives a convergent subsequence $x_{n_k}\to p$; then also $y_{n_k}\to p$. The interleaved sequence $x_{n_1},y_{n_1},x_{n_2},y_{n_2},\dots$ converges to $p$, so it is Cauchy, but its image is not Cauchy, since consecutive terms $f(x_{n_k}),f(y_{n_k})$ differ by at least $\varepsilon_0$. ∎

Part (c) needs $A$ bounded: $x^2$ on $\mathbb{R}$ maps Cauchy sequences to Cauchy sequences (they converge, and $x^2$ is continuous) but is not UC. Part (b) explains Example 2(b) at a glance: $1/x$ is unbounded on the bounded set $(0,1)$, so it cannot be UC there.

📐 Theorem 3.16 — Continuous extension theorem
(a) Let $f:A\to\mathbb{R}$ be uniformly continuous and let $\overline A$ be the closure of $A$ ($A$ together with its limit points). Then there is a unique continuous $F:\overline A\to\mathbb{R}$ with $F=f$ on $A$, and $F$ is uniformly continuous. (b) In particular, a continuous $f:(a,b)\to\mathbb{R}$ on a bounded interval is uniformly continuous if and only if the one-sided limits $f(a+)$ and $f(b-)$ exist (as real numbers).

Proof. (a) Definition of $F$. For $p\in\overline A$ choose $a_n\in A$ with $a_n\to p$. Then $(a_n)$ is Cauchy, so $(f(a_n))$ is Cauchy (Theorem 3.15(a)) and converges; put $F(p)=\lim f(a_n)$. If $b_n\to p$ is another such sequence, the interleaved sequence $a_1,b_1,a_2,b_2,\dots$ also converges to $p$, so its image converges, forcing $\lim f(a_n)=\lim f(b_n)$: $F$ is well defined. For $p\in A$ the constant sequence shows $F(p)=f(p)$.

$F$ is UC. Let $\varepsilon\gt0$ and take $\delta$ for $f$ and $\varepsilon$. Let $p,q\in\overline A$ with $|p-q|\lt\delta$, and choose $a_n\to p$, $b_n\to q$ in $A$. Then $|a_n-b_n|\to|p-q|\lt\delta$, so $|a_n-b_n|\lt\delta$ for large $n$ and $|f(a_n)-f(b_n)|\lt\varepsilon$; letting $n\to\infty$, $|F(p)-F(q)|\le\varepsilon$. So $\delta$ works for $2\varepsilon$, say, and $F$ is UC. Uniqueness: two continuous extensions agree on $A$, which is dense in $\overline A$, so they agree everywhere (sequential criterion).

(b) If $f$ is UC, part (a) extends it continuously to $[a,b]$, and continuity of the extension at $a$ and $b$ means $f(a+)$, $f(b-)$ exist. Conversely, if both limits exist, define $F(a)=f(a+)$, $F(b)=f(b-)$ and $F=f$ on $(a,b)$; $F$ is continuous on the compact interval $[a,b]$, hence UC there (Theorem 3.14), and so is its restriction $f$. ∎

📐 Theorem 3.17 — Gluing, and functions with a limit at infinity
(a) If $f$ is uniformly continuous on $[a,b]$ and on $[b,c]$ (where $c$ may be $+\infty$), then $f$ is uniformly continuous on $[a,c]$. (b) If $f:[a,\infty)\to\mathbb{R}$ is continuous and $\lim_{x\to\infty}f(x)=L$ exists (finite), then $f$ is uniformly continuous on $[a,\infty)$.

Proof. (a) Given $\varepsilon$, take $\delta_1,\delta_2$ for $\varepsilon/2$ on the two pieces and $\delta=\min(\delta_1,\delta_2)$. Let $|x-y|\lt\delta$, $x\le y$. If both lie in the same piece we are done. Otherwise $x\le b\le y$, so $|x-b|\lt\delta$ and $|b-y|\lt\delta$, and $|f(x)-f(y)|\le|f(x)-f(b)|+|f(b)-f(y)|\lt\varepsilon$. (b) Given $\varepsilon$, choose $M\ge a$ with $|f(x)-L|\lt\varepsilon/2$ for $x\ge M$; then $|f(x)-f(y)|\lt\varepsilon$ for all $x,y\ge M$, so $f$ is UC on $[M,\infty)$ (any $\delta$ works). On $[a,M]$ it is UC by Theorem 3.14. Glue with (a). ∎

The common point $b$ in (a) is essential: $f=0$ on $(0,1)$ and $f=1$ on $(1,2)$ is UC on each piece but not on the union, since $1-\eta$ and $1+\eta$ are close while their values differ by $1$.

✏️ Example 3 — Prove or disprove: uniformly continuous?
(a) $x\sin\tfrac1x$ on $(0,1]$; (b) $\dfrac{\sin x}{x}$ on $(0,\infty)$; (c) $x\sin x$ on $[0,\infty)$; (d) $\log x$ on $[1,\infty)$, and on $(0,1)$.
(a) UC $\lim_{x\to0+}x\sin\tfrac1x=0$ exists, so setting $F(0)=0$ gives a continuous function on the compact interval $[0,1]$, which is UC (Theorems 3.14, 3.16).
(b) UC On $(0,1]$: $\tfrac{\sin x}{x}\to1$ as $x\to0+$, so it extends continuously to $[0,1]$ and is UC there. On $[1,\infty)$: it is continuous and tends to $0$, so it is UC by Theorem 3.17(b). Glue the pieces at $1$ (Theorem 3.17(a)).
(c) Not UC $x_n=2\pi n+\tfrac1n$, $y_n=2\pi n$: $|x_n-y_n|=\tfrac1n\to0$ and $f(x_n)-f(y_n)=\left(2\pi n+\tfrac1n\right)\sin\tfrac1n\to2\pi$, since $n\sin\tfrac1n\to1$. So $|f(x_n)-f(y_n)|\ge1$ for large $n$. Growing amplitude, fixed frequency.
(d) On $[1,\infty)$: $|(\log x)'|=\tfrac1x\le1$, so $\log$ is $1$-Lipschitz, hence UC. On $(0,1)$: $\log x\to-\infty$ as $x\to0+$, so $\log$ is unbounded on a bounded set and not UC (Theorem 3.15(b)).
✏️ Example 4 — The algebra of uniform continuity
Let $f,g$ be uniformly continuous on $A$. Prove or disprove: (a) $f+g$ is UC; (b) $fg$ is UC; (c) $fg$ is UC if $f$ and $g$ are bounded; (d) $g\circ f$ is UC when $g$ is UC on a set containing $f(A)$; (e) $1/f$ is UC when $f\gt0$ on $A$.
(a) True Take $\delta=\min(\delta_f,\delta_g)$ for $\varepsilon/2$ each; then $|(f+g)(x)-(f+g)(y)|\lt\varepsilon$.
(b) False $f(x)=g(x)=x$ on $\mathbb{R}$ are UC, but $x^2$ is not (Example 2(a)). Also $x\cdot\sin x$ on $[0,\infty)$ (Example 3(c)).
(c) True If $|f|,|g|\le M$: $$|f(x)g(x)-f(y)g(y)|\le|f(x)|\,|g(x)-g(y)|+|g(y)|\,|f(x)-f(y)|,$$ which is at most $M\left(|g(x)-g(y)|+|f(x)-f(y)|\right)$. Choose $\delta$ for $\varepsilon/(2M)$ for both $f$ and $g$.
(d) True Given $\varepsilon$, take $\eta$ for $g$ and $\varepsilon$, then $\delta$ for $f$ and $\eta$: $|x-y|\lt\delta\Rightarrow|f(x)-f(y)|\lt\eta\Rightarrow|g(f(x))-g(f(y))|\lt\varepsilon$.
(e) False $f(x)=x$ on $(0,1)$ is UC and positive, but $1/x$ is not UC there. It becomes true if $f\ge m\gt0$: then $\left|\tfrac1{f(x)}-\tfrac1{f(y)}\right|\le\tfrac{|f(x)-f(y)|}{m^2}$.

One-sided Limits and Types of Discontinuity

📘 Definition 3.8 — Types of discontinuity

Let $f$ be defined on an open interval around $c$ and discontinuous at $c$ (or undefined at $c$). Write $f(c-)$, $f(c+)$ for the one-sided limits (Definition 3.2), when they exist in $\mathbb{R}$.

  • Removable discontinuity: $f(c-)$ and $f(c+)$ exist and are equal, but differ from $f(c)$ (or $f(c)$ is undefined). Redefining $f(c)=f(c\pm)$ removes it.
  • Jump discontinuity: $f(c-)$ and $f(c+)$ both exist and $f(c-)\ne f(c+)$; the number $f(c+)-f(c-)$ is the jump (saltus) of $f$ at $c$.
  • Discontinuity of the second kind (essential discontinuity): at least one of $f(c-)$, $f(c+)$ does not exist as a real number (it oscillates, or is $\pm\infty$).

Removable and jump discontinuities together are the discontinuities of the first kind ("simple" discontinuities). At an end point of an interval only one one-sided limit is involved.

✏️ Example 5 — Classifying discontinuities
Classify every discontinuity of: (a) $\lfloor x\rfloor$; (b) $\dfrac{\sin x}{x}$ for $x\ne0$, with value $0$ at $0$; (c) $e^{1/x}$ for $x\ne0$, value $0$ at $0$; (d) $\sin\dfrac1x$, value $0$ at $0$; (e) Thomae's function $T$ (§3.1); (f) the Dirichlet function $D$.
(a) Jumps At each $n\in\mathbb{Z}$: $\lfloor n-\rfloor=n-1$, $\lfloor n+\rfloor=n=\lfloor n\rfloor$: a jump of $1$ (the function is right-continuous).
(b) Removable $\tfrac{\sin x}{x}\to1$ from both sides, while the value is $0$. Defining it to be $1$ at $0$ makes it continuous.
(c) Second kind As $x\to0-$, $1/x\to-\infty$ and $e^{1/x}\to0$; as $x\to0+$, $e^{1/x}\to+\infty$. The right-hand limit does not exist in $\mathbb{R}$: second kind (although the left limit exists).
(d) Second kind Neither one-sided limit exists: $\sin(1/x)$ oscillates between $\pm1$ on each side. Note that this function has the intermediate value property on every interval.
(e) Removable, at every rational $\lim_{x\to c}T(x)=0$ everywhere (§3.1), so at each rational $c$ the one-sided limits are both $0\ne T(c)$. Countably many removable discontinuities.
(f) Second kind, everywhere At every $c$ both one-sided limits fail to exist (rationals and irrationals accumulate from each side). Uncountably many discontinuities — all of the second kind, as Froda's theorem will require.

Monotone Functions and Their Discontinuities

📐 Theorem 3.18 — One-sided limits of monotone functions
Let $f:(a,b)\to\mathbb{R}$ be increasing and $c\in(a,b)$. Then both one-sided limits exist and $$f(c-)=\sup_{x\lt c}f(x)\ \le\ f(c)\ \le\ \inf_{x\gt c}f(x)=f(c+).$$ Moreover $f(x+)\le f(y-)$ whenever $x\lt y$, and $f$ is continuous at $c$ iff $f(c-)=f(c+)$. Hence every discontinuity of a monotone function on an open interval is a jump discontinuity. (For decreasing $f$ reverse the inequalities.)

Proof. The set $\{f(x):a\lt x\lt c\}$ is nonempty and bounded above by $f(c)$; let $\ell=\sup_{x\lt c}f(x)\le f(c)$. Given $\varepsilon\gt0$, the $\varepsilon$-characterisation of the supremum (§1.2) gives $x_0\lt c$ with $f(x_0)\gt\ell-\varepsilon$. For $x_0\lt x\lt c$, monotonicity gives $\ell-\varepsilon\lt f(x_0)\le f(x)\le\ell$. So $\delta=c-x_0$ works and $f(c-)=\ell$. The right-hand limit is the mirror argument with the infimum. If $x\lt y$, pick $z$ with $x\lt z\lt y$; then $f(x+)\le f(z)\le f(y-)$. Finally, $f$ is continuous at $c$ iff $f(c-)=f(c)=f(c+)$ (Theorem 3.3 of §3.1), and since $f(c)$ is squeezed between the two limits, this happens iff $f(c-)=f(c+)$. If not, both limits exist and differ: a jump. ∎

📐 Theorem 3.19 — Discontinuities of a monotone function are countable
Let $f:[a,b]\to\mathbb{R}$ be increasing. (a) For distinct points $c_1,\dots,c_k$ of discontinuity in $(a,b)$, $\ \sum_{i=1}^k\big(f(c_i+)-f(c_i-)\big)\le f(b)-f(a)$. (b) For each $\eta\gt0$, $f$ has at most $\big(f(b)-f(a)\big)/\eta$ jumps of size $\ge\eta$. (c) The set of discontinuities of $f$ is countable; the same holds for any monotone $f:I\to\mathbb{R}$ on any interval $I$. (d) Conversely, for every countable set $C=\{c_1,c_2,\dots\}\subseteq\mathbb{R}$ the function $$\varphi(x)=\sum_{n:\ c_n\lt x}2^{-n}$$ is increasing and bounded on $\mathbb{R}$, continuous at every $x\notin C$, and has a jump of exactly $2^{-n}$ at $c_n$.

Proof. (a) Order the points $c_1\lt\cdots\lt c_k$ and choose $a=x_0\lt c_1\lt x_1\lt c_2\lt\cdots\lt c_k\lt x_k=b$. By Theorem 3.18, $f(x_{i-1})\le f(c_i-)$ and $f(c_i+)\le f(x_i)$, so $$f(c_i+)-f(c_i-)\le f(x_i)-f(x_{i-1}).$$ Summing, the right side telescopes to $f(b)-f(a)$. (b) If there were more than $(f(b)-f(a))/\eta$ such jumps, choosing that many of them would violate (a). (c) The discontinuities in $(a,b)$ are the union over $m\in\mathbb{N}$ of the sets of jumps of size $\ge\tfrac1m$, each finite by (b): a countable union of finite sets is countable (§1.1). Add the two end points. For a general interval $I$, write it as a countable union of closed bounded intervals. (Alternative proof: at each jump choose a rational in the open interval $(f(c-),f(c+))$; by Theorem 3.18 these intervals are disjoint for different $c$, so $c\mapsto$ rational is injective into $\mathbb{Q}$.)

(d) The series converges, $0\le\varphi\le1$, and $\varphi$ is increasing because for $y\lt x$, $$\varphi(x)-\varphi(y)=\sum_{n:\ y\le c_n\lt x}2^{-n}\ge0 .$$ Fix $x$ and $N$. Choose $h\gt0$ so small that no $c_n$ with $n\le N$ lies in $[x-h,x)$ or in $(x,x+h)$. Then $\varphi(x)-\varphi(x-h)$ is a sum over indices $n\gt N$ only, so it is $\le2^{-N}$; hence $\varphi(x-)=\varphi(x)$. Similarly $\varphi(x+h)-\varphi(x)=\sum_{x\le c_n\lt x+h}2^{-n}$ equals $2^{-m}$ (if $x=c_m$) plus at most $2^{-N}$, and equals at most $2^{-N}$ if $x\notin C$. Letting $N\to\infty$: $\varphi(x+)-\varphi(x)=2^{-m}$ if $x=c_m$, and $0$ if $x\notin C$. ∎

✏️ Example 6 — An increasing function that jumps at every rational
List $\mathbb{Q}\cap(0,1)$ as $r_1=\tfrac12,\ r_2=\tfrac13,\ r_3=\tfrac23,\ r_4=\tfrac14,\ r_5=\tfrac34,\ r_6=\tfrac15,\dots$ and put $\varphi(x)=\sum_{n:\ r_n\lt x}2^{-n}$ on $[0,1]$. (a) Compute $\varphi(\tfrac12)$, $\varphi(\tfrac12+)$ and the jump at $\tfrac13$. (b) Show that $\varphi$ is strictly increasing on $[0,1]$, continuous exactly at the irrationals and at $0$ and $1$, and find $\varphi(0)$ and $\varphi(1)$. (c) Is $\varphi([0,1])$ an interval?
(a) $\varphi(\tfrac12)$ sums $2^{-n}$ over the $r_n\lt\tfrac12$; $\varphi(\tfrac12+)=\varphi(\tfrac12)+2^{-1}$ — the jump at $r_1=\tfrac12$ is $\tfrac12$. The jump at $r_2=\tfrac13$ is $2^{-2}=\tfrac14$ (Theorem 3.19(d)). By the convention $c_n\lt x$, $\varphi$ is left-continuous: $\varphi(r_n-)=\varphi(r_n)$.
(b) If $0\le y\lt x\le1$, the interval $[y,x)$ contains a rational $r_n\in(0,1)$ (density), so $\varphi(x)-\varphi(y)\ge2^{-n}\gt0$: strictly increasing. By Theorem 3.19(d) it is continuous off $\{r_n\}$ — at every irrational and at $0,1$ — and jumps at each rational of $(0,1)$. $\varphi(0)=0$ (no $r_n\lt0$) and $\varphi(1)=\sum_n2^{-n}=1$.
(c) No At $\tfrac12$ the values jump from $\varphi(\tfrac12)$ to $\varphi(\tfrac12)+\tfrac12$, and only $\varphi(\tfrac12)$ itself is attained in between. So $\varphi([0,1])$ misses an interval of length $\tfrac12$ — in fact it misses a dense set of open intervals of total length $1$, yet $\varphi(0)=0$ and $\varphi(1)=1$. Consistent with §3.1: a monotone function with an interval image would be continuous.
Moral Countable is not the same as "few": the discontinuities of a monotone function can be dense. Interactive 2 draws this staircase.
Interactive 2 — Countably Many Jumps, Total Size at Most $f(1)-f(0)$

The staircase is $\varphi_N(x)=\sum w_n$ over the first $N$ rationals $r_n\lt x$ of $(0,1)$, listed by denominator, with jump $w_n=\tfrac{6}{\pi^2n^2}$ at $r_n$ (so all jumps together add up to $1$). Press Play to add rationals. Jumps of size $\ge\eta$ are drawn in red: however many rationals you add, there are never more than $1/\eta$ of them — which is why the discontinuities of a monotone function are countable, even when they are dense.

—
rationals used N—
newest rₙ and its jump—
sum of all jumps—
jumps ≥ η / bound 1/η—
📐 Theorem 3.20 — Froda's theorem
For any function $f:\mathbb{R}\to\mathbb{R}$, the set of discontinuities of the first kind (removable or jump) is countable.

Proof. Let $J$ be the set of jump points and $R$ the set of removable discontinuities; it suffices to show each is countable. Split $J=J_+\cup J_-$ according as $f(c-)\lt f(c+)$ or $f(c-)\gt f(c+)$.

$J_+$ is countable. For $c\in J_+$ choose a rational $r$ with $f(c-)\lt r\lt f(c+)$. By the definition of one-sided limits there are rationals $p\lt c\lt q$ such that $f(x)\lt r$ for $p\lt x\lt c$ and $f(x)\gt r$ for $c\lt x\lt q$. Assign to $c$ the triple $(r,p,q)\in\mathbb{Q}^3$. If two points $c\lt c'$ of $J_+$ received the same triple, both would lie in $(p,q)$; pick $x$ with $c\lt x\lt c'$. Viewed from $c$, $x\in(c,q)$, so $f(x)\gt r$; viewed from $c'$, $x\in(p,c')$, so $f(x)\lt r$ — impossible. So $c\mapsto(r,p,q)$ is injective into the countable set $\mathbb{Q}^3$. The same argument (with the inequalities reversed) handles $J_-$.

$R$ is countable. For $c\in R$ let $L=f(c-)=f(c+)\ne f(c)$, say $f(c)\gt L$ (the other case is symmetric). Choose a rational $r$ with $L\lt r\lt f(c)$ and rationals $p\lt c\lt q$ with $f(x)\lt r$ for all $x\in(p,q)$, $x\ne c$. If $c\ne c'$ received the same triple $(r,p,q)$ (both with $f\gt L$ at the point), then $c'\in(p,q)\setminus\{c\}$ forces $f(c')\lt r$, while $f(c')\gt r$ by the choice of $r$ for $c'$ — impossible. Again an injection into $\mathbb{Q}^3$. ∎

So a function can be discontinuous at uncountably many points only through discontinuities of the second kind (Dirichlet's function), and Theorem 3.18 plus Froda give a second proof of Theorem 3.19(c). One more fact is often quoted (proved with the Baire category theorem, §7.1): the set of points of continuity of any $f:\mathbb{R}\to\mathbb{R}$ is a $G_\delta$ set, so there is no function continuous exactly on $\mathbb{Q}$, while Thomae's function is continuous exactly on $\mathbb{R}\setminus\mathbb{Q}$.

✏️ Example 7 — Prove or disprove: sets of discontinuity
(a) An increasing function on $[0,1]$ can be discontinuous at every point of the Cantor set. (b) There is a function $f:\mathbb{R}\to\mathbb{R}$ with a jump discontinuity at every rational number. (c) There is a function $f:\mathbb{R}\to\mathbb{R}$ with a removable discontinuity at every irrational number. (d) There is a function $f:\mathbb{R}\to\mathbb{R}$ discontinuous at every point. (e) If $f:[0,1]\to\mathbb{R}$ is increasing, then $f$ is continuous at uncountably many points of every subinterval.
(a) False The Cantor set is uncountable (§1.1), and the discontinuities of a monotone function form a countable set (Theorem 3.19).
(b) True Example 6, extended to all of $\mathbb{Q}$ with Theorem 3.19(d): enumerate $\mathbb{Q}=\{c_n\}$ and take $\varphi(x)=\sum_{c_n\lt x}2^{-n}$.
(c) False Removable discontinuities are of the first kind; by Froda's theorem there are only countably many, and $\mathbb{R}\setminus\mathbb{Q}$ is uncountable.
(d) True The Dirichlet function. All its discontinuities are of the second kind, so it does not contradict Froda.
(e) True A subinterval $[s,t]$ with $s\lt t$ is uncountable, and only countably many of its points are discontinuities; so uncountably many are points of continuity (in particular, they are dense).
⚠️ Counterexamples and pitfalls
  1. Continuous but not UC: $x^2$ on $\mathbb{R}$ (slope unbounded); $1/x$ on $(0,1)$ (unbounded on a bounded set); $\sin\tfrac1x$ on $(0,1)$ and $\sin x^2$ on $\mathbb{R}$ (bounded, but faster and faster oscillation); $x\sin x$ on $[0,\infty)$ (growing amplitude).
  2. UC but not Lipschitz: $\sqrt x$ on $[0,1]$; $\sqrt{|x|}$ on $\mathbb{R}$ ($|f'|$ unbounded near $0$). An unbounded derivative does not rule out uniform continuity.
  3. Bounded and continuous does not imply UC ($\sin x^2$); unbounded can be UC ($x$ on $\mathbb{R}$). But UC on a bounded set does imply bounded.
  4. Products: $x\cdot x$ and $x\cdot\sin x$ are products of UC functions that are not UC. Products of bounded UC functions are UC.
  5. Reciprocals: $f(x)=x$ is UC and positive on $(0,1)$, but $1/f$ is not UC.
  6. Preserving Cauchy sequences is not UC on unbounded sets: $x^2$ on $\mathbb{R}$ maps Cauchy sequences to Cauchy sequences. On bounded sets the two notions coincide (Theorem 3.15(c)).
  7. Extension needs UC: $\sin\tfrac1x$ on $(0,1]$ is continuous with no continuous extension to $[0,1]$.
  8. Gluing needs a common point (or a positive gap): $0$ on $(0,1)$ and $1$ on $(1,2)$ is UC on each piece but not on the union.
  9. Monotone functions can be discontinuous on a dense set (Example 6), but never on an uncountable set; their discontinuities are jumps only.
  10. At a jump, $f(c)$ need not equal either one-sided limit: $f=0$ on $[0,\tfrac12)$, $f(\tfrac12)=\tfrac12$, $f=1$ on $(\tfrac12,1]$.
  11. Infinite limits are second-kind discontinuities: $e^{1/x}$ at $0$, even though $f(0-)$ exists.
  12. Froda counts only first-kind discontinuities: Dirichlet's function has uncountably many discontinuities, all of the second kind; Thomae's has countably many, all removable.
  13. The intermediate value property does not prevent discontinuity: $\sin\tfrac1x$ with value $0$ at $0$ — but its discontinuity is of the second kind; a function with the IVP cannot have a jump or removable discontinuity.

Exercises

I
Finding $\delta$ and deciding uniform continuity.
  • 1 Show that $f(x)=3x-5$ is UC on $\mathbb{R}$ and give $\delta(\varepsilon)$.
  • 2 Find $\delta(\varepsilon)$ that shows $x^2$ is UC on $[0,5]$.
  • 3 Find $\delta(\varepsilon)$ that shows $1/x$ is UC on $[2,\infty)$.
  • 4 Find $\delta(\varepsilon)$ that shows $x^3$ is UC on $[-1,2]$.
  • 5 Prove that $x^3$ is not UC on $\mathbb{R}$.
  • 6 Is $x^{1/3}$ UC on $\mathbb{R}$? Justify.
  • 7 Is $\cos\sqrt x$ UC on $[0,\infty)$? Justify.
  • 8 Show that $e^x$ is UC on $(-\infty,0]$ but not on $\mathbb{R}$.
1 $|f(x)-f(y)|=3|x-y|$; $\delta=\varepsilon/3$.
2 $|x^2-y^2|=|x+y||x-y|\le10|x-y|$ on $[0,5]$; $\delta=\varepsilon/10$.
3 $\left|\tfrac1x-\tfrac1y\right|=\tfrac{|x-y|}{xy}\le\tfrac{|x-y|}4$ for $x,y\ge2$; $\delta=4\varepsilon$.
4 $|x^3-y^3|=|x-y|\,|x^2+xy+y^2|$ and $x^2+xy+y^2\le12$ on $[-1,2]^2$ (maximum at $x=y=2$; e.g. $|xy|\le4$ and $x^2,y^2\le4$). So $\delta=\varepsilon/12$.
5 $x_n=n+\tfrac1n$, $y_n=n$: $x_n^3-y_n^3=3n+\tfrac3n+\tfrac1{n^3}\ge3$ while $|x_n-y_n|\to0$ (Theorem 3.12).
6 Yes. On $[-1,1]$ it is continuous on a compact set, hence UC; on $[1,\infty)$ and on $(-\infty,-1]$ its derivative $\tfrac13|x|^{-2/3}$ is at most $\tfrac13$, so it is Lipschitz there. Glue the three pieces at $\pm1$ (Theorem 3.17(a)).
7 Yes. On $[0,1]$ it is UC (compact). On $[1,\infty)$, $\left|\tfrac{d}{dx}\cos\sqrt x\right|=\tfrac{|\sin\sqrt x|}{2\sqrt x}\le\tfrac12$: Lipschitz. Glue at $1$. (Alternatively, $|\cos\sqrt x-\cos\sqrt y|\le|\sqrt x-\sqrt y|\le\sqrt{|x-y|}$.)
8 On $(-\infty,0]$, $|(e^x)'|=e^x\le1$: $1$-Lipschitz. On $\mathbb{R}$: $x_n=n+\tfrac1n$, $y_n=n$ give $e^{x_n}-e^{y_n}=e^n(e^{1/n}-1)\ge e^n\cdot\tfrac1n\to\infty$.
II
The theory of uniform continuity.
  • 1 Prove that if $f$ is UC on $A$ then so is $|f|$, and that $\max(f,g)$ is UC when $f,g$ are.
  • 2 Let $f,g$ be UC on $A$ and bounded. Prove that $fg$ is UC. Give an example showing that boundedness of only one factor is not enough.
  • 3 Give an example of a bounded continuous function on a bounded interval that is not UC, and explain why it does not contradict Theorem 3.15(b).
  • 4 Let $f$ be UC on $\mathbb{R}$. Prove that there are constants $A,B$ with $|f(x)|\le A|x|+B$ for all $x$. Deduce again that $x^2$ is not UC on $\mathbb{R}$.
  • 5 Let $f:(0,1)\to\mathbb{R}$ be UC. Prove directly, with the Cauchy criterion, that $\lim_{x\to0+}f(x)$ exists.
  • 6 Prove that a continuous periodic function $f:\mathbb{R}\to\mathbb{R}$ is UC.
  • 7 Let $f:[0,\infty)\to\mathbb{R}$ be continuous with $f(x)-(ax+b)\to0$ as $x\to\infty$. Prove that $f$ is UC.
  • 8 Prove that $|x^\alpha-y^\alpha|\le|x-y|^\alpha$ for $x,y\ge0$ and $0\lt\alpha\le1$. Deduce that $x^\alpha$ is UC on $[0,\infty)$, and decide for which $\alpha\gt0$ it is Lipschitz on $[0,1]$.
1 $\big||f(x)|-|f(y)|\big|\le|f(x)-f(y)|$, so the same $\delta$ works. Then $\max(f,g)=\tfrac12(f+g+|f-g|)$ is a combination of UC functions (Example 4(a)).
2 See Example 4(c). One bounded factor is not enough: $f(x)=x$ (UC, unbounded) and $g(x)=\sin x$ (UC, bounded) give $x\sin x$, not UC on $[0,\infty)$ (Example 3(c)).
3 $\sin(1/x)$ on $(0,1)$. Theorem 3.15(b) says UC on a bounded set implies bounded; the converse is false.
4 Take $\delta$ for $\varepsilon=1$. For $x\gt0$ go from $0$ to $x$ in $n=\lceil 2x/\delta\rceil$ equal steps of length $x/n\le\delta/2\lt\delta$; each step changes $f$ by less than $1$, so $|f(x)-f(0)|\lt n\le\tfrac{2x}{\delta}+1$. Similarly for $x\lt0$. So $|f(x)|\le\tfrac2\delta|x|+1+|f(0)|$. Since $x^2/(A|x|+B)\to\infty$, $x^2$ is not UC.
5 Given $\varepsilon$, take $\delta$ from UC. If $0\lt x,y\lt\delta$ then $|x-y|\lt\delta$ and $|f(x)-f(y)|\lt\varepsilon$. That is the Cauchy criterion (§3.1, Theorem 3.2(4)) for the limit at $0$ from the right.
6 If the period is $T$, $f$ is UC on the compact interval $[-T,2T]$ — take $\delta\le T$ there. For $|x-y|\lt\delta$, shift both by the same multiple $kT$ so that $x+kT\in[0,T]$; then $y+kT\in[-T,2T]$, and $|f(x)-f(y)|=|f(x+kT)-f(y+kT)|\lt\varepsilon$.
7 $g(x)=f(x)-(ax+b)$ is continuous on $[0,\infty)$ with limit $0$ at $\infty$, so it is UC (Theorem 3.17(b)); $ax+b$ is Lipschitz; their sum $f$ is UC (Example 4(a)).
8 For $s,t\ge0$: $(s+t)^\alpha=s(s+t)^{\alpha-1}+t(s+t)^{\alpha-1}\le s\cdot s^{\alpha-1}+t\cdot t^{\alpha-1}=s^\alpha+t^\alpha$ (as $\alpha-1\le0$; the cases $s=0$ or $t=0$ are trivial). With $x\ge y$, $s=y$, $t=x-y$: $x^\alpha-y^\alpha\le(x-y)^\alpha$. So $x^\alpha$ is Hölder of order $\alpha$, hence UC on $[0,\infty)$. On $[0,1]$ it is Lipschitz iff $\alpha\ge1$: for $\alpha\lt1$, $\tfrac{h^\alpha-0}{h}=h^{\alpha-1}\to\infty$; for $\alpha\ge1$ the derivative $\alpha x^{\alpha-1}\le\alpha$ there.
III
Discontinuities and monotone functions.
  • 1 Classify the discontinuities of: (a) $\lfloor x\rfloor+\lfloor-x\rfloor$; (b) $\operatorname{sgn}x$; (c) $\cos(1/x)$ with value $1$ at $0$; (d) $\dfrac{x^2-4}{x-2}$ with value $0$ at $2$.
  • 2 For $f(x)=\lfloor x\rfloor+x^2$, find $f(2-)$, $f(2)$, $f(2+)$ and the jump at $2$.
  • 3 Let $f(x)=\sum_{n:\ 1/n\le x}2^{-n}$ on $[0,1]$. Find the points of discontinuity and the jumps, and show that $f$ is continuous at $0$.
  • 4 Let $f:[a,b]\to\mathbb{R}$ be decreasing. Prove that it has at most $(f(a)-f(b))/\eta$ jumps of size $\ge\eta$.
  • 5 Prove the right-hand half of Theorem 3.18: $f(c+)=\inf_{x\gt c}f(x)$ for increasing $f$.
  • 6 Is there an increasing function on $\mathbb{R}$ that is discontinuous exactly at the integers? Exactly at $\{\tfrac1n:n\in\mathbb{N}\}$? Exactly on $[0,1]$?
  • 7 Let $f:[0,1]\to\mathbb{R}$ be increasing with $f([0,1])$ dense in $[f(0),f(1)]$. Prove that $f$ is continuous.
  • 8 Use Froda's theorem to show that no function $f:\mathbb{R}\to\mathbb{R}$ has a jump discontinuity at every irrational point. Does the indicator function of $[0,1]$ contradict Froda's theorem?
1 (a) It equals $0$ at integers and $-1$ elsewhere: removable discontinuities at every integer. (b) Jump of $2$ at $0$. (c) Second kind at $0$ (no one-sided limit). (d) Removable at $2$: the limit is $4$.
2 $f(2-)=1+4=5$, $f(2)=2+4=6$, $f(2+)=6$: a jump of $1$; $f$ is right-continuous at $2$.
3 $f$ is increasing; at $x=\tfrac1n$ it jumps by $2^{-n}$ ($f(\tfrac1n)-f(\tfrac1n-)=2^{-n}$, right-continuous), and elsewhere in $(0,1]$ it is locally constant, hence continuous. At $0$: for $0\lt x\lt\tfrac1N$, $f(x)\le\sum_{n\gt N}2^{-n}=2^{-N}$, so $f(0+)=0=f(0)$.
4 Apply Theorem 3.19(b) to the increasing function $-f$, which has the same jump sizes.
5 $m=\inf_{x\gt c}f(x)\ge f(c)$ exists. Given $\varepsilon$, some $x_0\gt c$ has $f(x_0)\lt m+\varepsilon$; for $c\lt x\lt x_0$, $m\le f(x)\le f(x_0)\lt m+\varepsilon$. So $\delta=x_0-c$ works.
6 Integers: yes, $\lfloor x\rfloor$. $\{\tfrac1n\}$: yes, Theorem 3.19(d) with $c_n=\tfrac1n$ (or Exercise 3). $[0,1]$: no — it is uncountable (Theorem 3.19(c)).
7 A jump at $c$ would leave the open interval $(f(c-),f(c+))$ empty of values except possibly $f(c)$ (values left of $c$ are $\le f(c-)$, values right of $c$ are $\ge f(c+)$); this interval contains a smaller open interval with no values of $f$, contradicting density. At the end points use the one-sided version. So $f$ has no discontinuities.
8 The irrationals are uncountable; jump discontinuities form a countable set. $\mathbf 1_{[0,1]}$ has exactly two discontinuities, jumps at $0$ and $1$ — countable, no contradiction.
IV
Further problems.
  • 1 Let $f:\mathbb{R}\to\mathbb{R}$ be increasing with $f(x+y)=f(x)+f(y)$ for all $x,y$. Prove that $f(x)=cx$ with $c=f(1)$.
  • 2 Let $f:\mathbb{Q}\to\mathbb{R}$ be UC. Prove that $f$ extends to a continuous function on $\mathbb{R}$. Give a continuous $g:\mathbb{Q}\to\mathbb{R}$ with no continuous extension to $\mathbb{R}$.
  • 3 Let $f:\mathbb{R}\to\mathbb{R}$ be continuous with $f(x)\to0$ as $x\to\pm\infty$. Prove that $f$ is UC and that it attains its maximum or its minimum.
  • 4 Prove or disprove: if $f$ is UC on $A$ and on $B$, and $A,B$ are at positive distance ($|a-b|\ge r\gt0$ for $a\in A$, $b\in B$), then $f$ is UC on $A\cup B$.
  • 5 Let $f:[0,1]\to\mathbb{R}$ be continuous. Prove that for every $\varepsilon\gt0$ there is a step function $s$ (constant on each of finitely many subintervals) with $|f(x)-s(x)|\lt\varepsilon$ for all $x$.
  • 6 Applied. The cumulative distribution function $F(x)=P(X\le x)$ of a random variable is increasing, right-continuous, and has $F(-\infty)=0$, $F(\infty)=1$. Show that $X$ has at most $10$ values $a$ with $P(X=a)\ge0.1$ (note $P(X=a)=F(a)-F(a-)$), and at most countably many values of positive probability.
1 As in §3.1, Example 3(c), $f(r)=cr$ for $r\in\mathbb{Q}$. For real $x$ and rationals $r\lt x\lt s$, monotonicity gives $cr=f(r)\le f(x)\le f(s)=cs$. Letting $r,s\to x$ through rationals, $f(x)=cx$. (Monotonicity replaces continuity.)
2 $\overline{\mathbb{Q}}=\mathbb{R}$, so Theorem 3.16(a) gives the extension. $g(x)=0$ for $x\lt\sqrt2$ and $g(x)=1$ for $x\gt\sqrt2$ ($x\in\mathbb{Q}$) is continuous on $\mathbb{Q}$ (locally constant, as $\sqrt2\notin\mathbb{Q}$), but any extension would need a jump at $\sqrt2$.
3 UC: apply Theorem 3.17(b) on $[0,\infty)$ and its mirror image on $(-\infty,0]$, then glue at $0$. If $f\equiv0$ both extremes are attained. Otherwise some $f(x_0)\ne0$, say $f(x_0)\gt0$. Choose $M\gt|x_0|$ with $|f(x)|\lt f(x_0)$ for $|x|\gt M$. The maximum of $f$ on $[-M,M]$ is $\ge f(x_0)$, which exceeds every value outside: it is the global maximum. (If $f(x_0)\lt0$ the minimum is attained.) Both need not be: $f(x)=e^{-x^2}$ has no minimum.
4 True. Given $\varepsilon$, take $\delta=\min(\delta_A,\delta_B,r)$. If $|x-y|\lt\delta$ then $x,y$ lie in the same set, since points of different sets are at distance $\ge r$.
5 By Heine–Cantor choose $\delta$ for $\varepsilon$, and $n$ with $\tfrac1n\lt\delta$. Let $s=f(\tfrac{k}{n})$ on $[\tfrac kn,\tfrac{k+1}n)$ ($k=0,\dots,n-1$) and $s(1)=f(1)$. Each $x$ is within $\tfrac1n\lt\delta$ of the left end point of its piece, so $|f(x)-s(x)|\lt\varepsilon$. (This is the heart of the proof that continuous functions are Riemann integrable, §4.1.)
6 The jump of $F$ at $a$ is $F(a)-F(a-)=P(X=a)$. By Theorem 3.19(a) (applied on large intervals $[-M,M]$ and letting $M\to\infty$), the jumps add up to at most $F(\infty)-F(-\infty)=1$, so at most $10$ of them are $\ge0.1$, and the set of atoms is a countable union of finite sets.
🎯 Exam corner CSIR Part BCSIR Part CGATE MA

E1. CSIR Part B GATE MA Which of the following functions is uniformly continuous on $(0,1)$? (A) $\dfrac1x$; (B) $\sin\dfrac1x$; (C) $x\sin\dfrac1x$; (D) $\log x$.

Idea On a bounded open interval, a continuous function is UC iff its one-sided limits at both end points exist (Theorem 3.16(b)).
Check At $0+$: $\tfrac1x\to\infty$, $\log x\to-\infty$, $\sin\tfrac1x$ has no limit, while $x\sin\tfrac1x\to0$; at $1-$ all four have limits.
Answer (C).

E2. CSIR Part B Let $f:\mathbb{R}\to\mathbb{R}$ be increasing. Then the set of points where $f$ is discontinuous is (A) necessarily finite; (B) at most countable; (C) possibly uncountable; (D) necessarily empty if $f$ is bounded.

Work Theorem 3.19(c) gives (B) and rules out (C). (A) fails for $\lfloor x\rfloor$ (infinitely many jumps); (D) fails for the bounded increasing function $\arctan x+\mathbf 1_{[0,\infty)}(x)$, which jumps at $0$.
Answer (B).

E3. CSIR Part B For $\alpha\gt0$, the function $f(x)=x^\alpha$ is uniformly continuous on $[0,\infty)$ if and only if (A) $0\lt\alpha\le1$; (B) $\alpha\ge1$; (C) $\alpha=1$; (D) $\alpha\gt0$ is arbitrary.

$\alpha\le1$ $|x^\alpha-y^\alpha|\le|x-y|^\alpha$ (Exercise II.8): Hölder, hence UC.
$\alpha\gt1$ $x_n=n+\tfrac1n$, $y_n=n$: by the MVT, $x_n^\alpha-y_n^\alpha=\alpha\xi^{\alpha-1}\cdot\tfrac1n\ge\alpha n^{\alpha-2}$ for some $\xi\in(n,n+\tfrac1n)$. For $\alpha\ge2$ this is $\ge\alpha$; for $1\lt\alpha\lt2$ use instead $x_n=n+n^{1-\alpha}$, $y_n=n$: then $x_n-y_n\to0$ and $x_n^\alpha-y_n^\alpha\ge\alpha n^{\alpha-1}n^{1-\alpha}=\alpha$. Not UC.
Answer (A).

E4. CSIR Part C Let $f:(0,1)\to\mathbb{R}$ be uniformly continuous. Which of the following are true? (One or more options may be correct.) (A) $f$ is bounded. (B) $\lim_{x\to0+}f(x)$ exists. (C) $f$ is Lipschitz. (D) $f^2$ is uniformly continuous on $(0,1)$.

(A) True UC on a bounded set implies bounded (Theorem 3.15(b)).
(B) True Theorem 3.16(b), or the Cauchy criterion (Exercise II.5).
(C) False $\sqrt x$ is UC on $(0,1)$ but $\tfrac{\sqrt x-0}{x}=\tfrac1{\sqrt x}$ is unbounded, so no Lipschitz constant exists.
(D) True With $|f|\le M$: $|f(x)^2-f(y)^2|=|f(x)+f(y)|\,|f(x)-f(y)|\le2M|f(x)-f(y)|$.
Answer (A), (B) and (D).

E5. CSIR Part C Which of the following functions are uniformly continuous on $\mathbb{R}$? (A) $\sin(x^2)$; (B) $\dfrac{x}{1+x^2}$; (C) $\sqrt{|x|}$; (D) $x\sin x$.

(A) False Example 2(d): $x_n=\sqrt{2\pi n+\pi/2}$, $y_n=\sqrt{2\pi n}$.
(B) True $f'(x)=\dfrac{1-x^2}{(1+x^2)^2}$ and $|1-x^2|\le1+x^2$, so $|f'|\le\tfrac1{1+x^2}\le1$: Lipschitz.
(C) True $\big|\sqrt{|x|}-\sqrt{|y|}\big|\le\sqrt{\big||x|-|y|\big|}\le\sqrt{|x-y|}$ (Example 1(b)): Hölder of order $\tfrac12$.
(D) False Example 3(c) (the same sequences work on $\mathbb{R}$).
Answer (B) and (C).

E6. CSIR Part C Let $f:[0,1]\to\mathbb{R}$ be increasing. Which of the following are true? (A) The set of discontinuities of $f$ is countable. (B) $f$ can be discontinuous at every irrational point of $[0,1]$. (C) Every discontinuity of $f$ in $(0,1)$ is a jump discontinuity. (D) If $f$ is discontinuous at $c\in(0,1)$, then $f(c)$ equals $f(c-)$ or $f(c+)$.

(A) True Theorem 3.19(c).
(B) False The irrationals of $[0,1]$ are uncountable.
(C) True Both one-sided limits exist (Theorem 3.18), so a discontinuity has $f(c-)\ne f(c+)$.
(D) False $f=0$ on $[0,\tfrac12)$, $f(\tfrac12)=\tfrac12$, $f=1$ on $(\tfrac12,1]$ is increasing and $f(\tfrac12)$ is strictly between the one-sided limits.
Answer (A) and (C).
🧑‍🏫 For the teacher

Suggested plan — 2 lectures × 60 min.

  1. Uniform continuity. Write the definitions of continuity and uniform continuity one above the other and circle the swapped quantifiers. Example 2 (four ways to fail) and Theorem 3.12; project Interactive 1, comparing $x^2$ on $[0,2]$ (the $\delta$-curve has a positive floor) with $x^2$ on $[0,\infty)$ and $\sin(1/x)$ (the curve sinks to $0$). Lipschitz/Hölder and Example 1(b) for $\sqrt x$. Heine–Cantor with both proofs — the open-cover proof makes the role of compactness visible.
  2. Extension, monotone functions, discontinuities. Theorems 3.15–3.17 with the strategy box and Example 3; Example 4 as a quick quiz. Then Definition 3.8 and Example 5; Theorems 3.18 and 3.19 in full; Interactive 2 with $\eta$ moved slowly to see the count stay below $1/\eta$; Example 6. Froda's theorem: state it, prove the jump case on the board, assign the removable case.

Discussion questions. (1) Is the sum of a UC function and a continuous function UC? (2) Interactive 1 shows the smallest $\delta$ on a finite grid. Why can a picture never prove uniform continuity on $[0,\infty)$, and what replaces it? (3) Must an increasing function on $\mathbb{R}$ be continuous at some rational point?

Misconceptions to watch for. "Bounded continuous ⇒ UC"; "UC ⇒ bounded derivative"; "the product of UC functions is UC"; letting $\delta$ depend on $x$ in a UC proof; forgetting that a jump need not have $f(c)$ equal to a one-sided limit; thinking countable discontinuities must be isolated; applying Froda to second-kind discontinuities.

Suggested homework. I(4, 5, 6, 7), II(2, 4, 6, 8), III(1, 3, 6, 7), IV(1, 3, 6); Exam corner E3, E4, E6.

🔬 Research–Teaching NexusResearch-tutored · optional, about 40 minutes

Research question. Why are square-root flow meters inaccurate at low flow — and how does the difference between Hölder and Lipschitz continuity quantify it?

Why it matters. Orifice-plate and Venturi meters, used in water supply, oil and gas pipelines and hospital gas lines worldwide, infer the flow rate from a pressure drop by a law of the form $Q=C\sqrt{\Delta p}$. A pressure sensor always has some absolute error. Because $\sqrt{\cdot}$ is uniformly continuous but not Lipschitz near $0$, a fixed pressure error produces a flow error that is small at high flow and relatively huge at low flow. Engineers summarise this in the meter's "turndown ratio" — the range of flows it can measure to a stated accuracy.

What to do.

  1. Take $C=2$ (litres per second per $\sqrt{\text{kPa}}$) and a sensor error of $0.1$ kPa. Using $|\sqrt x-\sqrt y|\le\sqrt{|x-y|}$, find the worst possible flow error over all pressures, and the $\delta(\varepsilon)$ that guarantees a flow error below $\varepsilon=0.05$ L/s.
  2. Find the Lipschitz constant of $Q$ on $[p_{\min},\infty)$, and compute the actual flow error caused by a $0.1$ kPa error at $\Delta p=100$ kPa and at $\Delta p=1$ kPa.
  3. Find the smallest $p_{\min}$ for which a $0.1$ kPa error causes a flow error of at most $2\%$ of the reading. What turndown ratio $Q(100)/Q(p_{\min})$ does this give if the maximum pressure drop is $100$ kPa?
  4. Compare with a meter obeying a linear law (e.g. a turbine meter). Which kind of continuity does each have?

Tools: A calculator or spreadsheet; optional plot of the relative error against $\Delta p$ on a logarithmic axis.

Hand in: A half-page table of your numbers and two sentences explaining, in the language of this section, why the meter cannot be accurate near zero flow.

Going further. Read about how flow engineers extend the range of such meters (stacked sensors of different ranges, or switching to a different meter type at low flow), and about Hölder exponents as a measure of roughness of signals in image and audio analysis.

Instructor note: (1) the worst error is at $\Delta p=0$: $2\sqrt{0.1}\approx0.632$ L/s; $\delta=(\varepsilon/C)^2=(0.025)^2=6.25\times10^{-4}$ kPa. (2) Lipschitz constant $C/(2\sqrt{p_{\min}})=1/\sqrt{p_{\min}}$; errors $2(\sqrt{100.1}-10)\approx0.0100$ L/s at $100$ kPa ($0.05\%$ of $20$ L/s) and $2(\sqrt{1.1}-1)\approx0.0976$ L/s at $1$ kPa (about $4.9\%$ of $2$ L/s). (3) Need $\sqrt{1+0.1/p}\le1.02$, i.e. $p_{\min}=0.1/(1.02^2-1)\approx2.48$ kPa; turndown $\sqrt{100/2.48}\approx6.4$. (4) A linear law is Lipschitz with a constant relative accuracy.

🧪 Self-check quiz

0/5 correct

Q1. If $f$ is continuous on a closed bounded interval $[a,b]$, then $f$ is

Q2. On $[0,\infty)$ the function $\sqrt x$ is

Q3. The set of discontinuities of an increasing function $f:\mathbb{R}\to\mathbb{R}$ is

Q4. $f(x)=e^{1/x}$ for $x\ne0$, $f(0)=0$, has at $0$

Q5. A continuous $f:(0,1)\to\mathbb{R}$ is uniformly continuous if and only if