Let $f$ be a function that is continuous on $[a,b]$ for some $a<b$. Suppose that f(a)=f(b)=0, and let $M=\sup${$f(x) : x \in [a,b]$}, while $M>0$, and let $0 \leq r < M$.
Prove that the set {$x \in [a,b] : f(x)=r$} contains at least two distinct points.
--
So, because $M>0$ and $M=\sup${$f(x) : x \in [a,b]$}, there exists $x_{0} \in [a,b]$ such that $f(x_{0})=M>0$, so we get $f(a) \leq r < f(x_{0})$.
$f$ is continuous on $[a,b]$ for $a<b$, so from IVT, there exists $c,r \in R$, $f(a)\leq r<f(x_{0})$ such that $f(c)=r$.
From here I am a bit confused on what to do next.
Any tip will be very appreciated!
Thanks a lot!
hint
Assume $ r>0$.
$ f $ is continuous at the compact $ [a,b] \implies $
$$(\exists c\in(a,b) )\;:\;f(c)=M$$
let $$g(x)=f(x)-r$$ $ g $ is continuous at $ [a,c] $ and $ [c,b]$. $$g(a)g(c)=-r(M-r)<0$$
and
$$g(c)g(b)=-r(M-r)<0$$
conclude by IVT.