Prove that f is differentiable in $\mathbb{R}$ Let $f: \mathbb{R} \rightarrow \mathbb{R}$ some function that all $x$ and $y$ in $\mathbb{R}$ satisfies: $$\left|f(x)-f(y)\right| \le (x-y)^2$$


*

*Prove that f is differentiable in any point in $\mathbb{R}$.

*Prove that f is constant.

 A: You have $|f(x)-f(y)|\le |x-y||x-y|$ then $\displaystyle\frac{|f(x)-f(y)|}{|x-y|}\le|x-y|$ Just take the limit as $x\to y$ , you get $|f'(y)|\le 0$(then $f'(y)=0)$ for all $y$ then $f$ is constant  
A: I would like to point out that it is possible to prove the assertion without proving differentiability in the first place.
For each x we have 
$$|f(x)-f(0)| = \left|\sum_{k=1}^n f\left(\frac{k}{n} \cdot x\right)-f\left(\frac{k-1}{n}\cdot x\right)\right|$$
Thus by the triangle inequality
$$|f(x)-f(0)| \le \sum_{k=1}^n \left|f\left(\frac{k}{n}\cdot x\right)-f\left(\frac{k-1}{n}\cdot x\right)\right|$$
Since for each $k$
$$\left|f\left(\frac{k}{n}\cdot x\right)-f\left(\frac{k-1}{n}\cdot x\right)\right| \le \left|\frac{k}{n}\cdot x-\frac{k-1}{n}\cdot x\right|^2 = \left|\frac{x}{n}\right|^2$$ 
It follows that 
$$|f(x)-f(0)| \le \sum_{k=1}^n \frac{x^2}{n^2} = \frac{x^2}{n}$$
And thus
$$|f(x)-f(0)|\le \limsup_{n\rightarrow\infty} \frac{x^2}{n} = 0$$
Hence for all $x$
$$f(x)=f(0)$$
Thus f is constant. It follows that f is differentiable everywhere ;)
A: For each $x\in\mathbb R$, for each $y\in\mathbb R$ with $y\neq x$, we have $0\leq |\frac{f(x)-f(y)}{x-y}|\leq |x-y|$. Let $y\to x$. Then by squeezing we obtain $f'(x)=0$ for all $x\in\mathbb R$ so that $f$ is constant.
A: Let $a\in\Bbb R$ be fixed and $x\neq a$ then
$$\left| \frac{f(x)-f(a)}{x-a}\right|\le|x-a|$$
Since $\lim_{x\to a}|x-a|=0$, we get $\lim_{x\to a} \left| \frac{f(x)-f(a)}{x-a}\right|=0$. So $f$ is differentiable at $a$.
And $f'(a)=0$ for all $a$, By mean value theorem we get
$$f(x)-f(y)=f'(c)(x-y)$$
for some $c$. Since $f'(c)=0$, we get $f(x)=f(y)$, So $f$ is constant.
A: By definition of what it means to be differentiable, you want to prove that the limit
$$
\lim_{x\to y} \frac{f(x)- f(y)}{x-y}
$$
exists for all $y\in \mathbb{R}$. That will follow (in this case) from showing that
$$
\lim_{x\to y} \left\lvert\frac{f(x)- f(y)}{x-y}\right\rvert
$$
exists. Now you have that 
$$
0\leq \left\lvert\frac{f(x)- f(y)}{x-y}\right\rvert = \frac{\lvert f(x)- f(y)\rvert}{\lvert x-y\lvert} \leq \frac{\lvert x - y\rvert^2}{\lvert x - y\rvert} = \lvert x - y\rvert.
$$
Now you have $\lvert x - y\rvert \to 0$ as $x \to y$. So by the Squeeze Theorem you must also have
$$
\lim_{x\to y} \left\lvert\frac{f(x)- f(y)}{x-y}\right\rvert = 0
$$
And so
$$
\lim_{x\to y} \frac{f(x)- f(y)}{x-y} = 0
$$
That means that $f$ is differentiable and that the derivative at any number $y$ is zero: $f'(y) = 0$.
As others have already mentioned this means that $f$ must be a constant: If you had $f(x) \neq f(y)$ for some $x$ and $y$. Then by the Mean Value Theorem you would have a $c$ between $x$ and $y$ such that $0\neq f(x) - f(y) = f'(c)(x-y) = 0$. This is a contradiction, so indeed $f(x) = f(y)$ for all $x$ and $y$.
