# Algorithm for determining all the zeros of a complex rational function without initial guesses

Given a rational function R(x) = P(x)/Q(x), where P and Q are polynomials which can have complex coefficients, is there an algorithm which allows us to determine the zeros of R without an initial guess of the values of the zeros?

There are methods to determine approximate values of all the roots of P without any initial guesses. For example by computing the eigenvalues of the companion matrix (see this). Among these roots are all the zeros of R. The problem is that some roots may not be zeros of R, if they are a root of Q with at least the same multiplicity as P. I'm really looking for a robust way of checking that.

• A zero of $R$ must be a zero of $P$. So any polynomial algorithm would work. – Arthur Mar 29 '19 at 8:57
• But a zero of P (let's call it x) is not necessarily a zero of R. You could think that all we need to do is to check if R(x)=0, but numerically you will always get some finite value for R(x), and it is then difficult to assert if x is truly a zero of R. – user56159 Mar 29 '19 at 9:01

Reduce $$P(x)/Q(x)$$ to lowest terms by using the Euclidean algorithm to find $$\gcd(P(x),Q(x))$$. Then the zeros of $$R$$ are exactly the zeros of the numerator.