Problem 3. Determine all injective functions $f: \mathbb{Z} \rightarrow \mathbb{Z}$ that satisfy the relation

$$
|f(x)-f(y)| \leq|x-y|
$$

for any $x, y \in \mathbb{Z}$.
Solution. From the given relation we deduce

$$
|f(x+1)-f(x)| \leq 1
$$

![](https://cdn.mathpix.com/cropped/2024_06_07_842f4c1210bc4693f59eg-4.jpg?height=52&width=1585&top_left_y=1172&top_left_x=259)

Since $f$ is injective, it follows that $f(x+1)-f(x) \in \{-1,1\}$, for any $x$.

We observe that if $f$ satisfies the hypothesis, then $-f$ also satisfies it. Therefore, we can assume that $f(1)-f(0)=1$.

We have $f(2)-f(1)= \pm 1$. If $f(2)-f(1)=-1$, then $f(2)=f(0)$, which is a contradiction, so $f(2)=$

![](https://cdn.mathpix.com/cropped/2024_06_07_842f4c1210bc4693f59eg-4.jpg?height=46&width=1585&top_left_y=1386&top_left_x=259)

It immediately follows by induction that $f(n)=f(0)+n$, for any natural $n$.

![](https://cdn.mathpix.com/cropped/2024_06_07_842f4c1210bc4693f59eg-4.jpg?height=43&width=1540&top_left_y=1472&top_left_x=306)

By induction, it also follows that $f(-n)=f(0)-n$, for any natural $n$................................. 1 point

In conclusion, the functions sought can only be of the form $f(x)= \pm x+k$, for any $x$, with $k$ being a $\qquad$
It is easily verified that these functions satisfy the relation from the hypothesis....................................................