Polynomials

In the case of polynomials (with rational, real or complex coefficients), the degree is used to compare them. For any two polynomials \(P\), \(S\), there exist polynomials \(Q\) and \(R\) such that: \[P=SQ+R\] and \(R\) is the null polynomial or \(degree(R)<degree(S)\), and we have a division algorithm similar to the one for integers.

Examples:

1) \(P=5x^{3}+7x^{2}-3x+5\;\;\;\;\;\; \;\;\;\;\;\;S=x^{2}+1\)

\( \begin{array}{ll} 5x^3 + 7x^2 - 3x + 5 \hspace{2ex} & \vert\hspace{-0.3ex}\underline{\hspace{1.8ex}x^2+ 1\hspace{0.5ex}}\\ \hspace{-2.1ex}\underline{\hspace{0.3ex}-5x^3 \hspace{6.3ex} -5x\hspace{0.3ex}} & \hspace{1ex} 5x\;\, + 7\hspace{-0.3ex}\\ \hspace{6.3ex} 7x^2 - 8x + 5\\ \hspace{5ex} \underline{\hspace{0.3ex}-7x^2 \hspace{5.4ex} -7\hspace{0.3ex}}\\ \hspace{10.4ex} -\; 8x - 2 \end{array} \)

\(5x^{3}+7x^{2}-3x+5=\left(x^{2}+1\right)\left(5x+7\right)-8x-2\)

In this case \(Q=5x+7\) and \(R=-8x-2\)

2) \(P=8x^{4}+2x^{3}-5x^{2}-24x\;\;\;\;\;\;\;\;\;\;\;\; S=2x^{2}-3x\)

\( \begin{array}{ll} 8x^{4}+\,2x^{3}-5x^{2}-24x\hspace{2ex} & \vert\hspace{-0.3ex}\underline{\hspace{1.8ex}2x^{2}-3x\hspace{0.5ex}}\\ \hspace{-2.1ex}\underline{\hspace{0.3ex}-8x^{4}+\,12x^{3}\hspace{0.3ex}} & \hspace{1ex}4x^{2}+7x+8\hspace{-0.3ex}\\ \hspace{6.3ex}\,14x^{3}-5x^{2}-24x\\ \hspace{4.3ex}\underline{\hspace{0.3ex}-14x^{3}+21x^{2}\hspace{0.3ex}}\\ \hspace{14.5ex}16x^{2}-24x\\ \hspace{12.5ex}\underline{\hspace{0.3ex}-16x^{2}-24x\hspace{0.3ex}}\\ \hspace{18ex}0 \end{array} \)

\(8x^{4}+2x^{3}-5x^{2}-24x=\left(2x^{2}-3x\right)\left(4x^{2}+7x+8\right)\)

In this case \(Q=4x^{2}+7x+8\) and \(R=0\).

Having the division algorithm for the polynomials, we can now use the Euclidean algorithm to find "the" greatest common divisor. Here the gcd is not unique: suppose that \(D\) is a gcd of \(P\) and \(S\); note that, if a polynomial is the product of a non-zero number by \(D\), it is a gcd of \(P\) and \(S\), too (the reciprocal is also true).

We are sure that the algorithm ends after a certain number of steps because the degree of every remainder is smaller than the degree of the previous remainder (while the remainder is not zero), and the degree is an integer which is greater or equal to zero.

The arguments to conclude that what we obtain is a greatest common divisor (greatest in the sense that it is a common divisor which is a multiple of all the other divisors) are exactly the same we have seen for the case of integers.

Examples

1)\(P=x^{5}+x^{4}+x^{2}-6x-7\;\;\;\;\;\;\;\;\;\;\;\; S=x^{3}+x^{2}-3x-3\)

\(\begin{array}{rcl} x^{5}+x^{4}+x^{2}-6x-7 & = & \left(x^{3}+x^{2}-3x-3\right)+x^{2+3x+2}\\ x^{3}+x^{2}-3x-3 & = & \left(x^{2}+3x+2\right)\left(x-2\right)+x+1\\ x^{2}+3x+2 & = & \left(x+1\right)\left(x+2\right)+0 \end{array}\)

2) \(P=x^{6}-x^{5}-2x^{4}+x^{3}-4x\;\;\;\;\;\;\;\;\;\;\;\; S=x^{5}-2x^{4}+x^{2}-2x\)

\(\begin{array}{rcl} x^{6}-x^{5}-2x^{4}+x^{3}-4x & = & \left(x^{5}-2x^{4}+x^{2}-2x\right)\left(x+1\right)+x^{2}-2x\\ x^{5}-2x^{4}+x^{2}-2x & = & \left(x^{2}-2x\right)\left(x^{3}+1\right)+0 \end{array}\)