Let $|f(x)-f(y)| \leqslant (x-y)^2$ for all $x,y\in \mathbb{R}.$ Show that $f$ is a constant. 
Let $|f(x)-f(y)| \leqslant (x-y)^2$ for all $x,y\in \mathbb{R}.$ Show that $f$ is a constant.

This seemed quite straightforward just using the definition of the derivative, but I've ran into some weird issue. I have that $$|f(x)-f(y)| \leqslant (x-y)(x+y) \Longrightarrow \frac{|f(x)-f(y)|}{x-y} \leqslant x+y$$
from where I have that $\lim_{x\to y} x+y = 2y$.
If the problem assignment would instead had $|f(x)-f(y)| \leqslant |(x-y)^2|$ I would have gotten $$|f(x)-f(y)| \leqslant |x-y||x+y| \Longrightarrow \frac{|f(x)-f(y)|}{x-y} \leqslant |x-y|$$
from where $\lim_{x\to y} |x-y| = 0$. And $f$ would be a constant. What might I be missing here?

We have
$$
|f(x)-f(y)| \leqslant (x-y)^2
$$
so
$$
\frac{|f(x)-f(y)|}{|x-y|} \leqslant |x-y|
$$
so
$$
\frac{|f(x)-f(y)|}{|x-y|} \to_{y \to x} 0.
$$
Thus $f'=0$ and $f$ is constant.
