I am wondering whether the statement below is true (I cannot find a proof or a counterexample). It roughly says "If a continuous function decreases over an interval, it has to decrease at some point in this interval" and decrease at a point is defined as below.
Let $f:[0,1]\rightarrow\Re$ be a continuous function that is differentiable almost everywhere. Assume $f(0)>f(1)$. Then there exists a point $x_0$ and a $\epsilon>0$ such that either
(i) $f(x)\geq f(x_0)$ for all $x\in(x_0−\epsilon,x_0)$ and $f(x)<f(x_0)$ for all $x\in(x_0,x_0+\epsilon)$ or
(ii) $f(x)>f(x_0)$ for all $x\in(x_0−\epsilon,x_0)$ and $f(x)\leq$ $f(x_0)$ for all $x\in(x_0,x_0+\epsilon)$.
So far, I understand that the statement would be wrong if the "differentiable almost everywhere" assumption was not satisfied: Then the Weierstrass function would be a counterexample. If $f$ was differentiable everywhere, the statement would obviously be true. The almost everywhere differentiable case seems unclear to me. Any ideas how the statement above could be proven or whether there is a counterexample? Thanks for your thoughts!