On Thursday, July 17, 2014 9:19:04 AM UTC-4, Andrei Berceanu wrote: > > I should perhaps mention that this is part of a bigger scheme, to first > find all the poles of G(x,y)/F(x,y) and then use the residue theorem for > solving a complex integral of the type > integral( G(x,y)/F(x,y), (x,y)) >
Unless F(x,y) is very special (e.g. a polynomial), I suspect that it would be much faster to just do the integral. Since you have analytic functions, 1d/contour integration is very efficient (with an appropriate algorithm, e.g. the built-in quadgk function) unless you have poles lying very close to your integration contour (and even then it is not too bad with an adaptive scheme like quadgk.) In contrast, finding *all* the zeros of an arbitrary analytic function is hard, usually harder than integrating it unless you have a good idea of where the zeros are. In general, it's not practical to guarantee that you have found all the zeros unless you can restrict your search to some finite portion of the complex plane. For finding the roots of analytic functions inside a given contour, some of the best algorithms actually involve doing a sequence of integrals (http://www.chebfun.org/examples/roots/ComplexRoots.html) that are just as hard as your original integral above. So, you might as well just do the integral to begin with.
