$|f(x)-f(y)|\leq (x-y)^2$ for all $x,y\in\mathbb{R}$ differentiable 
Possible Duplicate:
Proof of a simple property of real, constant functions. 


Suppose $|f(x)-f(y)|\leq (x-y)^2$ for all $x,y\in\mathbb{R}$. Show f is differentiable.

This follows intuitively, the derivative $2(x-y)$ is defined on $\mathbb{R}$. How do I show this formally?
 A: You can write this inequality as: $$-(x-y)^2\leq f(x)-f(y)\leq (x-y)^2$$ Assume that $x>y$. Then 
$$-(x-y)\leq \frac{f(x)-f(y)}{x-y}\leq (x-y)$$Taking the limits as $x$ approaches $y$ and respecting the case $y>x$ you come to the conclusion that $f'(y)=0$ for all $y$. So, $f$ is differentiable.
A: You have to show that, for every $x \in \mathbb{R}$, the limit of $\frac{f(x+h)-f(x)}{h}$ as $h \to 0$ exists. In fact, the limit is zero. In order to show this, just begin with $\left|\frac{f(x+h)-f(x)}{h}\right| \leq \dotsc$.
A: 
Then $f$ is constant (in particular, $f$ is differentiable).

To show this, consider $x\ne y$, split the interval between $x$ and $y$ into $n\geqslant1$ parts of length $|x-y|$ and apply the triangular inequality. This yields
$$
|f(x)-f(y)|\leqslant\sum_{k=1}^n\left|f\left(x+\frac{k-1}n(y-x)\right)-f\left(x+\frac{k}n(y-x)\right)\right|.
$$
Now, apply the hypothesis to each of these intervals. The result is
$$
|f(x)-f(y)|\leqslant\sum_{k=1}^n\frac{|y-x|^2}{n^2}=\frac1n|y-x|^2.
$$
When $n\to\infty$, this proves that $f(x)=f(y)$.
Note that the same result holds as soon as $|f(x)-f(y)|\leqslant C|x-y|^a$ for every $x$ and $y$, for some $a\gt1$.
A: Have a look at this. Read the description and the top response. That may give you a clue or two.
