Problem

Source:

Tags: algebra, inequalities



Let $f$ be a function defined on $[0, 2022]$, such that $f(0) = f(2022) = 2022$, and $$|f(x) - f(y)| \le 2|x -y|,$$for all $x, y$ in $[0, 2022]$. Prove that for each $x, y$ in $[0, 2022]$, the distance between $f(x)$ and $f(y)$ does not exceed $2022$.