Problems on Continuity
Problems on Continuity
1. T HE ε − δ DEFINITION OF CONTINUITY
Since x ∈ [x0 − δ, x0 + δ] and |x0 − δ| ≤ |x0 | + δ and |x0 + δ| ≤ |x0 | + δ, we also get |x| ≤ |x0 | + δ.
Therefore,
|x2 − x20 | ≤ δ(2|x0 | + δ) ≤ δ(2|x0 | + 1) ≤ ε.
This completes the proof for ε ≤ 1. What if ε > 1? Then we can take the same δ that worked for
ε = 1, namely δ = 2|x01|+1 . Then if |x − x0 | ≤ δ, we have |f (x) − f (x0 )| ≤ 1 ≤ ε.
1 if x 6= 0,
x
Problem 2. Define f (x) = . Show that f is not continuous at 0.
7 if x = 0.
Solution Let ε = 1. Take any δ > 0. Let x = 2δ which is clearly in [0 − δ, 0 + δ]. But f (x) = x1 = 2δ .
Now if δ ≤ 1/5, then f (x) ≥ 10 and hence |f (x) − f (0)| > 10 − 7 > 1.
What if δ > 15 ? We can take the same point that worked for δ = 1/5, namely x = 1/10. Then
1
|x| = 10 < δ and |f (x) − f (0)| = 3 > 1.
Thus for any δ we have found a point x ∈ [−δ, δ] such that |f (x) − f (0)| > 1. Hence f is not
continuous at 0.
1 if x ∈ Q,
Problem 5. Define f (x) = . Show that f is not continuous at any point of R.
0 if x 6∈ Q.
x if x ∈ Q,
Problem 6. Let f (x) = . What are the continuity points of f ?
0 if x 6∈ Q.
Checking the continuity of a function using the ε − δ definition is somewhat painful. Much
simpler is the following sequential criterion.
If we are already familiar with sequences and their limits, then it is often easier to check the
continuity or discontinuity of a function at a point using this sequential criterion.
1 if x ∈ Q,
Problem 8. Define f (x) = . Show that f is not continuous at any point of R.
0 if x 6∈ Q.
Solution Fix x0 ∈ Q. As irrational numbers are dense in R, there exist xn ∈ Qc such that xn → x0 .
But f (xn ) = 0 and f (x0 ) = 1, therefore f (xn ) 6→ f (x0 ). This shows that f is not continuous at x0 .
Hence f is not continuous at any rational point.
Next fix x0 ∈ Qc . As rational numbers are dense in R, there exist xn ∈ Q such that xn → x0 .
But f (xn ) = 1 and f (x0 ) = 0, therefore f (xn ) 6→ f (x0 ). This shows that f is not continuous at x0 .
Hence f is not continuous at any irrational point.
Putting these together, f is not continuous at any point of R.
x if x ∈ Q,
Problem 9. Let f (x) = . Show that 0 is the only continuity point of f .
0 if x 6∈ Q.
x(x − 1)(x + 3) if x ∈ Q,
Problem 10. Let f (x) = . Find all the continuity points of f .
0 if x 6∈ Q.
Problem 11. Fix a natural number n and let f (x) = xn . Show that f is continuous.
2
Problem 12. Given a1 , . . . , an ∈ R, construct a function f : R → R whose only discontinuity points
are a1 , . . . , an .
Although the sequential criterion is more convenient to check continuity of a function, most
often we do not even have to go through that difficulty. We already know many functions (powers,
exponential, logarithm, trigonometric, etc.) that are continuous on their domains. If we combine
them in simple ways by adding, multiplying, dividing or composing, the resulting functions are
continuous. Thus to check continuity, we can simply invoke these properties.
Proposition 13. Let f, g : X → R. Suppose both f and g are continuous at x0 ∈ R. Then the following
functions are also continuous at x0 : (a) Linear combination af + bg where a, b ∈ R, (b) Product f.g
(c) Quotient f /g provided g(x0 ) 6= 0 (d) Maximum f ∨ g, (e) Minimum f ∧ g.
Note that the quotient function f /g is only defined on the subdomain X 0 = {x : g(x) 6= 0}.
Unless x0 ∈ X 0 , we cannot even talk about continuity of f /g at x0 .
Another useful operation is composition.
Proposition 14. Let f : X → R and g : Y → R. Assume that Range(f ) ⊆ Y (in other words,
f : X → Y ). Let x0 ∈ X. Suppose f is continuous at x0 and g is continuous at f (x0 ) ∈ Y , then
g ◦ f : X → R is continuous at X.
1A implies B is equivalent to Not B implies Not A. What we showed is that if the ε − δ condition fails, then the
sequential condition fails. Therefore, the sequential condition implies the ε − δ condition.
3
2 −3x
Problem 16. Show that the function 2x is continuous on R.
SolutionLet f (x) = x2 −3x and g(x) = 2x . We know that f and g are continuous (f is a polynomial
and we showed above; for g read the book). The given function is just g ◦ f , hence also continuous.
p
Problem 17. Show that the following functions are continuous on R: sin(x2 +x−2), (x + 3)2 + 17,
x2 −3x+2
x2 +1
.
Problem 18. Show that the following functions are continuous on R on their domain of definition
2
(which you should specify explicitly): x12 , sin(1/x), x x−3x+2
2 −1 .
Proof of Proposition 13. All the implications follow from the sequential criterion for continuity and
the corresponding statements for limits of sequences, namely: If un → u and vn → v, then (a) aun +
bvn → au + bv for any a, b ∈ R, (b) un vn → uv, (c) uvnn → uv provided v 6= 0, (d) un ∨ vn → u ∨ v,
(e) un ∧ vn → u ∧ v.
For example, if xn → x0 , then we know that f (xn ) → f (x0 ) (because f is continuous at x0 )
and g(xn ) → g(x0 ) (because g is continuous at x0 ). Applying (b) above, we see that f (xn )g(xn ) →
f (x0 )g(x0 ). Thus f g is continuous at x0 . We leave the rest as exercises.
A closed and bounded interval in one of the form X = [a, b] where a, b ∈ R and a < b. Note
that [0, ∞) is not bounded and and (0, 1) is not closed. Continuous functions on closed, bounded
intervals have special properties not shared by other domains.
(2) f is uniformly continuous. That is, given any ε > 0, there is a δ > 0 (depending only on ε) such
that for any x, y ∈ [a, b] with |x − y| ≤ δ, we have |f (x) − f (y)| ≤ ε.
Thus, we have one δ which works for all x ∈ [0, 10]. So f is uniformly continuous on [0, 10].
But f is not uniformly continuous on R. Then for any x > 0 and δ > 0 we have
f (x + δ) − f (x) = δ(2x + δ) > 2xδ.
ε
Therefore if x > 2δ , then f (x + δ) − f (x) > ε. Thus, for any δ > 0, there are points x for which
|f (x + δ) − f (x)| is not smaller than ε. So f is not uniformly continuous.
Example 21. If f : (0, 1) → R is defined as f (x) = x1 , then we claim that f is not uniformly
continuous. Let us use the sequential criterion. Let xn = n1 and yn = n+1 1
. Then |yn − xn | =
1
n(n+1) → 0 but f (yn ) − f (xn ) = 1 which does not go to 0. Hence f is not uniformly continuous.
Proof that f attains its minimum and maximum. By definition of infimum, for any n ≥ 1, there is
some xn ∈ [a, b] such that m ≤ f (xn ) ≤ m + n1 . By the Bolzano-Weierstrass property, (xn ) has a
convergent subsequence (xnk ) that converges to some point u ∈ [a, b]. By continuity of f , we see
that f (u) = lim f (xn ) = m. Thus f attains its minimum.
Adapt the same ideas to show that f attains its maximum.
Proof of the intermediate value theorem. Assume that f (a) ≤ f (b) and suppose v ∈ [f (a), f (b)]. De-
fine c = sup{x ∈ [a, b] : f (x) ≤ v}. As f (a) ≤ v, the set is non-empty and bounded above by b,
hence c ∈ [a, b]. By definition of supremum, c + n1 does not belong to the set. Hence f (c + n1 ) > v.
Let n → ∞ and use continuity of f to see that f (c) ≥ v. Further, by definition of supremum, for
any n there is some xn ∈ [c − n1 , c] ∩ {x ∈ [a, b] : f (x) ≤ v}. This is a complicated way of saying
that xn ∈ [c − n1 , c] and f (xn ) ≤ v. Therefore xn → c and hence f (xn ) → f (c). Therefore, f (c) ≤ v.
As f (c) ≤ v and f (c) ≥ v, we see that f (c) = v.
What is f (a) > f (b)? Define c = inf{x ∈ [a, b] : f (x) ≤ v} and carry out the rest of the argument
as above to show that f (c) = v.
We have shown that if v ∈ [f (a), f (b)], then there is some c such that f (c) = v. But the theorem
allows v ∈ [m, M ] (a larger interval than [f (a), f (b)]). But the previous point already tells us that
the min and max are attained, so there exist a0 , b0 ∈ [a, b] such that f (a0 ) = m and f (b0 ) = M .
By what we have shown, on the interval [a0 , b0 ] (or [b0 , a0 ] if b0 ≤ a0 ) f attains all values between
f (a0 ) = m and f (b0 ) = M . But [a0 , b0 ] ⊆ [a, b], therefore, on the interval [a, b] also f attains all values
in [m, M ].
Proof of uniform continuity. If f is not uniformly continuous, then there is some ε > 0 such that for
any n there exist xn , yn ∈ [a, b] such that |xn − yn | ≤ n1 but |f (xn ) − f (yn )| > ε. Then |xn − yn | → 0
5
but |f (xn ) − f (yn )| 6→ 0. By Bolzano-Weierstrass’ theorem, we can find a subsequence (nk ) such
that xnk → x and ynk → y and f (xnk ) → u and f (ynk ) → v for some x, y ∈ [a, b] and some u, v ∈ R.
But |xnk − ynk | → 0, hence x = y. Also f (xnk ) − f (ynk ) 6→ 0 and hence u 6= v. But by continuity of
f , we have u = f (x) and v = f (y). Since x = y we must have u = v, contradicting that u 6= v.
Problem 22. Let f : [a, b] → R be a continuous function. If f (a) < 0 and f (b) > 0, then show that
f has a root in [a, b].
Problem 23. Show that any third degree polynomial with real coefficients has a real root. For what
other degrees can we reach the same conclusion?
Problem 24. Let f (x) = sin(1/x) for x ∈ (0, 1). Show that f is not uniformly continuous.
1
Problem 25. Let f (x) = x for x > 0. Show that f is uniformly continuous on [1, ∞).
I Square root function exists: For every x ≥ 0, there is a unique non-negative number y such
√ 1
that y 2 = x. This y is usually denoted x or x 2 .
Proof. Fix x0 ≥ 0 and consider the interval [0, M ] where M 2 > x. Define f : [0, M ] → R by
f (x) = x2 . Then f (0) = 0 and f (M ) = M 2 > x0 . As f is continuous, by the intermediate value
theorem, there must be a y such that f (y) = x0 . That is y 2 = x0 . This shows the existence of
a square root. The uniqueness comes from the strict increasing property of f : If y1 < y2 , then
f (y1 ) < f (y2 ), hence there cannot be two pre-images for x0 .
I For any n ≥ 1, there is a unique nth root. The proof is similar and left as exercise.
I Let B be a “nice” bounded set in R2 . Then there is a vertical line x = x0 that partitions B
into two parts having equal area.
Proof. Assume that B ⊆ [−M, M ]2 for some M (possible because B is bounded). Define f :
[−M, M ] → R by f (z) = area(B ∩ {(x, y) : x ≤ z}). Then f (−M ) = 0 and f (M ) = area(B). Since
y = 21 area(B) lies between f (−M ) and f (M ), intermediate value theorem would tell us that there
is some z such that f (z) = 21 area(B), provided we show that f is continuous.
Why is f continuous? Fix u, v ∈ [−M, M ]. Then |f (u) − f (v)| is the area of B ∩ {(x, y) : u ≤
x ≤ v}. Since B is contained in [−M, M ]2 , we see that |f (x) − f (y)| ≤ 2M |x − y|. Therefore, f is
ε
continuous (given ε > 0, take δ = 2M to check the ε − δ definition of continuity).