# Primitive of a rational function

Does there exists some simple criteria to know when the primitive of a rational function of $\mathbb{C}[z]$ is still a rational function?

In fact my question is more about the stability of this property. Let $P$ and $Q$ two coprime polynomials and let $A$ and $B$ two coprime polynomials such that $$\frac{A}{B}= \left(\frac{P}{Q}\right)'= \frac{P'Q-PQ'}{Q^2}.$$ Then considering a pertubation $A^\varepsilon$ of $A$ (in the sense the roots of $A^\varepsilon$ converge to the one of $A$ with the same multiplicity as $\varepsilon$ goes to zero.): does $\dfrac{A^\varepsilon}{B}$ admit a primitive which is rational function?

• The obvious answer is if the partial fraction expansion contains no expression of the form $\frac{a}{z-r}$. But I'm not sure how one tests that in general. – Thomas Andrews Jun 12 '13 at 15:35
• Can you give an example? If $A(z)=1$ and $B(z)=z^2$, what would a perturbation of $A$ look like? Clearly, if $A^\epsilon(z)=1+\epsilon z$ is allowed, then you have your answer... – Thomas Andrews Jun 12 '13 at 16:12
• the root of $A^\varepsilon$ is not bounded so it is not allowed.... – Ana Jun 13 '13 at 9:05

One simple criterion is the following. If the denominator of $\,f\,$ has squarefree factorization $\,Q_1 Q_2^2\cdots Q_n^n\,$ then $\,f\,$ has a partial fraction expansion $\, P_1/Q_1+\cdots+ P_n/Q_n^n,\,$ which is the derivative of a rational function $\iff$ each $\,P/Q^i\,$ is $\iff Q\mid W(P,Q',(Q^2)',\ldots,(Q^{i-1})'),\,$ where $\,W\,$ denotes the Wronskian. Recall that the squarefree factorization of a polynomial over a field of characteristic $\,0\,$ may be quickly computed by gcds.