The condition ∣f(x)−f(y)∣≤∣x−y∣ is sufficient for the continuity of f. From ∣x−y∣2≤∣f(x)−f(y)∣ we derive that f is one-to-one, implying that f is a strictly monotonic function. We may assume that f is strictly increasing, because f can be replaced by −f.
Set x=0 and y=1 to derive that 0≤f(1)−f(0)≤1, hence f(1)=f(0)+1.
For x≥y we get f(x)−f(y)≤x−y or y−f(y)≤x−f(x), implying that the function g(x)=x−f(x)+f(0) is increasing.
Since g(0)=g(1)=0, the function g is the identically null. Consequently, the functions are fa± given by fa±(x)=±x+a, with a∈R.
Alternative solution:
For x=0 and y=1 we get ∣f(1)−f(0)∣=1. For x∈[0,1] we obtain 1=∣f(1)−f(0)∣≤∣f(1)−f(x)∣+∣f(x)−f(0)∣≤∣1−x∣+∣1−x∣=1−x+x−0=1.
Thus f(x) lies between f(0) and f(1); moreover, we have ∣f(1)−f(x)∣=1−x and ∣f(x)−f(0)∣=x. It follows that points (0,f(0)), (x,f(x)) and (1,f(1)) are collinear, hence f(x)=f(0)±x.