I encountered this proving problem, I can do the proof but my question is why in the condition/premise we need $a$ to be unequal to $b$? My guess is that even $a=b$, the statement is still true, is it correct? If yes, how can we prove it? If false, are there any counter-examples?
The problem: Let $a$ and $b$ be two unequal constants. If $f(x)$ is a polynomial with integer coefficients, and $f(x)$ is divisible by $x-a$ and $x-b$, then $f(x)$ is divisible by $(x-a)(x-b)$.
My proof (just for reference):
Let $q(x)$ be the quotient and $px+r$ be the remainder (where p, r are constants that we have to find) when $f(x)$ is divided by $(x-a)(x-b)$. So we have $f(x)=(x-a)(x-b)q(x)+px+r$.
We then substitute $a$ and $b$ into $f(x)$ and use factor theorem, we get $pa+r$ and $pb+r$. We solve the simultaneous equations we get $p(a-b)=0$, since $a\neq b$, $p=0$ and $r=0$. So $f(x)$ is divisible by $(x-a)(x-b)$.
Helps are greatly appreciated. Thanks!