If $f : [a, b] \to \mathbb{R}$ is cont, non-monotonic, there exists $u,v \in [a, b]$ such that $f(u) = f(v)$ 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.
 A: If $f$ is non-monotonic, there must exist $p<q<r$ 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.
A: Let $A=\{(x,y):a\leq x<y\leq b\}\subset \mathbb R^2$, and let $g:A\to\mathbb R$ be defined by $g(x,y)=f(y)-f(x)$.  Then $g$ is continuous, and $A$ is connected, so $g(A)$ is connected.  Nonmonotonicity of $f$ means that $g$ takes on both positive and negative values, and connected subsets of $\mathbb R$ are intervals, so $0$ must be in $g(A)$.  In other words, there exist $u$ and $v$ in $[a,b]$ with $u<v$ and $f(u)=f(v)$.

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$.
A: Since $f$ is not monotonic, there are $c_1,c_2,c_3\in[a,b]$ such that $c_1<c_2<c_3$ and either $$f(c_1)<f(c_2)>f(c_3)\;,$$ so that the function goes up and then down, or $$f(c_1)>f(c_2)<f(c_3)\;,$$ so that it goes down and then up. I’ll look at the first case; the second is similar (or you can simply apply the first to $-f$).
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)$.
