Question about proof of intermediate value theorem

211 Views Asked by At

I have a question about proof of intermediate value theorem. I will post the entire proof here.

Let $I\subset \Bbb{R}$ be interval $I=(a,b)$, and $f:I\rightarrow\Bbb{R}$ be a continous function. then if some $u$ is between $f(a),f(b)$, then there exists some $c\in (a,b)$ such that $f(c)=u$.

WLOG assume $f(a)<f(b)$. For $f(a)>f(b)$ the proof is very simillar.

Let $S=\{x\in(a,b);f(x)<u\}$. S is non-empty, because $a\in S$ and $S$ is bounded above by $b$. By completeness, $\sup{S}$ exists, call it $c$. We claim, that $f(c)=u$.

Choose some $\epsilon>0$. $f$ is continuous, thus $$f(x)-\epsilon<f(c)<f(x)+\epsilon$$ for all $x\in (c-\delta,c+\delta)$.

By the properties of the supremum, we can chose some $a^*$ from $(c-\delta,c)$ such that $a^*\in S$. We have $$f(c)<f(a^*)+\epsilon\leq u+\epsilon$$

Similarly we can chose $a^{**}$ from $(c,c+\delta)$ such that $a^{**}\notin S$. We have $$f(c)>f(a^{**})-\epsilon\geq u-\epsilon$$

which together gives $$u-\epsilon<f(c)<u+\epsilon$$ which holds for all $\epsilon >0$, thus $f(c)=u$ is the only possible value, as claimed.

My question is: Why can't we conclude the proof after saying that the supremum exist? I don't understand in which sense we used the fact that $f$ is continuous. As I know, if we don't use all assumptions in a proof, it is somehow wrong. Would anyone please explain me, what could happen if $f$ wasn't continuous? Why can't we say directly from definition of $S$ that $\sup{S}=u=f(c)$, I must be missing something.

2

There are 2 best solutions below

4
On BEST ANSWER

The continuity of the function $f$ is used to choose some $a^*$ and $a^{**}$ that are within $\epsilon$ of the value $f(c)$. You cannot assume that any choice of $a^*\in(c-\delta,c)$ will satisfy $f(c)<f(a^*)+\epsilon$ without the continuity of $f$ (the continuity of $f$ implies $|f(x)-f(c)|< \epsilon$ for all $x\in(c-\delta,c+\delta)$). Similarly with the choice of $a^{**}$.

0
On

Suppose that $a=-1$, $b=1$, and $f\colon[-1,1]\longrightarrow\mathbb R$ is defined by$$f(x)=\begin{cases}-1&\text{ if }x<0\\1&\text{ otherwise.}\end{cases}$$Take $u=0$. Then $S=[-1,0)$ and therefore $c=0$. However, $f(c)=f(0)=1\neq0$.

The problem here is that $f$ is discontinuous at $0$. Otherwise, we would necessarily have $f(c)=0$.