Arithmetic-geometric mean iteration (source code)

= Arithmetic-geometric mean iteration
{title2=$a_{n+1}=\sqrt{a_nb_n},\quad b_{n+1}=(a_n+b_n)/2$}

Starting from $0<a_1\leq b_1$, replace the lower endpoint by the <geometric mean> and the upper endpoint by the <arithmetic mean>. The <arithmetic-geometric mean inequality> gives $a_n\leq a_{n+1}\leq b_{n+1}\leq b_n$. The <bounded monotone sequence theorem> gives limits, and the arithmetic recurrence forces them to coincide. The limiting value is the arithmetic-geometric mean of the initial pair.