Prove that $|f(x)-f(y)|\le|x-y|$ for all $x$ and $y$.

155 Views Asked by At

Let $f(x) = |x|$ for $x \in [-1,1]$ and extend $f$ to all of $\mathbb R$ by requiring $f(x+2)=f(x)$. Prove that $|f(x)-f(y)|\le|x-y|$ for all $x$ and $y$.

This is easy to observe on a graph but my proof is long and a bit tedious. Just curious if there is a quick/elegant way?

2

There are 2 best solutions below

1
On BEST ANSWER

Here is a reasonably quick way based on the observation that $f(x) = \min_{n \in \mathbb{Z}} |x-2n|$.

We have $|x-2n| \le |y-2n| +|x-y|$ for all $n$, and so $f(x) \le |y-2n| +|x-y|$ for all $n$. Now choose $n$ such that $f(y) = |y-2n|$, then we have $f(x)-f(y) \le |x-y|$. Swapping the roles of $x,y$ yields the desired result.

4
On

Archemedian property implies for all $x$ there is an $a_x \in [-1, 1]$ and a $k_x \in \mathbb Z$ such that $x = 2k_x + a_x$, so $f(x) = f(a_x) = |a_x|$.

$| x - y| = |2k_x + a_x - 2k_y - a_y| = 2|k_x - k_y|+ |a_x - a_y| \ge |a_x - a_y|$

So $|f(x) - f(y)| = ||a_x| - |a_y|| \le |a_x - a_y|$. As $a_x, a_y \in [-1, 1] \implies |a_x - a_y| \le |1 - (-1)| = 2$. So$ |f(x) - f(y)| = |a_x - a_y| \le |x - y|$