# $f:\mathbb{Q}\rightarrow\mathbb{Q}$ such that $|f(x)-f(y)|\leq {|x-y|}^2$ for any $x,y\in \mathbb{Q}$.

Find $f:\mathbb{Q}\rightarrow\mathbb{Q}$ such that $|f(x)-f(y)|\leq {|x-y|}^2$ for any $x,y\in \mathbb{Q}$.

I want to show that the only solutions are the constant functions. I tried to construct a function on $\mathbb{R}$, equal on $\mathbb{Q}$ with $f$, who satisfies the condition, but I didn't succeed.

Let $x\in \mathbb{Q}$. For every $n\in\mathbb{N}$ you have that $$|f(x) - f(0)| = \left|\sum_{j=1}^n \left[f\left(j\frac{x}{n}\right) - f\left((j-1)\frac{x}{n}\right)\right]\right| \leq \sum_{j=1}^n \frac{x^2}{n^2} = \frac{x^2}{n}\,.$$ Letting $n\to +\infty$ you get that $f(x) = f(0)$.