How to derive this relation about this periodic function?

68 Views Asked by At

Let the function $f \colon \mathbb{R} \to \mathbb{R}$ be defined by $$ f(x) \colon= \begin{cases} \lvert x \rvert \ & \mbox{ if } \ -1 \leq x \leq 1, \\ f(x-2) \ & \mbox{ otherwies}. \end{cases} $$ Then of course $$ f(x+2) = f(x) $$ for all $x \in \mathbb{R}$. Am I right?

How to derive the following inequality about $f$? $$ \lvert f(x) - f(y) \rvert \leq \lvert x-y \rvert $$ for all $x, y \in \mathbb{R}$.

This inequality of course holds for all $x, y \in [-1, 1]$.

And, if $x=y$, then the inequality becomes an equality and holds trivially.

How to derive this inequality for all $x, y \in \mathbb{R}$ such that $x \neq y$?

PS:

Based on the comments below, I would like to revise my definition of the function $f$ as follows:

Let $f \colon \mathbb{R} \to \mathbb{R}$ be defined such that $$ f(x) = \lvert x \rvert \ \mbox{ if } \ -1 \leq x \leq 1, $$ and such that $f(x+2) = f(x)$ for all $x \in \mathbb{R}$.

Hope this definition is now sound enough.