How do I overcome with the numerical issue?

178 Views Asked by At

The argument principle states that the complex integral over a circle of the function $\frac{f'(z)}{f(z)}$ , where $f(z)$ is an entire function and $f(z)\ne 0$ on the border of the circle, divided by $2\pi i$, counts the number of roots (considered the multiplicity).

I wanted to verify with PARI/GP, that the circle around the origin with radius $8$ contains , beside the root $0$ with multiplicity $3$, $4$ more roots with multiplicity $1$ of the function $f(z)=\sin(z)-z$.

PARI/GP has a command intcirc, which numerically integrates a complex function over a circle and divides the result by $2\pi i$.

? intcirc(x=0,8,(cos(x)-1)/(sin(x)-x))
%7 = 5.303469915446074163807030378 + 5.86715161 E-29*I

The four roots of the function $f(z)=\sin(z)-z$ in the circle around the origin with radius $8$ (excluding $0$ with multiplicity $3$) have about absolute value $8$, so a numerical deviation is not very surprising. But $5.3$ instead of $7$ is a really bad result, considering that PARI/GP worked with $30$ digits precision.

Due to Wolfram alpha, only $5$ roots are within the given circle.

  • Is there any trick , how I can avoid the numerical issue if I want to locate roots of entire functions , for example, a suitable substitution ?

With $800$ digits precision, PARI/GP needs $32$ MByte and gives the following, still poor result , although I first converted the contour integral into a riemann integral.

? intnum(x=0,2*Pi,(cos(8*exp(I*x))-1)/(sin(8*exp(I*x))-8*exp(I*x))*8*exp(I*x))/2
/Pi
%60 =     7.369691901118188100362219452310677333616272089943876974912647372083157123
84179529029977030400934284416040863627534386665720935154841368799659221944898204
02757635694266367383728295310903977071812401482576524320092831446001989967642708
81839633602446936686289010839678017851131798446278431846915033952507457827079692
63538474842186965662365175322961292912760218059886409837609287809654466128599839
54308267989418829429895450725275924110056638982614530382627852768240536708411731
82431796915902666297231241968629022819445926736882166911622639293985738536570893
54384527910856939479141857042699155301048513404463146302188044424424671089286570
76610058269907148048702984152227815182574251350495156069101054726728071204376522
19884028066784486496078517889674617217625045398911511213735776299090527513539842
5902001 + 4.783718050 E-807*I
?

PARI/GP seems to have difficulties with complex integrals in some cases :(

1

There are 1 best solutions below

4
On

I tried with scilab:

-->function w=f(z); w=(cos(z)-1)/(sin(z)-z); endfunction;

--> intl ( 0,2*%pi,0, 8,f)/(2 * %pi)

ans = 4.017D-15 + 7.i

which seems quite convincing. Are you sure about your parameters?