It's well known that if we set $a_0=x \geq 0, \ g_0=y \geq 0$, and $$ a_{n+1}=\dfrac{1}{2}(a_n+g_n), \ g_{n+1}=\sqrt{a_n g_n} ,$$ then both $\{a_n\}$ and $\{g_n\}$ will converge to $AGM(x,y)$. Further more, we have $$ AGM(x,y)=\dfrac{\pi}{2}\big( \int_0^{\pi/2} \dfrac{\mathbf{d}\theta}{\sqrt{x^2 \cos^2 \theta + y^2 \sin^2 \theta}} \big)^{-1}.$$ Which was proved by Gauss firstly, by noting that $$ I(a,b) = \int_0^{\pi/2} \dfrac{\mathbf{d}\theta}{\sqrt{a^2 \cos^2 \theta + b^2 \sin^2 \theta}} = \int_0^{\pi/2} \dfrac{\mathbf{d}\theta}{\sqrt{(\sqrt{ab})^2 \cos^2 \theta + {(\frac{a+b}{2})}^2 \sin^2 \theta}} = I(\sqrt{ab}, \dfrac{a+b}{2}).$$ In other words, $I$ is an invariant for $(a_n,g_n)$.
Here gives more details with arithmetic-geometric mean: http://en.wikipedia.org/wiki/Arithmetic%E2%80%93geometric_mean
My question is, could someone give a heuristic reason to deduce invariant $I$?