# Fixed point and non-fixed point function

For constructing another proof I need two functions explicitly and therefore

I was wondering whether there exists a function that has nowhere a fixed point and a function that (maybe depending on the closed interval $[a,b] \subset \mathbb{R}$ where it is defined) has always somewhere a fixed point for each interval $[a,b]$?

• $y=e^x$ has no fixed point; $y=x$ has some in every nonempty interval. – Gerry Myerson Jul 11 '13 at 10:15

Sure -- $f(x)=x-1$ and $g(x)=x$. I think the latter is the only such function with no restrictions on the interval; for the former, any function which does not intersect $y=x$ works.
• $g(x)=x$ is far from the only example. If $g(x)=x$ for all rational $x$, and is whatever-you-like for all irrational $x$, that works. – Gerry Myerson Jul 11 '13 at 12:59
• Hmm, good point. if $a=b$ then either $g(a)=a$ is a fixed point, or $g(a) \notin [a,b]$ and the statement is vacuously true. And if $a < b$ then the interval contains a rational. – Sneftel Jul 11 '13 at 13:37