Problem with prove $f$ is constant with derivatives. i got a problem with this exercise:
Be $f:\;\mathbb{R\rightarrow\mathbb{R}}$ a function such that 
$|f(x)-f(y)|\leq(x-y)^{2}$, $\forall x,y\in\mathbb{R}$
Prove $f$ is constant.
Well... i was thinking about make this exercise for reduction to absurdity. I suppose exist $c\in(x,y)$ such that $f'(c)\neq 0$ if that happen then $f(x)\neq f(y)$ for $x,y \in \mathbb R$. Some ideas? please help :l i'm stuck in this exercise.
 A: You first need to show that $f$ is differentiable. And, in the same step, one can show that the derivative is zero:
$$
\left|\frac{f(y)-f(x)}{y-x}-0\right|=\frac{|f(y)-f(x)|}{|y-x|}\leq\frac{|y-x|^2}{|y-x|}=|y-x|.
$$
Then
$$
\lim_{y\to x}\frac{f(y)-f(x)}{y-x}=0
$$
for all $x$, i.e., $f'(x)$ exists for all $x$ and $f'(x)=0$. Now you can use the Mean Value Theorem to show that $f$ is constant. 
A: Note that by the definition of the derivative is $$f'(x) = \lim_{x \rightarrow y} \frac{f(x) - f(y)}{x -y}, $$
which implies that $$| f'(x) | =\lim_{x \rightarrow y} \left| \frac{f(x) - f(y)}{x - y} \right| = \lim_{x \rightarrow y} \frac{|f(x) - f(y)|}{|x - y|} ...$$
Now can you use your hypotheses to show that the derivative of $f(x)$ is equal to 0? 
A: $$|f(x) - f(y)| \leq (x-y)^2 \iff |f(x) - f(y)| \leq |x-y|^2 \iff \left|\frac{f(x)-f(y)}{x-y}\right|\leq |x-y|$$
If we let $t = y-x$ then;
$$\lim_{t \to 0} \ \frac{f(x+t)-f(x)}{t} = \lim_{x \to y} \ \frac{f(y)-f(x)}{y-x} \leq \lim_{x \to y} |x-y| = 0$$
i.e 
$$|f'(x)|  =\lim_{x \to y}\left|\frac{f(x)-f(y)}{x-y}\right| \leq \lim_{x \to y} \ |x-y| = 0$$
and so $f'(x) = 0, \forall x$ i.e $f$ is constant. 
