Global convergence of a square-root iteration (source code)

= Global convergence of a square-root iteration
{title2=$y_{n+1}=\sqrt{2+y_n}\longrightarrow2$}

For every $y_0\geq0$, this <recurrence relation> converges to the unique nonnegative <fixed point> $2$. If $0\leq y<2$, then $y<\sqrt{2+y}<2$, since $2+y-y^2=(2-y)(1+y)>0$. If $y>2$, then $2<\sqrt{2+y}<y$. Thus the iterates form a <monotone bounded sequence>, and <continuity> forces their limit to be $2$. A <cobweb plot> alternates vertical steps to $v=\sqrt{2+u}$ and horizontal steps to $v=u$, approaching the same intersection from either side. More quantitatively,
$$
y_{n+1}-2=\frac{y_n-2}{\sqrt{2+y_n}+2},
$$
so the error keeps its sign and decreases in <absolute value> by at least the uniform factor $1/(2+\sqrt2)$. The asymptotic factor is $1/4$.