statement about continuous function - false, why?

110 Views Asked by At

Let $f$ be a function defined on the closed interval $[0,1]$, such that $f(0)<f(1)$.

If for every $f(0)<b<f(1)$ there exists a $0<c<1$ such that $f(c)=b$

then $f(x)$ is continuous on the closed interval $[0,1]$.

I'm having trouble understanding why this is statement isn't true. Any idea to help me visualize it in some form will help a lot.

Thanks!

2

There are 2 best solutions below

0
On

First example: $$f(x)=\begin{cases} 2x\quad\quad\ \ \ \text{ if }\quad 0\le x\lt\frac12,\\ 2x-1\quad\text{ if }\quad\frac12\le x\le1.\\ \end{cases}$$ Now $f(0)=0\lt1=f(1)$.

If $f(0)\lt b\lt f(1)$, then $0\lt\frac b2\lt\frac12\lt\frac{b+1}2\lt1$ and $f\left(\frac b2\right)=f\left(\frac{b+1}2\right)=b$,

but $f$ is discontinuous at $x=\frac12$.


Second example:

$f\left(\frac13\right)=\frac23$ and $f\left(\frac23\right)=\frac13$, while $f(x)=x$ in all other cases.


Third example:

$f(0)=0$ and $f(1)=1$, while $f(x)=1-x$ for $0\lt x\lt1$.


On the other hand, if $f$ is a weakly increasing function on $[0,1]$ (that is, $0\le x\lt y\le1$ implies $f(x)\le f(y)$), and if $f$ maps $[0,1]$ onto $[f(0),f(1)]$, then $f$ must indeed be continuous on $[0,1]$. This is probably what you were thinking of; it's true because monotone functions can have only jump discontinuities.

0
On

It just has to "hit" all values. But it can jump about as much as it likes in doing so.

Suppose for instance $f(x) = \begin{cases} f(\frac 12) = \frac 14\\f(\frac 14) = \frac 12\\f(x)= x&\text{if }x\ne \frac 12;x\ne \frac 14\end{cases}$.

Then every condition is satisfied $f(0) = 0 < f(1) = 1$ and for every $0 < b < 1$ we have a $c: 0< c < 1$ so that $f(c) = b$. (If $b = \frac 12$ then $f(\frac 14)=b$. If $b =\frac 14$ then $f(\frac 12) =b$. And if $b \ne \frac 14$ and $b\ne \frac 12$ then $f(b) = b$.

But $f$ is not continuous at $\frac 12$ or at $\frac 14$.

If we want we can totally scramble them up. Let $f(x) =\begin{cases}x& \text{if }x\in \mathbb Q\\ 1-x &\text{if} x\not\in \mathbb Q\end{cases}$.