# Polynomial integer division

I have a polynomial $p$ with integer coefficients, which might have roots of multiplicity higher than one. I would like to obtain each root just once so I calculate $g = \gcd(p, p')$ and divide $q = p/g$. I know $g$ has integer coefficients, too, so my question is: does that division keep $q$ also in $\Bbb Z$?

I tried many random polynomials and it appears to be the case, but how can I be certain that this will always be the case? For example:

$$p = (x-7)\cdot(x-8)\cdot(x-8)\cdot(x-9)\cdot(x-9)\cdot(x-9)$$ $$p = x^6 - 50x^5 + 1040x^4 - 11518x^3 + 71631x^2 - 237168x + 326592$$

$$\gcd(p, p') = x^3 - 26x^2 + 225x - 648$$

$$p/q = x^3 - 24x^2 + 191x - 504$$

What you are asking is basically equivalent to showing that if $p$ and $g$ have integer coefficients, and $p = gq$, if it means $q$ has also integer coefficients. However, that need not be true:
$g = 2x + 6$, $q = \frac12x + 2$, $gq = p = x^2 + 7x + 12$
However if you impose that both $p$ and $g$ have their leading coefficient equal to $1$, then it must be the case that $q$ also has integer coefficients.
Should I prove it or do you want to attempt it? Start by proving that you need only consider the case when $g = x + a$ and then suppose that $q$ has non-integer coefficients and that $gq$ only has integer coefficients. What does that imply?
• @OndrejStefik being "slow" is fine. Not trying is not fine! Just give it a go. Start with small examples, if you must. Like $(x + a)(x + b)$. If $a$ is an integer, could $b$ be non-integer and still yield an integer-coefficient polynomial? And what for $(x + a)(x^2 + bx + c)$? Good luck and let me know how it went. – RGS Nov 19 '16 at 0:04
• Thanks a lot for the answer but unfortunately I still don't quite understand it. Could you please provide an example, where p has (some) roots with multiplicity higher than 1 and p/q does not stay in Z? I'm asking because the given example of yours (p = x^2 + 7x + 12) does not have any multiple roots (its roots are -4 and -3). Because when p does not have any multiple roots its gcd(p, p') is 1 so p/q stays in Z – Ondrej Stefik Nov 20 '16 at 15:08