Bill Allombert on Wed, 05 Feb 2014 17:48:42 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: How to count the zeros in interval of real or complex function in pari? |
On Mon, Feb 03, 2014 at 03:41:47PM +0200, Georgi Guninski wrote: > I would like to count the zeros in interval of real or complex function > in pari or some other software. > > As far as I can tell this is related to the argument > principle and possibly to |intcirc()|. This only works for complex zeros of meromorphic functions. > The functions I am interested in are: > > real: > P(x)=sin(Pi*x)^2+sin(Pi*(gamma(x)+1) /x)^2 This function is meromorphic but has a lot of complex zeros. > complex: > Pc(x)=abs(sin(Pi*x))+abs(sin(Pi*(gamma(x)+1) /x)) This function is not meromorphic so it will not work. If you want to count complex zeros of P: intcirc is useless for this because it does not work close to singularities. But you can use intnumromb: intcircromb(a,b,f)=intnumromb(t=0,2*Pi,f(a+b*exp(I*t))*exp(I*t))/2/Pi*b and then my(f(x)=P'(x)/P(x));intcircromb(10.5,10,f) For example ? \p19 realprecision = 19 significant digits ? my(f(x)=P'(x)/P(x));intcircromb(3,2.5,f) %85 = 39.99999999994892927 + 9.474996035627240141 E-12*I So there is 40 zeros in the disk of center 3 and radius 2.5. Cheers, Bill.