Given two factored polynomials of the same degree $N$:
$$ \begin{align} P(x) &= \prod_{k=1}^{k=N} (x - p_k) \\ Q(x) &= \prod_{k=1}^{k=N} (x - q_k) \end{align} $$
Due to $P$ and $Q$ having the same degree there exists a poylnomial $P'$ of degree $N - 1$ and number $C$ (i.e. polynomial of degree zero) such that:
$$ C + \frac {P'(x)}{Q(x)} = \frac {P(x)} {Q(x)} $$
Where $P'$ is needed in factored form also (a constant $K$ is introduced as leading coefficient may not be 1):
$$ P'(x) = K \prod_{k=1}^{k=N - 1} (x - p'_k) $$
Is it possible to find $P'$ in factored form given both $P$ and $Q$ are in factored form?
Has there been any work done on a numerically stable computer algorithm to do this?
One method would be to compute the partial fraction expansion of $\frac {P} {Q}$ and do some heavy rearranging and then find the roots of $P'$ but that is computationally expensive and will lead to inaccuracies for large $N$.
It can be assumed the $P$ and $Q$ have no repeated roots and no roots in common and that in their leading coefficient is 1 so that:
$$ \begin{align} P(x) &= 1 + a_0 x + ... + a_N x^N \\ Q(x) &= 1 + b_0 x + ... + b_N x^N \\ P'(x) &= K(1 + c_0 x + ... + c_{N-1} x^{N - 1}) \end{align} $$