# The divisibility of two polynomials

Question: Let $f(x)$ and $g(x)$ be polynomials. Now suppose $f(x)=0$ for exactly three values of $x$: $x_{1,2,3}=-3,4,8$.

And suppose $g(x)=0$ for exactly five values of x: namely, $x_{1,2,3,4,5}=-5,-3,2,4,8$.

Is it true that $g(x)$ is divisible by $f(x)$? And why?

I'm not sure what to do here. I know $f(x)=(x+3)(x-4)(x-8)$ and $g(x)=(x+5)(x+3)(x-2)(x-4)(x-8)$. But I don't know how to implement that in the proof.

Hints are also welcome. One big obstacle is that I don't know how to prove that two polynomials can be divided "perfectly" without remainders.

• You are essentially done. All that's left to do is write it as $g(x)=(x+5)(x-2)f(x)$. Note that the above assumes that all the given roots are simple i.e. of multiplicity $1$, otherwise the conclusion doesn't follow. – dxiv Dec 2 '16 at 19:43
• Polynomials over what? Name the ring! – user261263 Dec 2 '16 at 20:15
• Roots over $\,\Bbb R\,$ or $\,\Bbb C?$ And does "exaclty" mean multiplicity one? – Bill Dubuque Dec 2 '16 at 20:24
• @EugenCovaci We haven't learned about this "polynomial ring" thing. Although I'm assuming the roots are real. Otherwise, isn't the answer obvious. – Frank Dec 2 '16 at 21:37

$f(x)=(x+3)^2(x-4)^2(x-8)^2$ and $g(x)=(x+5)(x+3)(x-2)(x-4)(x-8)$.

and hence the statement is not true unless there is more information on the degree of the polynomials.

• Why the squared terms in f(x)? – DJohnM Dec 2 '16 at 20:12
• I was just constructing an example that satisfy the condition for $f(x)$. Did I understand the question correctly? – Siong Thye Goh Dec 2 '16 at 20:14
• That's what turns the answer into "no". (x+3) is divisible by (x+3), but not by (x+3)^2. – gnasher729 Dec 2 '16 at 20:14
• I agree, hence the statement is not true unless we know more things like all roots are simple roots. – Siong Thye Goh Dec 2 '16 at 20:15

I understand that when is said "$f(x)=0$ for exactly three values of x" then multiplicity is $1$ for each root. Using that we have:

$$f(x)=(x+3)(x-4)(x-8)$$ $$g(x)=(x+5)(x+3)(x-2)(x-4)(x-8)$$

So we have

$$g(x)=f(x)(x-2)(x+5) \Rightarrow \frac{g(x)}{f(x)}=(x-2)(x+5)$$

and then $f(x)|g(x)$.

If we're talking about real roots of real polynomials, then this is false. Just take

$f(x)=(x+3)(x-4)(x-8)(x^2+1)$

$g(x)=(x+5)(x+3)(x-2)(x-4)(x-8)$