2.3 Properties of Continuous functions
Definition 2.3.1. A real valued function \(f\) defined on a set \(E\subseteq \mathbb {R}\) is said to be bounded if there is a real number \(M\) such that \(|f(x)| \leq M\) for every \(x \in E\).
Theorem 2.3.2. Let \(f\) be a continuous real valued function on a closed interval \([a,b]\). Then
- 1.
- \(f\) is bounded on \([a,b]\);
- 2.
- there exist points \(\alpha , \beta \in [a,b]\) such that \[f(\alpha ) = \sup \{ f(x): x\in [a,b]\}, \qquad f(\beta ) = \inf \{f(x): x\in [a,b]\}.\]
Proof.
- 1.
- Suppose \(f\) is not bounded. Then for every \(n\in \mathbb {N}\) there is an \(x_n \in [a,b]\) such that \begin {equation} \label {eq:unbdd} |f(x_n)| > n . \end {equation} The sequence \(\{x_n\}\) lies in \([a,b]\) and so is bounded. By the Bolzano–Weierstrass theorem (for sequences) it has a convergent subsequence \(\{x_{n_k}\}\), with limit \(x\) say. Since \([a,b]\) is closed, \(x\in [a,b]\). Putting \(n = n_k\) in (2.7) gives \(|f(x_{n_k})| > n_k \geq k\) for every \(k\), so \(\{f(x_{n_k})\}\) is unbounded and hence not convergent. But \(f\) is continuous at \(x\), so \(f(x_{n_k}) \longrightarrow f(x)\), a contradiction. Hence \(f\) is bounded on \([a,b]\).
- 2.
- By part 1, \(M = \sup \{f(x): x\in [a,b]\}\) exists. For each \(n\in \mathbb {N}\), \(M - \frac {1}{n}\) is not an upper bound, so there is an \(x_n \in [a,b]\) with \[M - \frac {1}{n} < f(x_n) \leq M,\] and therefore \begin {equation} \label {eq:fxnM} \lim _{n\rightarrow \infty } f(x_n) = M . \end {equation} The sequence \(\{x_n\}\) is bounded, so by the Bolzano–Weierstrass theorem it has a convergent subsequence \(\{x_{n_k}\}\), with limit \(\alpha \) say. Since \([a,b]\) is closed, \(\alpha \in [a,b]\), and since \(f\) is continuous at \(\alpha \), \(f( x_{n_k})\longrightarrow f(\alpha )\). On the other hand, by (2.8), \(f(x_{n_k})\longrightarrow M\). A sequence cannot converge to two different limits, so \(f(\alpha ) = M\). The proof that \(f(\beta ) = \inf \{ f(x): x \in [a,b]\}\) for some \(\beta \) is similar.
Note. Both hypotheses on the interval matter.
- 1.
- A continuous function on an interval that is not closed need not be bounded. For example, \(f(x) = \frac {1}{x}\) is continuous on \((0,1]\) but not bounded there, since \(f(x)\longrightarrow \infty \) as \(x\longrightarrow 0^+\).
- 2.
- A continuous function on an interval that is not closed, even if bounded, need not attain its supremum and infimum. For example, \(f(x) = \frac {x}{x + 1}\) is continuous and bounded on \((0,1)\), with supremum \(\frac {1}{2}\) and infimum \(0\), but it attains neither value on \((0,1)\).
Theorem 2.3.3. Let \(f\) be defined on \([a,b]\) and continuous at \(p\in [a,b]\), with \(f(p)\neq 0\). Then there exists a \(\delta > 0\) such that \(f(x)\) has the same sign as \(f(p)\) for every \(x\in [a,b]\) with \(|x - p| < \delta \).
Proof. Take \(\varepsilon = |f(p)|>0\) in the definition of continuity: there is a \(\delta > 0\) such that \[f(p) - |f(p)| < f(x) < f(p) + |f(p)| \qquad \text {whenever } x\in [a,b] \text { and } |x - p| < \delta .\] If \(f(p) > 0\), the left inequality gives \(f(x) > 0\). If \(f(p) < 0\), the right inequality gives \(f(x) < 0\). □
The same holds at the end points of the interval, where only one side of the point is available.
Theorem 2.3.4. If \(f\) is defined on \([a,b]\), continuous at \(a\) and \(f(a) \neq 0\), then there exists a \(\delta > 0\) such that \(f(x)\) has the same sign as \(f(a)\) for every \(x\in [a, a + \delta )\). Similarly, if \(f\) is continuous at \(b\) and \(f(b) \neq 0\), then \(f(x)\) has the same sign as \(f(b)\) for every \(x\in (b -\delta , b]\), for some \(\delta >0\).
Proof. Suppose \(f\) is continuous at \(a\) with \(f(a)>0\); the case \(f(a)<0\) follows by applying this to \(-f\). Take \(\varepsilon = \frac {f(a)}{2} > 0\) in the definition of continuity: there is \(\delta >0\) such that \[|f(x)-f(a)| < \frac {f(a)}{2} \qquad \text {whenever } x\in [a,b] \text { and } |x-a|<\delta .\] Then \(f(x) > f(a) - \frac {f(a)}{2} = \frac {f(a)}{2} > 0\) for \(x\in [a,a+\delta )\). The argument at \(b\) is the same. □
Note. The choice \(\varepsilon = \frac {|f(a)|}{2}\) (or \(|f(p)|\)) is the standard device: it is small enough to keep the sign. The result is what allows us to divide by \(f\) near a point where it does not vanish, as in the quotient rule above.
Theorem 2.3.5. If \(f\) is continuous on \([a,b]\) and \(f(a) < 0 < f(b)\), then there exists a point \(p\in (a,b)\) such that \(f(p) = 0\).
Proof. Let \(A = \{ x\in [a,b]: f(x) < 0\}\). Then \(a\in A\), so \(A\) is non-empty, and \(A\) is bounded above by \(b\). By the completeness axiom \(A\) has a supremum; let \(p = \sup A\). Then \(a\leq p\leq b\).
Suppose \(f(p) < 0\). Then \(p\neq b\), since \(f(b)>0\), and by the sign-preservation theorems there is a \(\delta >0\) with \(f(x)<0\) for all \(x\in [p,p+\delta )\cap [a,b]\). Such points beyond \(p\) lie in \(A\), contradicting \(p = \sup A\).
Suppose \(f(p) > 0\). Then \(p\neq a\), since \(f(a)<0\), and there is a \(\delta >0\) with \(f(x)>0\) for all \(x\in (p-\delta ,p]\cap [a,b]\). So no point of \((p-\delta , p]\) lies in \(A\), and since no point of \(A\) exceeds \(p\), \(p-\delta \) is an upper bound of \(A\), again contradicting \(p = \sup A\).
Hence \(f(p) = 0\), and \(p\neq a,b\) because \(f(a)\neq 0\neq f(b)\). □
Theorem 2.3.6 (Intermediate Value Theorem). A continuous function \(f\) on \([a,b]\) assumes every value between \(f(a)\) and \(f(b)\).
Proof. Suppose \(f(a) < f(b)\) and let \(f(a) < K < f(b)\). (If \(f(a)>f(b)\), apply the argument to \(-f\); if \(f(a)=f(b)\) there is nothing to prove.) The function \(g(x) = f(x) - K\) is continuous on \([a,b]\), with \[g(a) = f(a) - K < 0 \qquad \text {and}\qquad g(b) = f(b) - K > 0 .\] By the previous theorem there exists \(p\in (a,b)\) such that \(g(p) = 0\), that is, \(f(p) = K\). □
The theorem can be restated as follows.
Proof. Let \(I\) be an interval, \(f\) continuous on \(I\), and let \(u<w<v\) with \(u,v\in f(I)\). Say \(u=f(c)\) and \(v=f(d)\) with \(c,d\in I\). Since \(I\) is an interval it contains the closed interval with end points \(c\) and \(d\), and \(f\) is continuous there, so by the Intermediate Value Theorem \(f\) takes the value \(w\) at some point between \(c\) and \(d\), which is a point of \(I\). Hence \(w\in f(I)\).
So \(f(I)\) contains every point between any two of its points, which means that it is an interval. □
Corollary 2.3.8. A continuous function \(f\) on \([a,b]\) assumes every value between its infimum and its supremum on \([a,b]\).
Proof. There exist points \(\alpha , \beta \in [a,b]\) with \(f(\alpha ) = \sup \{f(x): x\in [a,b]\}\) and \(f(\beta ) = \inf \{f(x): x \in [a,b]\}\). Applying the Intermediate Value Theorem to \(f\) on the closed interval with end points \(\alpha \) and \(\beta \), we see that \(f\) assumes every value between \(f(\beta )\) and \(f(\alpha )\). □
Example 2.3.9. Show that the equation \(x^5 - 3x + 1 = 0\) has a root in \((0,1)\), and locate it to within \(0.0625\).
Solution. Let \(f(x) = x^5-3x+1\), which is continuous. Since \(f(0) = 1>0\) and \(f(1) = -1<0\), the Intermediate Value Theorem gives a root in \((0,1)\). Bisecting:
| \(x\) | \(f(x)\) | root lies in |
| \(0.5\) | \(-0.46875\) | \((0,0.5)\) |
| \(0.25\) | \(0.25098\) | \((0.25,0.5)\) |
| \(0.375\) | \(-0.11758\) | \((0.25,0.375)\) |
| \(0.3125\) | \(0.06548\) | \((0.3125,0.375)\) |
So the root lies in \((0.3125,0.375)\), an interval of length \(0.0625\). Each bisection halves the interval, so \(n\) steps locate the root within \(2^{-n}\); continuing gives the root \(0.3347\) to four decimal places.
Example 2.3.10. Show that \(\cos x = x\) has exactly one solution in \(\left [0,\frac {\pi }{2}\right ]\).
Solution. Let \(g(x) = \cos x - x\), continuous on \(\left [0,\frac {\pi }{2}\right ]\). Then \(g(0) = 1>0\) and \(g\left (\frac {\pi }{2}\right ) = -\frac {\pi }{2}<0\), so by the Intermediate Value Theorem \(g\) has a zero there. It has only one, because \(g\) is strictly decreasing: if \(x<y\) then \(\cos x\geq \cos y\) on this interval and \(-x>-y\), so \(g(x)>g(y)\). (The solution is approximately \(0.739\).)
Example 2.3.11. Find the largest and smallest values of \(f(x) = x^3-3x\) on \([-2,2]\), and show that \(f\) takes every value in between.
Solution. The function is continuous on the closed bounded interval \([-2,2]\), so it attains a maximum and a minimum. Since \(f(x) - 2 = (x+1)^2(x-2)\leq 0\) and \(f(x)+2 = (x-1)^2(x+2)\geq 0\) on \([-2,2]\), we have \(-2\leq f(x)\leq 2\), with \(f = 2\) at \(x = -1, 2\) and \(f = -2\) at \(x = -2, 1\). So the maximum is \(2\) and the minimum is \(-2\), and by the corollary to the Intermediate Value Theorem \(f([-2,2]) = [-2,2]\).
Questions on this section
Stuck on something here? Ask below and it stays attached to this topic.