Re: Need help finding info from ace math folks Message #6 Posted by Crawl on 24 Aug 2010, 4:22 p.m., in response to message #1 by Namir
It doesn't seem like it would be too hard to implement on a TI89, which can do complex numeric integrals (I think the HP50 for some reason doesn't like it if integrals are complex).
I imagine you start with
a < real part < b
m < imaginary part < n
You believe there is one (or more) zeros in that rectangle.
Then you divide the rectangle into quarters, a to (a+b)/2 to b, and m to (m+n)/2 to n
Then you just numerically integrate f'/f around the rectangle. So, for the upper left one, it could be the sum of integrals
from a + m i to b + m i
then from b + m i to b + n i
then from b + n i to a + n i
and finally from a + n i back to a + m i
Then divide this number by 2 * pi * i. It should be an integer greater than or equal to zero. Because we're working with polynomials, there should be no poles, and the integer should equal the number of roots in the rectangle.
If the number of roots is greater than zero, quarter this new rectangle and try again.
If the number of roots equals zero, forget about this rectangle and move on to the next.
I'll see if I can whip up an example program on the TI89 later.
I can give one example that's simple enough to do by hand.
x1=0.
Suppose the rectangle is bounded by
0<real<2
1<imaginary<+1
In this case, f'/f = 1/(x1)
The integral of this is log(x1) = logx1 + theta * i
Along the bottom side of the rectangle, the integral will be
(log(sqr(2)) pi i / 4)  (log(sqr(2)  3 pi i / 4)
= pi i / 2
Likewise, each other side contributes pi i / 2. So the total integral is 2 pi i. Divide by 2 pi i to get 1, the number of roots in the rectangle.
In this case, the next step, the quartering of the rectangle, will fail, because the root is exactly at the center. So all four rectangles will have zero for their winding number. But in the unlikely event that that happens, you should know that's where the root exactly is.
