8.5: Continuous Real Functions
In this section, we will explore the concept of continuity, which you likely encountered in high school.
Definition 8.95. A real function is any function \(f:A\to \mathbb{R}\) such that \(A\) is a nonempty subset of \(\mathbb{R}\) .
There are several equivalent definitions of continuity for real functions. The following characterization is typically referred to as the epsilon-delta definition of continuity . Our definition mimics the definition of continuity used in metric spaces, which \(\mathbb{R}\) equipped with absolute value happens to be an example of. Recall that \(|a-b|<r\) means that the distance between \(a\) and \(b\) is less than \(r\) (see discussion below Corollary 5.31).
Definition 8.96. Suppose \(f\) is a real function such that \(a\in dom(f)\) . We say that \(f\) is continuous at \(a\) if for every \(\varepsilon>0\) , there exists \(\delta>0\) such that if \(x\in dom(f)\) and \(|x-a|<\delta\) , then \(|f(x)-f(a)|<\varepsilon\) . If \(f\) is continuous at every point in \(B\subseteq dom(f)\) , then we say that \(f\) is continuous on \(B\) . If \(f\) is continuous on its entire domain, we simply say that \(f\) is continuous .
Loosely speaking, a real function \(f\) is continuous at the point \(a\in dom(f)\) if we can get \(f(x)\) arbitrarily close to \(f(a)\) by considering all \(x\in dom(f)\) sufficiently close to \(a\) . The value \(\varepsilon\) is indicating how close to \(f(a)\) we need to be while the value \(\delta\) is providing the “window" around \(a\) needed to guarantee that all points in the window (and in the domain) yield outputs within \(\varepsilon\) of \(f(a)\) . Figure 8.5 illustrates our definition of continuity. Note that in the figure, the point \(a\) is fixed while we need to consider all \(x\in dom(f)\) such that \(|x-a|<\delta\) . The dashed box in the figure has dimensions \(2\delta\) by \(2\varepsilon\) and is centered at the point \((a,f(a))\) . Intuitively, the function is continuous at \(a\) since given \(\varepsilon>0\) , we could find \(\delta >0\) so that the graph of the function never exits the top or bottom of the dashed box.
Perhaps you have encountered the phrase “a function is continuous if you can draw its graph without lifting your pencil." While this description provides some intuition about what continuity of a function means, it is neither accurate nor precise enough to capture the meaning of continuity.
When proving that a function is continuous at a point, the choice of \(\delta\) depends on both the point in question and the value of \(\varepsilon\) . An example should be helpful.
Example 8.97. Define \(f:\mathbb{R}\to\mathbb{R}\) via \(f(x)=3x+2\) . Let’s prove that \(f\) is continuous (at every point in the domain). Let \(a\in\mathbb{R}\) and let \(\varepsilon>0\) . Choose \(\delta=\varepsilon/3\) . We will see in a moment why this is a good choice for \(\delta\) . Suppose \(x\in\mathbb{R}\) such that \(|x-a|<\delta\) . We see that \[|f(x)-f(a)|=|(3x+2)-(3a+2)|=|3x-3a| = 3\cdot |x-a|<3\cdot \delta = 3\cdot \varepsilon/3 =\varepsilon.\] We have shown that \(f\) is continuous at \(a\) , and since \(a\) was arbitrary, \(f\) is continuous.
Problem 8.98. Prove that each of the following real functions is continuous using Definition 8.96.
- \(f:\mathbb{R}\to \mathbb{R}\) defined via \(f(x)=x\) .
- \(g:\mathbb{R}\to \mathbb{R}\) defined via \(g(x)=x+42\) .
- \(h:\mathbb{R}\to \mathbb{R}\) defined via \(h(x)=5x\) .
The next result tells us that every linear real function is continuous. Do not forget to handle the case when \(m=0\) in your proof. Note that the case when \(m=0\) proves that every constant function is continuous.
Theorem 8.99. If \(f:\mathbb{R}\to\mathbb{R}\) is defined via \(f(x)=mx+b\) for \(m,b\in\mathbb{R}\) , then \(f\) is continuous.
The second part of the next problem is much harder than you might expect.
Problem 8.100. Define \(f:\mathbb{R}\to\mathbb{R}\) via \(f(x)=x^2\) .
- Prove that \(f\) is continuous at 0.
- Prove that \(f\) is continuous at 1.
Problem 8.101. Define \(f:\mathbb{R}\to\mathbb{R}\) via \(f(x)=\sqrt{x}\) . Prove that \(f\) is continuous at 0.
Problem 8.102. Suppose \(f\) is a real function. Write a precise statement for what it means for \(f\) to not be continuous at \(a\in dom(f)\) .
Problem 8.103. Define \(f:\mathbb{R}\to\mathbb{R}\) via \[f(x)=\begin{cases} 1, & \text{if }x=0\\ x, & \text{otherwise}. \end{cases}\] Determine where \(f\) is continuous and justify your assertion.
Problem 8.104. Define \(f:\mathbb{R}\to\mathbb{R}\) via \[f(x)=\begin{cases} 1, & \text{if }x\in \mathbb{Q}\\ 0, & \text{otherwise}. \end{cases}\] Determine where \(f\) is continuous and justify your assertion.
After completing the next problem, reflect on the statement “a function is continuous if you can draw its graph without lifting your pencil."
Problem 8.105. Define \(f:\mathbb{N}\to\mathbb{R}\) via \(f(x)=1\) . Notice the domain! Determine where \(f\) is continuous and justify your assertion.
Theorem 8.106. Suppose \(f\) is a real function. Then \(f\) is continuous if and only if the preimage \(f^{-1}(U)\) of every open set \(U\) is an open set intersected with the domain of \(f\) .
The previous characterization of continuity is often referred to as the “open set definition of continuity," although for us it is a theorem instead of a definition. This is the definition used in topology. Another notion of continuity, called “sequential continuity", makes use of convergent sequences. All of these characterizations of continuity are equivalent for the real numbers (using the standard definition of an open set). However, there are contexts in mathematics where the epsilon-delta definition of continuity is undefined (because there is not a notion of distance in either the domain or codomain) and others where continuity and sequential continuity are not equivalent.
Since every open set is the union of bounded open intervals (Definition 5.53), the union of open sets is open (Theorem 5.58), and preimages respect unions (Theorem 8.92), we can strengthen Theorem 8.106 into a slightly more useful result.
Theorem 8.107. Suppose \(f\) is a real function. Then \(f\) is continuous if and only if the preimage \(f^{-1}(I)\) of every bounded open interval \(I\) is an open set intersected with the domain of \(f\) .
Now that we have two methods for verifying continuity (Definition 8.96 and Theorem 8.106/8.107), you can use either one when approaching the remaining problems in this section. Sometimes it does not matter which approach you take and other times one method might be better suited to the task.
Problem 8.108. Define \(f:\mathbb{R}\to\mathbb{R}\) via \(f(x)=x^2\) . Prove that \(f\) is continuous.
Problem 8.109. Define \(f:\mathbb{R}\setminus\{0\}\to\mathbb{R}\) via \(f(x)=\frac{1}{x}\) . Determine where \(f\) is continuous and justify your assertion.
The previous problems once again calls into question the phrase “a function is continuous if you can draw its graph without lifting your pencil."
Problem 8.110. Find a continuous real function \(f\) and an open interval \(I\) such that the preimage \(f^{-1}(I)\) is not an open interval.
For the next few problems, if you attempt to construct counterexamples, you may rely on your previous knowledge about various functions that you encountered in high school and calculus.
Problem 8.111. Suppose \(f\) is a continuous real function. If \(U\) is an open set contained in \(dom(f)\) , is the image \(f(U)\) always open? If so, prove it. Otherwise, provide a counterexample.
Problem 8.112. Suppose \(f\) is a continuous real function. If \(C\) is a closed set, is the preimage \(f^{-1}(C)\) always a closed set? If so, prove it. Otherwise, provide a counterexample.
Problem 8.113. Suppose \(f\) is a continuous real function. If \([a,b]\) is a closed interval contained in \(dom(f)\) , is the image \(f([a,b])\) always a closed interval? If so, prove it. Otherwise, provide a counterexample.
Problem 8.114. Suppose \(f\) is a continuous real function. If \(C\) is a closed set contained in \(dom(f)\) , is the image \(f(C)\) always a closed set? If so, prove it. Otherwise, provide a counterexample.
Problem 8.115. Suppose \(f\) is a continuous real function. If \(B\) is bounded set contained in \(dom(f)\) , is the image \(f(B)\) always a bounded set? If so, prove it. Otherwise, provide a counterexample.
Problem 8.116. Suppose \(f\) is a continuous real function. If \(B\) is a bounded set, is the preimage \(f^{-1}(B)\) always a bounded set? If so, prove it. Otherwise, provide a counterexample.
Problem 8.117. Suppose \(f\) is a continuous real function. If \(K\) is a compact set, is the preimage \(f^{-1}(B)\) always a compact set? If so, prove it. Otherwise, provide a counterexample.
Problem 8.118. Suppose \(f\) is a continuous real function. If \(C\) is a connected set contained in \(dom(f)\) , is the image \(f(C)\) always connected? If so, prove it. Otherwise, provide a counterexample.
Problem 8.119. Suppose \(f\) is a continuous real function. If \(C\) is a connected set, is the preimage \(f^{-1}(C)\) always a connected set? If so, prove it. Otherwise, provide a counterexample.
Perhaps you noticed the absence of one natural question in the previous sequence of problems. If \(f\) is a continuous real function and \(K\) is a subset of the domain of \(f\) , is the image \(f(K)\) a compact set? It turns out that the answer is “yes", but proving this fact is beyond the scope of this book. This theorem is often proved in a real analysis course and is then used to prove the Extreme Value Theorem, which you may have encountered in your calculus course.
The next result is a special case of the well-known Intermediate Value Theorem , which states that if \(f\) is a continuous real function whose domain contains the interval \([a,b]\) , then \(f\) attains every value between \(f(a)\) and \(f(b)\) at some point within the interval \([a,b]\) . To prove the special case, utilize Theorem 5.87 and Problem 8.118 together with a proof by contradiction.
Theorem 8.120. Suppose \(f\) is a real function. If \(f\) is continuous on \([a,b]\) such that \(f(a)<0<f(b)\) or \(f(a)>0>f(b)\) , then there exists \(r\in [a,b]\) such that \(f(r)=0\) .
If we generalize the previous result, we obtain the Intermediate Value Theorem.
Theorem 8.121. Suppose \(f\) is a real function. If \(f\) is continuous on \([a,b]\) such that \(f(a)<c<f(b)\) or \(f(a)>c>f(b)\) for some \(c\in \mathbb{R}\) , then there exists \(r\in [a,b]\) such that \(f(r)=c\) .
Problem 8.122. Is the converse of the Intermediate Value Theorem true? If so, prove it. Otherwise, provide a counterexample.