# Proof of a formula for the number of distinct roots of a polynomial

I want to proof the following lemma:

Given a polynomial $P \in F[X]$ the number of distinct roots is $$d = \deg(P) - \deg(\gcd(P,P')).$$

I see that if $z_1, \dots, z_n$ are the roots and $\mu_1, \dots, \mu_n$ are the multiplicities then $$\gcd(P,P') = (X-z_1)^{\mu_1-1} \cdots (X-z_n)^{\mu_n-1}.$$

Now if $P$ has exactly $\deg(P)$ roots that's fine and the lemma holds. But I do not see why it holds if there are less then $\deg(P)$ roots.

Any ideas?

-
I changed \operatorname{deg} and \operatorname{gcd} to \deg and \gcd. They're already standard operator names in LaTeX. – Michael Hardy Nov 15 '11 at 20:50
Good to know! Thanks! – joachim Nov 15 '11 at 20:56

Take $F=\mathbb{R}$, $P(x)=x^2+1$. Then $P'(x) = 2x$, $\gcd(P,P') = \gcd(x^2+1,2x) = 1$, but $P(x)$ has zero roots in $\mathbb{R}$, not $2-0=2$ as the claim holds.
What is true is that the number of distinct roots in an algebraic closure of $F$ is equal to the given formula, and your argument gives the result.
So i.e. for integer polynomials with roots in $\mathbb{A}$ the lemma works? – joachim Nov 15 '11 at 20:57
@joachim: No, because polynomials with integer coefficients may have rational roots; e.g., $f(x) = 2x-3$ has $\deg(f)=1$, $\deg(\gcd(f,f')) = 0$, but $f(x)$ has no roots in $\mathbb{A}$. It will work for monic polynomials with integer coefficients, by considering them as polynomials over $\mathbb{Q}$ and then noting that any roots in $\overline{\mathbb{Q}}$ will actually lie in $\mathbb{A}$. Also for polynomials that are constant multiples of monic polynomials with integers in $\mathbb{Z}$, of course. – Arturo Magidin Nov 15 '11 at 20:59