# Example of a function, so that $g(x)\neq x$

I'm trying to find an example of a function $g:\mathbb{R}\to \mathbb{R}$ (or $g:[1,\infty) \to \mathbb{R}$), so that $$|g(x_1)-g(x_2)|<|x_1-x_2|$$ for all $x_1, x_2\in \mathbb{R}$ ( or $x_1,x_2\in [1,\infty)$) and $x_1\neq x_2$ but $$g(x)=x$$ doesn't have a solution

Any ideas?

• note that $g(0)=0$ – user220065 Mar 1 '15 at 1:08
• Why don't you try to draw a graph that lies wholly above the line $y=x$ and has slope always less than one. Once you see it, it might not be too hard to write down the piecewise definition of a function that meets those criteria. – Mark McClure Mar 1 '15 at 1:21

I think $g(x)=\frac{x}{2}$ works.
• it works for $g:[1,\infty)\to \mathbb{R}$. How about $\mathbb{R}\to \mathbb{R}$? Thats the real challange for me. – user220065 Mar 1 '15 at 1:11
• Any contraction on $\mathbb R$ has a fixed point by the Banach fixed point theorem. – William Stagner Mar 1 '15 at 1:18
• The Banach theorem requires the contraction to be bounded by a fixed multiplier $k<1,$ but in this problem that is not assumed, only that the distance becomes less (rather than less by a fixed factor less than one). – coffeemath Mar 1 '15 at 1:56
$g(x)=\sqrt{x^2+1}$ works on $\mathbb{R}.$ It has no fixed point, since squaring would give $x^2+1=x^2.$ And the derivative of $g$ is strictly increasing. More explicitly if $a>b$ so that also $g(a)>g(b)$ then the inequality desired becomes equivalent to $\sqrt{a^2+1}-a>\sqrt{b^2+1}-b,$ and then since $\sqrt{x^2+x}-x$ has an everywhere negative derivative, the inequality follows.
Added: Above it is OK to assume WLOG that $a>b,$ however it then doesn't follow that the absolute value sign may be just dropped in $\sqrt{a^2+1}-\sqrt{b^2+1}.$ If this quantity is $\ge 0$ the absolute sign may be dropped and treated as above. In the opposite case the absolute value becomes $\sqrt{b^2+1}-\sqrt{a^2+1},$ which we still wish to show is less than $a-b$ since we're assuming $a>b.$ So here we want to wind up with $\sqrt{b^2+1}+b<\sqrt{a^2+1}+a,$ which is clear from $b<a$ and that $x+\sqrt{x^2+1}$ is increasing.
Simpler proof of inequality: If $a \neq b$ then to show $|g(a)-g(b)|<|a-b|$ one can divide by $[a-b|$ and use that, via the mean value theorem, there is a $c$ between $a$ and $b$ for which $$\frac{g(a)-g(b)}{a-b}=g'(c).$$ Here $g'(c)=c/\sqrt{c^2+1},$ which has magnitude strictly less than $1.$