TITLE: Contraction mapping does not hold in metric space
QUESTION [6 upvotes]: Let $X=\mathbb{Q}\cap [1,2]$, i.e $X$ is the set of rational number between 1 and 2 inclusive.
We can consider $X$ to be a metric space by endowing it with the usual distance function, i.e for $x,y \in X$ we put $d(x,y)=|x-y|$. Now we define $f:X\rightarrow X$ by $f(x)=x-\dfrac{x^2-2}{2x}$.
Ones should check that if$x\in X$ , then $f(x)\in X$ as well. This means checking that if $x$ is rational and in $[1,2]$ then $f(x)$ is also rational and in $[1,2]$.
Prove that $f$ is a contraction mapping but $f$ does not has a fixed point. 
This is my homework exercise, but I am not good at mathematics, so please feel freely helping me. Thank you very much !

REPLY [2 votes]: Somewhere between a comment and an answer: the map $f$ is nothing else than the "amelioration function" $T(x) = x - \frac{f(x)}{f'(x)}$ one studies when applying Newton's method to search for roots of a differentiable function $f$: here the function is $f(x) = x^2-2$.
Aside from providing general orientation, this observation is directly helpful in at least one part of the problem: a glance at the above formula for $T$ shows that a real number $c$ is a fixed point for $T$ iff it is a root of $f$: $T(c) = c \iff f(c) = 0$.  Thus the fixed points of $T$ on all of $\mathbb{R}$ are $\pm \sqrt{2}$.  Since these are not rational numbers, we see that the given function (which I am calling $T$) has no fixed points on $\mathbb{Q} \cap [1,2]$.  
I recently covered Newton's method in my "Spivak calculus" course: some notes on it are available here.  One point that I found interesting was that in the analysis of the convergence of Newton's method one uses contraction mappings but not the Contraction Mapping Principle.  This comes down to the point made above: in general, $T$ has a fixed point iff $f$ has a root.  Now of course just starting with a differentiable function $f$ it need not have any roots (e.g. if $f(x) = e^x$, $T(x) = x-1$).  But one can show that if $f$ has a simple root $c$, then there is an interval $[c-\delta,c+\delta]$ which is $T$-invariant and on which $T$ is a contraction mapping.  Then the rate of convergence to the known fixed point comes in handy, and for this we do not need completeness!