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: Prove using the definition of continuity that the function f:[0,∞)→R defined by f(x)=x is continuous at every point p∈[0,∞).
Proof. Suppose ϵ>0. Let δ=ϵ2. If ∣p−q∣<δ, then ∣f(p)−f(q)∣2≤∣p−q∣∣p+q∣=∣p−q∣<ϵ2, i.e., ∣f(p)−f(q)∣<ϵ.
Exercise: Consider the function f:R→R defined by
f(x)={1/2k0if ∣x∣∈[1/2k,1/2k−1), for some k∈Z,if x=0
Prove that f is continuous at x=0.
Proof. Let g(x)=0 and h(x)=∣x∣. Since g(x)≤f(x)≤h(x) and g(0)=f(0)=h(0), by problem 5 and the continuity of g(x) and h(x), we know that f is continuous at $$.
Exercise: Suppose f:R→R satisfies limh→0[f(x+h)−f(x−h)]=0 for every x∈R. Does this imply f is continuous? Give a proof or a counterexample.
Proof. Suppose f(x)=0 for all x∈R but $$, and f(0)=1. Then f satisfies the requirement, but fails to be continuous.
Exercise: Suppose (X,d) is a metric space and f,g:X→R. State whether the following statements are true or false. If the statement is true, prove it. If it is false, give a counterexample.
If f is continuous on X, then ∣f∣ is continuous on X, where ∣f∣(x)=∣f(x)∣ for all x∈X.
If |f| is continuous at p∈X, then f is continuous at p.
Define h:X→R by h(x)=max{f(x),g(x)} for all x∈X. If f and g are continuous at p∈X, then h is continuous at p.
If f is continuous at p∈X, and if f(p)>M for some M∈R, then there is a neighborhood N of p in X, such that f(x)>M for all x∈N.
Suppose d is the discrete metric on X. Then every map f:X→R is continuous on X.
Proof.
Since |f| is really the composition of two continuous functions, i.e., the function f followed by the absolute value function, so it’s continuous.
Suppose X=R and f(x)=1 if x≥0, otherwise f(x)=−1. Then ∣f∣ is a constant function, which is continuous, but f itself fails to be continuous at x=0.
As h(x)=max{f(x),g(x)}=(f(x)+g(x)−∣f(x)−g(x)∣)/2, h is continuos.
Consider the pre-image of (M,∞]. Since its an open set containing f(p), by the continuity of f at p, the pre-image is a neighborhood of p. Let N=f−1(M,∞]. It works.
Choose your favorite map f:X→R. Whatever x∈X and ϵ>0 are, always pick δ=1. If ∣x−x′∣<δ=1, then x=x′, hence f(x)−f(x′)=0<ϵ.
Exercise: Suppose f,g and h are functions from R to R satisfying g(x)≤h(x)≤f(x) for all x∈R. Further, suppose f and g are continuous at x=a and f(a)=g(a). Then, prove that h is continuous at x=a.
Proof. Let b=f(a)=g(a)=h(a). As f and g are continuous at x=a, for every ϵ>0, there are δ1>0 and δ2>0, such that if ∣x−a∣<δ1, then ∣f(x)−b∣<ϵ, and if ∣x−a∣<δ2, then ∣g(x)−b∣<ϵ. Let δ be the minimum of δ1 and δ2. If ∣x−a∣<δ, then h(x)−b≤f(x)−b<ϵ and b−h(x)≤b−g(x)<ϵ. This finishes the proof of the continuity at a.