The function \(1/x\) is continuous at every point of the interval \((0,1)\) , and it misbehaves there in three ways. It is unbounded. It has no largest value and no smallest value. And the tolerance it permits shrinks without limit: to keep \(1/x\) within \(1\) of its value at \(a\) , the point \(x\) must stay within about \(a^2\) of \(a\) , which is tiny when \(a\) is near \(0\) . On the closed interval \([\tfrac1{10},1]\) all three problems disappear.
Continuity is a local property; it says something about each point separately. Boundedness, attained extremes, and a single tolerance that works everywhere are global properties. This chapter defines continuity for maps between metric spaces, and then proves that on a compact domain the local property forces the global ones. It also proves the other great theorem about continuous functions on an interval, that they cannot skip values, which depends not on compactness but on the completeness of \(\mathbb R\) .
5.1 Continuity at a point
Definition 5.1 (continuity). Let \((X,d_X)\) and \((Y,d_Y)\) be metric spaces, \(f:X\to Y\) , and \(a\in X\) . The function \(f\) is continuous at \(a\) if for every \(\varepsilon>0\) there is a \(\delta>0\) such that
It is continuous on \(X\) if it is continuous at every point of \(X\) .
For a real function defined on a set \(D\subseteq\mathbb R\) , the space \(X\) is \(D\) with the usual distance, and the condition reads: \(\lvert f(x)-f(a)\rvert<\varepsilon\) for all \(x\in D\) with \(\lvert x-a\rvert<\delta\) . Only points of the domain are tested. In terms of balls, the definition says \(f\bigl(B(a,\delta)\bigr)\subseteq B\bigl(f(a),\varepsilon\bigr)\) . The number \(\delta\) may depend on \(\varepsilon\) and on the point \(a\) . It may not depend on \(x\) .
The related notion of a limit ignores the value at the point. If \(a\) is a limit point of \(D\) , we write \(\lim_{x\to a}f(x)=L\) if for every \(\varepsilon>0\) there is \(\delta>0\) with \(d_Y(f(x),L)<\varepsilon\) whenever \(x\in D\) and \(0<d_X(x,a)<\delta\) . Comparing the definitions: at a limit point \(a\in D\) , \(f\) is continuous exactly when \(\lim_{x\to a}f(x)=f(a)\) ; at an isolated point of \(D\) every function is continuous, because for small \(\delta\) the only point tested is \(a\) itself.
Example 5.1: Finding a tolerance for the squaring function
Let \(f(x)=x^2\) on \(\mathbb R\) and \(a=3\) . We want \(\lvert x^2-9\rvert<\varepsilon\) .
Scratch work. \(\lvert x^2-9\rvert=\lvert x+3\rvert\,\lvert x-3\rvert\) . The second factor is what we control. The first is not small, but it is bounded once \(x\) is confined near \(3\) : if \(\lvert x-3\rvert<1\) then \(2<x<4\) and \(\lvert x+3\rvert<7\) .
Proof. Let \(\varepsilon>0\) and put \(\delta=\min\{1,\ \varepsilon/7\}\) . If \(\lvert x-3\rvert<\delta\) , then \(\lvert x+3\rvert<7\) and \(\lvert x-3\rvert<\varepsilon/7\) , so \(\lvert x^2-9\rvert<7\cdot\varepsilon/7=\varepsilon\) .
For \(\varepsilon=0.1\) this gives \(\delta=1/70\approx 0.0143\) . It is not the best possible value: the condition \(\lvert x^2-9\rvert<0.1\) holds exactly for \(\sqrt{8.9}<x<\sqrt{9.1}\) , and the largest symmetric interval about \(3\) inside that set has half-width \(\sqrt{9.1}-3\approx 0.0166\) . A proof needs some \(\delta\) that works, not the largest one, and the cap “\(\delta\le 1\) ” is what made the estimate easy.
Repeating the argument at a general point \(a\) gives \(\delta=\min\{1,\ \varepsilon/(2\lvert a\rvert+1)\}\) . The tolerance shrinks as \(\lvert a\rvert\) grows. Keep this in mind for Section 5.5.
Theorem 5.2 (sequential criterion for continuity). A function \(f:X\to Y\) is continuous at \(a\) if and only if \(f(x_n)\to f(a)\) for every sequence \((x_n)\) in \(X\) with \(x_n\to a\) .
Proof. Suppose \(f\) is continuous at \(a\) and \(x_n\to a\) . Let \(\varepsilon>0\) and take \(\delta\) from the definition. There is \(N\) with \(d_X(x_n,a)<\delta\) for \(n\ge N\) , and then \(d_Y(f(x_n),f(a))<\varepsilon\) .
Suppose \(f\) is not continuous at \(a\) . Then there is \(\varepsilon_0>0\) such that every \(\delta>0\) fails: some \(x\) has \(d_X(x,a)<\delta\) and \(d_Y(f(x),f(a))\ge\varepsilon_0\) . Using \(\delta=1/n\) gives points \(x_n\) with \(d_X(x_n,a)<1/n\) and \(d_Y(f(x_n),f(a))\ge\varepsilon_0\) . Then \(x_n\to a\) but \(f(x_n)\) does not converge to \(f(a)\) .
The criterion converts every theorem about limits of sequences into a theorem about continuous functions.
Corollary 5.3 (new continuous functions from old). Let \(f,g:X\to\mathbb R\) be continuous at \(a\) . Then \(f+g\) , \(cf\) , and \(fg\) are continuous at \(a\) , and \(f/g\) is continuous at \(a\) if \(g\) has no zeros. If \(f:X\to Y\) is continuous at \(a\) and \(h:Y\to Z\) is continuous at \(f(a)\) , then \(h\circ f\) is continuous at \(a\) .
Proof. If \(x_n\to a\) , then \(f(x_n)\to f(a)\) and \(g(x_n)\to g(a)\) , and Theorem 2.4 gives the limits of the sum, multiple, product, and quotient. For the composition, \(x_n\to a\) gives \(f(x_n)\to f(a)\) , and then \(h(f(x_n))\to h(f(a))\) by the criterion applied to \(h\) .
Constants and the identity function \(x\) are continuous on \(\mathbb R\) , hence so are all polynomials, and all rational functions away from the zeros of their denominators. The square root is continuous on \([0,\infty)\) , because \(\lvert\sqrt x-\sqrt a\rvert\le\sqrt{\lvert x-a\rvert}\) : assuming \(x\ge a\ge 0\) , we have \((\sqrt x-\sqrt a)^2\le(\sqrt x-\sqrt a)(\sqrt x+\sqrt a)=x-a\) . So \(\delta=\varepsilon^2\) works at every point.
Example 5.2: Two functions that test the definition
Dirichlet’s function. Let \(D(x)=1\) if \(x\) is rational and \(D(x)=0\) if \(x\) is irrational. It is discontinuous at every point. If \(a\) is rational, Corollary 1.12 supplies irrationals \(x_n\to a\) , and \(D(x_n)=0\) does not converge to \(D(a)=1\) . If \(a\) is irrational, rationals \(x_n\to a\) give \(D(x_n)=1\) , not converging to \(0\) .
Thomae’s function. Let \(T(x)=1/q\) if \(x\) is rational and equal to \(p/q\) in lowest terms with \(q\ge 1\) , and \(T(x)=0\) if \(x\) is irrational. We claim \(T\) is continuous at every irrational point and discontinuous at every rational point.
At a rational \(a\) , \(T(a)>0\) , and irrationals \(x_n\to a\) have \(T(x_n)=0\) ; so \(T\) is discontinuous at \(a\) . At an irrational \(a\) , let \(\varepsilon>0\) and choose \(q_0\in\mathbb N\) with \(1/q_0<\varepsilon\) . The interval \((a-1,a+1)\) contains only finitely many rationals with denominator at most \(q_0\) . None of them equals \(a\) , so the smallest of their distances to \(a\) is a positive number \(\delta\) (take \(\delta=1\) if there are none). If \(\lvert x-a\rvert<\delta\) , then \(x\) is either irrational, with \(T(x)=0\) , or rational with denominator larger than \(q_0\) , with \(T(x)<1/q_0<\varepsilon\) . In both cases \(\lvert T(x)-T(a)\rvert<\varepsilon\) .
The recipe can be run. Take \(a=1/\sqrt2\approx 0.70711\) and \(\varepsilon=0.1\) , so \(q_0=11\) would do, and it is enough to avoid denominators up to \(10\) . Among all fractions with denominator at most \(10\) , the nearest to \(a\) is \(7/10\) , at distance about \(0.00711\) . So \(\delta=0.0071\) works: within that distance of \(a\) , every rational has denominator at least \(11\) and \(T<0.1\) .
A function can thus be continuous on a dense set and discontinuous on another dense set. Thomae’s function returns in Chapter 7, where it turns out to be integrable.
Common mistake. Letting \(\delta\) depend on \(x\) . In an \(\varepsilon\) –\(\delta\) proof at the point \(a\) , the number \(\delta\) is chosen after \(\varepsilon\) and before \(x\) . A “proof” that ends with “so take \(\delta=\varepsilon/\lvert x+3\rvert\) ” has chosen nothing, because \(x\) is not yet known when \(\delta\) is fixed. The repair is the two-stage device of Example 5.1: first restrict \(x\) to a fixed neighbourhood of \(a\) to bound the awkward factor by a constant, then choose \(\delta\) in terms of \(\varepsilon\) and that constant.
5.2 Continuity and open sets
Continuity on a whole space has a formulation with no \(\varepsilon\) and no points at all. For \(f:X\to Y\) and \(V\subseteq Y\) , the preimage is \(f^{-1}(V)=\{x\in X:f(x)\in V\}\) .
Theorem 5.4 (continuity through preimages). A function \(f:X\to Y\) is continuous on \(X\) if and only if \(f^{-1}(V)\) is open in \(X\) for every open set \(V\subseteq Y\) .
Proof. Suppose \(f\) is continuous and \(V\) is open. Let \(a\in f^{-1}(V)\) . Then \(f(a)\in V\) , so \(B(f(a),\varepsilon)\subseteq V\) for some \(\varepsilon>0\) . Take \(\delta\) from Definition 5.1. Then \(f(B(a,\delta))\subseteq B(f(a),\varepsilon)\subseteq V\) , that is, \(B(a,\delta)\subseteq f^{-1}(V)\) . So \(f^{-1}(V)\) is open.
Conversely, suppose preimages of open sets are open. Let \(a\in X\) and \(\varepsilon>0\) . The ball \(V=B(f(a),\varepsilon)\) is open, so \(f^{-1}(V)\) is an open set containing \(a\) , and \(B(a,\delta)\subseteq f^{-1}(V)\) for some \(\delta>0\) . That is the definition of continuity at \(a\) .
Since \(f^{-1}(Y\setminus V)=X\setminus f^{-1}(V)\) , the theorem holds equally with “closed” in place of “open”. It is a quick source of open and closed sets: for continuous \(f:X\to\mathbb R\) the set \(\{x:f(x)>0\}\) is open, as the preimage of \((0,\infty)\) , and \(\{x:f(x)=0\}\) is closed, as the preimage of \(\{0\}\) .
The theorem is about preimages. Images behave worse. The continuous function \(x^2\) maps the open interval \((-1,1)\) onto \([0,1)\) , which is not open. The continuous function \(1/(1+x^2)\) maps the closed set \(\mathbb R\) onto \((0,1]\) , which is not closed. What continuous images do preserve is compactness.
5.3 Continuous functions on compact sets
Compactness of a set \(K\) in a metric space \(X\) does not depend on the ambient space: condition (b) of Theorem 4.17 mentions only sequences in \(K\) and limits in \(K\) . So we may speak of a compact metric space \(K\) and of continuous functions defined only on \(K\) .
Theorem 5.5 (continuous images of compact sets). If \(K\) is a compact metric space and \(f:K\to Y\) is continuous, then \(f(K)\) is a compact subset of \(Y\) .
Proof. Let \((y_n)\) be a sequence in \(f(K)\) and choose \(x_n\in K\) with \(f(x_n)=y_n\) . By Theorem 4.17 a subsequence \(x_{n_k}\) converges to a point \(x\in K\) . By Theorem 5.2, \(y_{n_k}=f(x_{n_k})\to f(x)\) , and \(f(x)\in f(K)\) . So every sequence in \(f(K)\) has a subsequence converging to a point of \(f(K)\) , and \(f(K)\) is compact by Theorem 4.17.
Theorem 5.6 (Extreme Value Theorem). Let \(K\) be a nonempty compact metric space and \(f:K\to\mathbb R\) continuous. Then \(f\) is bounded, and there are points \(x_{\min},x_{\max}\in K\) with
Proof. By Theorem 5.5 the set \(f(K)\) is a compact subset of \(\mathbb R\) , so it is closed and bounded by Theorem 4.14, and it is nonempty. Let \(M=\sup f(K)\) . There is a sequence in \(f(K)\) converging to \(M\) (Exercise 2.19), and \(f(K)\) is closed, so \(M\in f(K)\) by Theorem 4.12. That is, \(M=f(x_{\max})\) for some \(x_{\max}\in K\) . The minimum is handled the same way with the infimum.
In particular, by the Heine–Borel theorem, a continuous real function on a closed bounded interval \([a,b]\) , or on any closed bounded subset of \(\mathbb R^n\) , attains a maximum and a minimum. This is the existence theorem behind every optimisation problem in calculus.
Example 5.3: Removing the hypotheses one at a time
All hypotheses present. Let \(f(x)=x^3-3x\) on \([-2,3]\) . The theorem guarantees extremes; comparing the values at the endpoints and at the critical points \(x=\pm 1\) , namely \(f(-2)=-2\) , \(f(-1)=2\) , \(f(1)=-2\) , \(f(3)=18\) , the maximum is \(18\) , attained at \(x=3\) , and the minimum is \(-2\) , attained at both \(x=-2\) and \(x=1\) . (That the extremes occur only at endpoints or critical points is Theorem 6.5.)
Domain bounded but not closed. On \((0,1)\) the function \(f(x)=x\) is bounded, with \(\sup f=1\) and \(\inf f=0\) , and attains neither. The function \(1/x\) on \((0,1)\) is not even bounded.
Domain closed but not bounded. On \([0,\infty)\) the function \(f(x)=x/(1+x)=1-1/(1+x)\) is bounded and increasing, with \(\sup f=1\) , and \(f(x)<1\) for every \(x\) . The supremum is approached as \(x\to\infty\) and never reached.
Function not continuous. On the compact interval \([0,1]\) let \(f(x)=x\) for \(x<1\) and \(f(1)=0\) . Then \(\sup f=1\) is not attained. The discontinuity at \(1\) has removed the one point where the maximum would occur.
Each hypothesis fails in exactly one case and the conclusion fails each time, so none can be dropped.
5.4 The Intermediate Value Theorem
Theorem 5.7 (Intermediate Value Theorem). Let \(f:[a,b]\to\mathbb R\) be continuous, and let \(y\) be a number strictly between \(f(a)\) and \(f(b)\) . Then there is a point \(c\in(a,b)\) with \(f(c)=y\) .
Proof. Suppose \(f(a)<y<f(b)\) ; the other case follows by applying this one to \(-f\) . Let
Then \(a\in S\) and \(S\) is bounded above by \(b\) , so \(c=\sup S\) exists and \(a\le c\le b\) .
\(f(c)\le y\) . There is a sequence \(x_n\in S\) with \(x_n\to c\) (Exercise 2.19). By continuity \(f(x_n)\to f(c)\) , and \(f(x_n)<y\) for all \(n\) , so \(f(c)\le y\) by Theorem 2.5. In particular \(c\ne b\) , since \(f(b)>y\) .
\(f(c)\ge y\) . Since \(c<b\) , the points \(t_n=c+(b-c)/n\) lie in \((c,b]\) and converge to \(c\) . Each \(t_n\) is larger than \(\sup S\) , so \(t_n\notin S\) , which means \(f(t_n)\ge y\) . By continuity \(f(c)=\lim f(t_n)\ge y\) .
Hence \(f(c)=y\) , and \(c\ne a\) because \(f(a)<y\) .
The structure is that of Theorem 1.11: take the supremum of the set of points that have not yet reached the target, and show that the supremum can be neither short of the target nor past it. Completeness enters through the supremum, and the theorem fails over \(\mathbb Q\) , as the chapter opening of Chapter 1 showed with \(x^2-2\) .
Call a set \(J\subseteq\mathbb R\) an interval if whenever \(u<v\) are in \(J\) , every number between \(u\) and \(v\) is in \(J\) .
Corollary 5.8 (continuous images of intervals). If \(I\) is an interval and \(f:I\to\mathbb R\) is continuous, then \(f(I)\) is an interval. If \(I=[a,b]\) , then \(f(I)=[m,M]\) , where \(m\) and \(M\) are the minimum and maximum of \(f\) .
Proof. Let \(u=f(x_1)<v=f(x_2)\) be two values and \(u<y<v\) . Applying Theorem 5.7 on the closed interval with endpoints \(x_1\) and \(x_2\) , which lies in \(I\) , gives a point \(c\) with \(f(c)=y\) . So \(f(I)\) is an interval. If \(I=[a,b]\) , the Extreme Value Theorem gives \(m,M\in f(I)\) with \(f(I)\subseteq[m,M]\) , and an interval containing \(m\) and \(M\) contains \([m,M]\) .
Corollary 5.9 (roots). For every real \(y>0\) and every \(n\in\mathbb N\) there is exactly one \(x>0\) with \(x^n=y\) .
Proof. The function \(p(x)=x^n\) is continuous, \(p(0)=0<y\) , and \(p(1+y)=(1+y)^n\ge 1+ny>y\) by Lemma 2.6. By Theorem 5.7 there is \(x\in(0,1+y)\) with \(x^n=y\) . It is unique because \(0<x_1<x_2\) implies \(x_1^n<x_2^n\) .
This settles, for all roots at once, what Theorem 1.11 did by hand for the square root of \(2\) .
Example 5.4: Locating a root by bisection
Let \(f(x)=x^3+x-1\) . It is continuous, \(f(0)=-1<0\) , and \(f(1)=1>0\) , so \(f\) has a zero in \((0,1)\) ; since \(f\) is strictly increasing, it has exactly one. The theorem says a zero exists. Repeated use of the theorem finds it to any accuracy: evaluate \(f\) at the midpoint, and keep the half-interval at whose ends \(f\) has opposite signs.
The first midpoint is \(\tfrac12\) , where \(f(\tfrac12)=-\tfrac38<0\) , so the zero lies in \([\tfrac12,1]\) . Next, \(f(\tfrac34)=\tfrac{11}{64}>0\) gives \([\tfrac12,\tfrac34]\) ; then \(f(\tfrac58)<0\) gives \([\tfrac58,\tfrac34]\) ; then \(f(\tfrac{11}{16})>0\) gives \([\tfrac58,\tfrac{11}{16}]\) . After ten steps the interval is
of length \(2^{-10}\approx 0.000977\) . The zero is \(0.682328\) to six places. Each step halves the uncertainty, so the intervals are nested with lengths tending to \(0\) , and Theorem 1.13 says they close down on a single point; by continuity that point is the zero.
The inverse of a continuous function is continuous in the cases that matter for calculus.
Theorem 5.10 (continuous inverse). Let \(I\) be an interval and let \(f:I\to\mathbb R\) be continuous and strictly increasing. Then \(J=f(I)\) is an interval, and the inverse function \(g:J\to I\) is strictly increasing and continuous.
Proof. \(J\) is an interval by Corollary 5.8, and \(g\) is strictly increasing because \(f\) is. Let \(y_0=f(x_0)\in J\) and \(\varepsilon>0\) . Suppose first that \(x_0\) is not an endpoint of \(I\) . Choose \(x_1,x_2\in I\) with \(x_0-\varepsilon<x_1<x_0<x_2<x_0+\varepsilon\) . Then \(f(x_1)<y_0<f(x_2)\) ; put \(\delta=\min\{y_0-f(x_1),\ f(x_2)-y_0\}>0\) . If \(y\in J\) and \(\lvert y-y_0\rvert<\delta\) , then \(f(x_1)<y<f(x_2)\) , so \(x_1<g(y)<x_2\) and \(\lvert g(y)-x_0\rvert<\varepsilon\) . If \(x_0\) is the left endpoint of \(I\) , then \(y_0\) is the smallest element of \(J\) , and the same argument works using only \(x_2\) and \(\delta=f(x_2)-y_0\) ; similarly at a right endpoint.
The theorem applies to strictly decreasing functions through \(-f\) . It makes \(y\mapsto y^{1/n}\) continuous on \([0,\infty)\) , and it will make the exponential function continuous once the logarithm has been constructed in Chapter 7.
5.5 Uniform continuity
Return to the tolerance \(\delta=\min\{1,\varepsilon/(2\lvert a\rvert+1)\}\) found for \(x^2\) at the point \(a\) . It depends on \(a\) , and it tends to \(0\) as \(\lvert a\rvert\to\infty\) . On a bounded interval one can choose a \(\delta\) that serves all points at once. The property of having such a \(\delta\) is stronger than continuity and has its own name.
Definition 5.11 (uniform continuity). A function \(f:X\to Y\) between metric spaces is uniformly continuous if for every \(\varepsilon>0\) there is a \(\delta>0\) such that
Set the two definitions side by side. Continuity on \(X\) : for every \(a\) and every \(\varepsilon\) there is a \(\delta\) . Uniform continuity: for every \(\varepsilon\) there is a \(\delta\) that works for every \(a\) . The words are the same; the order of the quantifiers differs, and in the second statement \(\delta\) is chosen knowing only \(\varepsilon\) . Uniform continuity is a property of a function on a domain, never at a point, and shrinking the domain can only help.
Example 5.5: The same formula on two domains
On \([0,2]\) . For \(x,y\in[0,2]\) ,
Given \(\varepsilon\) , the choice \(\delta=\varepsilon/4\) works for all pairs of points. So \(x^2\) is uniformly continuous on \([0,2]\) .
On \(\mathbb R\) . Take \(x_n=n\) and \(y_n=n+1/n\) . Then \(\lvert x_n-y_n\rvert=1/n\to 0\) , but
So for \(\varepsilon=2\) no \(\delta\) can work: whatever \(\delta\) is proposed, some pair \(x_n,y_n\) is closer than \(\delta\) and has images more than \(2\) apart. The function \(x^2\) is continuous on \(\mathbb R\) and not uniformly continuous there.
The second half of the example is an instance of a general test.
Proposition 5.12 (sequential test for failure of uniform continuity). A function \(f:X\to Y\) fails to be uniformly continuous if and only if there are an \(\varepsilon_0>0\) and sequences \((x_n)\) , \((y_n)\) in \(X\) with \(d_X(x_n,y_n)\to 0\) and \(d_Y(f(x_n),f(y_n))\ge\varepsilon_0\) for all \(n\) .
Proof. The negation of Definition 5.11 is: there is \(\varepsilon_0>0\) such that for every \(\delta>0\) some pair \(x,y\) has \(d_X(x,y)<\delta\) and \(d_Y(f(x),f(y))\ge\varepsilon_0\) . If this holds, taking \(\delta=1/n\) produces the sequences. If the sequences exist, then for any \(\delta>0\) a pair \(x_n,y_n\) with \(d_X(x_n,y_n)<\delta\) witnesses the negation.
Example 5.6: The shrinking tolerance of the reciprocal
Let \(f(x)=1/x\) on \((0,1)\) . Fix \(\varepsilon>0\) and a point \(a\) with \(\varepsilon a<1\) . For \(x>0\) the condition \(\lvert 1/x-1/a\rvert<\varepsilon\) is equivalent to
The point \(a\) is nearer to the left end of this interval, so the largest \(\delta\) that works at \(a\) is
With \(\varepsilon=1\) : at \(a=0.5\) the tolerance is \(\delta\approx 0.1667\) ; at \(a=0.1\) it is \(\delta\approx 0.00909\) ; at \(a=0.01\) it is \(\delta\approx 0.000099\) . The best tolerance tends to \(0\) as \(a\to 0\) , so no single positive \(\delta\) serves every point, and \(f\) is not uniformly continuous on \((0,1)\) .
Proposition 5.12 gives the same conclusion without computing \(\delta(a)\) : for \(x_n=1/(n+1)\) and \(y_n=1/(n+2)\) , both in \((0,1)\) , the distance \(\lvert x_n-y_n\rvert=1/((n+1)(n+2))\) tends to \(0\) while \(\lvert f(x_n)-f(y_n)\rvert=1\) .
A simple sufficient condition for uniform continuity is a bound on difference quotients.
Definition 5.13 (Lipschitz function). A function \(f:X\to Y\) is Lipschitz if there is a constant \(L\) with \(d_Y(f(x),f(y))\le L\,d_X(x,y)\) for all \(x,y\in X\) .
A Lipschitz function is uniformly continuous: take \(\delta=\varepsilon/L\) . Example 5.5 showed that \(x^2\) is Lipschitz on \([0,2]\) with \(L=4\) . The converse is false.
Example 5.7: Uniformly continuous but not Lipschitz
Let \(f(x)=\sqrt x\) on \([0,\infty)\) . We showed after Corollary 5.3 that \(\lvert\sqrt x-\sqrt y\rvert\le\sqrt{\lvert x-y\rvert}\) . So \(\delta=\varepsilon^2\) works for every pair of points: the square root is uniformly continuous on its whole unbounded domain. For instance \(\varepsilon=0.1\) needs only \(\delta=0.01\) , wherever the two points are.
It is not Lipschitz. A Lipschitz constant \(L\) would give \(\sqrt x-\sqrt 0\le L(x-0)\) , that is, \(1/\sqrt x\le L\) , for all \(x>0\) ; but \(1/\sqrt x\) is unbounded near \(0\) . For instance at \(x=10^{-6}\) the quotient \(\sqrt x/x\) is \(1000\) . The graph is vertical at the origin, yet it does not oscillate or blow up, and uniform continuity only asks that nearby points have nearby values.
Now the main theorem. On a compact domain, continuity at each point is enough.
Theorem 5.14 (Heine–Cantor). If \(K\) is a compact metric space and \(f:K\to Y\) is continuous, then \(f\) is uniformly continuous.
Proof. Suppose \(f\) is not uniformly continuous. By Proposition 5.12 there are \(\varepsilon_0>0\) and points \(x_n,y_n\in K\) with \(d(x_n,y_n)\to 0\) and \(d(f(x_n),f(y_n))\ge\varepsilon_0\) . By compactness a subsequence \(x_{n_k}\) converges to some \(x\in K\) . The partner points follow it:
Since \(f\) is continuous at \(x\) , both \(f(x_{n_k})\to f(x)\) and \(f(y_{n_k})\to f(x)\) . Therefore
which contradicts \(d(f(x_{n_k}),f(y_{n_k}))\ge\varepsilon_0\) .
Look at where each hypothesis was used. Compactness produced the limit point \(x\) inside the domain; continuity was used only at that one point. For \(1/x\) on \((0,1)\) the pairs of Example 5.6 converge to \(0\) , which is not in the domain, and the argument stops there.
Compactness is sufficient, not necessary: the square root on \([0,\infty)\) and every Lipschitz function on \(\mathbb R\) are uniformly continuous on non-compact domains. For bounded intervals, though, there is an exact criterion.
Theorem 5.15 (uniform continuity and extension). (a) If \(f:X\to Y\) is uniformly continuous and \((x_n)\) is a Cauchy sequence in \(X\) , then \((f(x_n))\) is a Cauchy sequence in \(Y\) . (b) A function \(f:(a,b)\to\mathbb R\) on a bounded open interval is uniformly continuous if and only if it is the restriction to \((a,b)\) of a continuous function on \([a,b]\) .
Proof. (a) Given \(\varepsilon>0\) take \(\delta\) from Definition 5.11, and then \(N\) with \(d(x_n,x_m)<\delta\) for \(m,n\ge N\) . For such \(m,n\) , \(d(f(x_n),f(x_m))<\varepsilon\) .
(b) If \(f\) extends to a continuous function on the compact interval \([a,b]\) , the extension is uniformly continuous by Theorem 5.14, and so is its restriction. Conversely, let \(f\) be uniformly continuous on \((a,b)\) . The points \(x_n=a+(b-a)/(n+1)\) lie in \((a,b)\) and converge to \(a\) , so they form a Cauchy sequence; by (a) and the completeness of \(\mathbb R\) , \(f(x_n)\) converges to some number \(A\) . Define \(F(a)=A\) . To see that \(F\) is continuous at \(a\) , let \(\varepsilon>0\) and take \(\delta\) from uniform continuity for the tolerance \(\varepsilon/2\) . If \(a<x<a+\delta\) , then for all large \(n\) also \(a<x_n<a+\delta\) , so \(\lvert x-x_n\rvert<\delta\) and \(\lvert f(x)-f(x_n)\rvert<\varepsilon/2\) ; letting \(n\to\infty\) gives \(\lvert f(x)-A\rvert\le\varepsilon/2<\varepsilon\) . The endpoint \(b\) is treated in the same way, and \(F=f\) on \((a,b)\) .
Part (b) makes many questions easy. The function \(\sin(1/x)\) on \((0,1)\) is continuous and bounded, but it takes the values \(0\) and \(1\) at points arbitrarily near \(0\) , so it has no limit at \(0\) , no continuous extension, and is not uniformly continuous. The function \(x\sin(1/x)\) on \((0,1)\) extends continuously by the value \(0\) at \(0\) , since \(\lvert x\sin(1/x)\rvert\le\lvert x\rvert\) , so it is uniformly continuous. And part (a) fails for merely continuous functions: \(1/x\) sends the Cauchy sequence \((1/(n+1))\) in \((0,1)\) to the unbounded sequence \((n+1)\) .
Uniform continuity is the hinge of the next two chapters. In Chapter 7 it is what makes every continuous function on \([a,b]\) integrable: one \(\delta\) controls the oscillation of \(f\) on every piece of a fine partition simultaneously. In Chapter 8 the same shift, from “for each point there is” to “there is one for all points”, applied to sequences of functions, separates uniform from pointwise convergence.
Exercises
-
Prove from Definition 5.1 that \(f(x)=1/x\) is continuous at \(a=2\) , by exhibiting a \(\delta\) for each \(\varepsilon\) . State the \(\delta\) your proof gives for \(\varepsilon=0.05\) .
Solution
Scratch work. For \(x\ne 0\) ,
\[ \Bigl\lvert\frac1x-\frac12\Bigr\rvert=\frac{\lvert x-2\rvert}{2\lvert x\rvert}. \]The factor \(1/(2\lvert x\rvert)\) must be bounded. If \(\lvert x-2\rvert<1\) then \(x>1\) , so \(1/(2\lvert x\rvert)<1/2\) .
Proof. Let \(\varepsilon>0\) and put \(\delta=\min\{1,\ 2\varepsilon\}\) . If \(\lvert x-2\rvert<\delta\) , then \(x>1\) and \(\lvert x-2\rvert<2\varepsilon\) , so
\[ \Bigl\lvert\frac1x-\frac12\Bigr\rvert\le\frac{\lvert x-2\rvert}{2}<\varepsilon . \]Hence \(f\) is continuous at \(2\) .
For \(\varepsilon=0.05\) the proof gives \(\delta=\min\{1,\ 0.1\}=0.1\) . As a check, on the interval \(1.9<x<2.1\) the largest deviation of \(1/x\) from \(1/2\) is approached at \(x=1.9\) and equals \(1/1.9-1/2\approx 0.0263\) , comfortably below \(0.05\) ; the proof’s \(\delta\) is safe but not optimal.
-
Write out the negation of “\(f\) is continuous at \(a\) ”. Use it, and separately use Theorem 5.2, to show that the function equal to \(1\) for \(x>0\) , to \(-1\) for \(x<0\) , and to \(0\) at \(x=0\) is discontinuous at \(0\) .
Answer
Negation: there is an \(\varepsilon_0>0\) such that for every \(\delta>0\) there is an \(x\) with \(d(x,a)<\delta\) and \(d(f(x),f(a))\ge\varepsilon_0\) . For the sign function at \(0\) take \(\varepsilon_0=1\) : for any \(\delta\) the point \(x=\delta/2\) has \(\lvert x\rvert<\delta\) and \(\lvert f(x)-f(0)\rvert=1\) . By sequences: \(x_n=1/n\to 0\) but \(f(x_n)=1\) does not converge to \(f(0)=0\) .
-
Let \(f:X\to\mathbb R\) be continuous at \(a\) with \(f(a)>0\) . Prove that there is a \(\delta>0\) such that \(f(x)>f(a)/2\) for all \(x\) with \(d(x,a)<\delta\) .
Hint
Apply the definition of continuity at \(a\) with \(\varepsilon=f(a)/2\) , and unpack \(\lvert f(x)-f(a)\rvert<f(a)/2\) .
-
Let \(f,g:X\to\mathbb R\) be continuous. Prove that \(\lvert f\rvert\) and \(\max\{f,g\}\) are continuous, using the identity \(\max\{u,v\}=\tfrac12(u+v+\lvert u-v\rvert)\) .
Hint
The function \(t\mapsto\lvert t\rvert\) is continuous on \(\mathbb R\) by the second inequality of Proposition 1.4 (take \(\delta=\varepsilon\) ), so \(\lvert f\rvert\) is a composition of continuous functions. Then apply Corollary 5.3 to the identity with \(u=f(x)\) , \(v=g(x)\) .
-
Let \(f,g:\mathbb R\to\mathbb R\) be continuous with \(f(q)=g(q)\) for every rational \(q\) . Prove that \(f=g\) . Deduce that a continuous function satisfying \(f(x+y)=f(x)+f(y)\) for all real \(x,y\) has the form \(f(x)=cx\) .
Solution
Agreement on a dense set. Let \(x\in\mathbb R\) . By the density of the rationals, for each \(n\) there is a rational \(q_n\) with \(x-1/n<q_n<x+1/n\) , so \(q_n\to x\) . By Theorem 5.2, \(f(q_n)\to f(x)\) and \(g(q_n)\to g(x)\) . But \(f(q_n)=g(q_n)\) for every \(n\) , and limits are unique, so \(f(x)=g(x)\) .
Additive functions. Let \(f\) be continuous with \(f(x+y)=f(x)+f(y)\) , and put \(c=f(1)\) . From \(f(0)=f(0)+f(0)\) we get \(f(0)=0\) , and then \(f(-x)=-f(x)\) . By induction \(f(nx)=nf(x)\) for \(n\in\mathbb N\) , and with the previous remark for all integers \(n\) . For a rational \(p/q\) with \(q\in\mathbb N\) ,
\[ q\,f(p/q)=f(p)=p\,f(1)=pc,\qquad\text{so}\qquad f(p/q)=c\cdot\frac pq . \]Thus \(f\) and the continuous function \(x\mapsto cx\) agree at every rational. By the first part they agree everywhere: \(f(x)=cx\) .
Continuity was used only in the last step, and it cannot be dropped: without it, additive functions that are not of this form exist, though exhibiting one requires tools outside this book.
-
For Thomae’s function \(T\) and the point \(a=1/\sqrt2\) , find the largest \(\delta\) such that \(T(x)<1/5\) for all \(x\) with \(\lvert x-a\rvert<\delta\) , giving both its exact value and a decimal approximation.
Answer
\(T(x)<1/5\) holds exactly when \(x\) is irrational or is a rational whose denominator in lowest terms is at least \(6\) . So the largest \(\delta\) is the distance from \(a\) to the nearest rational with denominator at most \(5\) . The candidates near \(a\approx 0.70711\) are \(2/3\) (distance \(\approx 0.04044\) ) and \(3/4\) (distance \(\approx 0.04289\) ). Hence \(\delta=1/\sqrt2-2/3\approx 0.0404\) .
-
Let \(f:\mathbb R\to\mathbb R\) be continuous. Prove that \(\{x:f(x)>0\}\) is open and \(\{x:f(x)=0\}\) is closed. Give an example of a continuous \(f\) and an open set \(U\) with \(f(U)\) not open, and of a closed set \(F\) with \(f(F)\) not closed.
Solution
Open. The set \(\{x:f(x)>0\}\) is the preimage \(f^{-1}\bigl((0,\infty)\bigr)\) . The interval \((0,\infty)\) is open in \(\mathbb R\) , so its preimage under the continuous function \(f\) is open by Theorem 5.4.
Closed. The set \(\{x:f(x)=0\}\) is \(f^{-1}(\{0\})\) . The complement of \(\{0\}\) is the open set \((-\infty,0)\cup(0,\infty)\) , whose preimage is open; and \(f^{-1}(\{0\})\) is the complement of that preimage. So it is closed. (Alternatively: if \(x_n\to x\) and \(f(x_n)=0\) for all \(n\) , then \(f(x)=\lim f(x_n)=0\) .)
Images. Take \(f(x)=x^2\) and \(U=(-1,1)\) . Then \(f(U)=[0,1)\) , which is not open because no ball about \(0\) lies in it. Take \(f(x)=1/(1+x^2)\) and \(F=\mathbb R\) , a closed set. Then \(f(F)=(0,1]\) : the value \(1\) is taken at \(0\) , every value in \((0,1)\) is taken by the Intermediate Value Theorem since \(f(x)\to 0\) as \(x\to\infty\) , and \(0\) is not taken. The set \((0,1]\) is not closed, since it lacks its limit point \(0\) .
Continuity controls preimages, not images. The image of a compact set is compact, which is why the second example needed an unbounded closed set.
-
Let \(K\) be a nonempty compact metric space and \(f:K\to\mathbb R\) continuous with \(f(x)>0\) for every \(x\in K\) . Prove that there is a constant \(c>0\) with \(f(x)\ge c\) for all \(x\in K\) . Show that this can fail on the non-compact domain \((0,1)\) .
Solution
By the Extreme Value Theorem (Theorem 5.6) there is a point \(x_{\min}\in K\) with \(f(x_{\min})\le f(x)\) for all \(x\in K\) . Put \(c=f(x_{\min})\) . By hypothesis \(f\) is positive at every point of \(K\) , in particular at \(x_{\min}\) , so \(c>0\) , and \(f(x)\ge c\) for all \(x\in K\) .
The point of the exercise is the difference between “\(f(x)>0\) for every \(x\) ”, which allows \(\inf f=0\) , and “\(f\ge c>0\) ”, which does not. Compactness upgrades the first to the second because the infimum is attained, and an attained infimum of positive values is positive.
On \((0,1)\) the function \(f(x)=x\) is continuous and positive, but \(\inf f=0\) , so no constant \(c>0\) satisfies \(f\ge c\) : for any \(c>0\) the point \(x=\min\{c,1\}/2\) has \(f(x)<c\) .
-
Give an example of a bounded continuous function on \((0,1)\) that attains neither its supremum nor its infimum, and of a bounded continuous function on \([0,\infty)\) with the same property. Say which hypothesis of the Extreme Value Theorem fails in each.
Answer
On \((0,1)\) : \(f(x)=x\) , with supremum \(1\) and infimum \(0\) , neither attained; the domain is not closed. On \([0,\infty)\) : \(f(x)=\dfrac{x}{1+x}\sin x\) . Since \(0\le x/(1+x)<1\) and \(\lvert\sin x\rvert\le 1\) , we have \(\lvert f(x)\rvert<1\) for all \(x\) , while \(f(\pi/2+2\pi k)\to 1\) and \(f(3\pi/2+2\pi k)\to-1\) . So \(\sup f=1\) and \(\inf f=-1\) , neither attained; the domain is not bounded.
-
Prove that every polynomial of odd degree with real coefficients has at least one real zero.
Solution
Let \(p(x)=a_nx^n+a_{n-1}x^{n-1}+\cdots+a_0\) with \(n\) odd and \(a_n\ne 0\) . Replacing \(p\) by \(-p\) does not change the zeros, so assume \(a_n>0\) . For \(x\ne 0\) write
\[ p(x)=x^n\Bigl(a_n+\frac{a_{n-1}}{x}+\cdots+\frac{a_0}{x^n}\Bigr). \]Let \(A=\lvert a_0\rvert+\cdots+\lvert a_{n-1}\rvert\) and \(R=\max\{1,\ 2A/a_n\}\) . If \(\lvert x\rvert\ge R\) , then \(\lvert x\rvert^k\ge\lvert x\rvert\) for \(k\ge 1\) , so
\[ \Bigl\lvert\frac{a_{n-1}}{x}+\cdots+\frac{a_0}{x^n}\Bigr\rvert\le\frac{A}{\lvert x\rvert}\le\frac{A}{R}\le\frac{a_n}{2}, \]and the bracket is at least \(a_n/2>0\) . Therefore \(p(R)\ge R^n\,a_n/2>0\) , and since \(n\) is odd, \((-R)^n<0\) and \(p(-R)\le-R^n\,a_n/2<0\) .
A polynomial is continuous. By the Intermediate Value Theorem applied on \([-R,R]\) with the value \(0\) , there is \(c\in(-R,R)\) with \(p(c)=0\) .
For even degree the argument fails at the last step, because \((-R)^n\) is then positive; \(x^2+1\) has no real zero.
-
Let \(f:[0,2]\to\mathbb R\) be continuous with \(f(0)=f(2)\) . Prove that there is a point \(x\in[0,1]\) with \(f(x)=f(x+1)\) .
Solution
Define \(g:[0,1]\to\mathbb R\) by \(g(x)=f(x+1)-f(x)\) . It is continuous, as a difference of compositions of continuous functions. Using \(f(2)=f(0)\) ,
\[ g(0)+g(1)=\bigl(f(1)-f(0)\bigr)+\bigl(f(2)-f(1)\bigr)=f(2)-f(0)=0 . \]So \(g(1)=-g(0)\) . If \(g(0)=0\) , then \(x=0\) satisfies \(f(x)=f(x+1)\) . Otherwise \(g(0)\) and \(g(1)\) are nonzero with opposite signs, so \(0\) lies strictly between them, and by the Intermediate Value Theorem there is \(c\in(0,1)\) with \(g(c)=0\) , that is, \(f(c)=f(c+1)\) .
In words: on any closed loop of temperature readings of length \(2\) , some two points one unit apart have the same reading. The trick of introducing the auxiliary function \(g\) , whose zero is the thing sought, is the standard way to apply the theorem.
-
The equation \(x^3-2x-5=0\) has a root in \([2,3]\) . Justify this, carry out four steps of bisection, state the interval obtained, and determine how many steps are needed to reach an interval of length less than \(10^{-3}\) .
Solution
Let \(p(x)=x^3-2x-5\) . It is continuous, \(p(2)=8-4-5=-1<0\) , and \(p(3)=27-6-5=16>0\) . By the Intermediate Value Theorem there is a root in \((2,3)\) .
Bisection. Midpoint \(2.5\) : \(p(2.5)=5.625>0\) , so the root is in \([2,2.5]\) . Midpoint \(2.25\) : \(p(2.25)=1.890625>0\) , so \([2,2.25]\) . Midpoint \(2.125\) : \(p(2.125)\approx 0.345703>0\) , so \([2,2.125]\) . Midpoint \(2.0625\) : \(p(2.0625)\approx-0.351318<0\) , so the root is in
\[ [2.0625,\ 2.125], \]an interval of length \(1/16\) .
Number of steps. Each step halves the length, so after \(n\) steps the length is \(2^{-n}\) . We need \(2^{-n}<10^{-3}\) , that is \(2^n>1000\) . Since \(2^9=512\) and \(2^{10}=1024\) , ten steps are needed.
(The root is approximately \(2.094551\) .)
-
Find the error: “Let \(f(x)=1/x\) . Then \(f(-1)=-1<0<1=f(1)\) , so by the Intermediate Value Theorem there is \(c\in(-1,1)\) with \(f(c)=0\) .”
Answer
The Intermediate Value Theorem requires \(f\) to be continuous on the whole closed interval \([-1,1]\) . The function \(1/x\) is not defined at \(0\) , so it is not a function on \([-1,1]\) at all, and no assignment of a value at \(0\) makes it continuous there. The hypothesis fails and so does the conclusion: \(1/x\) has no zero.
-
Prove that \(f(x)=1/(1+x^2)\) is Lipschitz on \(\mathbb R\) with constant \(1\) , and hence uniformly continuous on \(\mathbb R\) .
Solution
For real \(x,y\) ,
\[ f(x)-f(y)=\frac{1}{1+x^2}-\frac{1}{1+y^2}=\frac{(y-x)(y+x)}{(1+x^2)(1+y^2)}. \]Hence, using \(\lvert x+y\rvert\le\lvert x\rvert+\lvert y\rvert\) and \(1+t^2\ge 1\) ,
\[ \lvert f(x)-f(y)\rvert\le\lvert x-y\rvert\Bigl(\frac{\lvert x\rvert}{(1+x^2)(1+y^2)}+\frac{\lvert y\rvert}{(1+x^2)(1+y^2)}\Bigr)\le\lvert x-y\rvert\Bigl(\frac{\lvert x\rvert}{1+x^2}+\frac{\lvert y\rvert}{1+y^2}\Bigr). \]For every real \(t\) , \((\lvert t\rvert-1)^2\ge 0\) gives \(2\lvert t\rvert\le 1+t^2\) , that is, \(\lvert t\rvert/(1+t^2)\le\tfrac12\) . So the bracket is at most \(\tfrac12+\tfrac12=1\) , and
\[ \lvert f(x)-f(y)\rvert\le\lvert x-y\rvert\qquad\text{for all }x,y\in\mathbb R . \]Thus \(f\) is Lipschitz with constant \(1\) , and given \(\varepsilon>0\) the choice \(\delta=\varepsilon\) shows uniform continuity on all of \(\mathbb R\) . Here the domain is not compact; the Lipschitz bound does the work that compactness does in the Heine–Cantor theorem.
-
Prove that \(f(x)=\sin(1/x)\) is not uniformly continuous on \((0,1)\) by exhibiting sequences as in Proposition 5.12.
Solution
Let
\[ x_n=\frac{1}{2\pi n},\qquad y_n=\frac{1}{2\pi n+\pi/2}\qquad(n\in\mathbb N). \]Both lie in \((0,1)\) . Their distance is
\[ x_n-y_n=\frac{\pi/2}{2\pi n\,(2\pi n+\pi/2)}<\frac{1}{2\pi n}\to 0 . \]But \(f(x_n)=\sin(2\pi n)=0\) and \(f(y_n)=\sin(2\pi n+\pi/2)=1\) , so \(\lvert f(x_n)-f(y_n)\rvert=1\) for every \(n\) . By Proposition 5.12 with \(\varepsilon_0=1\) , \(f\) is not uniformly continuous on \((0,1)\) .
Numerically, for \(n=10\) the two points are about \(0.015915\) and \(0.015527\) , less than \(0.0004\) apart, and the function values differ by \(1\) .
The same pair of sequences shows that \(f\) has no limit at \(0\) , which by Theorem 5.15(b) is another way to reach the conclusion.
-
Let \(f\) and \(g\) be bounded and uniformly continuous real functions on a metric space. Prove that \(fg\) is uniformly continuous. Show by example that boundedness cannot be dropped.
Hint
With \(\lvert f\rvert,\lvert g\rvert\le M\) , write \(f(x)g(x)-f(y)g(y)=f(x)\bigl(g(x)-g(y)\bigr)+g(y)\bigl(f(x)-f(y)\bigr)\) and choose \(\delta\) so that both differences are below \(\varepsilon/(2M)\) . For the example take \(f(x)=g(x)=x\) on \(\mathbb R\) and quote Example 5.5.
-
Give a proof of the Heine–Cantor theorem that uses open covers: for each \(a\in K\) choose \(\delta_a\) for the tolerance \(\varepsilon/2\) , cover \(K\) by the balls \(B(a,\delta_a/2)\) , and extract a finite subcover.
Hint
Let \(B(a_1,\delta_{a_1}/2),\dots,B(a_m,\delta_{a_m}/2)\) be a finite subcover and \(\delta=\tfrac12\min_i\delta_{a_i}\) . If \(d(x,y)<\delta\) , pick \(i\) with \(x\in B(a_i,\delta_{a_i}/2)\) ; then \(d(y,a_i)<\delta_{a_i}\) , so both \(f(x)\) and \(f(y)\) are within \(\varepsilon/2\) of \(f(a_i)\) .
-
Let \(D\subseteq\mathbb R\) be bounded and \(f:D\to\mathbb R\) uniformly continuous. Prove that \(f\) is bounded. Show that the conclusion fails for a function that is merely continuous on a bounded set.
Solution
Take \(\varepsilon=1\) in the definition of uniform continuity: there is \(\delta>0\) such that \(\lvert f(x)-f(y)\rvert<1\) whenever \(x,y\in D\) and \(\lvert x-y\rvert<\delta\) .
Since \(D\) is bounded, \(D\subseteq[-M,M]\) for some \(M>0\) . Choose \(N\in\mathbb N\) with \(2M/N<\delta\) and divide \([-M,M]\) into \(N\) closed subintervals \(I_1,\dots,I_N\) of length \(2M/N\) . For each \(j\) such that \(I_j\) meets \(D\) , choose one point \(p_j\in D\cap I_j\) . There are at most \(N\) such points; let \(C\) be the largest of the numbers \(\lvert f(p_j)\rvert\) .
Now let \(x\in D\) . It lies in some \(I_j\) , which therefore meets \(D\) , and \(\lvert x-p_j\rvert\le 2M/N<\delta\) . Hence \(\lvert f(x)-f(p_j)\rvert<1\) and
\[ \lvert f(x)\rvert<\lvert f(p_j)\rvert+1\le C+1 . \]So \(f\) is bounded by \(C+1\) on \(D\) .
For merely continuous functions the conclusion fails: \(1/x\) is continuous and unbounded on the bounded set \((0,1)\) . Equivalently, this exercise gives a second proof that \(1/x\) is not uniformly continuous there.
-
Decide which of the following functions are uniformly continuous on \((0,1)\) , with reasons: (a) \(x\sin(1/x)\) ; (b) \(\sin(1/x)\) ; (c) \((x^2-1)/(x-1)\) ; (d) \(\log x\) .
Answer
(a) Yes: it extends continuously to \([0,1]\) with value \(0\) at \(0\) and \(\sin 1\) at \(1\) ; apply Theorem 5.15(b). (b) No: it has no limit at \(0\) . (c) Yes: on \((0,1)\) it equals \(x+1\) , which extends continuously. (d) No: \(\log x\) is unbounded on \((0,1)\) , and a uniformly continuous function on a bounded set is bounded (Exercise 18).
-
Let \(f:X\to Y\) be continuous on a metric space \(X\) and let \(K\subseteq X\) be compact. Give a proof that \(f(K)\) is compact using open covers and Theorem 5.4, as an alternative to the sequential proof of Theorem 5.5.
Solution
Let \(\mathcal V\) be a collection of open subsets of \(Y\) whose union contains \(f(K)\) . For each \(V\in\mathcal V\) the preimage \(f^{-1}(V)\) is open in \(X\) by Theorem 5.4, because \(f\) is continuous on \(X\) .
These preimages cover \(K\) : if \(x\in K\) , then \(f(x)\in f(K)\) lies in some \(V\in\mathcal V\) , so \(x\in f^{-1}(V)\) . Since \(K\) is compact, finitely many of them cover \(K\) , say \(f^{-1}(V_1),\dots,f^{-1}(V_m)\) .
Then \(V_1,\dots,V_m\) cover \(f(K)\) : a point \(y\in f(K)\) has the form \(y=f(x)\) with \(x\in K\) ; \(x\) lies in some \(f^{-1}(V_i)\) , and so \(y=f(x)\in V_i\) . Thus every open cover of \(f(K)\) has a finite subcover, and \(f(K)\) is compact.
Compare the two proofs. The sequential proof pulls a sequence back to \(K\) , extracts a subsequence, and pushes it forward. This proof pulls a cover back to \(K\) , extracts a finite subcover, and pushes it forward. Both use continuity exactly once, in the form suited to the description of compactness being used.
-
Let \(f:[a,b]\to\mathbb R\) be increasing. Prove that at each interior point \(c\) the one-sided limits exist, with \(\lim_{x\to c^-}f(x)=\sup\{f(x):x<c\}\) and \(\lim_{x\to c^+}f(x)=\inf\{f(x):x>c\}\) , and that \(f\) has at most countably many discontinuities.
Hint
For the left limit let \(s=\sup\{f(x):x<c\}\) , which is at most \(f(c)\) . Given \(\varepsilon\) , some \(x_0<c\) has \(f(x_0)>s-\varepsilon\) , and monotonicity gives \(s-\varepsilon<f(x)\le s\) for \(x_0<x<c\) . At a discontinuity the open interval between the left and right limits is nonempty; these intervals are disjoint for different points, and each contains a rational number.
-
Let \(f:[0,\infty)\to\mathbb R\) be continuous and suppose \(\lim_{x\to\infty}f(x)\) exists and is finite. Prove that \(f\) is uniformly continuous.
Hint
Let \(L\) be the limit and \(\varepsilon>0\) . Choose \(R\) with \(\lvert f(x)-L\rvert<\varepsilon/2\) for \(x\ge R\) . On the compact interval \([0,R+1]\) the Heine–Cantor theorem gives a \(\delta\) , which you may take to be at most \(1\) . If \(\lvert x-y\rvert<\delta\) , then either both points lie in \([0,R+1]\) or both are at least \(R\) .