5.4: Continuous Functions
( \newcommand{\kernel}{\mathrm{null}\,}\)
5.4.1 Continuity at a Point
Suppose D⊂R,f:D→R, and a∈D. We say f is continuous at a if either a is an isolated point of D or limx→af(x)=f(a). If f is not continuous at a, we say f is discontinuous at a, or that f has a discontinuity at a.
Define f:R→R by
f(x)={1, if x is rational, 0, if x is irrational.
Then, by Example 5.1.5,f is discontinuous at every x∈R.
Define f:R→R by
f(x)={x, if x is rational, 0, if x is irrational.
Then, by Example 5.1 .6 and Exercise 5.1.10,f is continuous at 0, but discontinuous at every x≠0.
If D⊂R,α∈R,f:D→R, and g:D→R, then we define αf:D→R by
(αf)(x)=αf(x),
f+g:D→Rby
(f+g)(x)=f(x)+g(x),
and fg:D→R by
(fg)(x)=f(x)g(x).
Moreover, if g(x)≠0 for all x∈D, we define fg:D→R by
(fg)(x)=f(x)g(x).
Suppose D⊂R,α∈R,f:D→R, and g:D→R. If f and g are continuous at a, then αf,f+g, and fg are all continuous at a. Moreover, if g(x)≠0 for all x∈D, then fg is continuous at a.
Prove the previous proposition.
Suppose D⊂R,f:D→R,f(x)≥0 for all x∈D, and f is continuous at a∈D. If g:D→R is defined by g(x)=√f(x), then g is continuous at a.
Prove the previous proposition.
Suppose D⊂R,f:D→R, and a∈D. Then f is continuous at a if and only if for every ϵ>0 there exists δ>0 such that
|f(x)−f(a)|<ϵ whenever x∈(a−δ,a+δ)∩D.
- Proof
-
Suppose f is continuous at a. If a is an isolated point of D, then there exists a δ>0 such that
(a−δ,a+δ)∩D={a}.
Then for any ϵ>0, if x∈(a−δ,a+δ)∩D, then x=a, and so
|f(x)−f(a)|=|f(a)−f(a)|=0<ϵ.
If a is a limit point of D, then limx→af(x)=f(a) implies that for any ϵ>0 there exists δ>0 such that
|f(x)−f(a)|<ϵ whenever x∈(a−δ,a+δ)∩D.
Now suppose that for every ϵ>0 there exists δ>0 such that
|f(x)−f(a)|<ϵ whenever x∈(a−δ,a+δ)∩D.
If a is an isolated point, then f is continuous at a. If a is a limit point, then this condition implies limx→af(x)=f(a), and so f is continuous at a. Q.E.D.
From the preceding, it should be clear that a function f:D→R is continuous at a point a of D if and only if for every sequence {xn}n∈I with xn∈D for every n∈I and limn→∞xn=a,limn→∞f(xn)=f(a).
Show that if f:D→R is continuous at a∈D and f(a)>0, then there exists an open interval I such that a∈I and f(x)>0 for every x∈I∩D.
Suppose D⊂R,E⊂R,g:D→R,f:E→R,g(D)⊂E and a∈D. If g is continuous at a and f is continuous at g(a), then f∘g is continuous at a.
- Proof
-
Let {xn}n∈I be a sequence with xn∈D for every n∈I and limn→∞xn=a. Then, since g is continuous at a,{g(xn)}n∈I is a sequence with g(xn)∈E for every n∈I and limn→∞g(xn)=g(a). Hence, since f is continuous at g(a), limn→∞f(g(xn))=f(g(a)). That is,
limn→∞(f∘g)(xn)=(f∘g)(a).
Hence f∘g is continuous at a.
Let D⊂R,f:D→R, and a∈D. If f is not continuous at a but both f(a−) and f(a+) exist, then we say f has a simple discontinuity at a.
Suppose f is monotonic on the interval (a,b). Then every discontinuity of f in (a,b) is a simple discontinuity. Moreover, if E is the set of points in (a,b) at which f is discontinuous, then either E=∅,E is finite, or E is countable.
- Proof
-
The first statement follows immediately from Proposition 5.2.1. For the second statement, suppose f is nondecreasing and suppose E is nonempty. From Exercise 2.1 .26 and the the proof of Proposition 5.2.1, it follows that for every x∈(a,b),
f(x−)≤f(x)≤f(x+).
Hence x∈E if and only if f(x−)<f(x+). Hence for every x∈E, we may choose a rational number rx such that f(x−)<rx<f(x+). Now if x,y∈E with x<y, then, by Proposition 5.2.2,
rx<f(x+)≤f(y−)<ry,
so rx≠ry. Thus we have a one-to-one correspondence between E and a subset of Q, and so E is either finite or countable. A similar argument holds if f is nonincreasing. Q.E.D.
Define f:R→R by
f(x)={1q, if x is rational and x=pq,0, if x is irrational.
where p and q are taken to be relatively prime integers with q>0, and we take q=1 when x=0. Show that f is continuous at every irrational number and has a simple discontinuity at every rational number.
5.4.2 Continuity on a Set
Suppose D⊂R and f:D→R. We say f is continuous on D if f is continuous at every point a∈D.
If f is a polynomial, then f is continuous on R.
If D⊂R and f:D→R is a rational function, then f is continuous on D.
Explain why the function f(x)=√1−x2 is continuous on [−1,1].
Discuss the continuity of the function
f(x)={x+1, if x<0,4, if x=0,x2, if x>0.
If D⊂R,f:D→R, and E⊂R, we let
f−1(E)={x:f(x)∈E}.
Suppose D⊂R and f:D→R. Then f is continuous on D if and only if for every open set V⊂R,f−1(V)=U∩D for some open set U⊂R.
- Proof
-
Suppose f is continuous on D and V⊂R is an open set. If V∩f(D)=∅, then f−1(V)=∅, which is open. So suppose V∩f(D)≠∅ and let a∈f−1(V). Since V is open and f(a)∈V, there exists ϵa>0 such that
(f(a)−ϵa,f(a)+ϵa)⊂V.
Since f is continuous, there exists δa>0 such that
f((a−δa,a+δa)∩D)⊂(f(a)−ϵa,f(a)+ϵa)⊂V.
That is, (a−δa,a+δa)∩D⊂f−1(V). Let
U=⋃a∈f−1(V)(a−δa,a+δa).
Then U is open and f−1(V)=U∩D.
Now suppose that for every open set V⊂R,f−1(V)=U∩D for some open set U⊂R. Let a∈D and let ϵ>0 be given. Since (f(a)−ϵ,f(a)+ϵ) is open, there exists an open set U such that
U∩D=f−1((f(a)−ϵ,f(a)+ϵ)).
Since U is open and a∈U, there exists δ>0 such that (a−δ,a+δ)⊂U. But then
f((a−δ,a+δ)∩D)⊂(f(a)−ϵ,f(a)+ϵ).
That is, if x∈(a−δ,a+δ)∩D, then |f(x)−f(a)|<ϵ. Hence f is continuous at a. Q.E.D.
Let D⊂R and f:D→R. For any E⊂R, show that f−1(R∖E)=(R∖f−1(E))∩D.
Let A be a set and, for each α∈A, let Uα⊂R. Given D⊂R and a function f:D→R, show that
⋃α∈Af−1(Uα)=f−1(⋃α∈AUα)
and
⋂α∈Af−1(Uα)=f−1(⋂α∈AUα).
Suppose D⊂R and f:D→R. Show that f is continuous on D if and only if for every closed set C⊂R,f−1(C)=F∩D for some closed set F⊂R.
Let D⊂R. We say a function f:D→R is Lipschitz if there exists α∈R,α>0, such that |f(x)−f(y)|≤α|x−y| for all x,y∈D. Show that if f is Lipschitz, then f is continuous.
5.4.3 Intermediate Value Theorem
(Intermediate Value Theorem).
Suppose a,b∈R,a<b, and f:[a,b]→R. If f is continuous and s∈R is such that either f(a)≤s≤f(b) or f(b)≤s≤f(a), then there exists c∈[a,b] such that f(c)=s.
- Proof
-
Suppose f(a)<f(b) and f(a)<s<f(b). Let
c=sup{x:x∈[a,b],f(x)≤s}.
Suppose f(c)<s. Then c<b and, since f is continuous at c, there exists a δ>0 such that f(x)<s for all x∈(c,c+δ). But then f(c+δ2)<s, contradicting the definition of c. Similarly, if f(c)>s, then c>a and there exists δ>0 such that f(x)>s for all x∈(c−δ,c), again contradicting the definition of c. Hence we must have f(c)=s. Q.E.D.
Suppose a∈R,a>0, and consider f(x)=xn−a where n∈Z,n>1. Then f(0)=−a<0 and
f(1+a)=(1+a)n−a=1+na+n∑i=2(ni)ai−a=1+(n−1)a+n∑i=2(ni)ai>0,
where (ni) is the binomial coefficient
(ni)=n!i!(n−i)!.
Hence, by the Intermediate Value Theorem, there exists a real number γ>0 such that γn=a. Moreover, there is only one such γ since f is increasing on (0,+∞).
We call γ the n th root of a, and write
γ=n√a
or
γ=a1n.
Moreover, if a∈R,a<0,n∈Z+ is odd, and γ is the nth root of −a, then
(−γ)n=(−1)n(γ)n=(−1)(−a)=a.
That is, −γ is the n th root of a.
If n=pq∈Q with q∈Z+, then we define
xn=(q√x)p
for all real x≥0.
Explain why the equation x5+4x2−16=0 has a solution in the interval (0,2).
Give an example of a closed interval [a,b]⊂R and a function f:[a,b]→R which do not satisfy the conclusion of the Intermediate Value Theorem.
Show that if I⊂R is an interval and f:I→R is continuous, then f(I) is an interval.
Suppose f:(a,b)→R is continuous and strictly monotonic. Let (c,d)=f((a,b)). Show that f−1:(c,d)→(a,b) is strictly monotonic and continuous.
Let n∈Z+. Show that the function f(x)=n√x is continuous on (0,+∞).
Use the method of bisection to give another proof of the Intermediate Value Theorem.
5.4.4 Extreme Value Theorem
Suppose D⊂R is compact and f:D→R is continuous. Then f(D) is compact.
- Proof
-
Given a sequence {yn}n∈I in f(D), choose a sequence {xn}n∈I such that f(xn)=yn. Since D is compact, {xn}n∈I has a convergent subsequence {xnk}∞k=1 with
limk→∞xnk=x∈D.
Let y=f(x). Then y∈f(D) and, since f is continuous,
y=\lim _{k \rightarrow \infty} f\left(x_{n_{k}}\right)=\lim _{k \rightarrow \infty} y_{n_{k}}.
Hence f(D) is compact.
Prove the previous theorem using the open cover definition of a compact set.
(Extreme Value Theorem).
Suppose D \subset \mathbb{R} is compact and f: D \rightarrow \mathbb{R} is continuous. Then there exists a \in D such that f(a) \geq f(x) for all x \in D and there exists b \in D such that f(b) \leq f(x) for all x \in D . \quad Q.E.D.
As a consequence of the Extreme Value Theorem, a continuous function on a closed bounded interval attains both a maximum and a minimum value.
Find an example of a closed bounded interval [a, b] and a function f:[a, b] \rightarrow \mathbb{R} such that f attains neither a maximum nor a minimum value on [a, b] .
Find an example of a bounded interval I and a function f: I \rightarrow \mathbb{R} which is continuous on I such that f attains neither a maximum nor a minimum value on I .
Suppose K \subset \mathbb{R} is compact and a \notin K . Show that there exists b \in K such that |b-a| \leq|x-a| for all x \in K.
Suppose D \subset \mathbb{R} is compact, f: D \rightarrow \mathbb{R} is continuous and one-to-one, and E=f(D) . Then f^{-1}: E \rightarrow D is continuous.
- Proof
-
Let V \subset \mathbb{R} be an open set. We need to show that f(V \cap D)=U \cap E for some open set U \subset \mathbb{R}. Let C=D \cap(\mathbb{R} \backslash V) . Then C is a closed subset of D, and so is compact. Hence f(C) is a compact subset of E . Thus f(C) is closed, and so U=\mathbb{R} \backslash f(C) is open. Moreover, U \cap E=E \backslash f(C)=f(V \cap D) . Thus f^{-1} is continuous.
Suppose f:[0,1] \cup(2,3] \rightarrow[0,2] by
f(x)=\left\{\begin{array}{ll}{x,} & {\text { if } 0 \leq x \leq 1,} \\ {x-1,} & {\text { if } 2<x \leq 3.}\end{array}\right.
Show that f is continuous, one-to-one, and onto, but that f^{-1} is not continuous.
5.4.5 Uniform Continuity
Suppose D \subset \mathbb{R} and f: D \rightarrow \mathbb{R} . We say f is uniformly continuous on D if for every \epsilon>0 there exists \delta>0 such that for any x, y \in D,
|f(x)-f(y)|<\epsilon \text { whenever }|x-y|<\delta .
Suppose D \subset \mathbb{R} and f: D \rightarrow \mathbb{R} is Lipschitz (see Exercise 5.4 .10) . Show that f is uniformly continuous on D .
Clearly, if f is uniformly continuous on D then f is continuous on D . However, a continuous function need not be uniformly continuous.
Define f:(0,+\infty) by f(x)=\frac{1}{x}, Given any \delta>0, choose n \in \mathbb{Z}^{+} such that \frac{1}{n(n+1)}<\delta . Let x=\frac{1}{n} and y=\frac{1}{n+1} . Then
|x-y|=\frac{1}{n}-\frac{1}{n+1}=\frac{1}{n(n+1)}<\delta .
However,
|f(x)-f(y)|=|n-(n+1)|=1.
Hence, for example, there does not exist a \delta>0 such that
|f(x)-f(y)|<\frac{1}{2}
whenever |x-y|<\delta . Thus f is not uniformly continuous on (0,+\infty), although f is continuous on (0,+\infty).
Define f: \mathbb{R} \rightarrow \mathbb{R} by f(x)=2 x . Let \epsilon>0 be given. If \delta=\frac{\varepsilon}{2}, then
|f(x)-f(y)|=2|x-y|<\epsilon
whenever |x-y|<\delta . Hence f is uniformly continuous on \mathbb{R}.
Let f(x)=x^{2} . Show that f is not uniformly continuous on (-\infty,+\infty).
Suppose D \subset \mathbb{R} is compact and f: D \rightarrow \mathbb{R} is continuous. Then f is uniformly continuous on D .
- Proof
-
Let \epsilon>0 be given. For every x \in D, choose \delta_{x} such that
|f(x)-f(y)|<\frac{\epsilon}{2}
whenever y \in D and |x-y|<\delta_{x} . Let
J_{x}=\left(x-\frac{\delta_{x}}{2}, x+\frac{\delta_{x}}{2}\right).
Then \left\{J_{x}: x \in D\right\} is an open cover of D. Since D is compact, there must exist x_{1}, x_{2}, \ldots, x_{n}, n \in Z^{+}, such that J_{x_{1}}, J_{x_{2}}, \ldots, J_{x_{n}} is an open cover of D . Let \delta be the smallest of
\frac{\delta_{x_{1}}}{2}, \frac{\delta_{x_{2}}}{2}, \ldots, \frac{\delta_{x_{n}}}{2}.
Now let x, y \in D with |x-y|<\delta . Then for some integer k, 1 \leq k \leq n, x \in J_{x_{k}}, that is,
\left|x-x_{k}\right|<\frac{\delta_{x_{k}}}{2}.
Moreover,
\left|y-x_{k}\right| \leq|y-x|+\left|x-x_{k}\right|<\delta+\frac{\delta_{x_{k}}}{2} \leq \delta_{x_{k}}.
Hence
|f(x)-f(y)| \leq\left|f(x)-f\left(x_{k}\right)\right|+\left|f\left(x_{k}\right)-f(y)\right|<\frac{\epsilon}{2}+\frac{\epsilon}{2}=\epsilon .
Q.E.D.
Suppose D \subset \mathbb{R} and f: D \rightarrow \mathbb{R} is uniformly continuous. Show that if \left\{x_{n}\right\}_{n \in I} is a Cauchy sequence in D, then \left\{f\left(x_{n}\right)\right\}_{n \in I} is a Cauchy sequence in f(D) .
Suppose f:(0,1) \rightarrow \mathbb{R} is uniformly continuous. Show that f(0+) exists.
Suppose f: \mathbb{R} \rightarrow \mathbb{R} is continuous and \lim _{x \rightarrow-\infty} f(x)=0 and \lim _{x \rightarrow+\infty} f(x)=0 . Show that f is uniformly continuous.