Prove a function is constant under certain conditions 
Let $f: \mathbb{R} \rightarrow \mathbb{R}$ be smooth and such that for every $x$
$$\int_{-\infty}^{\infty}\frac{|f(x)-f(y)|}{|x-y|^2}dy < \infty$$
  Prove that $f$ is constant.

 A: If $f$ is not constant, then $f'(a)\ne 0$ for some $a.$ Thus for some $\delta >0,$ $|f(y)-f(a)|/|y-a|>|f'(a)|/2$ for $a<y<a+\delta.$ Taking $x=a,$ the integral of interest is at least
$$\int_{a}^{a+\delta}\frac{|f(a)-f(y)|}{|a-y|^2}dy \ge \frac{|f'(a)|}{2}\int_{a}^{a+\delta}\frac{1}{y-a}dy =\infty,$$
contradiction.
A: Sketch for a proof: from the Taylor's theorem we have that
$$
f(x)=f(y)+f'(y)(x-y)+O(|x-y|^2),\quad  \text{ when }|x-y|\to 0
$$
And because the integral converges then for any chosen $\epsilon >0$ there is some $\delta >0$ such that
$$
\int_{x-\delta }^{x+\delta }\frac{|f(x)-f(y)|}{(x-y)^2}\,\mathrm d y=\int_{x-\delta }^{x+\delta }\left|\frac{f'(y)}{x-y}+ \frac{O(|x-y|^2)}{(x-y)^2} \right|\,\mathrm d y<\epsilon 
$$
Because $f$ is smooth then $f'$ is continuous in $[x-\delta ,x+\delta ]$ so $f'$ is bounded here, and also its bounded the term $O(|x-y|^2)/(x-y)^2$ (check the definition of big Oh, or instead of big Oh notation use the Taylor's remainder). 
If you show that $f'(x)=0$ we are done. Can you continue from here?

 What happen if $f'(x)\neq 0$?

