User:Shlav/sandbox

Proof of the integral-form expression
The following proof relies on the work of Carl Wilhelm Borchardt.

Instead of using x and y as initial values of the sequences $$a_n$$ and $$g_n$$(as used above), we will simply call them $$a_0$$ and $$g_0.$$

So $$\lim_{n\to \infty}a_n=\lim_{n\to \infty}g_n = g = M(a_0, g_0).$$


 * $$a_1 = \tfrac{1}{2}(a_0 + g_0)\qquad(1)$$
 * $$g_1 = \sqrt{a_0g_0}$$

It is obvious that $$M(a_0, g_0) = M(a_1, g_1) = \ldots=M(a_n, g_n).$$

As mentioned above, if $$r\ge0$$ then $$M(ra_0, rg_0)=rM(a_0, g_0)$$. Therefore following expression holds:
 * $$g = a_0M\left(1,\frac{g_0}{a_0}\right) = a_1M\left(1,\frac{g_1}{a_1}\right)\qquad(2)$$

Next we define 4 new variables:


 * $$x = \frac{g_0}{a_0}, \quad x_1=\frac{g_1}{a_1}$$,


 * $$y = \frac{1}{M\left(1, \frac{g_0}{a_0}\right)}, \quad y_1 = \frac{1}{M\left(1, \frac{g_1}{a_1}\right)}\qquad(3)$$

Furthermore, from (1) we can deduce the following relation between $$x$$ and $$x_1$$:
 * $$x_1=\frac{2\sqrt{x}}{1+x}$$
 * $$\Rightarrow{dx_1 \over dx}=\frac{1-x}{(1+x)^2\sqrt{x}}=\frac{(x_1-x_1^3)(1+x)^2}{2(x-x^3)}\qquad(4)$$

From (2) and (3) we can deduce that
 * $$y=y_1\frac{a_0}{a_1}=y_1\frac{2a_0}{a_0 + g_0}=\frac{2y_1}{1+x}.$$


 * $${dy \over dx}=-\frac{2}{(1+x)^2}y_1 + \frac{2}{1+x}{dy_1 \over dx_1}{dx_1 \over dx}$$

If we substitute (4) to the last expression and multiply it by $$x-x^3$$ we'll get

$$ (x - x^3){dy \over dx} = \frac{2x(x-1)}{1 + x}y_1 + (1 + x)(x_1 - x_1^3){dy_1 \over dx_1}$$

Taking derivative on both sides we will get the next expression:


 * $${d{[(x-x^3){dy \over dx}]} \over dx} = 2y_1{d \over dx}\left[\frac{x(x - 1)}{1 + x}\right] + \frac{2x(x - 1)}{1 + x}{dy_1 \over dx_1}{dx_1 \over dx} +(x_1 - x_1^3){dy_1 \over dx_1} + (1 + x) {d \over dx_1}{\left[(x_1 - x_1^3){dy_1 \over dx_1}\right]}{dx_1 \over dx}$$

After some elementary rearrangement we get:
 * $$ {d \over dx}\left[(x-x^3){dy \over dx}\right] - xy = \frac{1 - x}{(1 + x)\sqrt{x}}\left\{{d \over dx_1}\left[(x_1-x_1^3){dy_1 \over dx_1}\right] - x_1y_1\right\}$$

Using the same considerations we can deduce that:
 * $$ {d \over dx_1}\left[(x_1-x_1^3){dy_1 \over dx_1}\right] - x_1y_1 = \frac{1 - x_1}{(1 + x_1)\sqrt{x_1}}\left\{{d \over dx_2}\left[(x_2-x_2^3){dy_2 \over dx_2}\right] - x_2y_2\right\},$$

where $$x_2 = \frac{g_2}{a_2}.$$

We can continue the process. Assuming,
 * $$H^*(y) \overset{\underset{\mathrm{def}}{}}{=} {d \over dx}\left[(x-x^3){dy \over dx}\right] - xy ,$$

$$H^*(y)= \frac{1 - x}{(1 + x)\sqrt{x}}\frac{1 - x_1}{(1 + x_1)\sqrt{x_1}} \ldots \frac{1 - x_n}{(1 + x_n)\sqrt{x_n}}H^*(y_n).$$

We know that $$\lim_{n \to \infty}x_n = \lim_{n \to \infty}\frac{g_n}{a_n} = 1,$$

so $$1-x_n\rightarrow 0 $$ as $$n\rightarrow \infty.$$ Therefore $$H^*(y) = 0.$$

So we found a differential equation for y:
 * $${d \over dx}\left[(x-x^3){dy \over dx}\right] - xy = 0$$

which is equivalent to:
 * $$(x - x^3){d^2y \over dx^2} + (1 - 3x^2){dy \over dx} - xy = 0$$

One of the solutions to the above equation is the complete elliptic integral of the first kind $$K(x).$$
 * $$K(x)=\int_0^{\frac{\pi}{2}}\frac{d\theta}{\sqrt{1-x\sin^2(\theta)}} $$

The second solution is $$K(\sqrt{1-x^2}),$$ assuming $$ 0 < x < 1.$$

So, we can write the complete expression for y: $$y = \alpha K(x) + \beta K(\sqrt{1-x^2}).$$ Using the definition of y and x as
 * $$y = \frac{1}{M\left(1, \frac{g_0}{a_0}\right)} = \frac{a_0}{M(a_0, g_0)}$$
 * $$x = \frac{g_0}{a_0}$$

we conclude that


 * $$\frac{a_0}{M(a_0, g_0)} = \alpha K\left(\frac{g_0}{a_0}\right) + \beta K\left(\sqrt{1-\frac{g_0^2}{a_0^2}}\right).\qquad(5)$$

Finally we need to find the values of α and β. It is easy to see that $$M(a_0, a_0)=a_0$$. Substituting this to the last equation we get:
 * $$\frac{a_0}{a_0}=\alpha K(1) + \beta K(0)$$

The values of K(x) at x = 0, 1 are: $$ K(0)=\frac{\pi}{2}, K(1) = \infty$$, so α must be equal to 0. Therefore


 * $$1=\beta \frac{\pi}{2},$$

hence
 * $$\beta = \frac{2}{\pi}.$$

Returning to (5) with β's value we get an expression for $$M(a_0, g_0):$$
 * $$\frac{a_0}{M(a_0, g_0)} = \frac{2}{\pi} K\left(\sqrt{1-\frac{g_0^2}{a_0^2}}\right),$$

hence
 * $$M(a_0, g_0) = \frac{a_0\pi}{2 K\left(\sqrt{1-\frac{g_0^2}{a_0^2}}\right)}$$

The expression in the properties section stated that $$M(a_0, g_0) = \frac{\pi}{4} (a_0 + g_0) \; / \; K\left[\left(\frac{a_0 - g_0}{a_0 + g_0}\right)\right].$$

To prove it we can use the expression mentioned above: $$ g=M(a_0, g_0) = M(a_1, g_1).$$

So,
 * $$g = \frac{\pi(a_0+g_0)/2}{2 K\left(\sqrt{1-\frac{a_0g_0}{(a_0+g_0)^2/4}}\right)} = \frac{\pi(a_0+g_0)}{4 K\left(\sqrt{\frac{(a_0 - g_0)^2}{(a_0+g_0)^2}}\right)} = \frac{\pi}{4} (a_0 + g_0) \; / \; K\left[\left(\frac{a_0 - g_0}{a_0 + g_0}\right)\right], $$

which completes the proof.