Prove that the range of $f$ is all of $\mathbb{R}$. Let $f:\mathbb{R} \rightarrow \mathbb{R}$ be a continous function such that  $|f (x)−f (y)| \geqslant |x −y|$, for all real $x$ and $y$. I need to prove that the range of $f$ is all of $\mathbb{R}$. I tried to solve the inequality to get a general form for the functions, but it just ended up in a mess. 
 A: Hint: Since $f$ is a continuous function the range $f(\mathbb{R})$ is an interval, and since $|f(x)-f(y)|\geq |x-y|$ the range is unbounded in both directions, hence $f(\mathbb{R})=\mathbb{R}$.
A: From the inequality we can directly deduce that $f$ is injective. We can also see that $f$ transforms unbounded intervals into unbounded intervals. The sets $f ((−\infty, 0])$ and $f ([0,\infty))$ are unbounded intervals which intersect at one point. Hence, they must be two intervals that cover the entire real axis.
A: *

*The function is injective.

*Fix $y=0$. Then $|f(x)-f(0)| \geq |x|$ for all $x$, so as $x \to \infty$, $|f(x)| \to \infty$ (by continuity).

*As $x \to -\infty$, $|f(x)| \to \infty$.

*Intermediate value theorem.

*Injectivity prevents the sign of the limits from being the same.

A: Well, let's think.
Is it possible that that $f(x)$ is bounded above or below?  Probably not as $|f(x)- f(y)| \ge |x-y|$ and $|x-y|$ seems likely to be arbitrarily large.
So Lemma 1:  $f(x)$ is unbounded. (We'll prove that.)
If $f$ is unbounded does it have to take on every value.  This seems reasonable as a variation of the Intermediate value theorem.  After all if $f$ is continuous and $f(x) < f(y)$ then for all $c \in (f(x),f(y)$ there is an $d$ between $x$ and $y$ so that $f(d) = f(c)$.  So wouldn't it be reasonable that for all $c: \inf f < c < sup f$ there is a $d$ so that $f(d) =c$?  And that if $f$ is continuous unbounded that for all $c$ there is a $d$ so that $f(d) = c$?
So Lemma 2: if $f$ is a continuous real-valued unbounded function, the for all $y \in \mathbb R$ there is an $x$ so that $f(x) = y$.
Proof of Lemma 1:
If $|f(x)| \le M$ for all $M$ then $|f(x) - f(y)| \le |f(x) + |f(y)| \le 2M$ for all $x,y$.  So $2M \ge |f(x) - f(y)| \ge |x-y|$ for all $x,y$.  Which means for all $x \in \mathbb R$ then $|x| = | x-0| \le 2M$ so $\mathbb R$ is bounded.  
This is false so $f$ is not bounded.
Lemma 2: 
$f$ is unbounded so, For any $y \in \mathbb R$ there exists an $x_0$ so that $f(x_0) > y$ and an $x_2$ so that $f(x_1) < y$.  $f$ is continuous so by Intermediate Value Theorem there is a $d$ so that $f(d) = y$.
And that is it... it would seem.  $\mathbb R \subset f(\mathbb R) = range f \subset \mathbb R$ so the range of $f$ is all $\mathbb R$.
A: If $f$ is injective and continuous it must be strictly monotonic. By looking at $-f$ if necessary, we can assume that $f$ is strictly increasing and so we have $f(x)-f(y) \ge x-y$ whenever $x \ge y$.
In particular, $\lim_{x \to \infty} f(x)-f(y) = \infty$ and
$\lim_{y \to -\infty} f(x)-f(y) = \infty$.
Hence the range is unbounded in both directions and the intermediate function theorem shows that the range must be $\mathbb{R}$.
