\chapter{Polynomial functions}
\minitoc
\section{Polynomial functions}
\listspecialproblems
%===================================
% Author: Hughes
% Date: May 2011
%===================================
\begin{pccdefinition}[Polynomial functions]
Polynomial functions have the form
\[
p(x)=a_nx^n+a_{n+1}x^{n+1}+\ldots+a_1x+a_0
\]
where $a_n$, $a_{n+1}$, $a_{n+2}$, \ldots, $a_0$ are real numbers.
\begin{itemize}
\item We call $n$ the degree of the polynomial;
\item $a_n$, $a_{n+1}$, $a_{n+2}$, \ldots, $a_0$ are called the coefficients;
\item We typically write polynomial functions in descending powers of $x$.
\end{itemize}
In particular, we call $a_n$ the {\em leading} coefficient.
\end{pccdefinition}
%===================================
% Author: Hughes
% Date: May 2011
%===================================
\begin{figure}[!h]
\centering
\setlength{\figurewidth}{\textwidth/6}
\setwindow{-10}{-10}{10}{10}{\figurewidth}
\begin{subfigure}{\figurewidth}
\begin{pspicture}(\xmin,\ymin)(\xmax,\ymax)
\pccpsframe(\xmin,\ymin)(\xmax,\ymax)
\psaxes[dx=10,Dx=10,dy=100,Dy=100]{<->}(0,0)(\xmin,\ymin)(\xmax,\ymax)[$x$,-90][$y$,180]
\pccpsplot{-10}{8}{(x+2)}
\end{pspicture}
\caption{$a_1>0$}
\end{subfigure}
\hfill
\begin{subfigure}{\figurewidth}
\begin{pspicture}(\xmin,\ymin)(\xmax,\ymax)
\pccpsframe(\xmin,\ymin)(\xmax,\ymax)
\psaxes[dx=10,Dx=10,dy=100,Dy=100]{<->}(0,0)(\xmin,\ymin)(\xmax,\ymax)[$x$,-90][$y$,180]
\pccpsplot{-4}{4}{(x^2-6)}
\end{pspicture}
\caption{$a_2>0$}
\end{subfigure}
\hfill
\begin{subfigure}{\figurewidth}
\begin{pspicture}(\xmin,\ymin)(\xmax,\ymax)
\pccpsframe(\xmin,\ymin)(\xmax,\ymax)
\psaxes[dx=10,Dx=10,dy=100,Dy=100]{<->}(0,0)(\xmin,\ymin)(\xmax,\ymax)[$x$,-90][$y$,180]
\pccpsplot{-7.5}{7.5}{0.05*(x+6)*x*(x-6)}
\end{pspicture}
\caption{$a_3>0$}
\end{subfigure}
\hfill
\begin{subfigure}{\figurewidth}
\begin{pspicture}(\xmin,\ymin)(\xmax,\ymax)
\pccpsframe(\xmin,\ymin)(\xmax,\ymax)
\psaxes[dx=10,Dx=10,dy=100,Dy=100]{<->}(0,0)(\xmin,\ymin)(\xmax,\ymax)[$x$,-90][$y$,180]
\pccpsplot[plotpoints=1000]{-2.35}{5.35}{0.2*(x-5)*x*(x-3)*(x+2)}
\end{pspicture}
\caption{$a_4>0$}
\end{subfigure}
\hfill
\begin{subfigure}{\figurewidth}
\begin{pspicture}(\xmin,\ymin)(\xmax,\ymax)
\pccpsframe(\xmin,\ymin)(\xmax,\ymax)
\psaxes[dx=10,Dx=10,dy=100,Dy=100]{<->}(0,0)(\xmin,\ymin)(\xmax,\ymax)[$x$,-90][$y$,180]
\pccpsplot[plotpoints=1000]{-5.5}{6.3}{0.01*(x+2)*x*(x-3)*(x+5)*(x-6)}
\end{pspicture}
\caption{$a_5>0$}
\end{subfigure}
\caption{Graphs to illustrate typical shapes of polynomials.}
\end{figure}
%===================================
% Author: Hughes
% Date: May 2011
%===================================
\begin{problem}[Polynomial or not?][special]
Identify whether each of the following functions is a polynomial or not.
If the function is a polynomial, state its degree.
\begin{multicols}{3}
\begin{subproblem}[special]
$p(x)=2x+1$
\begin{shortsolution}
$p$ is a polynomial (you might also describe $p$ as linear). The degree of $p$ is 1.
\end{shortsolution}
\end{subproblem}
\begin{subproblem}
$p(x)=7x^2+4x$
\begin{shortsolution}
$p$ is a polynomial (you might also describe $p$ as quadratic). The degree of $p$ is 2.
\end{shortsolution}
\end{subproblem}
\begin{subproblem}
$p(x)=\sqrt{x}+2x+1$
\begin{shortsolution}
$p$ is not a polynomial; we require the powers of $x$ to be integer values.
\end{shortsolution}
\end{subproblem}
\begin{subproblem}
$p(x)=2^x-45$
\begin{shortsolution}
$p$ is not a polynomial; the $2^x$ term is exponential.
\end{shortsolution}
\end{subproblem}
\begin{subproblem}
$p(x)=6x^4-5x^3+9$
\begin{shortsolution}
$p$ is a polynomial- the degree of $p$ is $6$.
\end{shortsolution}
\end{subproblem}
\begin{subproblem}[special]
$p(x)=-5x^{17}+9x+2$
\begin{shortsolution}
$p$ is a polynomial- the degree of $p$ is 17.
\end{shortsolution}
\end{subproblem}
\end{multicols}
\end{problem}
%===================================
% Author: Hughes
% Date: May 2011
%===================================
\begin{problem}[Polynomial graphs]
Three polynomial functions are shown in \crefrange{poly:fig:functionp}{poly:fig:functionn}.
The functions $p$, $m$, $n$ have the following formulas
\begin{align*}
p(x)&= (x-1)(x+2)(x-3)\\
m(x)&= -(x-1)(x+2)(x-3)\\
n(x)&= (x-1)(x+2)(x-3)(x+1)(x+4)
\end{align*}
Note that for our present purposes we are not concerned with the vertical scale of the graphs.
\end{problem}
\begin{subproblem}
Identify both on the graph {\em and} algebraically, the zeros of the polynomial.
\begin{shortsolution}
\setlength{\figurewidth}{\solutionfigurewidth}
\begin{figure}[!h]
\begin{subfigure}{\figurewidth}
\setwindow{-5}{-10}{5}{10}{\figurewidth}
\begin{pspicture}(\xmin,\ymin)(\xmax,\ymax)
\psaxes[dx=1,Dx=1,dy=0,Dy=10]{<->}(0,0)(\xmin,\ymin)(\xmax,\ymax)[$x$,-90][$y$,180]
\pccpsplot{-2.5}{3.5}{(x-1)*(x+2)*(x-3)}
\pccpsSolDot(-2,0)(1,0)(3,0)
\end{pspicture}
\caption{$y=p(x)$}
\end{subfigure}
\begin{subfigure}{\figurewidth}
\setwindow{-5}{-10}{5}{10}{\figurewidth}
\begin{pspicture}(\xmin,\ymin)(\xmax,\ymax)
\psaxes[dx=1,Dx=1,dy=0,Dy=10]{<->}(0,0)(\xmin,\ymin)(\xmax,\ymax)[$x$,-90][$y$,180]
\pccpsplot{-2.5}{3.5}{-1*(x-1)*(x+2)*(x-3)}
\pccpsSolDot(-2,0)(1,0)(3,0)
\end{pspicture}
\caption{$y=m(x)$}
\end{subfigure}
\begin{subfigure}{\figurewidth}
\setwindow{-5}{-90}{5}{70}{\figurewidth}
\begin{pspicture}(\xmin,\ymin)(\xmax,\ymax)
\psaxes[dx=1,Dx=1,dy=0,Dy=100]{<->}(0,0)(\xmin,\ymin)(\xmax,\ymax)[$x$,-90][$y$,180]
\pccpsplot{-4.15}{3.15}{(x-1)*(x+2)*(x-3)*(x+1)*(x+4)}
\pccpsSolDot(-4,0)(-2,0)(-1,0)(1,0)(3,0)
\end{pspicture}
\caption{$y=n(x)$}
\end{subfigure}
\end{figure}
The zeros of $p$ are $x=-2,1,3$; the zeros of $m$ are $x=-2,1,3$; the zeros of $n$ are $x=-4,-2,-1$, and $3$.
\end{shortsolution}
\end{subproblem}
\begin{subproblem}[special]
Write down the degree, how many times the graph `turns around', and how many zeros it has
\begin{shortsolution}
The degree of $p$ is 3, and it turns around twice. The degree of $q$ is also 3, and it turns around twice. The degree
of $n$ is $5$, and it turns around 4 times.
\end{shortsolution}
\end{subproblem}
\setlength{\figurewidth}{0.25\textwidth}
\begin{figure}[!h]
\begin{subfigure}{\figurewidth}
\setwindow{-5}{-10}{5}{10}{\figurewidth}
\begin{pspicture}(\xmin,\ymin)(\xmax,\ymax)
\psaxes[dx=1,Dx=1,dy=0,Dy=10]{<->}(0,0)(\xmin,\ymin)(\xmax,\ymax)[$x$,-90][$y$,180]
\pccpsplot{-2.5}{3.5}{(x-1)*(x+2)*(x-3)}
\end{pspicture}
\caption{$y=p(x)$}
\label{poly:fig:functionp}
\end{subfigure}
\hfill
\begin{subfigure}{\figurewidth}
\setwindow{-5}{-10}{5}{10}{\figurewidth}
\begin{pspicture}(\xmin,\ymin)(\xmax,\ymax)
\psaxes[dx=1,Dx=1,dy=0,Dy=10]{<->}(0,0)(\xmin,\ymin)(\xmax,\ymax)[$x$,-90][$y$,180]
\pccpsplot{-2.5}{3.5}{-1*(x-1)*(x+2)*(x-3)}
\end{pspicture}
\caption{$y=m(x)$}
\label{poly:fig:functionm}
\end{subfigure}
\hfill
\begin{subfigure}{\figurewidth}
\setwindow{-5}{-90}{5}{70}{\figurewidth}
\begin{pspicture}(\xmin,\ymin)(\xmax,\ymax)
\psaxes[dx=1,Dx=1,dy=0,Dy=100]{<->}(0,0)(\xmin,\ymin)(\xmax,\ymax)[$x$,-90][$y$,180]
\pccpsplot{-4.15}{3.15}{(x-1)*(x+2)*(x-3)*(x+1)*(x+4)}
\end{pspicture}
\caption{$y=n(x)$}
\label{poly:fig:functionn}
\end{subfigure}
\caption{}
\end{figure}
%===================================
% Author: Hughes
% Date: May 2011
%===================================
\begin{problem}[Horizontal intercepts][special]\label{poly:prob:matchpolys}%
State the horizontal intercepts (as ordered pairs) of the following polynomials.
\end{problem}
\begin{subproblem}\label{poly:prob:degree5}
$p(x)=(x-1)(x+2)(x-3)(x+1)(x+4)$
\begin{shortsolution}
$(-4,0)$, $(-2,0)$, $(-1,0)$, $(1,0)$, $(3,0)$
\end{shortsolution}
\end{subproblem}
\begin{subproblem}
$q(x)=-(x-1)(x+2)(x-3)$
\begin{shortsolution}
$(-2,0)$, $(1,0)$, $(3,0)$
\end{shortsolution}
\end{subproblem}
\begin{subproblem}
$r(x)=(x-1)(x+2)(x-3)$
\begin{shortsolution}
$(-2,0)$, $(1,0)$, $(3,0)$
\end{shortsolution}
\end{subproblem}
\begin{subproblem}\label{poly:prob:degree2}
$s(x)=(x-2)(x+2)$
\begin{shortsolution}
$(-2,0)$, $(2,0)$
\end{shortsolution}
\end{subproblem}
\begin{pccdefinition}[Linear factors of a polynomial]
If a polynomial $p$ can be written in factored form
\[
p(x)=(x-x_1)(x-x_2)\ldots(x-x_n)
\]
then we call each of the factors $(x-x_i)$ the linear factors of $p$.
\end{pccdefinition}
%===================================
% Author: Hughes
% Date: May 2011
%===================================
\begin{problem}[Multiple zeros]
Consider the polynomial
\[
p(x) = (x+3)^2(x-1).
\]
\end{problem}
\begin{marginfigure}
\setlength{\figurewidth}{\marginparwidth}
\setwindow{-5}{-20}{2}{10}{\figurewidth}
\centering
\begin{pspicture}(\xmin,\ymin)(\xmax,\ymax)
\psaxes[dx=1,Dx=1,dy=0,Dy=100]{<->}(0,0)(\xmin,\ymin)(\xmax,\ymax)[$x$,-90][$y$,180]
\pccpsplot{-4.75}{1.5}{(x-1)*(x+3)^2}
\end{pspicture}
\caption{$p(x)=(x+3)^2(x-1)$}
\label{poly:fig:multiplezeros}
\end{marginfigure}
\begin{subproblem}
How is this different to the polynomials we have seen so far?
\begin{shortsolution}
$p$ has a repeated linear factor.
\end{shortsolution}
\end{subproblem}
\begin{subproblem}
How many linear factors does $p$ have?
\begin{shortsolution}
$p$ has 3 linear factors.
\end{shortsolution}
\end{subproblem}
\begin{subproblem}
What is the degree of this polynomial?
\begin{shortsolution}
The degree of $p$ is $3$.
\end{shortsolution}
\end{subproblem}
Note that this polynomial can be written as
\begin{align*}
p(x) &=(x+3)^2(x-1)\\
&=(x+3)(x+3)(x-1).
\end{align*}
Does this change your answers?
\begin{subproblem}
The graph of this polynomial is shown in \cref{poly:fig:multiplezeros}. Notice in
particular the behavior of $p$ at $(-3,0)$. Does $p$ cut the horizontal axis, or bounce off it?
\begin{shortsolution}
$p$ bounces off the horizontal axis at $(-3,0)$.
\end{shortsolution}
\end{subproblem}
\begin{subproblem}
Now consider the polynomial functions in \cref{poly:fig:moremultiple}.
The formulas for $p$, $q$, and $r$ are as follows
\begin{align*}
p(x)&=(x-3)^2(x+4)^2\\
q(x)&=x(x+2)^2(x-1)^2(x-3)\\
r(x)&=x(x-3)^3(x+1)^2
\end{align*}
Find the degree of $p$, $q$, and $r$, and decide if the functions bounce or cut at
each of their zeros.
\begin{shortsolution}
\begin{itemize}
\item The degree of $p$ is 4. It bounces at both zeros, $x=3$ and $x=4$.
\item The degree of $q$ is 6. It bounces at $x=-2$ and $x=1$, and cuts at $x=0,3$.
\item The degree of $r$ is 6. It bounces at $x=-1$, and cuts at $x=0$. It also
cuts at $x=3$, although is flattened immediately to the left and right of $x=3$.
\end{itemize}
\end{shortsolution}
\end{subproblem}
\setlength{\figurewidth}{0.25\textwidth}
\begin{figure}[!h]
\centering
\begin{subfigure}{\figurewidth}
\setwindow{-5}{-30}{5}{200}{\figurewidth}
\begin{pspicture}(\xmin,\ymin)(\xmax,\ymax)
\psaxes[dx=2,Dx=2,dy=0,Dy=200]{<->}(0,0)(\xmin,\ymin)(\xmax,\ymax)[$x$,-90][$y$,180]
\pccpsplot{-5}{4.25}{(x-3)^2*(x+4)^2}
\end{pspicture}
\caption{$y=p(x)$}
\end{subfigure}
\hfill
\begin{subfigure}{\figurewidth}
\setwindow{-3}{-60}{4}{40}{\figurewidth}
\begin{pspicture}(\xmin,\ymin)(\xmax,\ymax)
\psaxes[dx=1,Dx=1,dy=0,Dy=200]{<->}(0,0)(\xmin,\ymin)(\xmax,\ymax)[$x$,-90][$y$,180]
\pccpsplot{-2.45}{3.05}{x*(x+2)^2*(x-1)^2*(x-3)}
\end{pspicture}
\caption{$y=q(x)$}
\end{subfigure}
\hfill
\begin{subfigure}{\figurewidth}
\setwindow{-2}{-40}{4}{40}{\figurewidth}
\begin{pspicture}(\xmin,\ymin)(\xmax,\ymax)
\psaxes[dx=1,Dx=1,dy=0,Dy=200]{<->}(0,0)(\xmin,\ymin)(\xmax,\ymax)[$x$,-90][$y$,180]
\pccpsplot{-1.45}{3.75}{x*(x-3)^3*(x+1)^2}
\end{pspicture}
\caption{$y=r(x)$}
\end{subfigure}
\caption{}
\label{poly:fig:moremultiple}
\end{figure}
\begin{pccdefinition}[Multiple zeros]
Let $p$ be a polynomial that has a repeated linear factor $(x-k)^n$. Then we say
that $p$ has a multiple zero at $x=k$ and
\begin{itemize}
\item if the factor $(x-k)$ is repeated an even number of times, the graph of $y=p(x)$ does not
cross the $x$ axis at $x=k$, but `bounces' off the $x$ axis at $x=k$.
\item if the factor $(x-k)$ is repeated an odd number of times, the graph of $y=p(x)$ crosses the
$x$ axis at $x=k$, but it looks `flattened' there
\end{itemize}
\end{pccdefinition}
%===================================
% Author: Hughes
% Date: May 2011
%===================================
\begin{margintable}
\centering
\caption{$p$ and $q$}
\begin{tabular}{rrr}
\beforeheading
\heading{$x$} & \heading{$p(x)$} & \heading{$q(x)$} \\ \afterheading
$-4$ & $-56$ & $-16$ \\\normalline
$-3$ & $-18$ & $-3$ \\ \normalline
$-2$ & $0$ & $0$ \\ \normalline
$-1$ & $4$ & $-1$ \\ \normalline
$0$ & $0$ & $0$ \\ \normalline
$1$ & $-6$ & $9$ \\ \normalline
$2$ & $-8$ & $32$ \\ \normalline
$3$ & $0$ & $75$ \\ \normalline
$4$ & $24$ & $144$ \\\lastline
\end{tabular}
\label{poly:tab:findformula}
\end{margintable}
\begin{problem}[Find a formula from a table]
\Cref{poly:tab:findformula} shows two polynomial functions, $p$ and $q$.
\end{problem}
\begin{subproblem}
Assuming that all of the zeros of $p$ are shown, how many zeros does $p$ have?
\begin{shortsolution}
$p$ has 3 zeros.
\end{shortsolution}
\end{subproblem}
\begin{subproblem}
What is the degree of $p$?
\begin{shortsolution}
$p$ is degree 3.
\end{shortsolution}
\end{subproblem}
\begin{subproblem}
Write a formula for $p(x)$.
\begin{shortsolution}
$p(x)=x(x+2)(x-3)$
\end{shortsolution}
\end{subproblem}
\begin{subproblem}
Assuming that all of the zeros of $q$ are shown, how many zeros does $q$ have?
\begin{shortsolution}
$q$ has 2 zeros.
\end{shortsolution}
\end{subproblem}
\begin{subproblem}
Describe the difference in behavior of $p$ and $q$ at $x=-2$.
\begin{shortsolution}
$p$ changes sign at $x=-2$, and $q$ does not change sign at $x=-2$.
\end{shortsolution}
\end{subproblem}
\begin{subproblem}[special]
Given that $q$ is a degree 3 polynomial, write a formula for $q(x)$.
\begin{shortsolution}
$q(x)=x(x+2)^2$
\end{shortsolution}
\end{subproblem}