Consider a continuous function $f$ on $[a,b]$ with $f(a)=f(b).$ Define $$A=\sup \left \{ f(x) \mid x \in [a,b] \right \}$$ and $$B= \inf \left \{ f(x) \mid x \in [a,b] \right \}.$$ My goal is to prove the statement:
If $B<m<A$, then there exists $c,d \in [a,b]$ such that $f(c)=f(d)=m$ with $c$ and $d$ not equal.
I was given a hint that we can split the proof into two different cases, looking at $f(a) \neq A$ and $f(a) \neq B.$ . However, I am still a little stuck.
I know that if $f(a) \neq A$, then we can let $$f(a)<m<A.$$ Then we know there exists an $x_{1} \in (a,b)$ such that $f(x_{1})=A.$ . Then we can consider the sets $$[a,x_{1}] \ \ \ \ \text{and} \ \ \ \ [x_{1},b].$$ From here I am not really sure how to continue. Can anyone help me complete the proof in this manner? Is there any easier way to do it?
Thanks in advance!
Let's do the case $f(a)<A$. Since $f$ is continuous, there exists $c\in[a,b]$ such that $f(c)=A$. Since $f(a)=f(b)<A$ we have $a,b\ne c$. By the Intermediate Value Theorem, there exists $x_1\in(a,c)$ such that $f(x_1)=m$. But $f(b)=f(a)<A$, and there exists $x_2\in(c,b)$ such that $f(x_2)=m$. It is clear that $x_1\ne x_2$.