One of the most important mathematical families of functions is
the collection of polynomials.
Given the independent variable \(x\), a polynomials is a calculation
that only includes addition and multiplication of real numbers and
the value of \(x\). Repeated multiplication by \(x\) corresponds to
positive integer powers of \(x\).

Definition7.5.1

A function \(p(x)\) is a polynomial if it can be written
\begin{equation*} p(x) = a_0 + a_1 \cdot x + a_2 \cdot x^2 + \ldots + a_n x^n \end{equation*}
(but traditionally written in decreasing order of powers)
for some integer \(n \ge 0\) and real numbers \(a_0, a_1, \ldots, a_n\).
The value of \(n\) is called the degree of the polynomial
and the constants \(a_0, a_1, \ldots, a_n\) with \(a_n \ne 0\) are called the coefficients
of the powers \(x^0, x^1, \ldots, x^n\).
The value \(a_n\) is called the leading coefficient.

Example7.5.2

Determine the coefficients and degree of each polynomial.

\(p(x)=x^2+3x-5\) is a polynomial with degree \(n=2\) and
coefficients \(a_0=-5\) (corresponding to the power \(x^0=1\)),
\(a_1=3\) (for \(x^1\)) and \(a_2=1\) (for \(x^2\)).
The leading coefficient is \(a_2=1\).

\(f(x) = 3x(x-5)(2x+1)\) is a function whose value is calculated using only addition
and multiplication of real numbers and the value of \(x\). So it will
be a polynomial. To determine the coefficients, we must multiply out
the terms.
\begin{align*}
f(x) &= 3x(x-5)(2x+1) = (3x^2-15x)(2x+1) \\
& = (3x^2)(2x) + (3x^2)(1) + (-15x)(2x) + (-15x)(1) = 6x^3 +3x^2-30x^2-15x \\
& = 6x^3 - 27x^2 -15x
\end{align*}
We see that the coefficients are \(a_0 = 0\) (no constant term), \(a_1=-15, a_2=-27, a_3=6\).
The degree of \(f\) is \(n=3\) (highest power) and the leading coefficient is 6.

Subsection7.5.2Polynomials in Factored Form

Although polynomials are defined as a sum of whole number power functions,
we frequently need to think about them as products.
This is based on an important mathematical principle of solving equations,
that a product can equal zero if and only if one of the factors is equal to
zero.

Theorem7.5.3

\(A \cdot B = 0 \quad \hbox{if and only if} \quad A=0\hbox{ or }B=0.\)

Polynomials are frequently used to model relationships between variables
where it is know that the dependent variable is zero for certain values
of the independent variable. A model can be formed by multiplying together
factors that individually are zero at each of the desired locations.
An expression of the form \(x-c\) is often used because
\(x-c\) equals zero when \(x=c\).
A product of the form
\((x-a)(x-b)(x-c)\)
will equal zero at \(x=a\) (from the first factor), at \(x=b\)
(from the second factor), and at \(x=c\) (from the third factor).

Example7.5.4

For each set of values, find a function that has zeros at each value in the set.

To get zeros at \(x=0\) and at \(x=4\), the simplest function
will have factors of \((x-0)=x\) and \((x-4)\).
\begin{equation*}f(x) =x(x-4) = x^2-4x\end{equation*}

To get zeros at \(x=-2\) and at \(x=3\), the simplest function
will have factors of \((x--2)=(x+2)\) and \((x-3)\).
\begin{equation*}f(x) =(x+2)(x-3) = x^2-3x+2x-6 = x^2-x-6\end{equation*}

To get zeros at each value in \(\{-1, 1, 3\}\),
the simplest function will have factors of \((x--1)=(x+1)\),
\((x-1)\) and \((x-3)\).
\begin{equation*}f(x) =(x+1)(x-1)(x-3) = (x^2-1)(x-3) = x^3-3x^2-x+3\end{equation*}

In the previous example, because we only used simple factors, the leading
coefficient was always 1. Requiring that the function also passes through
one additional, non-zero point corresponds to a vertical rescaling
by multiplying by some number. Also, in modeling settings, it is often better
to leave the formula in factored form.

Example7.5.5

Using the same set of zeros as in the previous example, find a function
that has the specified zeros and passes through the given point.

The general model with the desired zeros is
\begin{equation*}f(x) =ax(x-4)\end{equation*}
where \(a\) is a scaling parameter that will be determined
using the given point. This is found by using \(x=1\) and
requiring an output of 2:
\begin{gather*}
f(1) = 2 \quad \hbox{and} \quad f(1) = a(1)(1-4) = -3a \\
-3a = 2 \quad \Rightarrow \quad a=-\frac{2}{3}
\end{gather*}
So our function is given by
\begin{equation*} f(x) = -\frac{2}{3}x(x-4). \end{equation*}

The desired model will be the same as the previous solution
except multiplied by the parameter \(a\):
\begin{equation*}f(x) = a(x+2)(x-3).\end{equation*}
In order to guarantee that \(f(0)=3\), we also require
\begin{gather*}
f(0) = a(0+2)(0-3) = -6a = 3 \\
a=-\frac{1}{2}
\end{gather*}
Consequently, the function is given by
\begin{equation*} f(x) = -\frac{1}{2} (x+2)(x-3). \end{equation*}

The function will be of the form
\begin{equation*}f(x) = a(x+1)(x-1)(x-3),\end{equation*}
where \(a\) is determined by requiring \(f(2)=-6\):
\begin{gather*}
f(2) = a(2+1)(2-1)(2-3) = a(3)(1)(-1) = -3a = -6 \\
a=2
\end{gather*}
Consequently, the function is given by
\begin{equation*} f(x) = 2(x+1)(x-1)(x-3). \end{equation*}

In the examples thus far, the function has crossed the axis at each
of the zeros. This is a consequence of using a factor that behaves
like a linear function. If we choose factors that include powers
of the basic factor, we will functions that behave like the corresponding
power functions near the zeros. The power with which a factor is
repeated is called the multiplicity of the zero.

Example7.5.6

Find the equation of a function that touches, but does not cross,
the \(x\)-axis at \(x=-2\) and at \(x=3\), and crosses
the axis at \(x=0\), similar to the graph shown below, with
a value \(f(1)=5\).

Based on the zeros of the graph, we need factors like
\((x+2)\) (for \(x=-2\)), \(x\) (for \(x=0\)),
and \((x-3)\) (for \(x=3\)).
Because the graph looks similar to the vertex of a parabola at
\(x=-2\) and at \(x=3\), the corresponding factors
will need to be squared.
Consequently, the form of the function should be
\begin{equation*} f(x) = a(x+2)^2 x (x-3)^2. \end{equation*}
Usually, we would move the factor \(x\) to the front
for aesthetic purposes.

We find the scaling factor by making the function pass through
the given point.
\begin{gather*}
f(1) = a(1+2)^2(1)(1-3)^2 = a(9)(4) = 36a \\
f(1) = 5 \quad \Rightarrow \quad 36a=5
\quad \Rightarrow \quad a=\frac{5}{36}
\end{gather*}
Consequently, our model for this graph would be
\begin{equation*} f(x) = \frac{5}{36} x (x+2)^2(x-3)^2. \end{equation*}
The zero at \(x=0\) has multiplicity 1, while the zeros
at \(x=-2\) and at \(x=3\) each have multiplicity 2.

Subsection7.5.3Factoring Polynomials

Just as every positive integer has a unique prime factorization,
every polynomial can be factored in a unique way (up to order of factors).
In the history of mathematics, this result is actually fairly remarkable
and is closely related to the development of complex numbers.
The Fundamental Theorem of Algebra guarantees that every polynomial
of degree \(n\) has exactly \(n\) zeros, counted by multiplicity.
The zeros may occur at complex numbers, and if so, they will occur
in complex conjugate pairs.

In addition to the Fundamental Theorem of Algebra, the Factor–Root
theorem connects the zeros of the polynomial to the factors.

Theorem7.5.7Factor–Root Theorem

A polynomial \(f(x)\) has a zero at \(x=c\) with multiplicity \(k\)
if and only if
\((x-c)^k\) is a factor of \(f(x)\).

Zeros that are complex conjugate pairs can be written using simple factors,
but it is more common to include a single quadratic factor
so that we only need to deal with real numbers. A basic quadratic
has a leading coefficient of \(a=1\), and so is of the form \(x^2+bx+c\).
The quadratic formula states that the zeros of such a quadratic are at
\begin{equation*} x = \frac{-b \pm \sqrt{b^2-4c}}{2}. \end{equation*}
The zeros will be complex conjugate pairs if \(b^2-4c \lt 0\).
When a quadratic has complex conjugate zeros, we say the quadratic is
irreducible because it doesn't factor with real factors.

The take-home message of all this is that for any polynomial that you
start with, it is (in principle) possible to factor the polynomial
completely so that every real zero corresponds to factors of the form
\((x-c)\) (where \(c\) is the value of the zero) and
all remaining factors are irreducible quadratics.

In general, factoring a polynomial is very difficult.
But there are some special cases that are relatively easy and which
are typically used in practice problems. Otherwise, we need to rely
on computational tools to answer such questions.
Your task is to know the special cases where the work
is manageable.
For more details, refer to the appendix on polynomial factoring.

Subsection7.5.4End Behavior (Limits) of Polynomials

The factors of a polynomial tell us where and how many times the graph crosses
the \(x\)-axis. If there is a value \(x\) that makes a factor equal zero,
then that value is an \(x\)-intercept. If the factor is repeated an even number
of times, then although the graph comes and touches the axis, the graph will
not cross. It is as though it bounces off the axis.
So knowing the factors allows us to determine much of the shape of the graph.

All polynomials (except constant functions) have ends that
go to infinity. We refer to the left side of a graph as \(x \to -\infty\) (\(x\)
moves along the axis to the left towards infinity) and the right side
of the graph as \(x \to +\infty\) (\(x\) moves along the axis to the
right towards infinity). If the graph goes up forever then we say \(y \to +\infty\)
and if the graph goes down forever then we say \(y \to -\infty\).

Example7.5.8

Describe the end behavior of the polynomial \(y=x^2\).

The degree and leading coefficient of a polynomial completely determine the end
behavior. If the degree is even, then the polynomial will behave like a parabola
with both ends ultimately going in the same direction (both up or both down).
However, if the degree is odd, then the polynomial will behave like a cubic
where the ends ultimately go in opposite directions (one up and one down).
The sign of the leading coefficient determines what happens as \(x \to +\infty\),
with the graph going up if the leading coefficient is positive and going down
if the coefficient is negative. Together, this information completely determines
the end behavior.

Example7.5.10

Describe the end behavior of the polynomial \(f(x) = -2x^4+x^3+5x^2-5\).

When a polynomial is written in factored form, you only need to multiply enough
to determine the degree (or just decide if even/odd) and the sign of the leading
coefficient.

Example7.5.11

Describe the end behavior of the polynomial \(f(x) = -3x^2(x-4)(x+1)^2\).

The degree can be determined by counting how many times \(x\) will appear
when multiplied out. The term \(x^2\) will contributed two, the term \((x-4)\)
will contribute one more, and the term \((x+1)^2\) when multiplied out
will contribute two more. So the degree of this polynomial is \(n=5\).
The leading coefficient will be \(a_5=-3\) because the terms \((x-4)\)
and \((x+1)^2\) will each have a leading coefficient of 1 when multiplied
together.

Now that we know the leading term will be \(-3x^5\) (and the rest doesn't matter),
we can determine the end behavior.
Because the degree is odd, the ends will go in opposite directions.
Because the leading coefficient is negative, the right hand side will go down.
Consequently, we can say \(y \to -\infty\) as \(x \to +\infty\).
In the opposite direction, we say \(y \to +\infty\) as \(x \to -\infty\).
Compare that to the graph shown below.