Bill Allombert on Tue, 06 May 2014 15:21:49 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: q-Pochhammer


On Tue, May 06, 2014 at 01:41:29AM -0400, Charles Greathouse wrote:
> I would like to integrate (the product of 1 - q^n for n >= 1) from q = -1
> to 1. Is there a way to do this in GP? I tried variants of
> 
> eps=2e-19;
> intnum(z=-1+eps,1-eps, eta(log(z)/2/Pi/I))
> 
> but without any luck.

Your product is called the Euler function in Wikipedia.
It can be computed using one of the functions below:
eta1(q)=if(q==0,1,prod(n=1,log(10^-38)/log(abs(q)), 1-q^n,1.))
eta2(q)=if(q==0,1,my(p=log(10^-38)/log(abs(q)),N=floor(sqrt(2*p/3)));sum(n=-N,N,(-1)^n*q^((3*n^2-n)/2),0.))

(the second is faster)
So a rough estimation of your integral is
? intnum(q=-.99999,.99999,g(q))
%31 = 1.2883008886739212301815836032595770056

Cheers,
Bill.