Prove that $f$, such that $\forall\delta\gt0$ $|f(y)-f(x)|\lt\delta^2$ $\forall x,y\in\mathbb{R}$ and $|y-x|\lt\delta$, is a constant function. The function $f$ is defined on $\mathbb{R}$ such that for every $\delta\gt0$, $|f(y)-f(x)|\lt\delta^2$  for all $x,y\in\mathbb{R}$ and $|y-x|\lt\delta$. Prove that $f$ is a constant function. 
So, what I know, is that I need to show that $f(a)=f(b)$ for all points $a,b\in\mathbb{R}$. Or for every $\epsilon\gt0$, $|f(a)-f(b)|\lt\epsilon$. 
I'm at a loss here. I got a hint to divide the interval $[a, b]$ into $n$ smaller intervals. But I don't understand why, and how this would help me.  
Hints and preferably a proof are very much appreciated. Thanks in advance. 
 A: I have what I think is an equivalent situation:

Suppose $f$ is such that $f(x)-f(y)\leq (x-y)^2$ for all $x,y$. Then $f$ is constant. 

PROOF Choose any $x,y$. The hypothesis means that
$f(y)-f(x)=-(f(x)-f(y))\leq (y-x)^2$ whence $|f(x)-f(y)|\leq (x-y)^2$ for each $x,y$. Divide $[x,y]$ into $n$ intervals $[x_{k-1},x_k]$ such that $x_k-x_{k-1}=\dfrac{y-x}n$, $x_0=x$; $x_n=y$. That is, $$x_k=x+\frac k n (y-x)$$
Then
$$|f(x)-f(y)|=\left|\sum_{k=1}^n f(x_{k-1})-f(x_k)\right|\\ \leq \sum_{k=1}^n\left|f(x_{k-1})-f(x_k)\right| \\ \leq \sum\limits_{k = 1}^n {{{\left( {{x_{k - 1}} - {x_k}} \right)}^2}} \\ = \frac{1}{{{n^2}}}\sum\limits_{k = 1}^n {{{\left( {y - x} \right)}^2}}  = \frac{{{{\left( {y - x} \right)}^2}}}{n}$$
Thus
$$\tag 1 \left| {f\left( x \right) - f\left( y \right)} \right| \leq \frac{{{{\left( {y - x} \right)}^2}}}{n}$$
for every $n\in \Bbb N$. Now suppose $f(x)\neq f(y)$. $(1)$ means $$\tag 2 \frac{{\left| {f\left( x \right) - f\left( y \right)} \right|}}{{{{\left( {y - x} \right)}^2}}} \leq \frac{1}{n}$$
But since $|f(x)-f(y)|>0$ we have $$\frac{{\left| {f\left( x \right) - f\left( y \right)} \right|}}{{{{\left( {y - x} \right)}^2}}} > 0$$whence there must be an $n$ such that $$\frac{1}{n} < \frac{{\left| {f\left( x \right) - f\left( y \right)} \right|}}{{{{\left( {y - x} \right)}^2}}}$$
But this contradicts $(2)$. Then it must be $f(x)=f(y)$ for each choice of $x,y$.
A: Hint: Show that $f$ is differentiable in each point and the same time that the derivative is $0$.
A: It is natural to think that the given condition implies the inequality
$$\left| f(y) - f(x) \right| \leq C \left| y - x \right|^2. \tag{1}$$
But this implication requires some justification. So here is a proof.
Let $\epsilon > 0$ be any positive real number. To prove $(1)$, we decompose the set $\{ 0 < \left| y - x \right| < \epsilon \}$ in a dyadic manner as follow:
$$ \{ 0 < \left| y - x \right| < \epsilon \} = \bigcup_{n=1}^{\infty} \big\{ 2^{-n} \epsilon \leq \left|y - x\right| < 2^{-(n-1)}\epsilon \big\}. $$
Then whenever $n \geq 1$ and $2^{-n} \epsilon \leq \left|y - x\right| < 2^{-(n-1)}\epsilon$, we have
$$ \left|f(y) - f(x)\right| < 2^{-2(n-1)} \epsilon^2 \leq 4 \left| y - x \right|^2. $$
Thus whenever $0 < \left| y - x \right| < \epsilon$, we have $2^{-n} \epsilon \leq \left|y - x\right| < 2^{-(n-1)}\epsilon$ for some $n \geq 1$ and hence
$$ \left|f(y) - f(x)\right| \leq 4 \left| y - x \right|^2. $$
Then it follows that
$$ \left|\frac{f(y) - f(x)}{y - x}\right| \leq 4 \left| y - x \right|, $$
proving $(1)$ with $C = 4$.
Now the rest follows in various ways as many people pointed out. For example, taking the limit as $y \to x$, we find that $f$ is differentiable at any point $x$ with vanishing derivative. Therefore $f$ is constant.
A: Step 1. Let $x,y\in\mathbb{R}$ with $x \ne y$. For all $r>1$ we have $|x-y|<r|x-y|$, so $|f(x)-f(y)|<r^2|x-y|^2$. This is true for all $r>1$, so we must have $|f(x)-f(y)| \le |x-y|^2$.
Step 2. This is just Exercise 5.1 in Rudin; rewrite the above as
$$\left\vert\frac{f(x)-f(y)}{x-y}\right\vert \le |x-y|$$
and it's easy to see that $f'(x)=0$ for all $x\in\mathbb{R}$ directly from the definition of the derivative as a limit. Apply the mean value theorem, and you're done.
