# 8.8: Real Functions

• • Bob Dumas and John E. McCarthy
• University of Washington and Washington University in St. Louis
$$\newcommand{\vecs}{\overset { \rightharpoonup} {\mathbf{#1}} }$$ $$\newcommand{\vecd}{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}}$$$$\newcommand{\id}{\mathrm{id}}$$ $$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\kernel}{\mathrm{null}\,}$$ $$\newcommand{\range}{\mathrm{range}\,}$$ $$\newcommand{\RealPart}{\mathrm{Re}}$$ $$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$ $$\newcommand{\Argument}{\mathrm{Arg}}$$ $$\newcommand{\norm}{\| #1 \|}$$ $$\newcommand{\inner}{\langle #1, #2 \rangle}$$ $$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\id}{\mathrm{id}}$$ $$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\kernel}{\mathrm{null}\,}$$ $$\newcommand{\range}{\mathrm{range}\,}$$ $$\newcommand{\RealPart}{\mathrm{Re}}$$ $$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$ $$\newcommand{\Argument}{\mathrm{Arg}}$$ $$\newcommand{\norm}{\| #1 \|}$$ $$\newcommand{\inner}{\langle #1, #2 \rangle}$$ $$\newcommand{\Span}{\mathrm{span}}$$$$\newcommand{\AA}{\unicode[.8,0]{x212B}}$$

If you reread your calculus text, you will observe that many of the theorems of calculus are ultimately dependent on the Intermediate Value Theorem.

THEOREM 8.10. Intermediate Value Theorem Let $$f$$ be a continuous real function on a closed bounded interval $$[a, b]$$. If $$f(a)<L<f(b)$$ or $$f(b)<L<f(a)$$ then $(\exists c \in(a, b)) \quad f(c)=L .$ PRoOF. Let $$f$$ be a continuous real function on a closed bounded interval $$[a, b]$$, and $$f(a)<L<f(b)$$. We prove the special case $$L=0$$. Given the result for $$L=0$$, the theorem follows from application of the special case to the function $$f(x)-L$$.

Let $X=\{x \in[a, b] \mid(\forall y \in[a, x]) f(y) \leq 0\} .$ Then $$X \neq \emptyset$$ and $$X$$ is bounded above by $$b$$. By the Least Upper Bound Property, $$X$$ has a least upper bound, $$m \leq b$$. The function $$f$$ is continuous, and hence $$\lim _{x \rightarrow m} f(x)=f(m)$$. If $$f(m)=0$$, the theorem is proved.

(i) Assume that $$f(m)>0$$. Let $$0<\varepsilon<f(m)$$. For any $$x \in[a, m)$$, $$f(x) \leq 0$$ and $|f(x)-f(m)| \geq f(m)>\varepsilon$ Consequently for any $$\delta>0$$, there is $$x$$ in the punctured $$\delta$$-neighborhood of $$m$$ such that $|f(x)-f(m)| \geq \varepsilon$ This contradicts the assumption that $$\lim _{x \rightarrow m} f(x)=f(m)$$. Therefore $$f(m) \leq 0 .$$

(ii) Assume that $$f(m)<0$$. Let $$0<\varepsilon<|f(m)|$$. For any $$\delta>0$$, there is $$x \in(m, m+\delta)$$ such that $$f(x)>0$$. Otherwise $[a, m+\delta) \subseteq X,$ contradicting the assumption that $$m$$ is the least upper bound for $$X$$. So for any $$\delta>0$$ there is $$x$$ in the punctured $$\delta$$-neighborhood of $$m$$ such that $|f(x)-f(m)| \geq|f(m)|>\varepsilon .$ This contradicts the assumption that $$f$$ is continuous at $$m$$. Therefore $$f(m)=0 .$$

THEOREM 8.11. Extreme Value Theorem If $$f$$ is a continuous real function on a closed bounded interval $$[a, b]$$, then $$f$$ achieves a maximum and a minimum on $$[a, b]$$.

PROOF. We show first that the range of $$\left.f\right|_{[a, b]}$$ is bounded above and below. By way of contradiction suppose that the range of $$f$$ is not bounded above. For $$n \in \mathbb{N}$$, let $$a_{n} \in[a, b]$$ be such that $$f\left(a_{n}\right)>n$$. By the Bolzano-Weierstrass Theorem, the sequence $$\left\langle a_{n}\right\rangle$$ has a convergent subsequence, $$\left\langle a_{g(n)}\right\rangle$$, converging to some number $$c \in[a, b]$$. By the continuity of $$f$$, if $$c \in(a, b)$$ then $f(c)=\lim _{x \rightarrow c} f(x)=\lim _{n \rightarrow \infty} f\left(a_{g(n)}\right) .$ (See Exercise 8.25.) If $$c$$ is an endpoint of $$[a, b]$$, we make the corresponding claim for the appropriate one-sided limit. However, for any $$n \in \mathbb{N}$$, $f\left(a_{g(n)}\right)>g(n)>n .$ Hence, $$\lim _{n \rightarrow \infty} f\left(a_{g(n)}\right)$$ does not exist. Therefore the range of $$f$$ is bounded above. Similarly, the range of $$f$$ is bounded below. By the Least Upper Bound Property, the range of $$f$$ has a least upper bound, $$M$$, and a greatest lower bound, $$L$$.

Since $$M$$ is a least upper bound for the range of $$f$$, for any $$\varepsilon>0$$, there is $$x \in[a, b]$$ such that $|f(x)-M|<\varepsilon .$ For $$n \in \mathbb{N}^{+}$$, let $$a_{n} \in[a, b]$$ be such that $\left|f\left(a_{n}\right)-M\right|<\frac{1}{n} .$ The sequence $$\left\langle a_{n}\right\rangle$$ has a convergent subsequence by the Bolzano-Weierstrass Theorem. Let $$\left\langle c_{n}\right\rangle$$ be a convergent subsequence of $$\left\langle a_{n}\right\rangle$$ with limit $$c \in[a, b]$$. Since $$\left\langle c_{n}\right\rangle$$ is a subsequence of $$\left\langle a_{n}\right\rangle$$, for any $$n \in \mathbb{N}^{+}$$, $\left|f\left(c_{n}\right)-M\right|<\frac{1}{n} .$ Hence $\lim _{n \rightarrow \infty} f\left(c_{n}\right)=M .$ By the continuity of $$f$$, if $$c \in(a, b)$$ then $\lim _{x \rightarrow c} f(x)=f(c)=\lim _{n \rightarrow \infty} f\left(c_{n}\right)=M .$ If $$c$$ is an endpoint of $$[a, b]$$ we have the analogous claim for the appropriate one-sided limit. Therefore $$f$$ achieves a maximum value on $$[a, b]$$. By an analogous argument, $$f$$ achieves a minimum value on $$[a, b]$$.

By the Extreme Value Theorem, a continuous function achieves extreme values on a closed bounded interval. It is easy to construct examples for which the theorem fails for open intervals. The extreme value theorem has in common with the least upper bound property that it guarantees the existence of a number satisfying a desirable condition without providing additional information about the number itself. Quite often it is enough to know abstractly that a function attains its extremum without having to further distinguish the object. What more can we conclude about the extreme values of a function? THEOREM 8.12. Let $$f$$ be a real function defined on an interval $$(a, b)$$. If $$c \in(a, b)$$ is such that $$f(c)$$ is an extreme value of $$f$$ on $$(a, b)$$ and $$f$$ is differentiable at $$c$$, then $$f^{\prime}(c)=0$$.

PROOF. Let $$f$$ and $$c$$ satisfy the hypotheses of the theorem. Suppose that $$f(c)$$ is the maximum value achieved by $$f$$ on $$(a, b)$$. For any $$x \in(a, c), f(x) \leq f(c)$$ and $\frac{f(c)-f(x)}{c-x} \geq 0 .$ Therefore $\lim _{x \rightarrow c^{-}} \frac{f(c)-f(x)}{c-x} \geq 0 .$ Similarly, $\lim _{x \rightarrow c^{+}} \frac{f(c)-f(x)}{c-x} \leq 0 .$ However $$f$$ is differentiable at $$c$$, so $0 \leq \lim _{x \rightarrow c^{-}} \frac{f(c)-f(x)}{c-x}=f^{\prime}(c)=\lim _{x \rightarrow c^{+}} \frac{f(c)-f(x)}{c-x} \leq 0 .$ A similar argument proves the claim for $$f(c)$$ a minimum value of $$f$$ on $$(a, b)$$.

COROLLARY 8.13. Let $$f$$ be a continuous real function on a closed bounded interval $$[a, b]$$. Then $$f$$ achieves a maximum and minimum on $$[a, b]$$ and if $$c \in[a, b]$$ is a number at which $$f$$ achieves an extreme value, then one of the following must be true of $$c$$ :

(i) $$f^{\prime}(c)=0$$

(ii) $$f$$ is not differentiable at $$c$$

(iii) $$c$$ is an endpoint of $$[a, b]$$.

THEOREM 8.14. Mean Value Theorem Let $$f$$ be a continuous real function on a closed bounded interval $$[a, b]$$ and differentiable on $$(a, b)$$. Then there is $$c \in(a, b)$$ such that $f^{\prime}(c)=\frac{f(b)-f(a)}{b-a} .$ Proof. We first prove a special case of the Mean Value Theorem, known as Rolle’s Theorem. Assume that $$f(a)=f(b)$$. We prove that there is $$x \in(a, b)$$ such that $$f^{\prime}(x)=0$$.

If $$f$$ is constant then $$f^{\prime}(x)=0$$ for all $$x \in(a, b)$$. Assume that $$f$$ is non-constant and that there is $$x \in(a, b)$$ such that $$f(x)>f(a)$$. By the Extreme Value Theorem $$f$$ achieves a maximum value $$M$$ on $$[a, b]$$. Thus, $M>f(a)=f(b) .$ Let $$c \in(a, b)$$ be such that $$f(c)=M$$. By Theorem 8.12, $$f^{\prime}(c)=0$$. If there is $$x \in(a, b)$$ such that $$f(x)<f(a)$$, the proof is similar.

To prove the Mean Value Theorem in general, we reduce it to Rolle’s Theorem. We subtract from $$f(x)$$ the line segment formed by $$(a, f(a))$$ and $$(b, f(b))$$. Let $g(x)=f(x)-f(a)-\frac{f(b)-f(a)}{b-a}(x-a) .$ The function $$g(x)$$ satisfies the hypotheses of Rolle’s Theorem. So there is $$c \in(a, b)$$ such that $$g^{\prime}(c)=0$$. Since $g^{\prime}(x)=f^{\prime}(x)-\frac{f(b)-f(a)}{b-a}$ we have $g^{\prime}(c)=f^{\prime}(c)-\frac{f(b)-f(a)}{b-a}=0$ and $f^{\prime}(c)=\frac{f(b)-f(a)}{b-a} .$ The Mean Value Theorem has many practical consequences, one of which we state here.

COROLLARY 8.15. Let $$f$$ be a differentiable function on $$(a, b)$$. If $$f^{\prime}(x)>0$$ (resp. $$f^{\prime}(x)<0$$ ) on $$(a, b)$$ then $$f$$ is increasing (resp. decreasing) on $$(a, b)$$.

This page titled 8.8: Real Functions is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by Bob Dumas and John E. McCarthy via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.