Show that $a - b \mid f(a) - f(b)$

Let $A$ be a domain with field of fractions $K$ and let $$ f(X)=a_0+a_1X+a_2X^2+\cdots+a_nX^n $$ be a polynomial in $A[X]$. Then for all $a\neq b\in A$, $$ \begin{eqnarray} f(b)-f(a)&=&(a_0+a_1b+\cdots+a_nb^n)-(a_0+a_1a+\cdots+a_na^n)\\ &=& (b-a)\left(a_1+a_2\frac{b^2-a^2}{b-a}+\cdots+a_n\frac{b^n-a^n}{b-a}\right) \end{eqnarray} $$ is certainly valid in $K$. But now note that both factors actually belong to $A$ since $b-a$ divides $b^k-a^k$ for all $k\geq0$.


This follows by specializing the Polynomial Factor Theorem (below), namely if $\,f\in A[x]\,$ then

$$\begin{align} x\!-\!b\ \ \ \mid\ &\ f(x)-f(b)\ \ \ {\rm in}\ \ A[x]\\[.2em] \Rightarrow\ \ g(x)\, (x\!-\!b) =&\ f(x)-f(b)\,\ \ {\rm for\ some}\ \ g\in A[x]\\[.2em] \Rightarrow\ \ g(a)\, (a\!-\!b)\, =&\ f(a)-f(b)\,\ \ {\rm by\ eval\ at}\ \ x=a\\[.2em] \Rightarrow\qquad\ \ \ \ \, a\!-\!b\ \ \ \,\mid\ &\, f(a)-f(b)\ \ \ {\rm in}\ \ A\ \end{align}\ \ \ $$

Polynomial Factor Theorem $\ $ If $A$ is a commutative ring, $\,b\in A\,$ and $\,f(x)\in A[x]\,$ then

$$\ x\!-\!b\,\mid\, f(x)-f(b)\ \ {\rm in}\ \ A[x]\quad $$

Proof $\ \ {\rm mod}\,\ x\!-\!b\!:\,\ \color{#c00}{x\equiv b}\,\Rightarrow\, f(\color{#c00}{x})\equiv f(\color{#c00}b)\ $ by the Polynomial Congruence Rule. (the linked proof of the congruence rule is given in $\,\Bbb Z\,$ but it is in fact valid in any commutative ring, since the proofs use only commutative ring axioms).

Or use the Polynomial Division Algorithm to write $\,f(x)-f(b) = (x\!-\!b)g(x) + r\,$ then conclude $\,r = 0\,$ by evaluation at $\, x = b\,$ (recall eval is a ring hom when the coef ring $A$ is commutative).

Or, directly, use linearity to reduce to the monomial case $\,f = x^k\,$ then use the high-school formula for $\,(x^n-b^n)/(x-b)\,$ to infer it is $\in A[x],\,$ i.e. explicitly

$$\dfrac{f(x)-f(b)}{x-b} = \sum \,f_i\, \dfrac{x^k - b^k}{x-b} = \sum \,f_i\,(x^{k-1}\! +\! bx^{k-2}\!+\cdots+\! b^{k-2}x\!+\!b^{k-1})\in A[x] $$

Remark $ $ The universal Polynomial Factor Theorem $\ x\!-\!y\,\mid\, f(x)-f(y)\in \Bbb Z[x,y]\,$ is the special case $\, A=\Bbb Z[y]\,$ and $\,b = y.\,$ This allows us to deduce all "number" instances as specializations of "function" (polynomial) cases. It is a simple prototypical example of deducing number divisibility as a special case of polynomial divisibility. Here is more on universality of polynomial identities.

We have the following equivalence between the above methods.

Theorem $\ $ TFAE for a polynomial $\,f\in R[x],\,$ and $\,a\in R\,$ a commutative ring.

$(0)\ \ \ f = (x\!-\!a)q + r\ $ for some $\,q\in R[x],\ r\in R\ \ \ $ [Monic Linear Division Algorithm]

$(1)\ \ \ f\bmod x\!-\!a = f(a)\ \ \ \ \ \ \ $ [Remainder Theorem]

$(2)\ \ \ f(a) = 0\,\Rightarrow\, x\!-\!a\mid f\ \ \ \ $ [Factor Theorem]

Proof $\ (0\Rightarrow 1)\ \ \ f = (x\!-\!a)q + r\,\overset{\large x\,=\,a}\Longrightarrow\, r=f(a)\,\Rightarrow\,f\bmod x\!-\!a = r = f(a) $

$(1\Rightarrow 2)\ \ \ f\bmod x\!-\!a = f(a) = 0\,\Rightarrow\, x\!-\!a\mid f$

$(2\Rightarrow 0)\ \ \ g := f-f(a)\,$ has $\,g(a) = 0\ $ so $\ g = f-f(a) = (x\!-\!a)q$