Prove that a continuous function on a closed interval attains a maximum

23.3k Views Asked by At

As the title indicates, I'd like to prove the following:

If $f:\mathbb R\to\mathbb R$ is a continuous function on $[a,b]$, then $f$ attains its maximum.

Now, I do have a working proof: $[a,b]$ is a connected, compact space, which means that because $f$ is continuous, $f([a,b])$ is compact and connected as well. Therefore, $f([a,b])$ is a closed interval, which means it has both a minimum and, as desired, a maximum.

What I would like, however, is a proof that doesn't require such general or sophisticated framework. In particular, I'd like to know if there's a proof that is understandable to somebody beginning calculus, one that (at the very least) doesn't invoke compactness. Any comments, hints, or solutions are welcome and apreciated.

4

There are 4 best solutions below

4
On BEST ANSWER

Here’s a sketch of one possible argument. Let $u=\sup_{x\in[a,b]}f(x)$. (Note that I allow the possibility that $u=\infty$.) There is a sequence $\langle x_n:n\in\Bbb N\rangle$ in $[a,b]$ such that for each $n\in\Bbb N$, $u-f(x_n)<\frac1{2^n}$ if $u\in\Bbb R$ and $f(x_n)>n$ if $u=\infty$. Extract a monotone subsequence $\langle x_{n_k}:k\in\Bbb N\rangle$. Being a monotone, bounded sequence, $\langle x_{n_k}:k\in\Bbb N\rangle$ converges to some $y$. (Note that you have to use the completeness of $\Bbb R$ in some way, and this is the most elementary that occurs to me.) Moreover, $y\in[a,b]$, and $f$ is continuous, so $f(y)=\lim\limits_{k\to\infty}f(x_{n_k})=u$. (Note that this shows that in fact $u\in\Bbb R$.)

0
On

Yes, quite a few such proofs exist. You first prove that a continuous function is bounded, and apply the Bolzano-Weierstrass theorem. Here is such a proof from my lecture notes in a first course in analysis:

By the earlier result, $\,f$ is bounded. Consider the image of $[a,b]$ under $f$: $$A = f([a,b]) = \left\{f(x) : x \in [a,b]\right\}.$$ $f$ bounded means that $A$ is bounded as a subset of $\mathbb{R}$. We also have that $A \neq \emptyset$. We will prove the existence of $x_2$, and the existence of $x_1$ is proved similarly.

Since $A$ is bounded and non-empty, there is a supremum: $M=\sup A$. Given any positive integer $n$, $M-1/n$ cannot be an upper bound for $A$. Then there exists some $x_n \in [a,b]$ such that $$M-\frac{1}{n} < f(x_n) \leq M. \tag{$*$}$$ By Bolzano-Weierstrass, $x_n$ has a convergent subsequence $x_{n_{j}} \to x$. Since $a\leq x_{n_{j}}\leq b$, $a\leq x\leq b$. By the continuity of $f$, $\,f(x_{n_{j}}) \to f(x)$. But by $(*)$, $\,f(x_{n_{j}}) \to M$. By the uniqueness of the limit, $\,f(x)=M$. Now set $x_2=x$. $\square$

0
On

I don't know how you can avoid compactness entirely. Here's one that uses sequential compactness in the form of the Bolzano-Weierstrass theorem, "every bounded sequence has a convergent subsequence". (To justify that theorem to beginners, you could take it as an axiom that every bounded monotonic sequence converges, and show them the proof that every sequence has a monotonic subsequence.) For some reason that escapes me, this proof is often done in two stages, first proving that the function is bounded and then showing that the it attains a maximum.

Given a continuous real-valued function $f$ on $[a,b]$, we will show that the set $Y = f([a,b])$ has a greatest element.

For each positive integer $n$, define a finite set $Q_n = \{p/q: p,q \text{ integers, } 0 < q \le n, |p| \le n\}$.

Choose $y_n\in Y$ so as to maximize the number of elements in the set $\{r\in Q_n: y_n > r\}$, and choose $x_n\in[a,b]$ with $f(x_n) = y_n$.

The sequence $\{x_n\}$ has a subsequence converging to a point $c\in[a,b]$. Since $f$ is continuous, the corresponding subsequence of $\{y_n\}$ converges to $f(c)$. We will show that $f(c)$ is the greatest element of $Y$.

Assume for a contradiction that $f(c)<y\in Y$. Choose a rational number $r$ so that $f(c)<r<y$. Because of the way $y_n$ was chosen, we have $y_n > r$ whenever $r\in Q_n$. Since $r\in Q_n$ for all sufficiently large $n$, we have $y_n > r > f(c)$ for all sufficiently large $n$. But this is absurd, since $\{y_n\}$ has a subsequence converging to $f(c)$.

5
On

This theorem ultimately depends on the completeness of real number system and can't be proven without using any result equivalent to the completeness of real number system. If we assume that every continuous function on a closed interval is bounded then we can provide a very simple proof of the current problem being discussed here.

Under this assumption we have the existence of $M = \sup\{f(x)\mid x \in [a, b]\}$. If $f(x)\neq M$ for all $x \in [a, b]$ then the function $g(x) = 1/(M - f(x))$ is continuous in $[a, b]$ and hence bounded in $[a, b]$. On the other hand by definition of $M$ we can find $x \in [a, b]$ such that $M - f(x)$ can be made arbitrarily small. Thus $g(x)$ can be made arbitrarily large. This contradiction shows that we must have $f(x) = M$ for some $x \in [a, b]$.

The result that every continuous function is bounded on a closed interval is itself another property of continuous functions which can't be proved without using completeness of real number system.

I have presented various proofs of these properties of continuous function here.