[Math] A lot of confusion in the “Polynomial Remainder Theorem”

algebra-precalculusdefinitioneuclidean-algorithmpolynomials

Lately I've been reading about Polynomial Remainder Theorem from various sources, mainly from the wikipedea article, this post and some high school books. Wikipedea says that if we divide a polynomial $f(x)$ with another polynomial $g(x)$ then

$$f(x)=q(x)g(x) + r(x)\quad \text{and}\quad r(x) =0 \; \text{or}\; \deg(r)<\deg(g)\ \tag{1}$$

  • Why is the expression for $q(x)$ same for all values of $x$? E.g. suppose $f(x) = x^3 – 12x^2 – 42$ and $g(x) = x-3$ then $q(x)$ might be of form $q(x)=ax^n+bx^{n-1}+cx^{n-2} \cdots$ . For whatever reason the following relation is true,

    $$f(x) = x^3 – 12x^2 – 42 = (x-3)(x^2+15x)+3$$
    Here why is $a=1$, $b=15$, $c=0$ and $n=2$ always true irrespective of the values $x$ take?

  • Why is $\deg(r)$ always less than $\deg(q)$? As far as I know things are equivalent to usual Euclid's division, $|r(x)|<|g(x)|$. Now it might be that for any polynomial $r(x)$ to be less than another polynomial $g(x)$, $r(x)'s$ degree has to be less than that of $(g(x)'s$ — but I don't know why is this true or how I can prove it.

  • What is the logic behind long division? Why do we keep on taking the reminder in each step? E.g. while dividing $x^3 – 12x^2 – 42$ with $(x-3)$ why is in first step quotient is $x^2$, why not just $x$, why always choose the maximum possible value?

This was about the confusions related to the definition. It is said that in equation $1$ if $g(x)=(x-a)$ then $f(a)=r$, because of $$f(x)=q(x)(x-a) + r \tag{2}$$

But why is equation $2$ true for $x=a$? Here $g(a)=0$ so we can't just perform the Euclid division over $f(x)$. Moreover the expression for equation $2$ with $g(x)$ being $0$ must be something like
$$f(x)=0 q(x)+f(x)$$
That is the reminder should be $f(x)$ itself. Most of the answers on the similar question say that we aren't actually dividing by $0$, we are just figuring out an algebraic identity of sort, $f(x)=(x-a)q(x)+r$. I agree that if we actually multiply $(x-a)$ with $q(x)$ and then add $r$ to it to observe that the identity holds then $f(a)=r$, but what we actually do is Euclid division to find out $q(x)$, which we can't do because we can't divide with $0$. But then I don't understand why does the value of $q(x)$ found with Euclid division under the condition of $x\neq a$ is same as the value found by trial and error by actually multiplying with guessed values of $q(x)$ with $x-a$.

Another answer says equation $2$ is true for $x=a$ because the following relation holds,

$$\begin{eqnarray} f'(a) &=\,& \dfrac{f(x)-f(a)}{x-a}\Bigg|_{\large\, x\,=\,a}\\ \\ {\rm i.e.}\ \ \ f'(a) &=\,& q(a)\ \ {\rm where}\ \ f(x)-f(a) = q(x)(x-a)\end{eqnarray}$$

As far as I know he/she is using the Maan Value Theorem by substituting $x$ for $b$ in the standard equation,

$$ f'(c) = \frac{f(b) – f(a)}{b-a}$$

Where $x,c \to a$, but we can't take $x=c=b$. So equation (1) might be true for $x \to a$ but not for $x=a$.

Best Answer

Let's forget the word "division" for a moment.

The claim is that if $f$ and $g$ are polynomials in one variable (i.e., in one indeterminate) with coefficients in a field (e.g., with rational coefficients), and if $g$ is not the zero polynomial, then there exist unique polynomials $q$ and $r$, with $\deg r < \deg g$, such that $$ f = qg + r. $$ The preceding equation expresses equality of polynomials as abstract algebraic entities. If you're working with coefficients in a field of characteristic zero (e.g., rational, real, or complex coefficients), it's safe to reformulate the preceding in terms of values of polynomial functions: $$ f(x) = q(x) g(x) + r(x) \quad\text{for all $x$.} \tag{1} $$ The discussion below uses "function value" language.

Uniqueness is easy: if $$ q_{1}(x) g(x) + r_{1}(x) = f(x) = q_{2}(x) g(x) + r_{2}(x) \quad\text{for all $x$,} $$ then $\bigl(q_{1}(x) - q_{2}(x)\bigr) g(x) = r_{2}(x) - r_{1}(x)$. Since the left-hand side is a polynomial multiple of $g$ (hence is either $0$ for all $x$, or is a polynomial of degree at least $\deg g$) and the right-hand side is a polynomial of degree strictly smaller than $\deg g$, each side must be $0$. That is, $q_{1}(x) = q_{2}(x)$ for all $x$, and $r_{1}(x) = r_{2}(x)$ for all $x$.

One proof of existence proceeds by successive subtraction of (polynomial multiples of) $g$ from $f$: The preceding conclusion may be written $$ f(x) - q(x) g(x) = r(x) \quad\text{for all $x$,} $$ in which case it's clear the goal is "to subtract a polynomial multiple of $g$ from $f$, obtaining a polynomial of degree strictly smaller than $\deg g$".

To illustrate the main idea, consider the example $$ f(x) = x^{3} - 12x^{2} - 42,\quad g(x) = x - 3. $$ The "game" will be to subtract successive monomial multiples of $g$ from $f$ with the goal of reducing the degree of the difference at each step.

To that end, focus on the highest-degree term of each: $f(x) = x^{3} + \cdots$ and $g(x) = x + \cdots$. Since $x^{3} = x^{2} \cdot x$, we're led to consider \begin{align*} f(x) - x^{2}g(x) &= x^{3} - 12x^{2} - 42 - x^{2}(x - 3) \\ &= -9x^{2} - 42. \end{align*} Since $\deg (-9x^{2} - 42) = 2 < 3 = \deg f$, we've succeeded in writing $f$ as a polynomial multiple of $g$ plus a remainder of degree smaller than $\deg f$ [sic., not $\deg g$]. Note that the preceding holds for all $x$.

Continue in this vein. By similar consideration of the highest-degree terms, $-9x^{2} = -9x\cdot x$, we're led to write \begin{align*} \bigl[f(x) - x^{2}g(x)\bigr] - (-9x)\, g(x) &= \bigl[-9x^{2} - 42\bigr] + 9x(x - 3) \\ &= -27x - 42. \end{align*} Combining the two preceding steps, we have $$ f(x) - (x^{2} - 9x)\, g(x) = -27x - 42\quad\text{for all $x$.} $$

The remainder still has degree greater than or equal to the degree of $g$, so we can perform another step, obtaining $$ f(x) - (x^{2} - 9x - 27)\, g(x) = -123\quad\text{for all $x$.} $$

Here the process ends: Since $\deg(-123) = 0 < \deg g$, we cannot reduce the degree of the remainder further by subtracting monomial multiples of $g$. We have established a decomposition of the form (1) in this example: $$ f(x) - \underbrace{(x^{2} - 9x - 27)}_{q(x)}\, g(x) = \underbrace{-123}_{r(x)}\quad\text{for all $x$.} $$

The close analogy with Euclid's algorithm should be clear. The customary "polynomial long division" notation expresses this process more concisely.


Writing out a general proof is straightforward. The key technical step is the following observation: If $f(x) = a_{n}x^{n} + a_{n-1}x^{n-1} + \cdots$ is a polynomial of degree $n$ (i.e., if $a_{n} \neq 0$), if $g(x) = b_{m} x^{m} + b_{m-1}x^{m-1} + \cdots$ has degree $m$ (i.e., if $b_{m} \neq 0$), and if $\deg g = m \leq n = \deg f$ (i.e., if we do not already have a "remainder" of degree smaller than $\deg g$), then $$ f(x) - \frac{a_{n}}{b_{m}} x^{n - m}\, g(x) = \underbrace{\left(a_{n} - \frac{a_{n}}{b_{m}}\, b_{m}\right)}_{= 0} x^{n} + \left(a_{n-1} - \frac{a_{n}}{b_{m}}\, b_{m-1}\right) x^{n-1} + \cdots $$ has degree at most $n - 1$. (The second coefficient in parentheses might be zero, so the degree of this "partial remainder" might be strictly smaller than $n - 1$.)

Now do induction on the following statement $P_{n}$:

If $f$ is a polynomial of degree an most $n$ in one variable, and if $g$ is a polynomial in one variable, there exist polynomials $q$ and $r$ such that $f(x) = q(x) g(x) + r(x)$ and $\deg r < \deg g$.

As base case, the induction starts with constant polynomials, for which the conclusion is obvious.

The "key technical step" above shows that if $\deg f = k + 1$, then $f$ may be written as a monomial multiple of $g$ plus a polynomial of degree at most $k$, to which the inductive hypothesis may be applied.

Related Question