Now I have seen a lot of answers around here which seem to be good enough. Problem is, our teacher asked us to prove it his way.
Suppose we know that
$$|u(x)−u(y)|≤(x−y)^2$$ Prove, by adding and subtracting $$u((y+x)/2)$$
that u is a constant function.
Now I made use of the triangular inequality and got to
$$||u(x)-u((x+y)/2)|−|u(y)-u((x+y)/2)||≤(x−y)^2$$
I know that I should show that if between any two numbers the midpoint also returns the same constant as with the other two numbers, function is constant. But I cannot seem to get there.
Thanks.