Let $f:\mathbb R \rightarrow \mathbb R$ be continuous with $f(0)=f(1)=0.$

I was thinking about the following problem:
Let $f:\mathbb R \rightarrow \mathbb R$ be continuous with $f(0)=f(1)=0.$Then which of the following is not possible?

(a) $f([0,1])=\{0\},$

(b) $f([0,1])=[0,1),$

(c) $f([0,1])=[0,1],$

(d) $f([0,1])=[-1/2,1/2].$

Can someone point me in the right direction? Thanks in advance for your time.

-
Hint: The continuous image of a compact set is compact. –  Clayton Dec 17 '12 at 3:19
Continuous functions reach their max and min on a closed interval. –  Artem Dec 17 '12 at 3:20
To show that an option is possible, the easiest way is to exhibit a continuous function with the given property. Can you show that some of these options are possible? –  Andres Caicedo Dec 17 '12 at 3:20
Right direction: (b) –  Quinn Culver Dec 17 '12 at 3:33
Thanks a lot sir. –  learner Dec 17 '12 at 3:36

Let $[a,b]$ be a closed interval containing 0. Consider the function

$$f : x\mapsto\cases{ 3ax, & if 0\le x\le \frac13 \\ a + (3x-1)(b-a) & if  \frac13\le x \le \frac23 \\ (3-3x)b & if  \frac23\le x \le 1 }$$

The graph of $f$ is a piecewise-linear zigzag which starts at $\langle0,0\rangle$, zigs down to $\langle\frac13, a\rangle$, zags up to $\langle \frac23, b\rangle$, and then zigs back down to $\langle 1, 0\rangle$.

So $f$ is a continuous function on $[0,1]$ with range $[a,b]$, and $f(0)=f(1) = 0$.

-
I take it that $a\le0$ and $b\ge0$? –  David Mitra Dec 17 '12 at 3:54
@david: Is that required anywhere? I don't think so. But my informal description of the shape of the graph might be inaccurate. –  MJD Dec 17 '12 at 10:27
If $0$ is in the range (or, maybe i'm missing something)... –  David Mitra Dec 17 '12 at 12:28
@david Oh, I see your point. It can't have $f(0)=f(1)=0$ and a range of $[a,b]$ unless $0\in [a,b]$. Yes, quite so. I will edit the question appropriately. Thank you. –  MJD Dec 17 '12 at 14:51

By the Extreme Value Theorem, any function that is continuous on a closed and bounded interval (in this case, $[0, 1]$) has a global maximum and minimum.

The interval $[0, 1)$ in (b) has $1$ as a least upper bound, but not as a local maximum, which contradicts the Extreme Value Theorem.

-
Thanks a lot @Joe Zeng. +1 from me. –  learner Dec 17 '12 at 3:59

Hints:

$$f(x)=0\;\;,\;\;f(x)=\sin \pi x\;....$$

-
also thought of that –  Quickbeam2k1 May 30 '13 at 18:44