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!
No, the statement is not correct if $a=b$. For example, let $f=x-a$. Then $f$ is (obviously) divisible by both $x-a$ and $x-a$, while not being divisible by $(x-a)^2$.
By way of analogy, consider the statement "if $p$ and $q$ are two unequal prime numbers, and $n$ is an integer divisible by both $p$ and $q$, then $n$ is divisible by $pq$". That is a correct statement, but if you allow $p=q$ it is false, with counterexamples such as $n=p=q=2$.
The key in both situations is to make sure the ideals of the respective rings are coprime. The ideals $(x-a)$ and $(x-b)$ are coprime if and only if $a\neq b$, and the ideals $(p)$ and $(q)$ of $\mathbb{Z}$ for prime numbers $p,q$ are coprime if and only if $p\neq q$.