# Polynomial Arithmetic

Interestingly, polynomials behave a lot like integers. Just as we can add, subtract, or multiply two integers and the result is always an integer, we can add, subtract, or multiply two polynomials and the result is always expressable as a polynomial. Also, just as the quotient of two integers can sometimes be an integer, but need not be -- the quotient of two polynomials can occasionally be a polynomial, but very frequently is not.

To sum two polynomials, we simply appeal to the commutative and associative properties of real numbers to rearrange the sum so that like terms can be collected, as shown in the example below

$$\begin{array}{rcl} (x^3 + 7x^2 - 5) + (4x^3 - 2x^2 + 6x + 9) &=& (x^3 + 4x^3) + (7x^2 - 2x^2) + 6x + (-5 + 9)\\\\ &=& 5x^3 + 5x^2 + 6x + 4 \end{array}$$

Recall subtraction is just the addition of a negative. With this in mind, we find differences of polynomials by first distributing a negative to the terms of the second polynomial and then adding the resultant polynomials. An example is shown below:

$$\begin{array}{rcl} (x^3 + 7x^2 - 5) - (4x^3 - 2x^2 + 6x + 9) &=& (x^3 + 7x^2 - 5) + (-1)(4x^3 - 2x^2 + 6x + 9)\\\\ &=& (x^3 + 7x^2 - 5) + (-4x^3 + 2x^2 - 6x - 9)\\\\ &=& -3x^3 + 9x^2 - 6x - 14 \end{array}$$

Important: All of the steps for adding or subtracting the two polynomials above were shown for clarity -- but one should practice finding the sum or difference of a pair of polynomials completely in one's head -- without writing ANY of the above intermediate steps. These manipulations will be frequently required in future problems -- and being able to perform them as quickly as possible will be a great advantage.

### Multiplying Polynomials

Just like the sum and difference of two polynomials is always expressible as a polynomial, as demonstrated by the previous discussion, the product of two polynomials is also always expressible as a polynomial. To see this, we appeal to the distributive property twice, as shown in the example below:

$$\begin{array}{rcl} (2a-3b)(3a+4ab+b) &=& 2a(3a+4ab+b) - 3b(3a+4ab+b)\\\\ &=& 2a(3a) + 2a(4ab) + 2a(b) - 3b(3a) - 3b(4ab) - 3b(b)\\\\ &=& 6a^2 + 8a^2b + 2ab - 9ab - 12ab^2 - 3b^2\\\\ &=& 6a^2 + 8a^2b - 7ab - 12ab^2 - 3b^2 \quad \quad \scriptsize{\textrm{ after collecting the } ab \textrm{ terms }} \end{array}$$

Multiplying two binomials turns out to be a very common occurence. With this in mind, we note that in general

$$\begin{array}{rcl} (a + b)(c + d) &=& a(c + d) + b(c + d)\\\\ &=& ac + ad + bc + bd \end{array}$$

Remembering this expanded form, we don't have to deal with applying the distributive property, and can thus save ourselves some time. In future problems, a single step might require expanding many such products, so this is valuable. As a mneumonic, often students remember the acronym "F. O. I. L." to recall the various products involved (i.e., $ac, ad, bc,$ and $bc$). This is explained by the following:

The product of two binomials is the sum of the products of the

 F first terms, O outer terms, I inner terms, and L last terms

The following gives an example of how this mneumonic can shorten our work a bit:

$$\begin{array}{rcl} (x+2)(x-7) &=& \underbrace{x^2}_{\textrm{first terms: } x \cdot x} + \underbrace{(-7x)}_{\textrm{outer terms: } x \cdot (-7)} + \underbrace{2x}_{\textrm{inner terms: } 2 \cdot x} -\underbrace{14}_{\textrm{last terms: } 2 \cdot (-7)}\\\\ &=& x^2 - 5x - 14 \end{array}$$

Often we will encounter the need to square a binomial. While we can certainly do this by either again appealing to the distributive property multiple twice, or by using the FOIL mneumonic mentioned above. However, this particular action will be required with such frequency that we will likely want to simply commit to memory the final form of the result and thus save ourselves from the tedium of calculating the intermediate steps.

Note,

$$\begin{array}{rcl} (a + b)^2 &=& (a+b)(a+b)\\\\ &=& (a+b)a + (a+b)b\\\\ &=& a^2 + ab + ab + b^2\\\\ &=& a^2 + 2ab + b^2 \end{array}$$

Remembering that $(a+b)^2 = a^2 + 2ab + b^2$, we can square binomials in just two quick steps. For example, note how in expression below, $2x$ plays the role of $a$ and $(-3)$ plays the role of $b$:

$$(2x - 3)^2 = (2x)^2 + 2(2x)(-3) + (-3)^2 = 4x^2 - 12x + 9$$

We can deal with higher powers of binomials in a similar manner. One can quickly verify the following formulas for the third and fourth powers of a binomial:

$$\begin{array}{c} (a+b)^3 = a^3 + 3a^2b + 3ab^2 + b^3\\\\ (a+b)^4 = a^4 + 4a^3b + 6a^2b^2 + 4ab^3 + b^4 \end{array}$$

### Dividing Polynomials and Factoring

As mentioned previously the behavior of polynomials under division is remarkably similar to that of integers. When integers are divided, sometimes one goes into the other evenly, producing an integer result. Other times, we are left with some non-integer, but rational value.

Polynomials too, behave this way. There is no guarantee that a quotient of polynomials can be expressed as a polynomial, even though it sometimes can. As a simple example, note that both the numerator and denominator of $\frac{1}{x}$ are polynomials, albeit trivial ones. Yet, this quotient is equivalent to $x^{-1}$, which we know is not a polynomial.

We refer to quotients of two polynomials as rational expressions. They are the analogs of rational values (i.e., fractions), and can be handled in very similar ways.

For example, every fraction has a reduced form, where all common factors in the numerator and denominator have been "cancelled".

We will be able to reduce rational expressions (i.e., quotients of polynomials) with the same technique. We simply need to identify any common factors shared between the polynomial in the numerator and the polynomial in the denominator, and cancel them.

Of course, this raises the question, "How do we find the factors a given polynomial?"