This is obviously true, but I can't quite prove it.
If $f : [a, b] \to \mathbb{R}$ is non-monotonic and continuous, there exists distinct $u,v \in [a, b]$ such that $f(u) = f(v)$
Any help is appreciated.
This is obviously true, but I can't quite prove it.
If $f : [a, b] \to \mathbb{R}$ is non-monotonic and continuous, there exists distinct $u,v \in [a, b]$ such that $f(u) = f(v)$
Any help is appreciated.
If $f$ is non-monotonic, there must exist $p such that $f(p) > f(q)$ and $f(q) < f(r)$ or $f(p) < f(q)$ and $f(q) > f(r)$. By this I mean there is a part of your function that goes up and then down, or down and then up, if you try to draw it (just the definition of non-monotonic).
If $f(p) = f(r)$ then you are done. Suppose that $f(p) < f(q)$ and $f(q) > f(r)$. Then choose the maximum of $f(p)$ and $f(r)$, without loss of generality suppose it is $f(p)$. Then by the intermediate value theorem, because $f(q) > f(p) > f(r)$ you can find the point you want; that is to say there is some $u \not= p$ such that $f(u) = f(p)$.
The other case is similar.
Let $A=\{(x,y):a\leq x
Connectedness is used above, whereas the Intermediate Value Theorem (IVT) was used in the other answers (so far). The IVT can be seen as a consequence of connectedness, where the essential property of $\mathbb R$ is that intervals are connected. (The converse, saying that connected subsets of $\mathbb R$ are intervals, is also needed, but it is easier to prove, and would be true in any order topology.)
Above, instead of using connectedness of intervals directly, connectedness of $A$ is essential. To actually prove that $A$ is connected, one can ultimately use connectedness of intervals in $\mathbb R$.
Since $f$ is not monotonic, there are $c_1,c_2,c_3\in[a,b]$ such that $c_1
Just pick any $y_0\in\Big(\max\{f(c_1),f(c_3)\},f(c_2)\Big)$, and apply the intermediate value theorem to the intervals $(c_1,c_2)$ and $(c_2,c_3)$.