# Find a smooth function $f:\mathbb{R}\to\mathbb{R}$ such that $|f'(x)| < 1$ and $f(x) \neq x$ for all $x\in\mathbb{R}$

Exercise: Find a smooth function $f:\mathbb{R}\to\mathbb{R}$ such that $|f'(x)| < 1$ and $f(x) \neq x$ for all $x\in\mathbb{R}$

I got this exercise from the book "Curso de Análise: volume 1", by Elon Lages Lima. (In Portuguese).

My attempts include

$1$) integrate $\frac{2\text{arctan}(x)}{\pi}$, but I get this. (Adding larger constants doesn't seem to help.)

$2$) $f(x) = \text{sin}(x/2) + x + 2$ but its derivative gets too large.

Any ideas?

• Notice that by Banach's fixed point theorem, $|f'(x)|$ must go to $1$ for $x\rightarrow\infty$ or $x\rightarrow-\infty$. I know it's not really of any help towards a solution, but it is a nice fact. Feb 27 '13 at 22:58

## 3 Answers

Take any branch of the hyperbola $y^2-x^2=1$. It doesn't cross the line $y=x$ and satisfies the required condition.

• Thanks! Here's a comparison between the derivatives in: my first attempt, N.S.'s answer and your answer. As you can see, mine takes too long to get close to 1 (as x goes to infinity), which kind of explains why it didn't work. Feb 27 '13 at 23:22

$$f(x)=x-\arctan(x)+\frac{\pi}{2}$$

• Thanks, N.S.! May I ask you how you got this function? Did you integrate the function $\frac{x^2}{1 + x^2}$? I'm asking this because a friend of mine was trying to use "rotation" (I'm not sure what he means about that) and he mentioned the function arctan$(x)$, so I'm just wondering if you used this alternative method. Feb 28 '13 at 0:09
• @TuringMachine If you are familiar with Banach Fixed point theorem, it implies that for any such example, $f(x)$ needs to get arbitrarily close to $1$. So I looked a function of the type $1-g(x)$, where $0 \leq g(x) \leq 1$ and $\lim_{x \to \infty}g(x)=0$ and which is easy to integrate...Note that to get no fixed point, all you need is that the antiderivative of $g(x)$ has no root. Feb 28 '13 at 2:31

One solution is a function that tends to 0 at $-\infty$, and tends to $x$ at $+\infty$. For instance, a hyperbola with asymptotes y=0 and y=x.

Do you know how to construct such a hyperbola?