If not stated otherwise, we assume that the metric spaces R and Q are quipped with the Euclidean metric d(x,y)=∣x−y∣.
Exercise: If K⊂R and f:K→R is continuous. Show that either f(x)=0 for some x∈K or there exists n∈N such that ∣f(x)∣>1/n for all x∈K.
Proof. Since f is continuos and K is compact, f(K) is a compact subset of R, hence is closed. If 0∈/f(K), then there exists n∈N such that [−1/n,1/n]∩f(K)=∅, which gives us that ∣f(x)∣>1/n for all x∈K.
Exercise: Let I=[0,1] be the closed unit interval. Suppose f is a continuous mapping from I to I. Prove that there exists at least one x∈I such that f(x)=x. Hint: Consider the function g(x)=f(x)−x.
Proof. Since g(0)=f(0)−0≥0 and g(1)=f(1)−1≤0, by the intermediate value theorem, there exists at least one x∈I such that g(x)=0, i.e., f(x)=x.
Exercise: Give an example (with proof) of two real-valued functions f and g which are uniformly continuous, but whose product f⋅g is not uniformly continuous.
Proof. (An example without proof) Let f(x)=g(x)=x for all x∈R.
Exercise: Let f:E→R be a uniformly continuous function on the open interval E=(a,b)⊂R. Show that f can be extended to a uniformly continuos function on the closed interval [a,b]. More precisely, show that there is a uniformly continuous function g:[a,b]→Rsuch that f(x)=g(x) for all x∈(a,b). Hint: show first that limx→af(x) and limx→bf(x) exist.
Proof. (Sketch) Following the hint, we first prove that the limits exist.
Claim: For any sequence {an} that converges to a, the sequence {f(an)} is actually a Cauchy sequence in {R}, thus converges.
Proof of claim: to show that {f(an)} is a Cauchy sequence, it’s sufficient to show that for every ϵ>0, there is N such that if m,n≥N then ∣f(am)−f(an)∣<ϵ. Pick your favorite ϵ first. As f is uniformly continuous, there is δ>0 such that for any x,y∈(a,b) if ∣x−y∣δ, ∣f(x)−f(y)∣<ϵ. As {an} converges to a, there is N such that for all n≥N, ∣an−a∣<δ/2. Thus for any m,n≥N, ∣am−an∣≤∣am−a∣+∣an−a∣<δ, whence ∣f(am)−f(an)∣<ϵ.
Now, we’ve shown that for every sequence {an} that converges to a, the sequence {f(an)} converges. But how do you know for two different sequences {an} and {bn} that converge to a, {f(an)} and {f(bn)} have the same limit?
There is a slick way to resolve this. We can mingle {an} and {bn} together. Specifically, consider a new sequence {a1,b1,a2,b2,…}, denoted as cn. Now cn converges to a, so {f(cn)} converges. Meanwhile, we know that {f(an)} and {f(bn)} are two subsequences of {f(cn)}, so they share the same limit.
Now we can extend f to g by feeding in the limits at a and b. Since g is a continuous function on a closed interval [a,b], its uniformly continuity follows immediately.
Exercise: Let a<b be real numbers. A function f:(a,b)→R is said to be convex if
f(λx+(1−λ)y)≤f(x)+(1−λ)f(y) for all x,y∈(a,b) and all λ∈(0,1).
Prove that every convex function is continuos. Hint: prove first that if a<s<t<u<b, then
t−sf(t)−f(s)≤u−sf(u)−f(s)≤u−tf(u)−f(t)
Proof. First, we prove the first inequality in the hint. Notice that
t−sf(t)−f(s)≤u−sf(u)−f(s)
is equivalent to
f(t)≤u−st−sf(u)+u−su−tf(s).
But notice that if we take x=u, y=s and λ=u−st−s and plug them into the convexity inequality, the above inequality holds immediately. Similarly, we can prove the second inequality in the hint.
For a<x<y<b, let k(x,y)=x−yf(x)−f(y). By the inequality chain in the hint, we know that if a<s<t<u<b, k(s,t)≤k(s,u)≤k(t,u). Now for any x∈(a,b) and ϵ>0, pick δ∈(0,ϵ) such that a<x−δ<x+δ<b and x1∈(a,x−δ),x2∈(x+δ,b). For any y∈(x−δ,x+δ), by the chain inequality in the hint, k(x,y) is bounded below by k(x1,x) and is bounded above k(x,x2). Thus there is B such that ∣k(x,y)∣<B for all y∈(x−δ,x+δ). Whence, for all y∈(x−δ/B,x+δ/B), ∣f(x)−f(y)∣<B∣x−y∣<δ<epsilon. This shows that f is continuous.