Continuous functions - relation to compact and connected sets, uniform continuity
Introduction to Continuous Functions
A function is considered continuous if small changes in the input result in small changes in the output. In mathematical terms, a function \( f: D \to \mathbb{R} \), where \( D \subseteq \mathbb{R} \), is continuous at a point \( c \in D \) if for every \( \epsilon > 0 \), there exists a \( \delta > 0 \) such that if \( x \in D \) and \( |x - c| < \delta \), then \( |f(x) - f(c)| < \epsilon \).
A function is continuous on a set \( D \) if it is continuous at every point in \( D \). This definition, known as the epsilon-delta definition, is fundamental. However, for understanding the relationship with topological properties like compactness and connectedness, it's more useful to think in terms of open sets.
An equivalent definition of continuity using open sets states that a function \( f: X \to Y \) between two topological spaces \( X \) and \( Y \) is continuous if and only if for every open set \( V \) in \( Y \), the pre-image \( f^{-1}(V) \) is an open set in \( X \). The pre-image \( f^{-1}(V) \) is defined as \( \{x \in X \mid f(x) \in V\} \).
Continuous Functions and Compact Sets
Compactness is a topological property that generalizes the idea of closed and bounded intervals in \( \mathbb{R} \). A set \( K \subseteq \mathbb{R} \) is compact if and only if it is closed and bounded. The Heine-Borel theorem states this for \( \mathbb{R}^n \).
A crucial theorem in real analysis relates continuous functions to compact sets. It states that if \( f: K \to \mathbb{R} \) is a continuous function defined on a compact set \( K \), then the image \( f(K) = \{f(x) \mid x \in K\} \) is also a compact set in \( \mathbb{R} \).
Let's break down why this is true. If \( K \) is compact, and \( f \) is continuous, we need to show that \( f(K) \) is closed and bounded.
- Closedness: If \( y \) is a limit point of \( f(K) \), we need to show \( y \in f(K) \). We can construct a sequence \( \{y_n\} \) in \( f(K) \) that converges to \( y \). Since \( y_n \in f(K) \), for each \( n \), there exists \( x_n \in K \) such that \( f(x_n) = y_n \). Because \( K \) is compact, it is closed and bounded, and thus contains all its limit points. Therefore, the sequence \( \{x_n\} \) has a convergent subsequence \( \{x_{n_k}\} \) converging to some \( x \in K \). Since \( f \) is continuous at \( x \), \( f(x_{n_k}) \to f(x) \). But \( f(x_{n_k}) = y_{n_k} \), and \( y_{n_k} \to y \). By the uniqueness of limits, \( f(x) = y \). Since \( x \in K \), \( y \in f(K) \). Thus, \( f(K) \) is closed.
- Boundedness: Since \( K \) is compact, it is bounded. This means there exists a real number \( M \) such that \( |x| \le M \) for all \( x \in K \). If \( f \) were unbounded on \( K \), we could find a sequence \( \{x_n\} \) in \( K \) such that \( |f(x_n)| \to \infty \). Again, by compactness of \( K \), this sequence has a convergent subsequence \( \{x_{n_k}\} \) converging to some \( x \in K \). By continuity of \( f \) at \( x \), \( f(x_{n_k}) \to f(x) \), which contradicts \( |f(x_n)| \to \infty \). Therefore, \( f \) must be bounded on \( K \), meaning \( |f(x)| \) is bounded for all \( x \in K \). This implies \( f(K) \) is bounded.
Since \( f(K) \) is both closed and bounded, it is compact.
Extreme Value Theorem
A direct and very important consequence of the continuity of functions on compact sets is the Extreme Value Theorem.
Theorem (Extreme Value Theorem): If \( f: K \to \mathbb{R} \) is a continuous function on a compact set \( K \), then \( f \) attains its maximum and minimum values on \( K \). That is, there exist points \( c_{min}, c_{max} \in K \) such that \( f(c_{min}) \le f(x) \le f(c_{max}) \) for all \( x \in K \).
Proof: As shown above, \( f(K) \) is a compact set. In \( \mathbb{R} \), compact sets are closed and bounded. Since \( f(K) \) is bounded, it is bounded above and below. Let \( M = \sup\{f(x) \mid x \in K\} \) and \( m = \inf\{f(x) \mid x \in K\} \). Since \( f(K) \) is closed and bounded, \( M \) and \( m \) are elements of \( f(K) \). If \( M \in f(K) \), then there exists \( c_{max} \in K \) such that \( f(c_{max}) = M \). Similarly, if \( m \in f(K) \), there exists \( c_{min} \in K \) such that \( f(c_{min}) = m \). This proves the theorem.
Example: Consider the function \( f(x) = x^2 \) on the interval \( [-1, 2] \). The interval \( [-1, 2] \) is a closed and bounded set in \( \mathbb{R} \), hence it is compact. The function \( f(x) = x^2 \) is continuous on \( [-1, 2] \). According to the Extreme Value Theorem, \( f \) must attain its maximum and minimum values on \( [-1, 2] \). The minimum value is \( f(0) = 0 \) (since \( 0 \in [-1, 2] \)). The maximum value is \( f(2) = 4 \) (since \( 2 \in [-1, 2] \)). The image \( f([-1, 2]) = [0, 4] \) is indeed a compact set.
Continuous Functions and Connected Sets
Connectedness is another topological property. In \( \mathbb{R} \), connected sets are precisely the intervals (including single points, rays, and the entire line). A set \( S \subseteq \mathbb{R} \) is connected if and only if for any two points \( a, b \in S \), the interval \( [a, b] \) (or \( [b, a] \) if \( b < a \)) is entirely contained within \( S \).
A theorem analogous to the one for compact sets exists for connected sets: If \( f: X \to Y \) is a continuous function and \( X \) is a connected topological space, then the image \( f(X) \) is also a connected space.
Let's consider this in the context of \( \mathbb{R} \). If \( I \subseteq \mathbb{R} \) is an interval and \( f: I \to \mathbb{R} \) is continuous, then \( f(I) \) is a connected set in \( \mathbb{R} \). Since connected sets in \( \mathbb{R} \) are intervals, this implies that the image of an interval under a continuous function is itself an interval (possibly a single point).
Theorem (Intermediate Value Theorem - IVT): If \( f \) is a continuous function on an interval \( [a, b] \), and \( y \) is any value between \( f(a) \) and \( f(b) \) (i.e., \( f(a) \le y \le f(b) \) or \( f(b) \le y \le f(a) \)), then there exists at least one \( c \in [a, b] \) such that \( f(c) = y \).
Proof using connectedness: Let \( I = [a, b] \). Since \( I \) is an interval, it is connected. Since \( f \) is continuous, \( f(I) \) must be a connected subset of \( \mathbb{R} \). Therefore, \( f(I) \) must be an interval. Let \( f(a) \) and \( f(b) \) be two values in \( f(I) \). Suppose \( y \) is a value such that \( f(a) \le y \le f(b) \) (the case \( f(b) \le y \le f(a) \) is similar). Since \( f(I) \) is an interval containing \( f(a) \) and \( f(b) \), it must contain all values between them. Thus, \( y \in f(I) \). This means there exists some \( c \in I \) such that \( f(c) = y \).
Example: Consider the function \( f(x) = x^3 - x \) on the interval \( [0, 2] \). This function is continuous. \( f(0) = 0 \) and \( f(2) = 2^3 - 2 = 8 - 2 = 6 \). If we want to know if there is a \( c \) such that \( f(c) = 3 \), since \( 0 \le 3 \le 6 \), the Intermediate Value Theorem guarantees that such a \( c \) exists in \( [0, 2] \). (We can find \( c \) explicitly: \( c^3 - c = 3 \). This cubic equation has a real root approximately \( c \approx 1.67 \)).
The IVT is also used to prove the existence of roots for equations. If \( f(a) \) and \( f(b) \) have opposite signs, then \( 0 \) is between \( f(a) \) and \( f(b) \), so there must be a root \( c \in [a, b] \) where \( f(c) = 0 \).
Uniform Continuity
The standard definition of continuity at a point \( c \) states that for every \( \epsilon > 0 \), there exists a \( \delta > 0 \) such that if \( |x - c| < \delta \), then \( |f(x) - f(c)| < \epsilon \). Notice that \( \delta \) may depend on \( c \). This means that for different points \( c \), we might need different values of \( \delta \) to satisfy the condition for a given \( \epsilon \).
Uniform continuity is a stronger condition. A function \( f: D \to \mathbb{R} \) is uniformly continuous on \( D \) if for every \( \epsilon > 0 \), there exists a \( \delta > 0 \) such that for all \( x_1, x_2 \in D \), if \( |x_1 - x_2| < \delta \), then \( |f(x_1) - f(x_2)| < \epsilon \).
The key difference is that for uniform continuity, the \( \delta \) depends only on \( \epsilon \), not on the specific points \( x_1 \) and \( x_2 \) in the domain \( D \). This means that the function's behavior is "uniformly" spread out across the entire domain; the "wiggle" of the function is bounded by the same \( \epsilon \) for any pair of points that are close enough (within \( \delta \)).
Relation to standard continuity: If a function is uniformly continuous on \( D \), it is also continuous on \( D \). However, the converse is not always true. A function can be continuous on \( D \) but not uniformly continuous on \( D \).
When is Continuity Uniform?
The relationship between continuity and uniform continuity is closely tied to the domain's properties, specifically compactness.
Theorem: If \( f: K \to \mathbb{R} \) is a continuous function on a compact set \( K \), then \( f \) is uniformly continuous on \( K \).
Proof: Assume for contradiction that \( f \) is continuous on compact \( K \) but not uniformly continuous. This means there exists an \( \epsilon > 0 \) such that for every \( \delta > 0 \), there exist \( x_1, x_2 \in K \) with \( |x_1 - x_2| < \delta \) but \( |f(x_1) - f(x_2)| \ge \epsilon \).
For each \( n \in \mathbb{N} \), let \( \delta_n = 1/n \). Then there exist \( x_n, y_n \in K \) such that \( |x_n - y_n| < 1/n \) and \( |f(x_n) - f(y_n)| \ge \epsilon \).
Since \( K \) is compact, the sequence \( \{x_n\} \) has a convergent subsequence \( \{x_{n_k}\} \) converging to some \( x \in K \). Let \( \{y_{n_k}\} \) be the corresponding subsequence for \( y_n \).
We have \( |x_{n_k} - y_{n_k}| < 1/n_k \). As \( k \to \infty \), \( 1/n_k \to 0 \), so \( |x_{n_k} - y_{n_k}| \to 0 \). Since \( x_{n_k} \to x \), it must be that \( y_{n_k} \to x \) as well.
Because \( f \) is continuous at \( x \), we have \( f(x_{n_k}) \to f(x) \) and \( f(y_{n_k}) \to f(x) \).
This implies that \( |f(x_{n_k}) - f(y_{n_k})| \to |f(x) - f(x)| = 0 \).
However, we chose \( x_n, y_n \) such that \( |f(x_n) - f(y_n)| \ge \epsilon \) for all \( n \). Thus, for the subsequence, \( |f(x_{n_k}) - f(y_{n_k})| \ge \epsilon \). This is a contradiction, as the difference must approach 0. Therefore, \( f \) must be uniformly continuous on \( K \).
Example: The function \( f(x) = x^2 \) on the closed interval \( [0, 1] \) is continuous. Since \( [0, 1] \) is compact, \( f(x) = x^2 \) is uniformly continuous on \( [0, 1] \). For any \( \epsilon > 0 \), we can find a \( \delta > 0 \) such that if \( |x_1 - x_2| < \delta \), then \( |x_1^2 - x_2^2| < \epsilon \). We know \( |x_1^2 - x_2^2| = |(x_1 - x_2)(x_1 + x_2)| \). On \( [0, 1] \), \( |x_1 + x_2| \le |x_1| + |x_2| \le 1 + 1 = 2 \). So, \( |x_1^2 - x_2^2| \le |x_1 - x_2| \cdot 2 \). To make this less than \( \epsilon \), we can choose \( \delta \) such that \( \delta \cdot 2 < \epsilon \), so \( \delta < \epsilon/2 \). Thus, if we choose \( \delta = \epsilon/2 \), then \( |x_1 - x_2| < \delta \) implies \( |x_1^2 - x_2^2| < \epsilon \). This \( \delta \) works for all \( x_1, x_2 \in [0, 1] \).
When is Continuity NOT Uniform?
A continuous function may fail to be uniformly continuous on a set if the set is not compact. Specifically, if the set is unbounded or not closed, uniform continuity might not hold.
Example 1: Unbounded Set Consider the function \( f(x) = x^2 \) on \( \mathbb{R} \). \( \mathbb{R} \) is not bounded, hence not compact. \( f(x) = x^2 \) is continuous on \( \mathbb{R} \). However, it is not uniformly continuous on \( \mathbb{R} \).
To show this, let's try to find an \( \epsilon \) for which no single \( \delta \) works for all \( x_1, x_2 \in \mathbb{R} \). Let \( \epsilon = 1 \). We need to show that for any \( \delta > 0 \), there exist \( x_1, x_2 \) such that \( |x_1 - x_2| < \delta \) but \( |f(x_1) - f(x_2)| \ge 1 \).
Let \( x_1 = x \) and \( x_2 = x + \delta/2 \). Then \( |x_1 - x_2| = \delta/2 < \delta \). We want \( |f(x_1) - f(x_2)| = |x^2 - (x + \delta/2)^2| \ge 1 \). \( |x^2 - (x^2 + x\delta + (\delta/2)^2)| = |-x\delta - (\delta/2)^2| = |x\delta + \delta^2/4| \). If we choose large values of \( x \), this difference can be made arbitrarily large. For example, let \( \delta \) be fixed. If we choose \( x = \frac{1}{\delta} \), then \( |x\delta + \delta^2/4| = |\frac{1}{\delta} \cdot \delta + \delta^2/4| = |1 + \delta^2/4| \). This is clearly greater than 1 if \( \delta \) is positive. More formally, for any \( \delta > 0 \), choose \( x_1 = \frac{1}{\delta} \) and \( x_2 = \frac{1}{\delta} + \frac{\delta}{2} \). Then \( |x_1 - x_2| = \frac{\delta}{2} < \delta \). \( |f(x_1) - f(x_2)| = |(\frac{1}{\delta})^2 - (\frac{1}{\delta} + \frac{\delta}{2})^2| = |\frac{1}{\delta^2} - (\frac{1}{\delta^2} + 2 \cdot \frac{1}{\delta} \cdot \frac{\delta}{2} + \frac{\delta^2}{4})| = |\frac{1}{\delta^2} - (\frac{1}{\delta^2} + 1 + \frac{\delta^2}{4})| = |-1 - \frac{\delta^2}{4}| = 1 + \frac{\delta^2}{4} \). Since \( 1 + \frac{\delta^2}{4} \ge 1 \), the condition \( |f(x_1) - f(x_2)| < 1 \) is not met. Thus \( f(x) = x^2 \) is not uniformly continuous on \( \mathbb{R} \).
Example 2: Non-closed Set (Open Interval) Consider the function \( f(x) = 1/x \) on the interval \( (0, 1] \). This interval is not closed (it doesn't include 0), and therefore not compact. The function \( f(x) = 1/x \) is continuous on \( (0, 1] \). However, it is not uniformly continuous on \( (0, 1] \).
Let \( \epsilon = 1 \). We need to show that for any \( \delta > 0 \), there exist \( x_1, x_2 \in (0, 1] \) such that \( |x_1 - x_2| < \delta \) but \( |f(x_1) - f(x_2)| \ge 1 \).
Let \( x_1 = \delta/2 \) and \( x_2 = \delta \). If \( \delta \) is small enough such that \( \delta \le 1 \), both points are in \( (0, 1] \). Then \( |x_1 - x_2| = |\delta/2 - \delta| = |-\delta/2| = \delta/2 < \delta \). Now consider \( |f(x_1) - f(x_2)| = |1/(\delta/2) - 1/\delta| = |2/\delta - 1/\delta| = |1/\delta| = 1/\delta \). If we choose \( \delta \) such that \( 1/\delta \ge 1 \), which means \( \delta \le 1 \), then the condition \( |f(x_1) - f(x_2)| < 1 \) is not met. So, for any \( \delta \in (0, 1] \), we can choose \( x_1 = \delta/2 \) and \( x_2 = \delta \). Then \( |x_1 - x_2| = \delta/2 < \delta \) and \( |f(x_1) - f(x_2)| = 1/\delta \ge 1 \). Thus, \( f(x) = 1/x \) is not uniformly continuous on \( (0, 1] \).
The problem arises because as \( x \) approaches 0, \( f(x) = 1/x \) grows infinitely large. The function becomes very steep near 0, meaning small changes in \( x \) lead to large changes in \( f(x) \). This variability prevents uniform continuity.
Summary of Key Relationships
- Compactness & Continuity: Continuous image of a compact set is compact.
- Compactness & Extreme Values: Continuous function on a compact set attains its maximum and minimum.
- Connectedness & Continuity: Continuous image of a connected set is connected.
- Connectedness & IVT: Continuous function on an interval satisfies the Intermediate Value Theorem.
- Uniform Continuity: A stronger form of continuity where \( \delta \) depends only on \( \epsilon \), not the points.
- Uniform Continuity & Compactness: Continuous functions on compact sets are uniformly continuous.
- Non-Uniform Continuity: Continuous functions may fail to be uniformly continuous on non-compact sets (e.g., unbounded sets or sets not closed at limit points).
Important Definitions Recap
- Continuous at \( c \): \( \forall \epsilon > 0, \exists \delta > 0 \) s.t. \( |x-c| < \delta \implies |f(x)-f(c)| < \epsilon \).
- Continuous on \( D \): Continuous at every point in \( D \).
- Uniformly Continuous on \( D \): \( \forall \epsilon > 0, \exists \delta > 0 \) s.t. \( \forall x_1, x_2 \in D, |x_1-x_2| < \delta \implies |f(x_1)-f(x_2)| < \epsilon \).
- Compact Set (in \( \mathbb{R} \)): Closed and Bounded.
- Connected Set (in \( \mathbb{R} \)): An interval.
Key Theorems
- Image of Compact Set: If \( f \) is continuous and \( K \) is compact, then \( f(K) \) is compact.
- Extreme Value Theorem: If \( f \) is continuous on compact \( K \), \( f \) attains max and min on \( K \).
- Image of Connected Set: If \( f \) is continuous and \( X \) is connected, then \( f(X) \) is connected.
- Intermediate Value Theorem: If \( f \) is continuous on \( [a, b] \) and \( y \) is between \( f(a) \) and \( f(b) \), then \( \exists c \in [a, b] \) s.t. \( f(c) = y \).
- Uniform Continuity on Compact Sets: If \( f \) is continuous on compact \( K \), then \( f \) is uniformly continuous on \( K \).
Exam Tip: Remember the core difference between continuity and uniform continuity: for continuity, \( \delta \) depends on both \( \epsilon \) AND the point \( c \). For uniform continuity, \( \delta \) depends ONLY on \( \epsilon \). Compactness is the key condition that bridges continuity to uniform continuity and guarantees the attainment of extreme values. Connectedness guarantees that the image of an interval is an interval, leading to the IVT.