GFUN AND THE AGM

Bruno Salvy

January 1998

Let [Maple Math] and [Maple Math] be two positive real numbers, with [Maple Math] . The arithmetic-geometric mean of [Maple Math] and [Maple Math] is classically defined as the common limit of the sequences [Maple Math] and [Maple Math] defined by
[Maple Math] , with [Maple Math] and [Maple Math] .
That the sequences converge to the same limit can be inferred from

[Maple Math] .

This common limit is known by Maple as GaussAGM [Maple Math] . It was discovered by Gauss that the arithmetic-geometric mean is related to hypergeometric functions by

> GaussAGM(a,b)=a/hypergeom([1/2, 1/2],[1],1-b^2/a^2);

[Maple Math]

> eval(subs(a=3.,b=2.,"));

[Maple Math]

This worksheet, largely inspired by [1], shows how gfun can be used to guess and then prove this result, as well as a generalization of it due to J. M. Borwein and P. B. Borwein.

The functional equation

Following [1], we start by introducing a generalization of the arithmetic-geometric mean obtained by considering the following iteration where [Maple Math] is an integer:

[Maple Math] .

where the second equality is motivated by

[Maple Math]

from which follows that both sequences converge to a common limit, which is denoted by [Maple Math] . The arithmetic-geometric mean corresponds to the case [Maple Math] .

The function [Maple Math] is easily seen to be homogeneous: [Maple Math] , for [Maple Math] . Together with the obvious property that [Maple Math] , this implies that for [Maple Math] in [Maple Math] ,

[Maple Math] .

Defining the function [Maple Math] by

[Maple Math]

the equation above translates into the following functional equation for [Maple Math] :

> [Maple Math]

which plays a central rôle in this worksheet. It is not too difficult to show that [Maple Math] is analytic in the neighborhood of the origin and that the functional equation above has a unique analytic solution in this neighborhood.

The quadratic case

This is the case [Maple Math] and Gauss's theorem is equivalent to stating that

[Maple Math] .

We now use gfun to first guess and then prove this result. The first step is to use the functional equation to compute a series expansion of [Maple Math] , then we use this series to guess a possible closed form which turns out to be analytic, then we show that this analytic function does satisfy the functional equation.

Series expansion

Starting from the functional equation,

> funeq2:=subs(N=2,A[2]=A,op(1,funeq)-op(2,funeq));

[Maple Math]

a series solution is easily obtained by a method of undeterminate coefficients:

> sol:=1:

> for i to 12 do
sol:=sol+x^i*solve(op(1,series(eval(
subs(A=unapply(sol+a*x^i,x),funeq2)),x,i+2)),a) od:sol;

[Maple Math]
[Maple Math]
[Maple Math]

Guessing the solution

From this series, gfun guesses a differential equation which could be satisfied by [Maple Math] :

> deq:=op(1,gfun[seriestodiffeq](series(sol,x,13),y(x),[ogf]));

[Maple Math]

It turns out that Maple's dsolve function is unable to solve this differential equation:

> dsolve(deq,y(x));

We then use gfun[diffeqtorec] which deduces from this differential equation the recurrence satisfied by the Taylor coefficients of its solutions:

> gfun[diffeqtorec](deq,y(x),u(n));

[Maple Math]

From this first order linear recurrence, a solution is easily found:

> rsolve(",u(n));

[Maple Math]

hence the sum:

> y(x)=sum("*x^n,n=0..infinity);

[Maple Math]

Proving the result of the guess

The proof consists in showing that the function [Maple Math] , which is obviously analytic, satisfies the functional equation

> subs(A=y,funeq2)=0;

[Maple Math]

Our approach consists in using closure properties of solutions of linear differential equations that are implemented in gfun to compute a linear differential equation satisfied by the left-hand side of this equation. The proof then reduces to showing that 0 is the only solution of this differential equation that is compatible with the initial conditions, which are 0 up to a large order by construction of [Maple Math] .
It turns out that this proof can be performed directly from the differential equation, and would apply even if no closed-form had been found.

Given a linear differential equation satisfied by a series [Maple Math] , the function gfun[algebraicsubs] computes a linear differential equation satisfied by [Maple Math] for any algebraic function, given by a polynomial [Maple Math] such that [Maple Math] . Thus a differential equation satisfied by [Maple Math] is easily computed from that satisfied by [Maple Math] :

> deq:=op(select(has,deq,x)):

> deq1:=gfun[algebraicsubs](deq,numer(y-(1-(1-x)^2/(1+x)^2)),y(x));

[Maple Math]
[Maple Math]

Similarly, [Maple Math] satisfies

> gfun[algebraicsubs](deq,y-x^2,y(x));

[Maple Math]

and its product by [Maple Math] satisfies

> deq2:=gfun[`diffeq*diffeq`](",y(x)+1+x,y(x));

[Maple Math]

From there, we deduce a differential equation satisfied by the left-hand side of the functional equation when applied to the hypergeometric function we have guessed:

> gfun[`diffeq+diffeq`](deq1,deq2,y(x));

[Maple Math]

Analytic solutions of this equation have a coefficient sequence which satisfies

> gfun[diffeqtorec](",y(x),u(n));

[Maple Math]
[Maple Math]

and thus the first three zeroes of the Taylor expansion of the left-hand side of the functional equation conclude the proof.

The cubic case

It has been discovered by J. M. Borwein and P. B. Borwein that a hypergeometric expression also exists when [Maple Math] . Again, the same steps as above lead to guessing and then proving the following result by gfun .

Theorem . [Borwein & Borwein 90] The function [Maple Math] corresponding to the AGM iteration of order 3 has the following closed form:

[Maple Math] .

Series expansion

We start from the functional equation

> funeq3:=subs(N=3,A[3]=A,op(1,funeq)-op(2,funeq));

[Maple Math]

and compute the first terms of the series expansion of the solution:

> sol:=1:

> for i to 12 do
sol:=sol+x^i*solve(op(1,series(eval(
subs(A=unapply(sol+a*x^i,x),funeq3)),x,i+2)),a) od:sol;

[Maple Math]
[Maple Math]
[Maple Math]

Guessing the solution

Again, this is a lucky situation where a differential equation can be guessed:

> deq:=op(1,gfun[seriestodiffeq](series(sol,x,13),y(x),[ogf]));

[Maple Math]
[Maple Math]

From there, we find a closed-form as before

> gfun[diffeqtorec](deq,y(x),u(n));

[Maple Math]

> rsolve(",u(n));

[Maple Math]

> y(x)=sum("*x^n,n=0..infinity);

[Maple Math]

Proving the result of the guess

The same routine applies:

> subs(A=y,funeq3)=0;

[Maple Math]

> deq:=op(select(has,deq,x)):

> deq1:=gfun[algebraicsubs](deq,numer(y-(1-(1-x)^3/(1+2*x)^3)),y(x));

[Maple Math]
[Maple Math]

> gfun[algebraicsubs](deq,y-x^3,y(x));

[Maple Math]

> deq2:=gfun[`diffeq*diffeq`](",y(x)+1+2*x,y(x));

[Maple Math]
[Maple Math]

> gfun[`diffeq+diffeq`](deq1,deq2,y(x));

[Maple Math]
[Maple Math]

> gfun[diffeqtorec](",y(x),u(n));

[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]

and thus the first five zeroes of the Taylor expansion of the left-hand side of the functional equation conclude the proof.

Conclusion

These results are very good examples of the use of gfun : experiments first lead to conjecture a general form for the solution to a problem and then a completely different process leads to a proof. However, the apparent ease with which the problems treated here are solved using gfun hides the preliminary work which led to the form under which this approach could work. For example this approach does not seem to work for higher values of [Maple Math] , where similar results might exist.

Bibliography

[1] Arithmetic-Goemetric Means Revisited. Jonathan M. Borwein, Petr Lisonek and John A. Macdonald. MapleTech , 4-1 , pp. 20-27 (1997).