Prove that $f$ is constant if and only if for all point pair $x,y \in \mathbb{R} $, $$ | f(x) - f(y) | \leq (x-y)^2 $$
My attempt:
It's a double implication so...
To right:
$f$ is constant $\Rightarrow \forall c \in \mathbb{R}, f(c) = k $, with $ k \in \mathbb{R} \Rightarrow \forall x,y \in \mathbb{R} , | f(x) - f(y) | = 0 \Rightarrow 0 \leq (x-y)^2 $
We observe that $(x-y)^2$ is the square of the difference of two real numbers, hence, is always positive.
To left:
We cant think $(x-y)^2$ as $|x-y|^2$, so:
$$ | f(x) - f(y) | \leq |x-y|^2$$ $$ \Bigg|\frac{f(x) - f(y)}{x-y}\Bigg| \leq |x-y| $$ $$ \lim_{x \to y}{\Bigg|\frac{f(x) - f(y)}{x-y}\Bigg|} \leq \lim_{x \to y}{|x-y|} $$ $$ |f'(y)| \leq 0 $$ We know that the module of a number is always greater or equal to $0$. So $ |f'(y)| = 0 $. $$ |f'(y)| = 0 \Rightarrow f(y) \ \text{is constant} $$
But I'm not sure if I can get into the absolute value with the limit. The statement doesn't mention that $f$ is differentiable.