To show that function is constant Let $f$ be defined on $\mathbb{R}$ and suppose that |$f(x)$ - $f(y)$| $\leq$ $(x-y)^2$ $x,y \in\mathbb{R}$. Here I have to show that $f$ is a constant function.
I think I have to show that $f'(x)$ = 0 for all $x$.
But I don't know from where to start this. I tried taking it as (|$f(x)$ - $f(y)$|/|$x$-$y$|) $\leq$ |$x$ - $y$|. Am I right in doing so? Any hint or suggestion will be helpful. Thanks
 A: You are on the right track. Use the definition of the derivative: $f'(y)=\lim _{x\to y}\frac{f(x)-f(y)}{x-y}$. You wish to show this limit is $0$. Now, look at what you can estimate: $|f(x)-f(y)|$. Well, it's not far off from the numerator in the definition of the derivative. Now, a limit of an expression is $0$ iff the limit of the absolute value of the expression is $0$. So look at the limit as $x\to y$ of $\frac{|f(x)-f(y)|}{|x-y|}$. Fill in something in $0\le \frac{|f(x)-f(y)|}{|x-y|}\le ... $ based on what is given. Then conclude the desired result. 
A: Consider the definition of the derivative of $f$, $$f'(x) = \lim_{h \to 0} \frac{f(x+h)-f(x)}{h}$$
So, 
$$\begin{align}
|f'(x)| &= \lim_{h \to 0} \left |\frac{f(x+h)-f(x)}{h}\right|
\\
&\leq \lim_{h \to 0} \left |(x+h)-x\right|
\\
&=0
\end{align}\\
\therefore f'(x)=0 \text{ }\forall x$$
I went from the first step to the second by taking $x:=x+h$ and $y:=h$ in the given inequality. Since $f'=0$ identically, $f$ is constant.
A: Ya it suffices to prove that $f'(x)$ = 0  $\forall x \in \mathbb{R}$. You can use $\epsilon - \delta$ approach to prove this statement.
Let $\epsilon > 0$ be given then you need to show that $\exists$ $\delta > 0$ such that
$|\frac{f(x+h) -f(x)}{h} - 0| = |\frac{f(x+h) -f(x)}{h} | < \epsilon$ when $|h|<\delta$
but, by the definition of the function given above we have that 
$|\frac{f(x+h) -f(x)}{h}| \leq \frac{h^2}{|h|} = |h|$ . So choose $\delta = \epsilon$, and if
$|h|< \delta$ we have $|\frac{f(x+h) -f(x)}{h} - 0| < \epsilon$. Since $\epsilon > 0$ is arbitrary we have that $f'(x) = 0$
A: For any $x, y \in \mathbb{R}$, subdivide the line segment between $x$ and $y$ into $N$ pieces, we have:
$$\begin{align}
| f(y) - f(x) | = &\left|\sum_{i=1}^N \left( f(x + \frac{i}{N}(y-x)) - f(x+\frac{i-1}{N}(y-x) \right) \right|\\
\le & \sum_{i=1}^N \left| f(x + \frac{i}{N}(y-x)) - f(x+\frac{i-1}{N}(y-x)) \right|\\
\le & \sum_{i=1}^N \left|\frac{y-x}{N}\right|^2 = \frac{|y-x|^2}{N}
\end{align}$$
Since $N$ can be taken to be arbitrary large, we have:
$$|f(y) - f(x)| \le \liminf_{N\to\infty} \frac{|y-x|^2}{N} = 0\quad\implies\quad f(y) = f(x)$$
Please note that this argument not only works for $f : \mathbb{R} \to \mathbb{R}$, but for any map between normed vector spaces provided the $|\cdot|$ is interpreted properly.
