# On Contractive mapping theorem

I am trying to solve one of the problem in the book "Berkeley Problems in Mathematics": Define a sequence of positive numbers as follows. Let $x_0>0$ be any positive number, and let $x_{n+1}=(1+x_n)^{-1}$. Prove that the sequence converges, and find its limit.

But I have trouble in understanding its solution: Let $g(x)=(1+x)^{-1}$, then we have $g'(x)=-1/(1+x)^2$. Therefoer, $|g'(x)| \leq 1/(1+x_0/2)^2<1$ for $x>x_0$. Then by contractive mapping theorem, the sequence given by $x_0>0, x_{n+1}=g(x_n)$ converges to the unique fixed point of $g$ in $[x_0, \infty).$ Solving $g(x)=x$ gives $x=(1-\sqrt{5})/2$.

My question is, we have to show that $g$ is a contraction. i.e. $|g(x)-g(y)| \leq k|x-y|$ for some $k\in (0,1)$. I don't know how the solution (showing the derivative is less than 1) help to show $g$ is a contraction, please help, thanks in advance.

Notice that $$|g(x)-g(y)| \leq \sup |g'| \cdot |x-y|$$ by the MVT. If $|g'(t)| \leq k<1$ for every $t$, then...
if $g'(x) < 1$ then $g(x)$ is a contraction.
$$g(y) - g(x) = \int_x^y{g'(t)}dt \le \int_x^y 1 dt = y - x$$
Technically for this proof to work you need to show that $g$ eventually maps an interval to within itself when $g$ is iterated. But for this just assume that $x_0 \geq 1$ and show $0 < g(x_0) < 1$. Then show $0 < g(x) < 1$ when $0 < x < 1$. Then the bound on the derivative (which is valid for any interval $[x_0, \infty]$) gives you the contraction mapping property, so since the function maps an interval to itself and satisfies the contraction mapping property, it has a fixed point.