\documentclass[numbers=enddot,12pt,final,onecolumn,notitlepage]{scrartcl}%
\usepackage[headsepline,footsepline,manualmark]{scrlayer-scrpage}
\usepackage[all,cmtip]{xy}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{framed}
\usepackage{comment}
\usepackage{color}
\usepackage{hyperref}
\usepackage[sc]{mathpazo}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usepackage{needspace}
\usepackage{tabls}
\usepackage{wasysym}
\usepackage{easytable}
\usepackage{ytableau}
%TCIDATA{OutputFilter=latex2.dll}
%TCIDATA{Version=5.50.0.2960}
%TCIDATA{LastRevised=Tuesday, July 08, 2025 23:14:52}
%TCIDATA{SuppressPackageManagement}
%TCIDATA{<META NAME="GraphicsSave" CONTENT="32">}
%TCIDATA{<META NAME="SaveForMode" CONTENT="1">}
%TCIDATA{BibliographyScheme=Manual}
%TCIDATA{Language=American English}
%BeginMSIPreambleData
\providecommand{\U}[1]{\protect\rule{.1in}{.1in}}
%EndMSIPreambleData
\usetikzlibrary{arrows.meta}
\usetikzlibrary{chains}
\newcounter{exer}
\numberwithin{exer}{subsection}
\theoremstyle{definition}
\newtheorem{theo}{Theorem}[subsection]
\newenvironment{theorem}[1][]
{\begin{theo}[#1]\begin{leftbar}}
{\end{leftbar}\end{theo}}
\newtheorem{lem}[theo]{Lemma}
\newenvironment{lemma}[1][]
{\begin{lem}[#1]\begin{leftbar}}
{\end{leftbar}\end{lem}}
\newtheorem{prop}[theo]{Proposition}
\newenvironment{proposition}[1][]
{\begin{prop}[#1]\begin{leftbar}}
{\end{leftbar}\end{prop}}
\newtheorem{defi}[theo]{Definition}
\newenvironment{definition}[1][]
{\begin{defi}[#1]\begin{leftbar}}
{\end{leftbar}\end{defi}}
\newtheorem{remk}[theo]{Remark}
\newenvironment{remark}[1][]
{\begin{remk}[#1]\begin{leftbar}}
{\end{leftbar}\end{remk}}
\newtheorem{coro}[theo]{Corollary}
\newenvironment{corollary}[1][]
{\begin{coro}[#1]\begin{leftbar}}
{\end{leftbar}\end{coro}}
\newtheorem{conv}[theo]{Convention}
\newenvironment{convention}[1][]
{\begin{conv}[#1]\begin{leftbar}}
{\end{leftbar}\end{conv}}
\newtheorem{quest}[theo]{Question}
\newenvironment{question}[1][]
{\begin{quest}[#1]\begin{leftbar}}
{\end{leftbar}\end{quest}}
\newtheorem{warn}[theo]{Warning}
\newenvironment{warning}[1][]
{\begin{warn}[#1]\begin{leftbar}}
{\end{leftbar}\end{warn}}
\newtheorem{conj}[theo]{Conjecture}
\newenvironment{conjecture}[1][]
{\begin{conj}[#1]\begin{leftbar}}
{\end{leftbar}\end{conj}}
\newtheorem{exam}[theo]{Example}
\newenvironment{example}[1][]
{\begin{exam}[#1]\begin{leftbar}}
{\end{leftbar}\end{exam}}
\newtheorem{exmp}[exer]{Exercise}
\newenvironment{exercise}[1][]
{\begin{exmp}[#1]\begin{leftbar}}
{\end{leftbar}\end{exmp}}
\newenvironment{statement}{\begin{quote}}{\end{quote}}
\newenvironment{fineprint}{\medskip \begin{small}}{\end{small} \medskip}
\iffalse
\newenvironment{proof}[1][Proof]{\noindent\textbf{#1.} }{\ \rule{0.5em}{0.5em}}
\newenvironment{question}[1][Question]{\noindent\textbf{#1.} }{\ \rule{0.5em}{0.5em}}
\newenvironment{warning}[1][Warning]{\noindent\textbf{#1.} }{\ \rule{0.5em}{0.5em}}
\newenvironment{teachingnote}[1][Teaching note]{\noindent\textbf{#1.} }{\ \rule{0.5em}{0.5em}}
\fi
\let\sumnonlimits\sum
\let\prodnonlimits\prod
\let\cupnonlimits\bigcup
\let\capnonlimits\bigcap
\renewcommand{\sum}{\sumnonlimits\limits}
\renewcommand{\prod}{\prodnonlimits\limits}
\renewcommand{\bigcup}{\cupnonlimits\limits}
\renewcommand{\bigcap}{\capnonlimits\limits}
\setlength\tablinesep{3pt}
\setlength\arraylinesep{3pt}
\setlength\extrarulesep{3pt}
\voffset=0cm
\hoffset=-0.7cm
\setlength\textheight{22.5cm}
\setlength\textwidth{15.5cm}
\newcommand\arxiv[1]{\href{http://www.arxiv.org/abs/#1}{\texttt{arXiv:#1}}}
\newenvironment{verlong}{}{}
\newenvironment{vershort}{}{}
\newenvironment{noncompile}{}{}
\newenvironment{teachingnote}{}{}
\excludecomment{verlong}
\includecomment{vershort}
\excludecomment{noncompile}
\excludecomment{teachingnote}
\newcommand{\CC}{\mathbb{C}}
\newcommand{\RR}{\mathbb{R}}
\newcommand{\QQ}{\mathbb{Q}}
\newcommand{\NN}{\mathbb{N}}
\newcommand{\ZZ}{\mathbb{Z}}
\newcommand{\KK}{\mathbb{K}}
\newcommand{\id}{\operatorname{id}}
\newcommand{\lcm}{\operatorname{lcm}}
\newcommand{\rev}{\operatorname{rev}}
\newcommand{\powset}[2][]{\ifthenelse{\equal{#2}{}}{\mathcal{P}\left(#1\right)}{\mathcal{P}_{#1}\left(#2\right)}}
\newcommand{\set}[1]{\left\{ #1 \right\}}
\newcommand{\abs}[1]{\left| #1 \right|}
\newcommand{\tup}[1]{\left( #1 \right)}
\newcommand{\ive}[1]{\left[ #1 \right]}
\newcommand{\floor}[1]{\left\lfloor #1 \right\rfloor}
\newcommand{\lf}[2]{#1^{\underline{#2}}}
\newcommand{\underbrack}[2]{\underbrace{#1}_{\substack{#2}}}
\newcommand{\horrule}[1]{\rule{\linewidth}{#1}}
\newcommand{\are}{\ar@{-}}
\newcommand{\nnn}{\nonumber\\}
\newcommand{\sslash}{\mathbin{/\mkern-6mu/}}
\newcommand{\numboxed}[2]{\underbrace{\boxed{#1}}_{\text{box } #2}}
\newcommand{\ig}[2]{\includegraphics[scale=#1]{#2.png}}
\iffalse
\NOEXPAND{\today}{\today}
\NOEXPAND{\sslash}{\sslash}
\NOEXPAND{\numboxed}[2]{\numboxed}
\fi
\ihead{Math 235 Fall 2023, Worksheet 8, version \today}
\ohead{page \thepage}
\cfoot{Darij Grinberg}
\begin{document}
\setcounter{section}{7}

\section{Math 235 Fall 2023, Worksheet 8: Some algebraic properties of
polynomials}

\emph{Polynomials} and their many variants have been occupying mathematicians
since the Middle Ages. Somewhere between 1/4 and 3/4 of a typical textbook on
abstract algebra is devoted to the study of polynomials, and yet even some of
the most basic questions that one might ask usually remain
unanswered.\footnote{Indeed, we saw such a question on worksheet \#4: How can
we factor a polynomial with integer coefficients into irreducible
polynomials?}

This worksheet is not meant to be any comprehensive survey of the subject
(this would be near-impossible), nor even an introduction to all its bases (we
will treat only univariate polynomials with numbers as coefficients). Its goal
is rather to expose some elementary properties and features that are often
useful. Obviously, we can only scratch the surface of the subject. For further
results, techniques and problems, see \cite[\S 5.4]{Zeitz17}, \cite[\S 2.2]%
{GelAnd17}, \cite[Chapter 10]{Engel98}, \cite[Chapters 10--11]{AndDos},
\cite[Chapters 10--11]{AndDosS}, \cite{Barbea89} and \cite{Prasol04} (listed
roughly in the order of increasing sophistication).

As before, $\mathbb{N}$ means the set $\left\{  0,1,2,\ldots\right\}  $.

\subsection{Definitions}

I assume that you have already encountered polynomials in your life, although
maybe not their precise definition. I will outline it without going into too
many details (see \cite[Chapter 7]{19s} for the latter). The following is more
of a reminder than an introduction.

\subsubsection{The informal definition}

Informally speaking, a \emph{polynomial with real coefficients} is an
\textquotedblleft expression\textquotedblright\ of the form $c_{0}X^{0}%
+c_{1}X^{1}+\cdots+c_{n}X^{n}$, where $c_{0},c_{1},\ldots,c_{n}$ are real
numbers, and where $X$ is \textquotedblleft an indeterminate\textquotedblright%
\ (a symbol with no fixed value other than itself; but you will soon be able
to substitute numbers and other things for it). Examples of such polynomials
are
\begin{align*}
&  2X^{0}+7X^{1}+\dfrac{3}{8}X^{2}+\sqrt{2}X^{3}+\left(  -\pi\right)
X^{4}\ \ \ \ \ \ \ \ \ \ \text{and}\\
&  1X^{0}+2X^{1}\ \ \ \ \ \ \ \ \ \ \text{and}\ \ \ \ \ \ \ \ \ \ 1X^{0}%
+0X^{1}+\left(  -1\right)  X^{2}.
\end{align*}
We treat such expressions as if they were actual sums of powers of $X$
multiplied with real factors, and we allow them to be manipulated accordingly:
For example, an addend of the form $0X^{i}$ can be omitted (or, conversely,
inserted), an addend of the form $1X^{i}$ can be rewritten as $X^{i}$, and we
can replace a \textquotedblleft$+c_{i}X^{i}$\textquotedblright\ by a
\textquotedblleft$-\left(  -c_{i}\right)  X^{i}$\textquotedblright\ whenever
we find it convenient. Thus, for example, the polynomial $1X^{0}%
+0X^{1}+\left(  -1\right)  X^{2}$ can be rewritten in any of the forms%
\[
X^{0}+\left(  -1\right)  X^{2},\ \ \ \ \ \ \ \ \ \ X^{0}-1X^{2}%
,\ \ \ \ \ \ \ \ \ \ X^{0}-X^{2}%
\]
(as well as more complicated forms such as $1X^{0}+0X^{1}+\left(  -1\right)
X^{2}+0X^{3}+0X^{4}$, because we can insert $0X^{i}$ addends). We can also put
the monomials in any order (so, e.g., we can rewrite $X^{3}+2X^{7}$ as
$2X^{7}+X^{3}$). Moreover, we abbreviate the monomials $X^{0}$ and $X^{1}$ as
$1$ and $X$, respectively. Thus, the polynomial $X^{0}-2X^{1}+X^{2}$ can be
simplified to $1-2X+X^{2}$. We shall say a few words about how to make all
this rigorous further below.

For theoretical purposes, we often write a polynomial $c_{0}X^{0}+c_{1}%
X^{1}+\cdots+c_{n}X^{n}$ as an infinite sum $c_{0}X^{0}+c_{1}X^{1}+c_{2}%
X^{2}+\cdots$ by setting $c_{i}:=0$ for all $i>n$. For example, $X^{0}%
-X^{2}=1X^{0}+0X^{1}+\left(  -1\right)  X^{2}+0X^{3}+0X^{4}+0X^{5}+\cdots$.
When a polynomial is written in this infinite-sum form $c_{0}X^{0}+c_{1}%
X^{1}+c_{2}X^{2}+\cdots$, the numbers $c_{0},c_{1},c_{2},\ldots$ are called
its \emph{coefficients}.

Having introduced polynomials, we need to explain how they can be added and
multiplied. This is best done using their infinite-sum form: Addition is
defined by%
\begin{align*}
&  \left(  c_{0}X^{0}+c_{1}X^{1}+c_{2}X^{2}+\cdots\right)  +\left(  d_{0}%
X^{0}+d_{1}X^{1}+d_{2}X^{2}+\cdots\right) \\
&  =\left(  c_{0}+d_{0}\right)  X^{0}+\left(  c_{1}+d_{1}\right)
X^{1}+\left(  c_{2}+d_{2}\right)  X^{2}+\cdots
\end{align*}
(this is called \textquotedblleft coefficientwise addition\textquotedblright),
whereas multiplication is defined by the more complicated formula%
\begin{align*}
&  \left(  c_{0}X^{0}+c_{1}X^{1}+c_{2}X^{2}+\cdots\right)  \cdot\left(
d_{0}X^{0}+d_{1}X^{1}+d_{2}X^{2}+\cdots\right) \\
&  =e_{0}X^{0}+e_{1}X^{1}+e_{2}X^{2}+\cdots,\ \ \ \ \ \ \ \ \ \ \text{where
}e_{n}:=\sum_{i=0}^{n}c_{i}d_{n-i}\text{ for each }n\in\mathbb{N}%
\end{align*}
(this is the formula you would obtain if you expanded the product on the left
hand side and used distributivity and $X^{i}X^{j}=X^{i+j}$ to collect equal
powers of $X$ together).

The \emph{degree} of a polynomial $c_{0}X^{0}+c_{1}X^{1}+c_{2}X^{2}+\cdots$ is
defined to be the largest number $n\in\mathbb{N}$ such that $c_{n}\neq0$. If
no such $n$ exists (i.e., if the polynomial is $0X^{0}+0X^{1}+0X^{2}+\cdots$),
then the degree is defined to be $-\infty$ (a symbol that is understood to be
smaller than every integer). The degree of a polynomial $P$ is denoted by
$\deg P$.

Each real number $r\in\mathbb{R}$ is commonly identified with the polynomial
$rX^{0}+0X^{1}+0X^{2}+0X^{3}+\cdots$, which is known as a \emph{constant
polynomial} (and has degree $0$ if $r\neq0$ and degree $-\infty$ if $r=0$).

Nothing forces us to use the letter $X$ for the indeterminate; and indeed,
many other symbols are commonly used in its stead, such as the lowercase $x$
or $t$. On this worksheet, I will generally use uppercase letters (such as
$P$, $Q$ and $R$) for polynomials (and in particular, $X$ for the
indeterminate, which itself is a polynomial, namely the polynomial
$0X^{0}+1X^{1}+0X^{2}+0X^{3}+\cdots$), and lowercase letters for numbers. But
you should be prepared to encounter other notations on the Putnam contest and elsewhere.

We let $\mathbb{R}\left[  X\right]  $ denote the set of all polynomials with
real coefficients. As we know, these polynomials can be added and multiplied.
They can also be subtracted, namely by the rule $P-Q=P+\left(  -Q\right)  $,
where $-Q$ is $\left(  -1\right)  Q$. Explicitly, this boils down to
subtracting them coefficientwise. We will soon see how they can be divided
(with remainder).

All the above was stated for polynomials with real coefficients. Similarly, we
can define polynomials with integer coefficients, polynomials with rational
coefficients, and polynomials with complex coefficients. The sets of such
polynomials are denoted by $\mathbb{Z}\left[  X\right]  $, $\mathbb{Q}\left[
X\right]  $ and $\mathbb{C}\left[  X\right]  $, respectively. More generally,
if $\mathbb{K}$ is any set of numbers, then the notation $\mathbb{K}\left[
X\right]  $ means the set of all polynomials with coefficients in $\mathbb{K}%
$. Clearly, $\mathbb{Z}\left[  X\right]  \subseteq\mathbb{Q}\left[  X\right]
\subseteq\mathbb{R}\left[  X\right]  \subseteq\mathbb{C}\left[  X\right]  $.

One important feature of polynomials is the possibility of \emph{substituting}
things (e.g., numbers, matrices, other polynomials) into them (aka
\emph{evaluating} them at these things). Let me remind how this works: If
$P=c_{0}X^{0}+c_{1}X^{1}+\cdots+c_{n}X^{n}$ is a polynomial, and if $a$ is a
\textquotedblleft number-like thing\textquotedblright\ (i.e., a number, a
square matrix, a polynomial, or more generally an element of a
ring\footnote{This will make sense if you know some abstract algebra. (In that
case, you will realize that I'm being a bit sloppy here.)}), then $P\left(
a\right)  $ denotes the sum $c_{0}a^{0}+c_{1}a^{1}+\cdots+c_{n}a^{n}$. Roughly
speaking, $P\left(  a\right)  $ is obtained from $P$ by \textquotedblleft
plugging $a$ for each $X$\textquotedblright. We say that $P\left(  a\right)  $
is obtained by \emph{substituting} $a$ into $P$ or by \emph{evaluating} $P$ at
$a$.

Since we can substitute numbers $a$ into polynomials $P$, you may be tempted
to view polynomials as functions. And indeed, polynomials \emph{give rise to}
functions: For example, any polynomial $P\in\mathbb{R}\left[  X\right]  $
gives rise to the function%
\begin{align*}
f_{P}:\mathbb{R}  &  \rightarrow\mathbb{R},\\
a  &  \mapsto P\left(  a\right)  ,
\end{align*}
called the \emph{polynomial function} corresponding to $P$. Moreover, the
polynomial $P$ can be uniquely reconstructed from the polynomial function
$f_{P}$ (see Corollary \ref{cor.polys.idtrick.fP} below). Analogous things
hold for polynomials in $\mathbb{Z}\left[  X\right]  $, $\mathbb{Q}\left[
X\right]  $ and $\mathbb{C}\left[  X\right]  $. Thus, one might be tempted to
equate a polynomial $P$ with its corresponding polynomial function $f_{P}$,
and perhaps even to \textbf{define} polynomials as such functions (as Axler
does in his otherwise superb textbook \cite{Axler23}). However, this is bad
for two reasons: Firstly, it lets you forget that polynomials can take not
just numbers but also other things (e.g., square matrices) as inputs.
Secondly, this turns out to be the wrong definition of polynomials once you
generalize them to other kinds of coefficients (e.g., coefficients in a finite
field). I personally think of polynomials as things that lie somewhat upstream
from functions, but can be made into functions at the slightest need and often
can be recovered back from the latter functions.

\subsubsection{The formal definition}

The definition of a polynomial we gave above was not quite up to the modern
standards of rigorous mathematics. It referred to a mystical \textquotedblleft
indeterminate\textquotedblright\ and to a vague concept of an
\textquotedblleft expression\textquotedblright. There is a well-known way to
make this definition bulletproof, which I will outline just for the sake of
completeness; the details can be found in \cite[Chapter 7]{19s}. This rigorous
definition proceeds in multiple steps:

\begin{enumerate}
\item We let $\mathbb{K}$ be one of the four sets $\mathbb{Z}$, $\mathbb{Q}$,
$\mathbb{R}$ and $\mathbb{C}$. We define a \emph{polynomial with coefficients
in }$\mathbb{K}$ (that is, a polynomial with integer, rational, real or
complex coefficients, depending on what $\mathbb{K}$ is) as an infinite
sequence $\left(  c_{0},c_{1},c_{2},\ldots\right)  $ of numbers in
$\mathbb{K}$ such that only finitely many entries of this sequence are nonzero
(i.e., only finitely many $i\in\mathbb{N}$ satisfy $c_{i}\neq0$). For example,
$\left(  1,0,4,-1,\underbrace{0,0,0,\ldots}_{\text{zeroes}}\right)  $ is a
polynomial, but $\left(  1,1,1,1,\ldots\right)  $ is not. This definition may
look strange, but it is completely precise (you know what a sequence is,
right?). Later on, such a polynomial-as-sequence $\left(  c_{0},c_{1}%
,c_{2},\ldots\right)  $ will be rewritten as $c_{0}X^{0}+c_{1}X^{1}+c_{2}%
X^{2}+\cdots$, so we will recover the usual notation for polynomials.

\item We define addition and multiplication of polynomials by the formulas
\[
\left(  c_{0},c_{1},c_{2},\ldots\right)  +\left(  d_{0},d_{1},d_{2}%
,\ldots\right)  =\left(  c_{0}+d_{0},\ c_{1}+d_{1},\ c_{2}+d_{2}%
,\ \ldots\right)
\]
and%
\begin{align*}
&  \left(  c_{0},c_{1},c_{2},\ldots\right)  \cdot\left(  d_{0},d_{1}%
,d_{2},\ldots\right)  =\left(  e_{0},e_{1},e_{2},\ldots\right)  ,\\
&  \ \ \ \ \ \ \ \ \ \ \text{where }e_{n}:=\sum_{i=0}^{n}c_{i}d_{n-i}\text{
for each }n\in\mathbb{N}.
\end{align*}
(These are exactly the usual definitions of addition and multiplication,
rewritten in terms of infinite sequences.)

We identify each number $r\in\mathbb{K}$ with the polynomial $\left(
r,\underbrace{0,0,0,\ldots}_{\text{zeroes}}\right)  $, and we define
subtraction of polynomials by $P-Q:=P+\left(  -1\right)  Q$. We also set
$\dfrac{P}{r}:=\dfrac{1}{r}P$ for any nonzero $r\in\mathbb{K}$ and any
polynomial $P$.

\item If $P=\left(  c_{0},c_{1},c_{2},\ldots\right)  $ is a polynomial, then
the entries $c_{0},c_{1},c_{2},\ldots$ are called its \emph{coefficients}.
Specifically, $c_{i}$ is called its $i$\emph{-th coefficient} (or its
\emph{coefficient before }$X^{i}$).

\item The \emph{degree} of a polynomial $P=\left(  c_{0},c_{1},c_{2}%
,\ldots\right)  $ is defined to be the largest $n\in\mathbb{N}$ such that
$c_{n}\neq0$ (or, if no such $n$ exists, then it is defined to be $-\infty$).

\item We define the \emph{indeterminate} $X$ to be the polynomial $\left(
0,1,\underbrace{0,0,0,\ldots}_{\text{zeroes}}\right)  $.

\item We define powers of polynomials in the usual way: $P^{i}%
=\underbrace{PP\cdots P}_{i\text{ times}}$ and $P^{0}=1$.

\item If $a$ is an appropriate \textquotedblleft number-like
thing\textquotedblright\ (we will explain what this means in a moment), and if
$P=\left(  c_{0},c_{1},c_{2},\ldots\right)  $ is a polynomial, then $P\left(
a\right)  $ denotes the sum $c_{0}a^{0}+c_{1}a^{1}+c_{2}a^{2}+\cdots$. This
sum looks infinite, but actually it has only finitely many nonzero addends
(since only finitely many $c_{i}$ are nonzero), and thus it can be computed in
finite time simply by throwing away its zero addends and summing the rest.

What is an \textquotedblleft appropriate\textquotedblright\ \textquotedblleft
number-like thing\textquotedblright? The short answer is \textquotedblleft
anything for which the sum $c_{0}a^{0}+c_{1}a^{1}+c_{2}a^{2}+\cdots$ would
make sense\textquotedblright. For example, $a$ can be a number in $\mathbb{K}%
$, or a square matrix with entries in $\mathbb{K}$, or another polynomial with
coefficients in $\mathbb{K}$. Unlike a function, a polynomial has no a-priori
restriction on what can be substituted into it.

The value $P\left(  a\right)  $ is called the \emph{value} of $P$ at $a$. It
is said to be obtained by \emph{substituting} $a$ into $P$ or by
\emph{evaluating} $P$ at $a$.
\end{enumerate}

Strictly speaking, some things need to be checked for this definition to work.
For instance, it is not obvious that the multiplication of polynomials is
associative -- i.e., that $\left(  PQ\right)  R=P\left(  QR\right)  $ for any
three polynomials $P,Q,R$. Likewise, some things that look obvious actually
need some proof: For instance, if $P$ and $Q$ are two polynomials, and if $a$
is a \textquotedblleft number-like thing\textquotedblright, then
\begin{align}
\left(  P+Q\right)  \left(  a\right)   &  =P\left(  a\right)  +Q\left(
a\right)  \ \ \ \ \ \ \ \ \ \ \text{and}\label{eq.pols.subs-rules.+}\\
\left(  PQ\right)  \left(  a\right)   &  =P\left(  a\right)  \cdot Q\left(
a\right)  \ \ \ \ \ \ \ \ \ \ \text{and}\label{eq.pols.subs-rules.*}\\
\left(  P\left(  Q\right)  \right)  \left(  a\right)   &  =P\left(  Q\left(
a\right)  \right)  . \label{eq.pols.subs-rules.compose}%
\end{align}
You have probably used these facts tacitly many times before realizing that
they are theorems rather than tautologies. Don't worry too much: Their proofs
are not very hard (see \cite[Theorem 7.2.5 and Theorem 7.6.3 and Proposition
7.6.14]{19s} for the facts just mentioned)\footnote{The proofs of
(\ref{eq.pols.subs-rules.+}) and (\ref{eq.pols.subs-rules.*}) are very easy.}.

It is also easy to see that if $P\in\mathbb{K}\left[  X\right]  $ is a
polynomial, then $P\left(  X\right)  =P$. In other words, if $P=\left(
c_{0},c_{1},c_{2},\ldots\right)  $ is a polynomial, then%
\[
P=P\left(  X\right)  =c_{0}X^{0}+c_{1}X^{1}+c_{2}X^{2}+\cdots.
\]
This fact completes the connection between our rigorous definition of
polynomials as sequences and our informal understanding of polynomials as
\textquotedblleft expressions\textquotedblright.

It is common to write polynomials $P$ as \textquotedblleft$P\left(  X\right)
$\textquotedblright, even though the equality $P\left(  X\right)  =P$ shows
that the \textquotedblleft$\left(  X\right)  $\textquotedblright\ part is
redundant. The advantage of this redundant notation is that it stresses the
fact that $P$ is a polynomial and that the indeterminate is being denoted by
$X$.

Note that, as a consequence of our definition, two polynomials $P=\left(
c_{0},c_{1},c_{2},\ldots\right)  $ and $Q=\left(  d_{0},d_{1},d_{2}%
,\ldots\right)  $ are equal if and only if their respective coefficients are
equal (i.e., if and only if $c_{i}=d_{i}$ for all $i\in\mathbb{N}$). We will
later see that (for $\mathbb{K}$ being one of the sets $\mathbb{Z}$,
$\mathbb{Q}$, $\mathbb{R}$ and $\mathbb{C}$) this is equivalent to equality of
values (more precisely, to requiring that $P\left(  x\right)  =Q\left(
x\right)  $ for all $x\in\mathbb{K}$), but this is not obvious at this point
(and does not generalize to more exotic cases such as $\mathbb{K}$ being a
finite field).

\subsubsection{A caveat}

Keep in mind that a polynomial $P\in\mathbb{Q}\left[  X\right]  $ might be
\emph{integer-valued} (i.e., satisfy $P\left(  a\right)  \in\mathbb{Z}$ for
all $a\in\mathbb{Z}$) without having integer coefficients (i.e., without
belonging to $\mathbb{Z}\left[  X\right]  $). For instance, the polynomial
$P=\dfrac{X\left(  X-1\right)  }{2}=\dfrac{-1}{2}X+\dfrac{1}{2}X^{2}$ is
integer-valued (since $\dfrac{a\left(  a-1\right)  }{2}\in\mathbb{Z}$ for all
$a\in\mathbb{Z}$), but has two non-integer coefficients. This again
illustrates the downsides of thinking of polynomials as functions.

\subsubsection{What we are missing}

We are deliberately restricting ourselves to \emph{univariate polynomials}
(i.e., polynomials in one indeterminate) here, and specifically to those that
have coefficients in $\mathbb{Z}$, $\mathbb{Q}$, $\mathbb{R}$ or $\mathbb{C}$.
The reason is that there is enough to say about these \textquotedblleft
simple\textquotedblright\ cases already! In particular, these cases cover the
majority of polynomials that appear on contests like the Putnam (even though
polynomials with coefficients in finite fields sometimes appear as well).

\subsection{Basics about degrees and coefficients}

We introduce some more notations regarding polynomials:

\begin{itemize}
\item If $P\in\mathbb{K}\left[  X\right]  $ is a polynomial (where
$\mathbb{K}$ is one of $\mathbb{Z}$, $\mathbb{Q}$, $\mathbb{R}$ and
$\mathbb{C}$), then $\deg P$ denotes the degree of $P$.

\item A polynomial $P$ is called \emph{nonzero} if it is distinct from the
polynomial $0=\left(  0,0,0,\ldots\right)  $. (This does not mean that all its
values $P\left(  a\right)  $ are nonzero!)

\item The \emph{leading coefficient} of a nonzero polynomial $P=\left(
c_{0},c_{1},c_{2},\ldots\right)  $ is its coefficient $c_{\deg P}$. In other
words, it is the last nonzero coefficient of $P$.

\item If $P=\left(  c_{0},c_{1},c_{2},\ldots\right)  $ is a polynomial, and
$i\in\mathbb{N}$, then $\left[  X^{i}\right]  P$ denotes the coefficient
$c_{i}$ of $P$.

For example, if $P=\left(  X+1\right)  ^{n}$ for some $n\in\mathbb{N}$, then
$\left[  X^{i}\right]  P=\dbinom{n}{i}$ by the binomial formula.

\item The \emph{constant coefficient} of a polynomial $P$ is defined to be
$\left[  X^{0}\right]  P$. This equals the value $P\left(  0\right)  $.

\item A polynomial $P$ is said to be \emph{monic} if it is nonzero and its
leading coefficient is $1$.

For instance, the polynomial $X^{2}-5X+4$ is monic, but the polynomial
$4X^{2}-5X+1$ is not.

\item As we know, the polynomials of degree $\leq0$ are called constant. The
polynomials of degree $1$ (or sometimes of degree $\leq1$) are called
\emph{linear}; the polynomials of degree $2$ (or sometimes $\leq2$) are called
\emph{quadratic}; the polynomials of degree $3$ (or sometimes $\leq3$) are
called \emph{cubic}.
\end{itemize}

Degrees and leading coefficients behave nicely when polynomials are added,
subtracted and multiplied:\footnote{The symbol $-\infty$ is understood to be
smaller than every integer.
\par
Sums of the form $\left(  -\infty\right)  +k$ or $k+\left(  -\infty\right)  $
(where $k$ is an integer or $-\infty$) are understood to be $-\infty$.}

\begin{proposition}
\label{prop.poly.deg.prod}Let $\mathbb{K}$ be one of the sets $\mathbb{Z}$,
$\mathbb{Q}$, $\mathbb{R}$ and $\mathbb{C}$. Let $P$ and $Q$ be two
polynomials in $\mathbb{K}\left[  X\right]  $. Then:

\begin{enumerate}
\item[\textbf{(a)}] We have $\deg\left(  P+Q\right)  \leq\max\left\{  \deg
P,\ \deg Q\right\}  $ and $\deg\left(  P-Q\right)  \leq\max\left\{  \deg
P,\ \deg Q\right\}  $.

\item[\textbf{(b)}] We have $\deg\left(  PQ\right)  =\deg P+\deg Q$.

\item[\textbf{(c)}] If $P$ and $Q$ are nonzero, then $PQ$ is nonzero as well,
and the leading coefficient of $PQ$ is the product of the leading coefficients
of $P$ and $Q$.

\item[\textbf{(d)}] If $P$ and $Q$ are monic, then $PQ$ is also monic.

\item[\textbf{(e)}] If $PQ=0$, then $P=0$ or $Q=0$.

\item[\textbf{(f)}] The constant coefficient of $PQ$ is the product of the
constant coefficients of $P$ and $Q$. In other words, $\left[  X^{0}\right]
\left(  PQ\right)  =\left[  X^{0}\right]  P\cdot\left[  X^{0}\right]  Q$.
\end{enumerate}
\end{proposition}

\begin{proof}
This is essentially \cite[Theorem 7.4.7]{19s}, but the proof is easy enough
that you don't need a reference. Do note that parts \textbf{(b)}, \textbf{(c)}
and \textbf{(e)} rely on the fact that a product of two nonzero numbers is nonzero!
\end{proof}

\subsection{Division with remainder}

We now know that polynomials can be added, subtracted and multiplied. But the
type of polynomials we are considering -- that is, univariate polynomials --
have an additional feature: They can also be divided with remainder, just like
integers. To be more precise, polynomials in $\mathbb{Q}\left[  X\right]  $,
$\mathbb{R}\left[  X\right]  $ and $\mathbb{C}\left[  X\right]  $ can be
divided with remainder. For polynomials in $\mathbb{Z}\left[  X\right]  $, the
situation is more complicated, and we discuss this briefly below.

We first state the main result for $\mathbb{Q}\left[  X\right]  $,
$\mathbb{R}\left[  X\right]  $ and $\mathbb{C}\left[  X\right]  $ (see
\cite[Theorem 7.5.4]{19s} for a rigorous proof, but it is actually quite easy):

\begin{theorem}
\label{thm.poly.quorem}Let $\mathbb{K}$ be one of the sets $\mathbb{Q}$,
$\mathbb{R}$ and $\mathbb{C}$. Let $P$ and $N$ be two polynomials in
$\mathbb{K}\left[  X\right]  $, where $N$ is nonzero. Then, there exists a
\textbf{unique} pair $\left(  Q,R\right)  $ of two polynomials in
$\mathbb{K}\left[  X\right]  $ satisfying%
\[
P=QN+R\ \ \ \ \ \ \ \ \ \ \text{and}\ \ \ \ \ \ \ \ \ \ \deg R<\deg
N.\ \ \ \ \ \ \ \ \ \ \text{\footnotemark}%
\]

\end{theorem}

\footnotetext{The inequality $\deg R<\deg N$ allows for the case $R=0$, in
which case $\deg R=-\infty$ is automatically smaller than $\deg N$.}The two
entries of this pair $\left(  Q,R\right)  $ have names: The first entry $Q$ is
called the \emph{quotient} of $P$ upon division by $N$, whereas the second
entry $R$ is called the \emph{remainder} of $P$ upon division by $N$. We also
use the notations%
\[
P//N:=Q\ \ \ \ \ \ \ \ \ \ \text{and}\ \ \ \ \ \ \ \ \ \ P\%N:=R
\]
for them. Of course, this terminology is analogous to the standard terminology
used for quotients and remainders of integers (Definition 2.5.1 on Worksheet
2), and the condition $\deg R<\deg N$ on the remainder is the analogue of the
$r\in\left\{  0,1,\ldots,n-1\right\}  $ condition on the remainder for integers.

\begin{example}
\label{exa.poly.quorem.Q1}Let $\mathbb{K}=\mathbb{Q}$ and $P=2X^{6}+3X^{2}-7$
and $N=2X^{3}-5$. Then,
\[
P//N=X^{3}+\dfrac{5}{2}\ \ \ \ \ \ \ \ \ \ \text{and}%
\ \ \ \ \ \ \ \ \ \ P\%N=3X^{2}+\dfrac{11}{2},
\]
because the pair $\left(  Q,R\right)  =\left(  X^{3}+\dfrac{5}{2}%
,\ 3X^{2}+\dfrac{11}{2}\right)  $ satisfies $P=QN+R$ and $\deg R<\deg N$.
\end{example}

The way to find this pair (both in this example and in general) is to keep
reducing the degree of $P$ by subtracting appropriate multiples of $N$ (every
time choosing the multiple whose subtraction will cancel the leading
coefficient of $P$), until the degree falls below $\deg N$. This method is
called
\href{https://en.wikipedia.org/wiki/Polynomial_long_division}{\emph{polynomial
long division}} and is similar to the analogous method for integers.

This method works if $\mathbb{K}$ is $\mathbb{Q}$, $\mathbb{R}$ or
$\mathbb{C}$ (it does not really care what $\mathbb{K}$ is, as long as we can
add, subtract, multiply and divide numbers in $\mathbb{K}$). However, as we
saw in Example \ref{exa.poly.quorem.Q1}, if we apply this method to two
polynomials with integer coefficients, it can produce non-integer coefficients
in the output, since the \textquotedblleft appropriate multiples of
$N$\textquotedblright\ that must be subtracted can be non-integer multiples.
Thus, Theorem \ref{thm.poly.quorem} does not hold for $\mathbb{K}=\mathbb{Z}$.
However, it can be salvaged for $\mathbb{K}=\mathbb{Z}$ if we require $N$ to
be monic:

\begin{theorem}
\label{thm.poly.quoremZ}Let $P$ and $N$ be two polynomials in $\mathbb{Z}%
\left[  X\right]  $, where $N$ is \textbf{monic}. Then, there exists a
\textbf{unique} pair $\left(  Q,R\right)  $ of two polynomials in
$\mathbb{Z}\left[  X\right]  $ satisfying%
\[
P=QN+R\ \ \ \ \ \ \ \ \ \ \text{and}\ \ \ \ \ \ \ \ \ \ \deg R<\deg N.
\]
In other words, the polynomials $P//N$ and $P\%N$ belong to $\mathbb{Z}\left[
X\right]  $.
\end{theorem}

(Sometimes, of course, this claim will hold even if $N$ is not monic, but this
cannot be guaranteed.) \medskip

Just like for integers, we can define divisibility and congruence for polynomials:

\begin{definition}
Let $\mathbb{K}$ be one of the sets $\mathbb{Z}$, $\mathbb{Q}$, $\mathbb{R}$
and $\mathbb{C}$.

\begin{enumerate}
\item[\textbf{(a)}] Given two polynomials $P$ and $Q$ in $\mathbb{K}\left[
X\right]  $, we write $P\mid Q$ (and say that $P$ \emph{divides} $Q$, or that
$Q$ is \emph{divisible by }$P$) if and only if there exists a polynomial
$F\in\mathbb{K}\left[  X\right]  $ satisfying $Q=PF$. To be more precise, we
write \textquotedblleft$P\mid Q$ in $\mathbb{K}\left[  X\right]
$\textquotedblright\ in this case, because this relation depends on
$\mathbb{K}$.

\item[\textbf{(b)}] Given three polynomials $P$, $Q$ and $N$ in $\mathbb{K}%
\left[  X\right]  $, we write $P\equiv Q\operatorname{mod}N$ (and say that $P$
is \emph{congruent to }$Q$ \emph{modulo }$N$) if and only if $N\mid P-Q$ in
$\mathbb{K}\left[  X\right]  $. To be more precise, we write \textquotedblleft%
$P\equiv Q\operatorname{mod}N$ in $\mathbb{K}\left[  X\right]  $%
\textquotedblright\ in this case, because this relation depends on
$\mathbb{K}$.
\end{enumerate}
\end{definition}

Just as an example of how these relations depend on $\mathbb{K}$, note that we
have $2X\mid X^{2}-X$ in $\mathbb{Q}\left[  X\right]  $ (since $X^{2}%
-X=2X\cdot\dfrac{X-1}{2}$), but we don't have $2X\mid X^{2}-X$ in
$\mathbb{Z}\left[  X\right]  $ (since $\dfrac{X-1}{2}$ does not belong to
$\mathbb{Z}\left[  X\right]  $). Similarly, $X^{2}\equiv X\operatorname{mod}%
2X$ in $\mathbb{Q}\left[  X\right]  $ but not in $\mathbb{Z}\left[  X\right]
$.

Divisibility and congruence satisfy the same rules for polynomials as they do
for integers (in particular, all claims in \S 2.2 and \S 2.4 of Worksheet 2
hold equally well for polynomials). For example, congruences can be multiplied
(i.e., if $A\equiv B\operatorname{mod}N$ and $C\equiv D\operatorname{mod}N$,
then $AC\equiv BD\operatorname{mod}N$), and so can divisibilities (i.e., if
$A\mid B$ and $C\mid D$, then $AC\mid BD$).

Exactly as for integers, congruence for polynomials is closely related to remainders:

\begin{proposition}
\label{prop.poly.quorem.mod}Let $\mathbb{K}$ be one of the sets $\mathbb{Z}$,
$\mathbb{Q}$, $\mathbb{R}$ and $\mathbb{C}$. Let $P$, $Q$ and $N$ be three
polynomials in $\mathbb{K}\left[  X\right]  $, where $N$ is nonzero. If
$\mathbb{K}=\mathbb{Z}$, then we furthermore assume that $N$ is monic.

Then, $P\equiv Q\operatorname{mod}N$ if and only if $P\%N=Q\%N$.
\end{proposition}

\begin{proof}
[Proof idea.]Just like for integers.
\end{proof}

\begin{exercise}
\label{exe.poly.quorem.XX-X-1}Let $n\in\mathbb{N}$. Compute the remainder
$X^{n}\%\left(  X^{2}-X-1\right)  $.
\end{exercise}

\begin{proof}
[Solution idea.]For the sake of brevity, let us set $N:=X^{2}-X-1\in
\mathbb{Z}\left[  X\right]  $. This is a monic polynomial, so that Proposition
\ref{prop.poly.quorem.mod} can be used (with $\mathbb{K}=\mathbb{Z}$).

We are looking for the remainder $X^{n}\%\left(  X^{2}-X-1\right)  =X^{n}\%N$.
Computing this remainder for small values of $n$ might give us an idea:%
\[%
\begin{tabular}
[c]{ll|lll|ll}%
$X^{0}\%N=1;$ & $\vphantom{\int_f^f}$ &  & $X^{3}\%N=2X+1;$ &
$\vphantom{\int_f^f}$ &  & $X^{6}\%N=8X+5;$\\
$X^{1}\%N=X;$ & $\vphantom{\int_f^f}$ &  & $X^{4}\%N=3X+2;$ &
$\vphantom{\int_f^f}$ &  & $X^{7}\%N=13X+8;$\\
$X^{2}\%N=X+1;$ & $\vphantom{\int_f^f}$ &  & $X^{5}\%N=5X+3;$ &
$\vphantom{\int_f^f}$ &  & $X^{8}\%N=21X+13.$%
\end{tabular}
\ \
\]
Note that the easiest way to compute all these is by working modulo $N$:
Indeed, a polynomial of degree $\leq1$ that is congruent to $X^{n}$ modulo $N$
must automatically be the remainder $X^{n}\%N$ (why?). Hence, in order to find
the latter remainder, we just need to simplify $X^{n}$ modulo $N$. We can do
this by repeatedly replacing $X^{2}$ by $X+1$ (since $X^{2}\equiv
X+1\operatorname{mod}N$); here, for instance, is this procedure for $n=4$:%
\begin{align*}
X^{4}  &  =\underbrace{X^{2}}_{\equiv X+1\operatorname{mod}N}X^{2}%
\equiv\left(  X+1\right)  X^{2}=X^{3}+X^{2}=\underbrace{X^{2}}_{\equiv
X+1\operatorname{mod}N}X+\underbrace{X^{2}}_{\equiv X+1\operatorname{mod}N}\\
&  \equiv\left(  X+1\right)  X+\left(  X+1\right)  =\underbrace{X^{2}}_{\equiv
X+1\operatorname{mod}N}+\,2X+1\\
&  \equiv X+1+2X+1=3X+2\operatorname{mod}N,
\end{align*}
so that $X^{4}\%N=3X+2$. Moreover, once we have simplified $X^{n}$ modulo $N$,
we can easily simplify $X^{n+1}$ as well (by multiplying the result for
$X^{n}$ by $X$ and then doing one more $X^{2}$-replacement); thus, we need not
start the computation from scratch for each new $n$.

At this point, you will have realized what the answer must be: For each
$n\geq1$, we have%
\begin{equation}
X^{n}\%N=f_{n}X+f_{n-1}, \label{sol.poly.quorem.XX-X-1.goal}%
\end{equation}
where $\left(  f_{0},f_{1},f_{2},\ldots\right)  $ is the Fibonacci sequence
(defined recursively by $f_{0}=0$ and $f_{1}=1$ and $f_{n}=f_{n-1}+f_{n-2}$
for all $n\geq2$). (The case $n=0$ also fits under this pattern if we set
$f_{-1}:=1$.)

It remains to prove (\ref{sol.poly.quorem.XX-X-1.goal}). There are several
ways to do so; the shortest is probably the following:

We shall first show that%
\begin{equation}
X^{n}\equiv f_{n}X+f_{n-1}\operatorname{mod}N\ \ \ \ \ \ \ \ \ \ \text{for
each }n\geq1. \label{sol.poly.quorem.XX-X-1.goal3}%
\end{equation}


[\textit{Proof of (\ref{sol.poly.quorem.XX-X-1.goal3}):} We proceed by
induction on $n$.

\textit{Base case:} The claim (\ref{sol.poly.quorem.XX-X-1.goal3}) is true for
$n=1$, since $\underbrace{f_{1}}_{=1}X+\underbrace{f_{1-1}}_{=f_{0}=0}=X$ is
literally equal to $X^{1}$.

\textit{Induction step:} Let $n\geq1$ be an integer. Assume (as the induction
hypothesis) that (\ref{sol.poly.quorem.XX-X-1.goal3}) holds for this $n$. We
must then prove that (\ref{sol.poly.quorem.XX-X-1.goal3}) holds for $n+1$ as
well, i.e., that we have $X^{n+1}\equiv f_{n+1}X+f_{\left(  n+1\right)
-1}\operatorname{mod}N$.

By the induction hypothesis, we know that (\ref{sol.poly.quorem.XX-X-1.goal3})
holds for $n$, so that we have $X^{n}\equiv f_{n}X+f_{n-1}\operatorname{mod}%
N$. Furthermore, $X^{2}-\left(  X+1\right)  =X^{2}-X-1=N$ is clearly divisible
by $N$, so that we have $X^{2}\equiv X+1\operatorname{mod}N$. Thus,
\begin{align*}
X^{n+1}  &  =\underbrace{X^{n}}_{\equiv f_{n}X+f_{n-1}\operatorname{mod}%
N}X\equiv\left(  f_{n}X+f_{n-1}\right)  X=f_{n}\underbrace{X^{2}}_{\equiv
X+1\operatorname{mod}N}+\,f_{n-1}X\\
&  \equiv f_{n}\left(  X+1\right)  +f_{n-1}X=\underbrace{\left(  f_{n}%
+f_{n-1}\right)  }_{\substack{=f_{n+1}\\\text{(by the definition of
the}\\\text{Fibonacci sequence)}}}X+\underbrace{f_{n}}_{=f_{\left(
n+1\right)  -1}}\\
&  =f_{n+1}X+f_{\left(  n+1\right)  -1}\operatorname{mod}N.
\end{align*}
This proves that (\ref{sol.poly.quorem.XX-X-1.goal3}) holds for $n+1$. Thus,
the induction step is complete, and (\ref{sol.poly.quorem.XX-X-1.goal3}) is
proved by induction.] \medskip

Now, let $n\geq1$ be an integer. Let $R$ be the polynomial $f_{n}X+f_{n-1}%
\in\mathbb{Z}\left[  X\right]  $; its degree is $\deg R\leq1<2$. Now,
(\ref{sol.poly.quorem.XX-X-1.goal3}) shows that $X^{n}\equiv f_{n}%
X+f_{n-1}=R\operatorname{mod}N$. In other words, $X^{n}-R$ is divisible by
$N$. In other words, there exists a polynomial $Q\in\mathbb{Z}\left[
X\right]  $ such that $X^{n}-R=NQ$. Consider this $Q$. From $X^{n}-R=NQ$, we
obtain%
\[
X^{n}=NQ+R=QN+R.
\]
Since $\deg R<2=\deg N$, this equality shows that $Q$ is the quotient and $R$
the remainder upon division $X^{n}$ by $N$. In other words, $Q=X^{n}//N$ and
$R=X^{n}\%N$. In particular, $X^{n}\%N=R=f_{n}X+f_{n-1}$. This proves
(\ref{sol.poly.quorem.XX-X-1.goal}), so the problem is solved. \medskip

\textit{Remark:} We can also compute the quotient $X^{n}//N$: It equals
$\sum_{k=0}^{n-2}f_{n-k-1}X^{k}$. The simplest proof of this is by showing
that
\[
X^{n}=\left(  \sum_{k=0}^{n-2}f_{n-k-1}X^{k}\right)  N+\left(  f_{n}%
X+f_{n-1}\right)  \ \ \ \ \ \ \ \ \ \ \text{for each }n\geq1.
\]
(This can be shown, e.g., by induction on $n$, or directly using a form of the
telescope principle.)
\end{proof}

\subsection{Gcds and lcms}

We have now seen that polynomials have quotients and remainders just like
integers do, and can satisfy divisibilities and congruences just like integers
can. Some of the basic arithmetical properties have analogues for polynomials.
Here are three examples (we always assume $\mathbb{K}$ to be one of the sets
$\mathbb{Z}$, $\mathbb{Q}$, $\mathbb{R}$ and $\mathbb{C}$):

\begin{itemize}
\item If two polynomials $P$ and $Q$ in $\mathbb{K}\left[  X\right]  $ satisfy
$P\mid Q$, then $\deg P\leq\deg Q$ unless $Q=0$.

\item If two polynomials $P$ and $Q$ in $\mathbb{K}\left[  X\right]  $ satisfy
$P\mid Q$ and $Q\mid P$, then $Q=\lambda P$ for some $\lambda\in\mathbb{K}$.
(This is the analogue of \textquotedblleft if two integers $a$ and $b$ satisfy
$a\mid b$ and $b\mid a$, then $\left\vert a\right\vert =\left\vert
b\right\vert $\textquotedblright.)

\item If two polynomials $P$ and $Q$ in $\mathbb{K}\left[  X\right]  $ satisfy
$P\mid Q$ and $\deg Q\leq\deg P$, then $Q=\lambda P$ for some $\lambda
\in\mathbb{K}$.
\end{itemize}

This analogy can be taken further: We can define greatest common divisors and
lowest common multiples of polynomials, at least when $\mathbb{K}$ is
$\mathbb{Q}$ or $\mathbb{R}$ or $\mathbb{C}$ (the case $\mathbb{K}=\mathbb{Z}$
is more complicated). Here are the definitions:

\begin{definition}
Let $\mathbb{K}$ be one of the sets $\mathbb{Q}$, $\mathbb{R}$ and
$\mathbb{C}$ (not $\mathbb{Z}$). Let $P$ and $Q$ be two polynomials in
$\mathbb{K}\left[  X\right]  $ that are not both zero. Then:

\begin{enumerate}
\item[\textbf{(a)}] The \emph{greatest common divisor} of $P$ and $Q$ is
defined to be the monic polynomial of largest possible degree that divides
each of $P$ and $Q$. It is denoted by $\gcd\left(  P,Q\right)  $.

\item[\textbf{(b)}] The \emph{lowest common multiple} of $P$ and $Q$ is
defined to be the monic polynomial of smallest possible degree that is
divisible by each of $P$ and $Q$. It is denoted by $\operatorname{lcm}\left(
P,Q\right)  $.
\end{enumerate}

We also define $\gcd\left(  0,0\right)  $ and $\operatorname{lcm}\left(
0,0\right)  $ to be $0$.
\end{definition}

Note that the word \textquotedblleft monic\textquotedblright\ serves to make
these polynomials unique, just like gcds and lcms of integers are required to
be nonnegative. The uniqueness of $\operatorname{lcm}\left(  P,Q\right)  $ is
easy to see\footnote{\textit{Hint.} Argue that if $U$ and $V$ are two monic
polynomials of the same degree that are divisible by each of $P$ and $Q$, then
their difference $U-V$ is a polynomial of smaller degree that is also
divisible by each of $P$ and $Q$. By properly scaling it, we can make it monic
as well (unless it is $0$).}; the uniqueness of $\gcd\left(  P,Q\right)  $ is
trickier\footnote{\textit{Hint.} This can be proved by strong induction on
$\deg P+\deg Q$, where the induction step proceeds by replacing $P$ by $P\%Q$
(if $\deg P\geq\deg Q$) or replacing $Q$ by $Q\%P$ (if $\deg Q>\deg P$). The
reason why this works is that the common divisors of $P$ and $Q$ are exactly
the common divisors of $P\%Q$ and $Q$ and also are the common divisors of $P$
and $Q\%P$. (Once again, this should all sound familiar from the number theory
of integers, specifically from the Euclidean algorithm.)}. Moreover, analogues
of the classical properties of gcds and lcms for integers hold: If
$\mathbb{K}$ is one of the sets $\mathbb{Q}$, $\mathbb{R}$ and $\mathbb{C}$
(but not $\mathbb{Z}$), and if $P$ and $Q$ are two polynomials in
$\mathbb{K}\left[  X\right]  $, then we have the following facts:

\begin{itemize}
\item \emph{Universal property of the gcd:} Every common divisor of $P$ and
$Q$ divides $\gcd\left(  P,Q\right)  $.

\item \emph{Universal property of the lcm:} Every common multiple of $P$ and
$Q$ is a multiple of $\operatorname{lcm}\left(  P,Q\right)  $.

\item \emph{Bezout's identity:} There exist two polynomials $A$ and $B$ in
$\mathbb{K}\left[  X\right]  $ that satisfy
\begin{equation}
AP+BQ=\gcd\left(  P,Q\right)  . \label{eq.poly.gcd.bezout}%
\end{equation}


\item \emph{Gcd-lcm relation:} We have
\begin{equation}
PQ=\lambda\cdot\gcd\left(  P,Q\right)  \cdot\operatorname{lcm}\left(
P,Q\right)  , \label{eq.poly.gcd.gcd*lcm}%
\end{equation}
where $\lambda$ is the leading coefficient of $PQ$.

\item \emph{Invariance of the gcd under adding a multiple of one argument to
the other:} If $N\in\mathbb{K}\left[  X\right]  $ is a polynomial such that
$P\equiv Q\operatorname{mod}N$, then
\begin{equation}
\gcd\left(  N,P\right)  =\gcd\left(  N,Q\right)  . \label{eq.poly.gcd.invar}%
\end{equation}

\end{itemize}

Actually, a more civilized definition of $\gcd\left(  P,Q\right)  $ than the
one we gave above would stipulate the universal property (as opposed to
\textquotedblleft smallest degree\textquotedblright) as a defining property.
(This would make the uniqueness of $\gcd\left(  P,Q\right)  $ easy, but the
existence would become nontrivial.)

Just like for integers, $\gcd\left(  P,Q\right)  $ can be computed efficiently
using a form of the Euclidean algorithm, in which we repeatedly replace the
pair $\left(  P,Q\right)  $ by $\left(  Q,\ P\%Q\right)  $ until the second
entry of the pair becomes $0$. (The \textquotedblleft cave-man's Euclidean
algorithm\textquotedblright\ from \S 6.1.3 on Worksheet 6 does not work here,
since mere subtraction is not enough to decrease the degree; we actually need
to take remainders.) Then, $\operatorname{lcm}\left(  P,Q\right)  $ can be
computed using the gcd-lcm relation.

We reiterate that gcds and lcms break down for $\mathbb{K}=\mathbb{Z}$, at
least according to our above definition. The definitions can be adapted, but
Bezout's identity cannot be saved, as the following example shows.

\begin{example}
Let $\mathbb{K}=\mathbb{Q}$ and $P=X^{3}-2X^{2}$ and $Q=X^{2}-4$. Then, it is
not hard to see that $\gcd\left(  P,Q\right)  =X-2$. Bezout's identity thus
says that there exist two polynomials $A$ and $B$ in $\mathbb{K}\left[
X\right]  $ that satisfy $AP+BQ=X-2$. Such $A$ and $B$ can indeed be easily
found: for instance, $A=\dfrac{1}{4}$ and $B=-\dfrac{1}{4}X+\dfrac{1}{2}$ will do.

Note that, even though $P$ and $Q$ are monic polynomials in $\mathbb{Z}\left[
X\right]  $, the $A$ and the $B$ cannot be found in $\mathbb{Z}\left[
X\right]  $. This illustrates why Bezout's identity was not stated for
$\mathbb{K}=\mathbb{Z}$.
\end{example}

\begin{exercise}
\label{exe.poly.gcd.Xn-1}Let $n,m\in\mathbb{N}$. Let $\mathbb{K}=\mathbb{Q}$.
Prove that:

\begin{enumerate}
\item[\textbf{(a)}] If $m$ is positive, then $\left(  X^{n}-1\right)
\%\left(  X^{m}-1\right)  =X^{n\%m}-1$.

\item[\textbf{(b)}] We have $\gcd\left(  X^{n}-1,\ X^{m}-1\right)
=X^{\gcd\left(  n,m\right)  }-1$.
\end{enumerate}
\end{exercise}

\begin{proof}
[Solution idea.]\textbf{(a)} Assume that $m$ is positive. Then, we can write
$n$ as $n=qm+r$ with $q=n//m\in\mathbb{Z}$ and $r=n\%m\in\left\{
0,1,\ldots,m-1\right\}  $ (this is just classical division with remainder of
integers). Consider these $q$ and $r$. Note that $q\in\mathbb{N}$ (why?).
Define the two polynomials%
\[
Q:=X^{r}\left(  X^{0m}+X^{1m}+X^{2m}+\cdots+X^{\left(  q-1\right)  m}\right)
\ \ \ \ \ \ \ \ \ \ \text{and}\ \ \ \ \ \ \ \ \ \ R:=X^{r}-1
\]
in $\mathbb{Q}\left[  X\right]  $. The definition of $Q$ yields%
\begin{align*}
Q\cdot\left(  X^{m}-1\right)   &  =X^{r}\underbrace{\left(  X^{0m}%
+X^{1m}+X^{2m}+\cdots+X^{\left(  q-1\right)  m}\right)  \cdot\left(
X^{m}-1\right)  }_{\substack{=X^{qm}-1\\\text{(by the geometric series formula
-- i.e., Theorem 4.1.2 on Worksheet 4)}}}\\
&  =X^{r}\left(  X^{qm}-1\right)  =X^{qm+r}-X^{r}=X^{n}-X^{r}%
\ \ \ \ \ \ \ \ \ \ \left(  \text{since }qm+r=n\right) \\
&  =\left(  X^{n}-1\right)  -\underbrace{\left(  X^{r}-1\right)  }%
_{=R}=\left(  X^{n}-1\right)  -R,
\end{align*}
so that
\[
X^{n}-1=Q\cdot\left(  X^{m}-1\right)  +R.
\]
Since $\deg R\leq r<m=\deg\left(  X^{m}-1\right)  $, this equality entails
that $Q$ and $R$ are the quotient and the remainder upon division of $X^{n}-1$
by $X^{m}-1$. In other words, $Q=\left(  X^{n}-1\right)  //\left(
X^{m}-1\right)  $ and $R=\left(  X^{n}-1\right)  \%\left(  X^{m}-1\right)  $.
Hence,
\[
\left(  X^{n}-1\right)  \%\left(  X^{m}-1\right)  =R=X^{r}-1=X^{n\%m}%
-1\ \ \ \ \ \ \ \ \ \ \left(  \text{since }r=n\%m\right)  .
\]
This solves part \textbf{(a)} of this exercise. \medskip

\textbf{(b)} Do not fix $n$ and $m$. Instead, we proceed by strong induction
on $m$:

\textit{Base case:} The case of $m=0$ is obvious, because in this case we have
$X^{m}-1=X^{0}-1=0$ and thus $\gcd\left(  X^{n}-1,\ X^{m}-1\right)
=\gcd\left(  X^{n}-1,\ 0\right)  =X^{n}-1$.

\textit{Induction step:} Let $m$ be a positive integer. We assume (as the
induction hypothesis) that part \textbf{(b)} of the exercise is already known
to be true for all integers $m^{\prime}<m$ in the place of $m$. Hence, in
particular, part \textbf{(b)} of the exercise is proved for $m$ and $n\%m$
instead of $n$ and $m$ (since $n\%m\in\left\{  0,1,\ldots,m-1\right\}  $ and
thus $n\%m<m$). In other words, we have%
\begin{equation}
\gcd\left(  X^{m}-1,\ X^{n\%m}-1\right)  =X^{\gcd\left(  m,\ n\%m\right)  }-1.
\label{sol.poly.gcd.Xn-1.b.1}%
\end{equation}


However, recalling the proof of correctness of the usual Euclidean algorithm
for integers, we know that $\gcd\left(  m,\ n\%m\right)  =\gcd\left(
n,m\right)  $. (Indeed, this is easy to check: We have $n\%m\equiv
n\operatorname{mod}m$. Thus, the analogue of (\ref{eq.poly.gcd.invar}) for
integers yields $\gcd\left(  m,\ n\%m\right)  =\gcd\left(  m,n\right)
=\gcd\left(  n,m\right)  $.)

Part \textbf{(a)} of this exercise shows that $\left(  X^{n}-1\right)
\%\left(  X^{m}-1\right)  =X^{n\%m}-1$. Hence,
\[
X^{n\%m}-1=\left(  X^{n}-1\right)  \%\left(  X^{m}-1\right)  \equiv
X^{n}-1\operatorname{mod}X^{m}-1
\]
(because if $P$ and $N$ are two polynomials with $N\neq0$, then $P\%N\equiv
P\operatorname{mod}N$). Therefore, (\ref{eq.poly.gcd.invar}) (applied to
$P=X^{n\%m}-1$ and $Q=X^{n}-1$ and $N=X^{m}-1$) yields%
\[
\gcd\left(  X^{m}-1,\ X^{n\%m}-1\right)  =\gcd\left(  X^{m}-1,\ X^{n}%
-1\right)  =\gcd\left(  X^{n}-1,\ X^{m}-1\right)  ,
\]
so that%
\begin{align*}
\gcd\left(  X^{n}-1,\ X^{m}-1\right)   &  =\gcd\left(  X^{m}-1,\ X^{n\%m}%
-1\right) \\
&  =X^{\gcd\left(  m,\ n\%m\right)  }-1\ \ \ \ \ \ \ \ \ \ \left(  \text{by
(\ref{sol.poly.gcd.Xn-1.b.1})}\right) \\
&  =X^{\gcd\left(  n,m\right)  }-1\ \ \ \ \ \ \ \ \ \ \left(  \text{since
}\gcd\left(  m,\ n\%m\right)  =\gcd\left(  n,m\right)  \right)  .
\end{align*}
In other words, part \textbf{(b)} of the exercise holds for our two numbers
$n$ and $m$. This completes the induction step, and thus part \textbf{(b)} of
the exercise is solved by induction.
\end{proof}

The \textquotedblleft number theory\textquotedblright\ of polynomials (i.e.,
their properties regarding divisibility) is a fruitful field of research, but
we will leave it now. Let us only briefly mention that there is a polynomial
analogue of coprime integers (unsurprisingly called \emph{coprime
polynomials}) and a polynomial analogue of prime numbers (known as
\emph{irreducible polynomials}\footnote{Specifically, a polynomial
$P\in\mathbb{K}\left[  X\right]  $ (where $\mathbb{K}$ is $\mathbb{Q}$ or
$\mathbb{R}$ or $\mathbb{C}$) is said to be \emph{irreducible} if it is
non-constant and is not divisible by any non-constant polynomials other than
those of the form $\lambda P$ with $\lambda\in\mathbb{K}$. Note that this
depends very strongly on $\mathbb{K}$: For example, the polynomial $X^{2}-2$
is irreducible when regarded as a polynomial in $\mathbb{Q}\left[  X\right]
$, but not when regarded as a polynomial in $\mathbb{R}\left[  X\right]  $
(since it is divisible by $X-\sqrt{2}$).
\par
The analogy between prime numbers and irreducible polynomials is almost
perfect; one minor difference is that irreducible polynomials are not commonly
required to be monic, so that an irreducible polynomial $P$ automatically
entails irreducible polynomials $\lambda P$ for all nonzero $\lambda
\in\mathbb{K}$.}). Much has been written about irreducible polynomials (see,
e.g., \cite[Chapter 2]{Prasol04}), but most of it would go beyond the reach of
this worksheet.

\subsection{Roots and the polynomial identity trick}

\subsubsection{Roots of polynomials}

Polynomials first appeared in mathematics as an abstraction for algebraic
equations. For instance, solving the equation $x^{3}-2x^{2}+7=0$ means finding
a number $x$ such that substituting $x$ into the polynomial $X^{3}-2X^{2}+7$
gives $0$. In general, a number $x$ that becomes $0$ when substituted into a
polynomial $P$ is called a \emph{root} of $P$. In other words:

\begin{definition}
Let $\mathbb{K}$ be one of the sets $\mathbb{Z}$, $\mathbb{Q}$, $\mathbb{R}$
and $\mathbb{C}$. Let $P\in\mathbb{K}\left[  X\right]  $ be a polynomial. A
\emph{root} of $P$ means a complex number $r\in\mathbb{C}$ such that $P\left(
r\right)  =0$.
\end{definition}

Note that even if a polynomial $P$ belongs to $\mathbb{Z}\left[  X\right]  $
(that is, all its coefficients are integers), one is commonly interested in
complex roots of $P$ as well, since they often shed light on $P$ (and they
include all the integer roots as a subset, so nothing is lost by extending the
scope). Here are some examples:

\begin{itemize}
\item The polynomial $X^{3}-4X^{2}+3X$ has three roots: $0$, $1$ and $3$. All
of these roots are integers.

\item The polynomial $X^{3}-2X^{2}+1$ has three roots: $1$, $\dfrac{1+\sqrt
{5}}{2}$ and $\dfrac{1-\sqrt{5}}{2}$. Only the first of these roots is an integer.

\item The polynomial $X^{3}-2X^{2}+X$ has two roots: $0$ and $1$ (both integers).

\item The polynomial $X^{3}+X^{2}+X$ has three roots: $0$, $\dfrac{-1+\sqrt
{3}i}{2}$ and $\dfrac{-1-\sqrt{3}i}{2}$, where $i=\sqrt{-1}$. The first of
them is a real number, while the other two are not.

\item The polynomial $X^{3}-3X+1$ has three real roots, which are
approximately equal to $-1.879$, $0.347$ and $1.532$. The fact that these
roots exist can be easily derived from the analytic properties of the
corresponding polynomial \textbf{function}\footnote{To wit: The function
$f:\mathbb{R}\rightarrow\mathbb{R}$ given by $f\left(  x\right)  =x^{3}-3x+1$
is continuous (just like any polynomial function), and it takes a negative
value at $-2$ (since $f\left(  -2\right)  =-1$), a positive value at $-1$
(since $f\left(  -1\right)  =3$), a negative value at $1$ (since $f\left(
1\right)  =-1$) and a positive value at $2$ (since $f\left(  2\right)  =3$).
Hence, by the
\href{https://en.wikipedia.org/wiki/Intermediate_value_theorem}{intermediate
value theorem}, it must take the value $0$ in each of the open intervals
$\left(  -2,-1\right)  $, $\left(  -1,1\right)  $ and $\left(  1,2\right)  $.
Thus, it takes the value $0$ at least three times, i.e., the polynomial
$X^{3}-3X+1$ has at least three real roots. Approximate values for these roots
can be found by the
\href{https://en.wikipedia.org/wiki/Bisection_method}{bisection method}.}, but
the only exact expressions for them are intricate and inconvenient (see
\href{https://en.wikipedia.org/wiki/Cubic_equation#Cardano's_formula}{Cardano's
formula}). The question of finding a formula for the roots of an arbitrary
cubic polynomial (i.e., solving cubic equations) has been one of the guiding
problems in medieval mathematics, and its solution by Tartaglia and Cardano in
the 1530s has reestablished Europe as the center of mathematical research for
the first time after the Dark Ages.

\item The polynomial $2X+1$ has one root: $-1/2$.

\item The polynomial $3$ has no roots, since substituting anything into $3$
gives $3$.

\item The polynomial $0$ has infinitely many roots: Any complex number is a
root of $0$.
\end{itemize}

\subsubsection{Roots vs. divisors}

As these examples show, roots can behave rather unpredictably. Nevertheless, a
few simple but important things can be said. For one, the roots of a
polynomial are directly related to its linear divisors:

\begin{theorem}
[\textquotedblleft root = factor\textquotedblright\ theorem]%
\label{thm.polys.root=fac}Let $\mathbb{K}$ be one of the sets $\mathbb{Z}$,
$\mathbb{Q}$, $\mathbb{R}$ and $\mathbb{C}$. Let $P\in\mathbb{K}\left[
X\right]  $ be a polynomial. Let $r\in\mathbb{K}$ be a number. Then, $r$ is a
root of $P$ if and only if $P$ is divisible by $X-r$ (in $\mathbb{K}\left[
X\right]  $).
\end{theorem}

\begin{proof}
[Proof.]We must prove the logical equivalence%
\[
\left(  r\text{ is a root of }P\right)  \ \Longleftrightarrow\ \left(  P\text{
is divisible by }X-r\right)  .
\]
We shall prove the \textquotedblleft$\Longleftarrow$\textquotedblright\ and
\textquotedblleft$\Longrightarrow$\textquotedblright\ directions of this
equivalence separately: \medskip

$\Longleftarrow:$ Assume that $P$ is divisible by $X-r$. We must prove that
$r$ is a root of $P$.

Since $P$ is divisible by $X-r$, we can write $P$ as $P=\left(  X-r\right)
\cdot Q$ for some polynomial $Q$. Consider this $Q$. Substituting $r$ for $X$
on both sides of the equality $P=\left(  X-r\right)  \cdot Q$, we obtain%
\begin{align*}
P\left(  r\right)   &  =\left(  \left(  X-r\right)  \cdot Q\right)  \left(
r\right)  \ \ \ \ \ \ \ \ \ \ \left(  \text{this is to be read as
\textquotedblleft the value of }\left(  X-r\right)  \cdot Q\text{ at
}r\text{\textquotedblright}\right) \\
&  =\underbrace{\left(  r-r\right)  }_{=0}\cdot\,Q\left(  r\right)
\ \ \ \ \ \ \ \ \ \ \left(  \text{here, we have used
(\ref{eq.pols.subs-rules.+}) and (\ref{eq.pols.subs-rules.*})}\right) \\
&  =0,
\end{align*}
which shows that $r$ is a root of $P$. Thus, the \textquotedblleft%
$\Longleftarrow$\textquotedblright\ direction of our equivalence is proved.
\medskip

$\Longrightarrow:$ Assume that $r$ is a root of $P$. We must show that $P$ is
divisible by $X-r$.

The polynomial $X-r\in\mathbb{K}\left[  X\right]  $ is monic. Hence, using
Theorem \ref{thm.poly.quoremZ} or Theorem \ref{thm.poly.quorem} (depending on
whether $\mathbb{K}$ is $\mathbb{Z}$ or not), we see that the quotient
$P//\left(  X-r\right)  $ and the remainder $P\%\left(  X-r\right)  $ are
well-defined. Let us set $Q:=P//\left(  X-r\right)  $ and $R:=P\%\left(
X-r\right)  $. By the definition of quotient and remainder, we thus have%
\[
P=Q\cdot\left(  X-r\right)  +R\ \ \ \ \ \ \ \ \ \ \text{and}%
\ \ \ \ \ \ \ \ \ \ \deg R<\deg\left(  X-r\right)  .
\]
From $\deg R<\deg\left(  X-r\right)  =1$, we see that the polynomial $R$ is
constant, i.e., satisfies $R=b$ for some number $b\in\mathbb{K}$. Consider
this $b$. Thus, $P=Q\cdot\left(  X-r\right)  +R$ can be rewritten as
$P=Q\cdot\left(  X-r\right)  +b$.

Since $r$ is a root of $P$, we have $P\left(  r\right)  =0$. But substituting
$r$ for $X$ on both sides of the equality $P=Q\cdot\left(  X-r\right)  +b$, we
obtain
\begin{align*}
P\left(  r\right)   &  =\left(  Q\cdot\left(  X-r\right)  +b\right)  \left(
r\right)  \ \ \ \ \ \ \ \ \ \ \left(  \text{this is to be read as
\textquotedblleft the value of }Q\cdot\left(  X-r\right)  +b\text{ at
}r\text{\textquotedblright}\right) \\
&  =Q\left(  r\right)  \cdot\underbrace{\left(  r-r\right)  }_{=0}%
+\,b\ \ \ \ \ \ \ \ \ \ \left(  \text{here, we have used
(\ref{eq.pols.subs-rules.+}) and (\ref{eq.pols.subs-rules.*})}\right) \\
&  =b,
\end{align*}
so that $b=P\left(  r\right)  =0$. Therefore, $P=Q\cdot\left(  X-r\right)
+\underbrace{b}_{=0}=Q\cdot\left(  X-r\right)  =\left(  X-r\right)  \cdot Q$.
This shows that $P$ is divisible by $X-r$. Thus, the \textquotedblleft%
$\Longrightarrow$\textquotedblright\ direction of our equivalence is proved.
\medskip

We have now proved both directions of our equivalence. Thus, Theorem
\ref{thm.polys.root=fac} is proved.
\end{proof}

\begin{theorem}
[\textquotedblleft roots = factors\textquotedblright\ theorem]%
\label{thm.polys.roots=facs}Let $\mathbb{K}$ be one of the sets $\mathbb{Z}$,
$\mathbb{Q}$, $\mathbb{R}$ and $\mathbb{C}$. Let $P\in\mathbb{K}\left[
X\right]  $ be a polynomial. Let $r_{1},r_{2},\ldots,r_{m}\in\mathbb{K}$ be
distinct numbers. Then, $r_{1},r_{2},\ldots,r_{m}$ are roots of $P$ if and
only if $P$ is divisible by $\left(  X-r_{1}\right)  \left(  X-r_{2}\right)
\cdots\left(  X-r_{m}\right)  $ (in $\mathbb{K}\left[  X\right]  $).
\end{theorem}

\begin{proof}
[Proof idea.]$\Longleftarrow:$ Assume that $P$ is divisible by $\left(
X-r_{1}\right)  \left(  X-r_{2}\right)  \cdots\left(  X-r_{m}\right)  $. We
must show that $r_{1},r_{2},\ldots,r_{m}$ are roots of $P$.

Our assumption yields that
\begin{equation}
P=\left(  X-r_{1}\right)  \left(  X-r_{2}\right)  \cdots\left(  X-r_{m}%
\right)  \cdot Q \label{pf.thm.polys.roots=facs.1}%
\end{equation}
for some polynomial $Q$. Consider this $Q$.

For each $i\in\left\{  1,2,\ldots,m\right\}  $, we have%
\begin{align*}
P\left(  r_{i}\right)   &  =\left(  \left(  X-r_{1}\right)  \left(
X-r_{2}\right)  \cdots\left(  X-r_{m}\right)  \cdot Q\right)  \left(
r_{i}\right)  \ \ \ \ \ \ \ \ \ \ \left(  \text{by
(\ref{pf.thm.polys.roots=facs.1})}\right) \\
&  =\underbrace{\left(  r_{i}-r_{1}\right)  \left(  r_{i}-r_{2}\right)
\cdots\left(  r_{i}-r_{m}\right)  }_{\substack{=0\\\text{(since one factor of
this product is }r_{i}-r_{i}=0\text{)}}}\cdot\,Q\left(  r_{i}\right)  =0,
\end{align*}
which shows that $r_{i}$ is a root of $P$. In other words, $r_{1},r_{2}%
,\ldots,r_{m}$ are roots of $P$. This proves the \textquotedblleft%
$\Longleftarrow$\textquotedblright\ direction of Theorem
\ref{thm.polys.roots=facs}. \medskip

$\Longrightarrow:$ We must show that if $r_{1},r_{2},\ldots,r_{m}$ are roots
of $P$, then $P$ is divisible by $\left(  X-r_{1}\right)  \left(
X-r_{2}\right)  \cdots\left(  X-r_{m}\right)  $.

We will prove this claim by induction on $m$:

\textit{Base case:} For $m=0$, the claim is obvious (since the product
$\left(  X-r_{1}\right)  \left(  X-r_{2}\right)  \cdots\left(  X-r_{m}\right)
$ is an empty product in this case, hence equal to $1$, and of course $P$ is
divisible by $1$).

\textit{Induction step:} Let $m$ be a positive integer. Assume (as the
induction hypothesis) that our claim is proved for $m-1$ instead of $m$. We
must now prove it for $m$.

So let us assume that $r_{1},r_{2},\ldots,r_{m}$ are roots of $P$. Thus, in
particular, $r_{m}$ is a root of $P$. Hence, Theorem \ref{thm.polys.root=fac}
(applied to $r=r_{m}$) shows that $P$ is divisible by $X-r_{m}$ (in
$\mathbb{K}\left[  X\right]  $). In other words, there exists a polynomial
$Q\in\mathbb{K}\left[  X\right]  $ such that $P=\left(  X-r_{m}\right)  \cdot
Q$. Consider this $Q$.

Now, for each $i\in\left\{  1,2,\ldots,m-1\right\}  $, we have $r_{i}\neq
r_{m}$ (since the numbers $r_{1},r_{2},\ldots,r_{m}$ are distinct), so that
$r_{i}-r_{m}\neq0$. Moreover, for each $i\in\left\{  1,2,\ldots,m-1\right\}
$, we have
\[
P\left(  r_{i}\right)  =\left(  r_{i}-r_{m}\right)  \cdot Q\left(
r_{i}\right)
\]
(this follows by substituting $r_{i}$ for $X$ into the equality $P=\left(
X-r_{m}\right)  \cdot Q$) and thus%
\[
\left(  r_{i}-r_{m}\right)  \cdot Q\left(  r_{i}\right)  =P\left(
r_{i}\right)  =0\ \ \ \ \ \ \ \ \ \ \left(  \text{since }r_{i}\text{ is a root
of }P\right)  ,
\]
which entails that $Q\left(  r_{i}\right)  =0$ (because $r_{i}-r_{m}\neq0$);
in other words, $r_{i}$ is a root of $Q$. Thus we have shown that the $m-1$
distinct numbers $r_{1},r_{2},\ldots,r_{m-1}$ are roots of $Q$. Hence, by our
induction hypothesis, we can apply the \textquotedblleft$\Longrightarrow
$\textquotedblright\ direction of Theorem \ref{thm.polys.roots=facs} to $Q$
and $m-1$ instead of $P$ and $m$. We thus conclude that $Q$ is divisible by
$\left(  X-r_{1}\right)  \left(  X-r_{2}\right)  \cdots\left(  X-r_{m-1}%
\right)  $. In other words, $Q=\left(  X-r_{1}\right)  \left(  X-r_{2}\right)
\cdots\left(  X-r_{m-1}\right)  \cdot R$ for some polynomial $R\in
\mathbb{K}\left[  X\right]  $. Consider this $R$. Now,%
\begin{align*}
P  &  =\left(  X-r_{m}\right)  \cdot\underbrace{Q}_{=\left(  X-r_{1}\right)
\left(  X-r_{2}\right)  \cdots\left(  X-r_{m-1}\right)  \cdot R}\\
&  =\underbrace{\left(  X-r_{m}\right)  \cdot\left(  X-r_{1}\right)  \left(
X-r_{2}\right)  \cdots\left(  X-r_{m-1}\right)  }_{=\left(  X-r_{1}\right)
\left(  X-r_{2}\right)  \cdots\left(  X-r_{m}\right)  }\cdot\,R\\
&  =\left(  X-r_{1}\right)  \left(  X-r_{2}\right)  \cdots\left(
X-r_{m}\right)  \cdot R,
\end{align*}
so that $P$ is divisible by $\left(  X-r_{1}\right)  \left(  X-r_{2}\right)
\cdots\left(  X-r_{m}\right)  $. This is precisely what we wanted to show.
Thus, our claim holds for $m$, and the induction step is complete.
\end{proof}

\begin{corollary}
\label{cor.polys.roots-n}Let $\mathbb{K}$ be one of the sets $\mathbb{Z}$,
$\mathbb{Q}$, $\mathbb{R}$ and $\mathbb{C}$. Let $n\in\mathbb{N}$. Let
$P\in\mathbb{K}\left[  X\right]  $ be a nonzero polynomial of degree $\leq n$.
Then, $P$ has at most $n$ roots.
\end{corollary}

\begin{proof}
[Proof idea.]Assume the contrary. Thus, $P$ has at least $n+1$ roots. In other
words, there exist $n+1$ distinct roots $r_{1},r_{2},\ldots,r_{n+1}%
\in\mathbb{C}$ of $P$. Consider these $n+1$ roots.

The set $\mathbb{K}$ is a subset of $\mathbb{C}$. Thus, $\mathbb{K}\left[
X\right]  $ is a subset of $\mathbb{C}\left[  X\right]  $. Hence,
$P\in\mathbb{K}\left[  X\right]  \subseteq\mathbb{C}\left[  X\right]  $.
Therefore, applying Theorem \ref{thm.polys.roots=facs} to $n+1$ and
$\mathbb{C}$ instead of $n$ and $\mathbb{K}$, we see that $r_{1},r_{2}%
,\ldots,r_{n+1}$ are roots of $P$ if and only if $P$ is divisible by $\left(
X-r_{1}\right)  \left(  X-r_{2}\right)  \cdots\left(  X-r_{n+1}\right)  $ (in
$\mathbb{C}\left[  X\right]  $). We thus conclude that $P$ is divisible by
$\left(  X-r_{1}\right)  \left(  X-r_{2}\right)  \cdots\left(  X-r_{n+1}%
\right)  $ (since $r_{1},r_{2},\ldots,r_{n+1}$ are roots of $P$). In other
words, $P$ can be written as%
\begin{equation}
P=\left(  X-r_{1}\right)  \left(  X-r_{2}\right)  \cdots\left(  X-r_{n+1}%
\right)  \cdot Q \label{pf.cor.polys.roots-n.2}%
\end{equation}
for some polynomial $Q\in\mathbb{C}\left[  X\right]  $. Consider this $Q$. The
equality (\ref{pf.cor.polys.roots-n.2}) shows that $Q$ is nonzero (since $P$
is nonzero). Hence, $\deg Q\geq0$.

Now, from (\ref{pf.cor.polys.roots-n.2}), we obtain%
\begin{align*}
\deg P  &  =\deg\left(  \left(  X-r_{1}\right)  \left(  X-r_{2}\right)
\cdots\left(  X-r_{n+1}\right)  \cdot Q\right) \\
&  =\underbrace{\deg\left(  \left(  X-r_{1}\right)  \left(  X-r_{2}\right)
\cdots\left(  X-r_{n+1}\right)  \right)  }_{=n+1}+\underbrace{\deg Q}_{\geq
0}\\
&  \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \left(  \text{by Proposition
\ref{prop.poly.deg.prod} \textbf{(b)}}\right) \\
&  \geq n+1>n,
\end{align*}
which contradicts the fact that $P$ has degree $\leq n$. This contradiction
shows that our assumption was false. Hence, Corollary \ref{cor.polys.roots-n}
is proved.
\end{proof}

Theorem \ref{thm.polys.root=fac}, Theorem \ref{thm.polys.roots=facs} and
Corollary \ref{cor.polys.roots-n} are surprisingly useful for their
simplicity. Here is a classical competition problem that has spawned many
variants (in particular, some on the Putnam contest):

\begin{exercise}
\label{exe.polys.Pk=1/k}Let $n\in\mathbb{N}$. Let $P\in\mathbb{Q}\left[
X\right]  $ be a polynomial of degree $\leq n$ that satisfies $P\left(
k\right)  =\dfrac{1}{k}$ for each $k\in\left\{  1,2,\ldots,n+1\right\}  $.
Find $P\left(  n+2\right)  $.
\end{exercise}

\begin{proof}
[Solution idea.]How can we exploit the \textquotedblleft$P\left(  k\right)
=\dfrac{1}{k}$ for each $k\in\left\{  1,2,\ldots,n+1\right\}  $%
\textquotedblright\ condition? One way to do so is by multiplying it by $k$,
obtaining $k\cdot P\left(  k\right)  =1$, or, equivalently, $k\cdot P\left(
k\right)  -1=0$. This shows that each $k\in\left\{  1,2,\ldots,n+1\right\}  $
is a root of the polynomial $XP-1$ (because $\left(  XP-1\right)  \left(
k\right)  =k\cdot P\left(  k\right)  -1=0$). In other words, the $n+1$
distinct numbers $1,2,\ldots,n+1$ are roots of the polynomial $XP-1$.

The polynomial $P$ has degree $\leq n$. Thus, the polynomial $XP$ has degree
$\leq n+1$ (by Proposition \ref{prop.poly.deg.prod} \textbf{(b)}, or just by
observing that multiplication by $X$ turns every monomial $X^{i}$ into
$X^{i+1}$ and thus raises the degree by $1$). Therefore, the polynomial $XP-1$
has degree $\leq n+1$ as well. In other words, $\deg\left(  XP-1\right)  \leq
n+1$.

However, Theorem \ref{thm.polys.roots=facs} (applied to $\mathbb{Q}$, $n+1$,
$XP-1$ and $\dfrac{1}{k}$ instead of $\mathbb{K}$, $m$, $P$ and $r_{k}$)
yields that $1,2,\ldots,n+1$ are roots of the polynomial $XP-1$ if and only if
$XP-1$ is divisible by $\left(  X-1\right)  \left(  X-2\right)  \cdots\left(
X-\left(  n+1\right)  \right)  $. Thus, $XP-1$ is divisible by $\left(
X-1\right)  \left(  X-2\right)  \cdots\left(  X-\left(  n+1\right)  \right)  $
(since $1,2,\ldots,n+1$ are roots of the polynomial $XP-1$). In other words,
we can write $XP-1$ as%
\begin{equation}
XP-1=\left(  X-1\right)  \left(  X-2\right)  \cdots\left(  X-\left(
n+1\right)  \right)  \cdot Q \label{sol.polys.Pk=1/k.2}%
\end{equation}
for some $Q\in\mathbb{Q}\left[  X\right]  $. Consider this $Q$.

From (\ref{sol.polys.Pk=1/k.2}), we obtain%
\begin{align*}
\deg\left(  XP-1\right)   &  =\deg\left(  \left(  X-1\right)  \left(
X-2\right)  \cdots\left(  X-\left(  n+1\right)  \right)  \cdot Q\right) \\
&  =\underbrace{\deg\left(  \left(  X-1\right)  \left(  X-2\right)
\cdots\left(  X-\left(  n+1\right)  \right)  \right)  }_{=n+1}+\deg Q\\
&  \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \left(  \text{by Proposition
\ref{prop.poly.deg.prod} \textbf{(b)}}\right) \\
&  =\left(  n+1\right)  +\deg Q,
\end{align*}
so that%
\[
\deg Q=\underbrace{\deg\left(  XP-1\right)  }_{\leq n+1}-\left(  n+1\right)
\leq\left(  n+1\right)  -\left(  n+1\right)  =0.
\]
This shows that the polynomial $Q$ is constant. In other words, $Q=q$ for some
$q\in\mathbb{Q}$. Consider this $q$. Since $Q=q$, we can rewrite
(\ref{sol.polys.Pk=1/k.2}) as%
\begin{equation}
XP-1=\left(  X-1\right)  \left(  X-2\right)  \cdots\left(  X-\left(
n+1\right)  \right)  \cdot q. \label{sol.polys.Pk=1/k.4}%
\end{equation}


How can we compute $q$ ? We can compare constant coefficients on both sides of
(\ref{sol.polys.Pk=1/k.4}). In fact:

\begin{itemize}
\item The constant coefficient of $XP-1$ is $-1$ (since the product $XP$
contains only positive powers of $X$ and thus contributes nothing to the
constant coefficient). In other words, the constant coefficient on the left
hand side of (\ref{sol.polys.Pk=1/k.4}) is $-1$.

\item The constant coefficient of $\left(  X-1\right)  \left(  X-2\right)
\cdots\left(  X-\left(  n+1\right)  \right)  $ is \newline$\left(  -1\right)
\left(  -2\right)  \cdots\left(  -\left(  n+1\right)  \right)  $ (since we can
expand the product \newline$\left(  X-1\right)  \left(  X-2\right)
\cdots\left(  X-\left(  n+1\right)  \right)  $ as a sum, and the only addend
without an $X$ factor will be $\left(  -1\right)  \left(  -2\right)
\cdots\left(  -\left(  n+1\right)  \right)  $). Thus, the constant coefficient
of $\left(  X-1\right)  \left(  X-2\right)  \cdots\left(  X-\left(
n+1\right)  \right)  \cdot q$ is
\begin{align*}
\left(  -1\right)  \left(  -2\right)  \cdots\left(  -\left(  n+1\right)
\right)  \cdot q  &  =\left(  -1\right)  ^{n+1}\underbrace{\left(
1\cdot2\cdot\cdots\cdot\left(  n+1\right)  \right)  }_{=\left(  n+1\right)
!}\cdot\,q\\
&  =\left(  -1\right)  ^{n+1}\left(  n+1\right)  !\cdot q.
\end{align*}
In other words, the constant coefficient on the right hand side of
(\ref{sol.polys.Pk=1/k.4}) is $\left(  -1\right)  ^{n+1}\left(  n+1\right)
!\cdot q$.
\end{itemize}

\noindent Since the two sides of (\ref{sol.polys.Pk=1/k.4}) are equal, their
constant coefficients must be equal as well. In other words,%
\[
-1=\left(  -1\right)  ^{n+1}\left(  n+1\right)  !\cdot q
\]
(since we just found that these constant coefficients are $-1$ and $\left(
-1\right)  ^{n+1}\left(  n+1\right)  !\cdot q$, respectively). Solving this
for $q$, we obtain%
\begin{equation}
q=\dfrac{-1}{\left(  -1\right)  ^{n+1}\left(  n+1\right)  !}=\dfrac{\left(
-1\right)  ^{n}}{\left(  n+1\right)  !}. \label{sol.polys.Pk=1/k.6}%
\end{equation}


Now, recall that we are looking for $P\left(  n+2\right)  $. We can obtain
this by substituting $n+2$ for $X$ in (\ref{sol.polys.Pk=1/k.4}). This results
in
\begin{align*}
\left(  n+2\right)  \cdot P\left(  n+2\right)  -1  &  =\underbrace{\left(
\left(  n+2\right)  -1\right)  \left(  \left(  n+2\right)  -2\right)
\cdots\left(  \left(  n+2\right)  -\left(  n+1\right)  \right)  }%
_{\substack{=\left(  n+1\right)  n\cdots1\\=1\cdot2\cdot\cdots\cdot\left(
n+1\right)  \\=\left(  n+1\right)  !}}\cdot\,q\\
&  =\left(  n+1\right)  !\cdot q=\left(  n+1\right)  !\cdot\dfrac{\left(
-1\right)  ^{n}}{\left(  n+1\right)  !}\ \ \ \ \ \ \ \ \ \ \left(  \text{by
(\ref{sol.polys.Pk=1/k.6})}\right) \\
&  =\left(  -1\right)  ^{n}.
\end{align*}
Solving this for $P\left(  n+2\right)  $, we find%
\[
P\left(  n+2\right)  =\dfrac{1+\left(  -1\right)  ^{n}}{n+2}.
\]

\end{proof}

\begin{remark}
In Exercise \ref{exe.polys.Pk=1/k}, the existence of a polynomial $P$
satisfying the imposed conditions is assumed. Does such a $P$ actually exist?
Yes. Indeed, we can solve the equality (\ref{sol.polys.Pk=1/k.4}) for $P$,
obtaining%
\[
P=\dfrac{1+\left(  X-1\right)  \left(  X-2\right)  \cdots\left(  X-\left(
n+1\right)  \right)  \cdot q}{X},
\]
where $q$ is given by (\ref{sol.polys.Pk=1/k.6}). The division by $X$ is
allowed here, since the numerator $1+\left(  X-1\right)  \left(  X-2\right)
\cdots\left(  X-\left(  n+1\right)  \right)  \cdot q$ is a polynomial with
constant term $0$ (why?) and thus can be divided by $X$ without remainder
(i.e., the remainder will be $0$). Having defined $P$ in this way, we can
easily check that $P$ has degree $\leq n$ (actually exactly $n$) and satisfies
$P\left(  k\right)  =\dfrac{1}{k}$ for each $k\in\left\{  1,2,\ldots
,n+1\right\}  $.

Alternatively, the existence of $P$ can be easily obtained from Lagrange
interpolation (see Theorem \ref{thm.polys.lag.construct} below).
\end{remark}

\begin{remark}
Exercise \ref{exe.polys.Pk=1/k} had us compute $P\left(  n+2\right)  $. We
could have similarly computed $P\left(  a\right)  $ for any $a\neq0$ (although
the answers would be less elegant). Computing $P\left(  0\right)  $ is
trickier, however. In fact, substituting $0$ for $X$ in
(\ref{sol.polys.Pk=1/k.4}) yields $0\cdot P\left(  0\right)  -1$ on the left
hand side, which reveals nothing about $P\left(  0\right)  $. There is a trick
that helps, and the answer is surprising: see Exercise
\ref{exe.polys.Pk=1/k.0} below.
\end{remark}

\subsubsection{The polynomial identity trick}

Corollary \ref{cor.polys.roots-n} has the following trivial but rather useful consequence:

\begin{corollary}
[polynomial identity trick]\label{cor.polys.idtrick}Let $\mathbb{K}$ be one of
the sets $\mathbb{Z}$, $\mathbb{Q}$, $\mathbb{R}$ and $\mathbb{C}$. Let
$n\in\mathbb{N}$. Let $P,Q\in\mathbb{K}\left[  X\right]  $ be two polynomials
of degree $\leq n$. Assume that there are more than $n$ numbers $x\in
\mathbb{K}$ that satisfy $P\left(  x\right)  =Q\left(  x\right)  $. Then,
$P=Q$.
\end{corollary}

\begin{proof}
[Proof idea.]Assume the contrary. Thus, the difference $P-Q$ is nonzero.

The polynomials $P$ and $Q$ have degree $\leq n$. Hence, their difference
$P-Q$ has degree $\leq n$ as well. Since it is furthermore nonzero, we can
thus conclude that $P-Q$ has at most $n$ roots (by Corollary
\ref{cor.polys.roots-n}, applied to $P-Q$ instead of $P$).

However, we assumed that there are more than $n$ numbers $x\in\mathbb{K}$ that
satisfy $P\left(  x\right)  =Q\left(  x\right)  $. All such numbers
$x\in\mathbb{K}$ are roots of $P-Q$ (since they satisfy $\left(  P-Q\right)
\left(  x\right)  =\underbrace{P\left(  x\right)  }_{=Q\left(  x\right)
}-\,Q\left(  x\right)  =Q\left(  x\right)  -Q\left(  x\right)  =0$). Hence,
$P-Q$ has more than $n$ roots. This contradicts the fact that $P-Q$ has at
most $n$ roots. This contradiction shows that our assumption was wrong. Thus,
Corollary \ref{cor.polys.idtrick} is proved.
\end{proof}

Corollary \ref{cor.polys.idtrick} entails that polynomials have rather little
\textquotedblleft freedom\textquotedblright\ as far as their values are
concerned: A polynomial of degree $\leq n$ is uniquely determined by any $n+1$
of its values (on $n+1$ distinct numbers $x$). For example, a linear
polynomial is uniquely determined by two values (no surprise here: a line is
uniquely determined by two distinct points on it), whereas a quadratic
polynomial is uniquely determined by three values.

This yields, in particular, the following:

\begin{corollary}
\label{cor.polys.idtrick.fP}Let $\mathbb{K}$ be one of the sets $\mathbb{Z}$,
$\mathbb{Q}$, $\mathbb{R}$ and $\mathbb{C}$. Any polynomial $P\in
\mathbb{K}\left[  X\right]  $ is uniquely determined by the corresponding
polynomial function
\begin{align*}
f_{P}:\mathbb{K}  &  \rightarrow\mathbb{K},\\
a  &  \mapsto P\left(  a\right)  .
\end{align*}
In other words: If $P$ and $Q$ are two polynomials in $\mathbb{K}\left[
X\right]  $ such that $f_{P}=f_{Q}$, then $P=Q$.
\end{corollary}

\begin{proof}
[Proof idea.]Let $P$ and $Q$ be two polynomials in $\mathbb{K}\left[
X\right]  $ such that $f_{P}=f_{Q}$. We must prove that $P=Q$.

Let $n=\max\left\{  \deg P,\ \deg Q\right\}  $. Thus, $P$ and $Q$ are
polynomials of degree $\leq n$. But the set $\mathbb{K}$ is infinite, and thus
contains more than $n$ numbers. Each number $x\in\mathbb{K}$ satisfies
$P\left(  x\right)  =\underbrace{f_{P}}_{=f_{Q}}\left(  x\right)
=f_{Q}\left(  x\right)  =Q\left(  x\right)  $. Hence, there are more than $n$
numbers $x\in\mathbb{K}$ that satisfy $P\left(  x\right)  =Q\left(  x\right)
$ (since there are more than $n$ numbers $x\in\mathbb{K}$). Therefore,
Corollary \ref{cor.polys.idtrick} yields $P=Q$.
\end{proof}

These facts can be made more concrete: We can give an explicit formula for
reconstructing a polynomial $P$ of degree $\leq n$ from $n+1$ values $P\left(
a_{0}\right)  ,P\left(  a_{1}\right)  ,\ldots,P\left(  a_{n}\right)  $. This
formula is Theorem \ref{thm.polys.lag.reconstruct} below. First, however, we
shall show how Corollary \ref{cor.polys.idtrick} can be used already in its
present (non-concrete) form.

Recall that the \emph{binomial coefficient} $\dbinom{n}{k}$ is defined for any
number $n\in\mathbb{C}$ and any nonnegative integer $k\in\mathbb{N}$ by the
formula%
\[
\dbinom{n}{k}:=\dfrac{n\left(  n-1\right)  \left(  n-2\right)  \cdots\left(
n-k+1\right)  }{k!}.
\]
We could have just as well defined the polynomial $\dbinom{X}{k}\in
\mathbb{Q}\left[  X\right]  $ by
\[
\dbinom{X}{k}:=\dfrac{X\left(  X-1\right)  \left(  X-2\right)  \cdots\left(
X-k+1\right)  }{k!},
\]
and then defined $\dbinom{n}{k}$ to be the value of this polynomial
$\dbinom{X}{k}$ at $n$. Much can be said about binomial coefficients (see,
e.g., \cite[Chapter 2]{19fco}, \cite{BenQui03}, \cite[Chapter 5]{GKP},
\cite{Granvi05}), but here is not the time and space. We will just solve a toy problem:

\begin{exercise}
\label{exe.polys.idtrick.n22}Prove that $\dbinom{\dbinom{n}{2}}{2}=3\dbinom
{n}{4}+3\dbinom{n}{3}$ for each $n\in\mathbb{C}$.
\end{exercise}

\begin{proof}
[Solution idea.]Obviously, this is an identity that can be proved mechanically
by expanding both sides and comparing. But here is a slicker proof using
Corollary \ref{cor.polys.idtrick}:

Consider the two polynomials%
\[
P:=\dbinom{\dbinom{X}{2}}{2}\ \ \ \ \ \ \ \ \ \ \text{and}%
\ \ \ \ \ \ \ \ \ \ Q:=3\dbinom{X}{4}+3\dbinom{X}{3}%
\]
in $\mathbb{Q}\left[  X\right]  $. Thus, the exercise wants us to prove that
$P\left(  n\right)  =Q\left(  n\right)  $ for each $n\in\mathbb{C}$.
Obviously, it suffices to show that $P=Q$ (and because of Corollary
\ref{cor.polys.idtrick.fP}, this is equivalent to the claim that $P\left(
n\right)  =Q\left(  n\right)  $ for each $n\in\mathbb{C}$, so that we don't
need to worry about trying to prove something false).

It is easy to see that both polynomials $P$ and $Q$ have degree $\leq4$.
(Indeed, $Q$ has degree $\leq4$ because the polynomial $\dbinom{X}{k}$ has
degree $k$ for each $k\in\mathbb{N}$. As far as $P$ is concerned, it is not
hard to see that substituting a degree-$n$ polynomial into a degree-$m$
polynomial yields a degree-$nm$ polynomial (as long as both polynomials are
nonzero). Hence, the polynomial $P$ (which is obtained by substituting the
degree-$2$ polynomial $\dbinom{X}{2}$ into itself) is a degree-$4$ polynomial.)

Corollary \ref{cor.polys.idtrick} (applied to $n=4$ and $\mathbb{K}%
=\mathbb{Q}$) thus says that if there are more than $4$ numbers $x\in
\mathbb{Q}$ that satisfy $P\left(  x\right)  =Q\left(  x\right)  $, then
$P=Q$. Therefore, it suffices to find more than $4$ such numbers
$x\in\mathbb{Q}$.

The easiest way to find them is to take the five numbers $0,1,2,3,4$. Thus, we
need to check that $P\left(  x\right)  =Q\left(  x\right)  $ for each
$x\in\left\{  0,1,2,3,4\right\}  $. This is not only straightforward but
actually goes very quick if you remember Pascal's triangle (which you should).
For example, for $x=4$, we have%
\begin{align*}
P\left(  x\right)   &  =P\left(  4\right)  =\dbinom{\dbinom{4}{2}}{2}%
=\dbinom{6}{2}=15\ \ \ \ \ \ \ \ \ \ \text{and}\\
Q\left(  x\right)   &  =Q\left(  4\right)  =3\underbrace{\dbinom{4}{4}}%
_{=1}+\,3\underbrace{\dbinom{4}{3}}_{=4}=3+3\cdot4=15,
\end{align*}
so that $P\left(  x\right)  =Q\left(  x\right)  $. The other four options for
$x$ are even easier (e.g., the cases $x\in\left\{  0,1,2\right\}  $ boil down
to $0=0$). Thus, by \textquotedblleft probing\textquotedblright\ the equality
$P=Q$ at our five numbers $x$, we have ensured that it holds. This solves the exercise.

\textit{Remark:} Our choice of $0,1,2,3,4$ is just one possible option; any
five distinct numbers would have worked. For instance, you can make your job a
bit easier by using $x=-1$ instead of $x=4$, as long as you remember (which
again you should) that $\dbinom{-1}{k}=\left(  -1\right)  ^{k}$ for each
$k\in\mathbb{N}$. Furthermore, you can save yourself some work if you check
that the polynomials $P$ and $Q$ have the same coefficient before $X^{4}$
(namely, $\dfrac{1}{8}$), so that $P-Q$ has degree $\leq3$ (which means that
we need to \textquotedblleft probe\textquotedblright\ the equality $P=Q$ at
four points only).
\end{proof}

This was arguably a toy example (we could have solved Exercise
\ref{exe.polys.idtrick.n22} by dully expanding both sides), but the
\textquotedblleft probing\textquotedblright\ method we have just used is worth
remembering, as it has various other uses, many of them much less gratuitous.
Examples of such uses can be found in \cite[\S 7.5.3]{20f}, \cite[\S 2.6]%
{19fco} and \cite[Chapter 5]{GKP}.

\subsubsection{Lagrange interpolation}

Corollaries \ref{cor.polys.idtrick} and \ref{cor.polys.idtrick.fP} show that a
polynomial $P\in\mathbb{C}\left[  X\right]  $ of degree $\leq n$ is uniquely
determined by its values on $n+1$ given distinct numbers $a_{0},a_{1}%
,\ldots,a_{n}$. But is this just an abstract uniqueness statement, or can we
actually reconstruct $P$ given these $n+1$ values? It turns out that we can,
and in fact there is a rather explicit formula:

\begin{theorem}
[Lagrange interpolation formula, I]\label{thm.polys.lag.reconstruct}Let
$\mathbb{K}$ be one of the sets $\mathbb{Z}$, $\mathbb{Q}$, $\mathbb{R}$ and
$\mathbb{C}$. Let $n\in\mathbb{N}$. Let $P\in\mathbb{K}\left[  X\right]  $ be
a polynomial of degree $\leq n$. Let $a_{0},a_{1},\ldots,a_{n}$ be $n+1$
distinct numbers in $\mathbb{K}$. Let $b_{i}:=P\left(  a_{i}\right)  $ for
each $i\in\left\{  0,1,\ldots,n\right\}  $. Then,%
\[
P\left(  X\right)  =\sum_{j=0}^{n}b_{j}\dfrac{\prod_{k\neq j}\left(
X-a_{k}\right)  }{\prod_{k\neq j}\left(  a_{j}-a_{k}\right)  }%
\]
(where the \textquotedblleft$\prod_{k\neq j}$\textquotedblright\ sign means a
product over all $k\in\left\{  0,1,\ldots,n\right\}  $ satisfying $k\neq j$).
\end{theorem}

\begin{proof}
[Proof idea.]We define a polynomial $Q\in\mathbb{K}\left[  X\right]  $ by%
\begin{equation}
Q=\sum_{j=0}^{n}b_{j}\dfrac{\prod_{k\neq j}\left(  X-a_{k}\right)  }%
{\prod_{k\neq j}\left(  a_{j}-a_{k}\right)  }.
\label{pf.thm.polys.lag.reconstruct.Q=}%
\end{equation}
Our goal is thus to prove that $P\left(  X\right)  =Q$. In other words, we
must prove that $P=Q$ (since $P\left(  X\right)  $ is just another way to say
$P$).

The polynomial $Q$ has degree $\leq n$ (since each product $\prod_{k\neq
j}\left(  X-a_{k}\right)  $ has $n$ factors, thus is a polynomial of degree
$n$, and our polynomial $Q$ is a sum of all these products multiplied with
certain numbers). We shall now show that it satisfies%
\begin{equation}
Q\left(  a_{i}\right)  =b_{i}\ \ \ \ \ \ \ \ \ \ \text{for each }i\in\left\{
0,1,\ldots,n\right\}  . \label{pf.thm.polys.lag.reconstruct.goal}%
\end{equation}


\begin{proof}
[Proof of (\ref{pf.thm.polys.lag.reconstruct.goal}).]Let $i\in\left\{
0,1,\ldots,n\right\}  $. Substituting $a_{i}$ for $X$ on both sides of
(\ref{pf.thm.polys.lag.reconstruct.Q=}), we find%
\begin{align*}
Q\left(  a_{i}\right)   &  =\left(  \sum_{j=0}^{n}b_{j}\dfrac{\prod_{k\neq
j}\left(  X-a_{k}\right)  }{\prod_{k\neq j}\left(  a_{j}-a_{k}\right)
}\right)  \left(  a_{i}\right) \\
&  =\sum_{j=0}^{n}b_{j}\dfrac{\prod_{k\neq j}\left(  a_{i}-a_{k}\right)
}{\prod_{k\neq j}\left(  a_{j}-a_{k}\right)  }\ \ \ \ \ \ \ \ \ \ \left(
\text{by (\ref{eq.pols.subs-rules.+}) and (\ref{eq.pols.subs-rules.*}), used
many times}\right) \\
&  =b_{i}\underbrace{\dfrac{\prod_{k\neq i}\left(  a_{i}-a_{k}\right)  }%
{\prod_{k\neq i}\left(  a_{i}-a_{k}\right)  }}_{=1}+\sum_{\substack{j\in
\left\{  0,1,\ldots,n\right\}  ;\\j\neq i}}b_{j}\underbrace{\dfrac
{\prod_{k\neq j}\left(  a_{i}-a_{k}\right)  }{\prod_{k\neq j}\left(
a_{j}-a_{k}\right)  }}_{\substack{=0\\\text{(because the product in the
numerator}\\\text{has a factor }a_{i}-a_{i}\text{ (since }i\neq j\text{),}%
\\\text{thus a factor equal to }0\text{)}}}\\
&  \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \left(
\begin{array}
[c]{c}%
\text{here, we have split off the addend for }j=i\\
\text{from the sum}%
\end{array}
\right) \\
&  =b_{i}+\underbrace{\sum_{\substack{j\in\left\{  0,1,\ldots,n\right\}
;\\j\neq i}}b_{j}0}_{=0}=b_{i}.
\end{align*}
This proves (\ref{pf.thm.polys.lag.reconstruct.goal}).]
\end{proof}

Now we are almost done: For each $i\in\left\{  0,1,\ldots,n\right\}  $, we
have $P\left(  a_{i}\right)  =Q\left(  a_{i}\right)  $ (since
(\ref{pf.thm.polys.lag.reconstruct.goal}) yields $Q\left(  a_{i}\right)
=b_{i}=P\left(  a_{i}\right)  $ by the definition of $b_{i}$). In other words,
the equality $P\left(  x\right)  =Q\left(  x\right)  $ holds for each
$x\in\left\{  a_{0},a_{1},\ldots,a_{n}\right\}  $. Since the $n+1$ numbers
$a_{0},a_{1},\ldots,a_{n}$ are all distinct, this shows that $P\left(
x\right)  =Q\left(  x\right)  $ holds for at least $n+1$ many numbers
$x\in\mathbb{K}$. In other words, there are more than $n$ numbers
$x\in\mathbb{K}$ that satisfy $P\left(  x\right)  =Q\left(  x\right)  $.
Corollary \ref{cor.polys.idtrick} thus yields $P=Q$, and this completes our proof.
\end{proof}

Theorem \ref{thm.polys.lag.reconstruct} tells us how to \textbf{reconstruct} a
polynomial $P$ from any $n+1$ of its values; but we can use the same method to
\textbf{construct} a polynomial $P$ with given values at $n+1$ given points:

\begin{theorem}
[Lagrange interpolation formula, II]\label{thm.polys.lag.construct}Let
$\mathbb{K}$ be one of the sets $\mathbb{Z}$, $\mathbb{Q}$, $\mathbb{R}$ and
$\mathbb{C}$. Let $n\in\mathbb{N}$. Let $a_{0},a_{1},\ldots,a_{n}$ be $n+1$
distinct numbers in $\mathbb{K}$. Let $b_{0},b_{1},\ldots,b_{n}$ be $n+1$
numbers in $\mathbb{K}$ (not necessarily distinct). Define a polynomial
$Q\in\mathbb{K}\left[  X\right]  $ by%
\[
Q=\sum_{j=0}^{n}b_{j}\dfrac{\prod_{k\neq j}\left(  X-a_{k}\right)  }%
{\prod_{k\neq j}\left(  a_{j}-a_{k}\right)  }%
\]
(where the \textquotedblleft$\prod_{k\neq j}$\textquotedblright\ sign means a
product over all $k\in\left\{  0,1,\ldots,n\right\}  $ satisfying $k\neq j$).
Then,%
\[
Q\left(  a_{i}\right)  =b_{i}\ \ \ \ \ \ \ \ \ \ \text{for each }i\in\left\{
0,1,\ldots,n\right\}  .
\]

\end{theorem}

\begin{proof}
This is precisely the equality (\ref{pf.thm.polys.lag.reconstruct.goal}),
which we showed during our proof of Theorem \ref{thm.polys.lag.reconstruct}.
Its proof still applies here, since it used nothing about $P$.
\end{proof}

Theorem \ref{thm.polys.lag.reconstruct} is known as the \emph{Lagrange
interpolation formula}, and has many applications. The following two exercises
are just a little selection:

\begin{exercise}
\label{exe.polys.lag.1}Let $\mathbb{K}$ be one of the sets $\mathbb{Z}$,
$\mathbb{Q}$, $\mathbb{R}$ and $\mathbb{C}$. Let $n\in\mathbb{N}$. Let
$P\in\mathbb{K}\left[  X\right]  $ be a polynomial of degree $\leq n$. Let
$c_{n}=\left[  X^{n}\right]  P$ be the coefficient of $X^{n}$ in $P$. (Note
that $c_{n}=0$ if $P$ has degree $<n$.) Let $a_{0},a_{1},\ldots,a_{n}$ be
$n+1$ distinct numbers in $\mathbb{K}$. Prove that%
\[
\sum_{j=0}^{n}\dfrac{P\left(  a_{j}\right)  }{\prod_{k\neq j}\left(
a_{j}-a_{k}\right)  }=c_{n}%
\]
(where the \textquotedblleft$\prod_{k\neq j}$\textquotedblright\ sign means a
product over all $k\in\left\{  0,1,\ldots,n\right\}  $ satisfying $k\neq j$).
\end{exercise}

\begin{proof}
[Solution idea.]Let $b_{i}:=P\left(  a_{i}\right)  $ for each $i\in\left\{
0,1,\ldots,n\right\}  $. Then, Theorem \ref{thm.polys.lag.reconstruct} yields%
\begin{equation}
P\left(  X\right)  =\sum_{j=0}^{n}b_{j}\dfrac{\prod_{k\neq j}\left(
X-a_{k}\right)  }{\prod_{k\neq j}\left(  a_{j}-a_{k}\right)  }.
\label{sol.polys.lag.1.1}%
\end{equation}
Let us compare the coefficients of $X^{n}$ on both sides of this equality.

\begin{itemize}
\item The coefficient of $X^{n}$ on the left hand side is $c_{n}$ (since
$c_{n}$ is defined as the coefficient of $X^{n}$ in $P=P\left(  X\right)  $).

\item The right hand side is a bit more complicated. For each $j\in\left\{
0,1,\ldots,n\right\}  $, the product $\prod_{k\neq j}\left(  X-a_{k}\right)  $
is a product of $n$ monic polynomials of degree $1$ (since each $X-a_{k}$ is
monic of degree $1$), and thus itself is a monic polynomial of degree $n$ (by
Proposition \ref{prop.poly.deg.prod} \textbf{(b)} and \textbf{(d)}, applied
many times). The coefficient of $X^{n}$ in this product is therefore $1$.
Thus, the coefficient of $X^{n}$ in $b_{j}\dfrac{\prod_{k\neq j}\left(
X-a_{k}\right)  }{\prod_{k\neq j}\left(  a_{j}-a_{k}\right)  }$ is%
\[
\underbrace{b_{j}}_{\substack{=P\left(  a_{j}\right)  \\\text{(by the
definition}\\\text{of }b_{j}\text{)}}}\dfrac{1}{\prod_{k\neq j}\left(
a_{j}-a_{k}\right)  }=P\left(  a_{j}\right)  \dfrac{1}{\prod_{k\neq j}\left(
a_{j}-a_{k}\right)  }=\dfrac{P\left(  a_{j}\right)  }{\prod_{k\neq j}\left(
a_{j}-a_{k}\right)  }.
\]
This holds for each $j\in\left\{  0,1,\ldots,n\right\}  $. Hence, the
coefficient of $X^{n}$ in the sum $\sum_{j=0}^{n}b_{j}\dfrac{\prod_{k\neq
j}\left(  X-a_{k}\right)  }{\prod_{k\neq j}\left(  a_{j}-a_{k}\right)  }$ is%
\[
\sum_{j=0}^{n}\dfrac{P\left(  a_{j}\right)  }{\prod_{k\neq j}\left(
a_{j}-a_{k}\right)  }.
\]
This is therefore the coefficient of $X^{n}$ on the right hand side of
(\ref{sol.polys.lag.1.1}).
\end{itemize}

Hence, comparing the coefficients of $X^{n}$ on both sides of
(\ref{sol.polys.lag.1.1}), we find%
\[
c_{n}=\sum_{j=0}^{n}\dfrac{P\left(  a_{j}\right)  }{\prod_{k\neq j}\left(
a_{j}-a_{k}\right)  }.
\]
This solves the exercise.
\end{proof}

\begin{exercise}
\label{exe.polys.lag.1binom}Let $\mathbb{K}$ be one of the sets $\mathbb{Z}$,
$\mathbb{Q}$, $\mathbb{R}$ and $\mathbb{C}$. Let $n\in\mathbb{N}$. Let
$P\in\mathbb{K}\left[  X\right]  $ be a polynomial of degree $\leq n$. Let
$c_{n}=\left[  X^{n}\right]  P$ be the coefficient of $X^{n}$ in $P$. (Note
that $c_{n}=0$ if $P$ has degree $<n$.) Prove that%
\[
\sum_{i=0}^{n}\left(  -1\right)  ^{n-i}\dbinom{n}{i}P\left(  i\right)
=c_{n}\cdot n!.
\]

\end{exercise}

\begin{proof}
[Solution idea.]Exercise \ref{exe.polys.lag.1} (applied to $a_{i}=i$) yields%
\[
\sum_{j=0}^{n}\dfrac{P\left(  j\right)  }{\prod_{k\neq j}\left(  j-k\right)
}=c_{n}%
\]
(where the \textquotedblleft$\prod_{k\neq j}$\textquotedblright\ sign means a
product over all $k\in\left\{  0,1,\ldots,n\right\}  $ satisfying $k\neq j$).
Multiplying this equality by $n!$, we obtain%
\begin{equation}
\sum_{j=0}^{n}\dfrac{P\left(  j\right)  }{\prod_{k\neq j}\left(  j-k\right)
}\cdot n!=c_{n}\cdot n!. \label{sol.polys.lag.1binom.2}%
\end{equation}


However, each $j\in\left\{  0,1,\ldots,n\right\}  $ satisfies%
\[
\prod_{k\neq j}\left(  j-k\right)  =\underbrace{\left(  \prod_{k=0}%
^{j-1}\left(  j-k\right)  \right)  }_{\substack{=\left(  j-0\right)  \left(
j-1\right)  \cdots\left(  j-\left(  j-1\right)  \right)  \\=j\left(
j-1\right)  \cdots1\\=1\cdot2\cdot\cdots\cdot j\\=j!}}\cdot\underbrace{\left(
\prod_{k=j+1}^{n}\left(  j-k\right)  \right)  }_{\substack{=\left(  j-\left(
j+1\right)  \right)  \left(  j-\left(  j+2\right)  \right)  \cdots\left(
j-n\right)  \\=\left(  -1\right)  \left(  -2\right)  \cdots\left(  -\left(
n-j\right)  \right)  \\=\left(  -1\right)  ^{n-j}\left(  1\cdot2\cdot
\cdots\left(  n-j\right)  \right)  \\=\left(  -1\right)  ^{n-j}\left(
n-j\right)  !}}=j!\cdot\left(  -1\right)  ^{n-j}\left(  n-j\right)  !
\]
and therefore%
\begin{align}
\dfrac{P\left(  j\right)  }{\prod_{k\neq j}\left(  j-k\right)  }\cdot n!  &
=\dfrac{P\left(  j\right)  }{j!\cdot\left(  -1\right)  ^{n-j}\left(
n-j\right)  !}\cdot n!=\left(  -1\right)  ^{n-j}\cdot\underbrace{\dfrac
{n!}{j!\cdot\left(  n-j\right)  !}}_{\substack{=\dbinom{n}{j}\\\text{(by the
factorial formula}\\\text{for binomial coefficients)}}}P\left(  j\right)
\nonumber\\
&  =\left(  -1\right)  ^{n-j}\dbinom{n}{j}P\left(  j\right)  .
\label{sol.polys.lag.1binom.5}%
\end{align}
Hence, (\ref{sol.polys.lag.1binom.2}) can be rewritten as
\[
\sum_{j=0}^{n}\left(  -1\right)  ^{n-j}\dbinom{n}{j}P\left(  j\right)
=c_{n}\cdot n!.
\]
Renaming the index $i$ as $j$ on the left hand side, we obtain precisely the
claim of Exercise \ref{exe.polys.lag.1binom}.
\end{proof}

The above two exercises just scratch the surface. Further applications of
Lagrange interpolation can be found in \cite{Nica23}, \cite[Chapter
11]{AndDos}, \cite[Chapter 11]{AndDosS} and \cite[\S 4.3.7]{23wa}.

\subsubsection{The integer and rational root tests}

As we already said, finding roots of a polynomial (both exactly and
numerically) is a difficult task in general. However, some simple cases of
this task can be done in easy ways. One such case is when you are looking for
rational roots of a polynomial with rational coefficients. By multiplying such
a polynomial with the lowest common denominator of its coefficients, we can
always make its coefficients become integers, so that our task becomes to find
the rational roots of a polynomial with integer coefficients. And for this,
there is a theorem (\cite[Theorem 3.5.14]{20f}):

\begin{theorem}
[rational root test]\label{thm.poly.rat-root-test}Let $P=a_{0}X^{0}+a_{1}%
X^{1}+\cdots+a_{n}X^{n}\in\mathbb{Z}\left[  X\right]  $ be a polynomial with
integer coefficients (i.e., all of $a_{0},a_{1},\ldots,a_{n}$ are integers).
Let $r$ be a rational root of $P$ (that is, a rational number satisfying
$P\left(  r\right)  =0$). Write $r$ as a reduced fraction, i.e., in the form
$r=p/q$ for some coprime integers $p$ and $q$. Then, $p\mid a_{0}$ and $q\mid
a_{n}$.
\end{theorem}

When the two coefficients $a_{0}$ and $a_{n}$ in Theorem
\ref{thm.poly.rat-root-test} are nonzero, the theorem leads to an algorithm
for finding all roots of $P$, since the divisibilities $p\mid a_{0}$ and
$q\mid a_{n}$ leave only finitely many options for $p$ and $q$ (because a
nonzero integer has only finitely many divisors), and we can just try all
possible combinations of divisors of $p$ and $q$ and check which of them are
roots of $P$. (Don't forget that divisors can be negative!) The case when
$a_{0}$ or $a_{n}$ is zero can be easily dealt with\footnote{If $a_{0}=0$,
then we can divide $P$ by $X$. If $a_{n}=0$, then we can drop the zero
coefficient and replace $n$ by $n-1$.}.

The proof of Theorem \ref{thm.poly.rat-root-test} is easy and nice, and can be
found in \cite[Theorem 3.5.14]{20f}, but I recommend treating it as a good exercise.

As a particular case of Theorem \ref{thm.poly.rat-root-test}, we obtain the following:

\begin{corollary}
\label{cor.poly.rat-root-test.monic}Let $P\in\mathbb{Z}\left[  X\right]  $ be
a \textbf{monic} polynomial with integer coefficients. Then, any rational root
of $P$ is an integer.
\end{corollary}

\begin{proof}
[Proof idea.]Write $P$ as $P=a_{0}X^{0}+a_{1}X^{1}+\cdots+a_{n}X^{n}$, where
$n=\deg P$. Then, $a_{n}=1$ (since $P$ is monic).

Now, let $r$ be a rational root of $P$. We must prove that $r$ is an integer.

Write $r$ as a reduced fraction, i.e., in the form $r=p/q$ for some coprime
integers $p$ and $q$. Then, Theorem \ref{thm.poly.rat-root-test} yields $p\mid
a_{0}$ and $q\mid a_{n}$. Hence, $q\mid a_{n}=1$, so that $q=\pm1$, and thus
$p/q=p/\left(  \pm1\right)  =\pm p\in\mathbb{Z}$. Hence, $r=p/q\in\mathbb{Z}$.
In other words, $r$ is an integer, qed.
\end{proof}

This corollary easily yields the following classical result (generalizing the
irrationality of $\sqrt{2}$):

\begin{corollary}
\label{cor.poly.rrootw}Let $a$ be an integer. Let $r$ be a positive integer.
If $\sqrt[r]{a}$ is not an integer, then $\sqrt[r]{a}$ is irrational.
\end{corollary}

\begin{proof}
[Proof idea.]The polynomial $X^{r}-a$ is monic. Thus, Corollary
\ref{cor.poly.rat-root-test.monic} shows that any rational root of $X^{r}-a$
is an integer. Hence, if $\sqrt[r]{a}$ is rational, then $\sqrt[r]{a}$ is an
integer (since $\sqrt[r]{a}$ is a root of $X^{r}-a$). Taking the
contrapositive, we conclude that if $\sqrt[r]{a}$ is not an integer, then
$\sqrt[r]{a}$ is irrational. Qed.
\end{proof}

For another proof of Corollary \ref{cor.poly.rrootw}, see \cite[Exercise
9.3.2]{20f}.

\subsubsection{Real roots}

Having discussed integer and rational roots, let us turn to real roots. There
are algorithms for determining the number of real roots of a polynomial in
$\mathbb{Q}\left[  X\right]  $, but these are more advanced than would be
appropriate for this worksheet\footnote{The reason why I am stating this for
$\mathbb{Q}\left[  X\right]  $ instead of $\mathbb{R}\left[  X\right]  $ is
technical: Real numbers cannot be precisely represented on a computer (due to
their infinitary nature), so it is not clear what an algorithm would even be
that takes a polynomial in $\mathbb{R}\left[  X\right]  $ as input. Of course,
numerical algorithms exist, but the problem is not always well-posed.}. I will
thus restrict myself to a simple example and a simple result:

\begin{example}
\label{exa.poly.realroot-none}Let $n\in\mathbb{N}$. Then, the polynomial
$X^{2n}+1$ has no real roots, since every real $x$ satisfies $x^{2n}%
+1>x^{2n}=\left(  x^{n}\right)  ^{2}\geq0$ (because squares of reals are
always $\geq0$).
\end{example}

Thus, you should not expect a polynomial of even degree to have any real roots
(although many such polynomials have them). But polynomials of odd degree are
forced to have at least one:

\begin{proposition}
Let $P\in\mathbb{R}\left[  X\right]  $ be a polynomial of odd degree. Then,
$P$ has at least one real root.
\end{proposition}

\begin{proof}
[Proof sketch.]We WLOG assume that $P$ is monic (otherwise, we divide $P$ by
its leading coefficient; this makes $P$ monic without changing its roots).
Thus, we can write $P$ as
\[
P=c_{0}X^{0}+c_{1}X^{1}+\cdots+c_{n-1}X^{n-1}+X^{n}%
\]
for some $c_{0},c_{1},\ldots,c_{n-1}\in\mathbb{R}$. Hence, for each
$x\in\mathbb{R}$, we have%
\[
P\left(  x\right)  =c_{0}x^{0}+c_{1}x^{1}+\cdots+c_{n-1}x^{n-1}+x^{n}.
\]
As the real number $x$ increases towards $+\infty$, the $x^{n}$ addend here
becomes large and outgrows all other $c_{i}x^{i}$ addends, and thus the sum
$P\left(  x\right)  $ eventually becomes positive\footnote{This will
definitely happen for $x>\left\vert c_{0}\right\vert +\left\vert
c_{1}\right\vert +\cdots+\left\vert c_{n-1}\right\vert +1$.}. On the other
hand, as $x$ decreases towards $-\infty$, the $x^{n}$ addend becomes small
(since $n$ is odd) and outgrows (in the negative sense) all other $c_{i}x^{i}$
addends, and therefore the sum $P\left(  x\right)  $ eventually becomes
negative\footnote{This will definitely happen for $x<-\left(  \left\vert
c_{0}\right\vert +\left\vert c_{1}\right\vert +\cdots+\left\vert
c_{n-1}\right\vert +1\right)  $.}. This shows that the polynomial function%
\begin{align*}
f_{P}:\mathbb{R}  &  \rightarrow\mathbb{R},\\
x  &  \mapsto P\left(  x\right)
\end{align*}
takes both positive and negative values. Since this function is continuous, it
must therefore take the value $0$ as well (by the intermediate value theorem).
In other words, $P$ has a real root.
\end{proof}

\subsection{Viete's theorem and the fundamental theorem of algebra}

\subsubsection{The multiplicity of a root}

Theorems \ref{thm.polys.root=fac} and \ref{thm.polys.roots=facs} show that
each root of a polynomial $P$ corresponds to a linear factor $X-r$ that can be
\textquotedblleft split off\textquotedblright\ from $P$ (that is, $P$ can be
divided by this factor without remainder). For example, the polynomial
$\left(  X-4\right)  \left(  X-5\right)  \left(  X-6\right)  $ has the three
roots $4,5,6$, each corresponding to one of its three factors. But this is not
always a one-to-one correspondence: For instance, the polynomial $\left(
X-4\right)  ^{2}\left(  X-5\right)  $ has the two roots $4$ and $5$, because
its two $X-4$ factors correspond to the same root. This seems somewhat unfair.
It appears more appropriate to count the root $4$ twice, as it corresponds to
two linear factors. This is done by the following definition:

\begin{definition}
Let $\mathbb{K}$ be one of the sets $\mathbb{Z}$, $\mathbb{Q}$, $\mathbb{R}$
and $\mathbb{C}$. Let $P\in\mathbb{K}\left[  X\right]  $ be a polynomial. Let
$r\in\mathbb{K}$ be a number. Then, the \emph{multiplicity of }$r$ \emph{as a
root of }$P$ is defined to be the largest $m\in\mathbb{N}$ such that $\left(
X-r\right)  ^{m}\mid P$ (in $\mathbb{K}\left[  X\right]  $). In other words,
it is the number of times we can divide $P$ by $X-r$.
\end{definition}

Note that we did not require $r$ to be a root of $P$ in the first place. If it
isn't, then its multiplicity as a root of $P$ is $0$. Conversely, if $r$ is a
root of $P$, then its multiplicity as a root of $P$ is $\geq1$.

For example, the polynomial $\left(  X-4\right)  ^{2}\left(  X-5\right)
\left(  X-6\right)  ^{3}$ has three roots: $4$, $5$ and $6$, with respective
multiplicities $2$, $1$ and $3$. Equivalently, we can say that it has the
roots $4,4,5,6,6,6$ (listed with multiplicities).

The following theorem generalizes Theorem \ref{thm.polys.roots=facs} to roots
with multiplicities:

\begin{theorem}
[\textquotedblleft roots = factors\textquotedblright\ theorem with
multiplicities]\label{thm.polys.roots=facs-mult}Let $\mathbb{K}$ be one of the
sets $\mathbb{Z}$, $\mathbb{Q}$, $\mathbb{R}$ and $\mathbb{C}$. Let
$P\in\mathbb{K}\left[  X\right]  $ be a polynomial. Let $r_{1},r_{2}%
,\ldots,r_{m}\in\mathbb{K}$ be distinct numbers. Let $a_{1},a_{2},\ldots
,a_{m}$ be nonnegative integers. Then, each $r_{i}$ (for each $i\in\left\{
1,2,\ldots,m\right\}  $) has multiplicity $\geq a_{i}$ as a root of $P$ if and
only if $P$ is divisible by $\left(  X-r_{1}\right)  ^{a_{1}}\left(
X-r_{2}\right)  ^{a_{2}}\cdots\left(  X-r_{m}\right)  ^{a_{m}}$ (in
$\mathbb{K}\left[  X\right]  $).
\end{theorem}

\begin{proof}
[Proof idea.]$\Longleftarrow:$ The \textquotedblleft$\Longleftarrow
$\textquotedblright\ direction is easy (just as in Theorem
\ref{thm.polys.roots=facs}).

$\Longrightarrow:$ We induct on $m$, similarly to Theorem
\ref{thm.polys.roots=facs}. The \textit{base case} is again obvious.

In the \textit{induction step}, we now start out by writing $P$ as $P=\left(
X-r_{m}\right)  ^{a_{m}}\cdot Q$ for some $Q\in\mathbb{K}\left[  X\right]  $
(this can be done, since $r_{m}$ has multiplicity $\geq a_{m}$ as a root of
$P$, so that $\left(  X-r_{m}\right)  ^{a_{m}}\mid P$). Consider this $Q$.
Now, the tricky part is to argue that the numbers $r_{1},r_{2},\ldots,r_{m-1}$
still have multiplicities $\geq a_{1},\ \geq a_{2},\ \ldots,\ \geq a_{m-1}$ as
roots of $Q$. To this purpose, we show the following fact:

\begin{statement}
\textit{Claim 1:} Let $r$ and $s$ be two distinct elements of $\mathbb{K}$.
Let $a$ and $b$ be nonnegative integers. Let $S\in\mathbb{K}\left[  X\right]
$ be a polynomial such that $\left(  X-s\right)  ^{b}\mid\left(  X-r\right)
^{a}\cdot S$. Then, $\left(  X-s\right)  ^{b}\mid S$.
\end{statement}

\begin{proof}
[Proof of Claim 1.]We induct on $b$.

\textit{Base case:} For $b=0$, we have $\left(  X-s\right)  ^{b}=\left(
X-s\right)  ^{0}=1\mid S$, so that Claim 1 holds.

\textit{Induction step:} Let $b$ be a positive integer. Assume (as the
induction hypothesis) that Claim 1 has already been proved for $b-1$ instead
of $b$.

Now assume that $\left(  X-s\right)  ^{b}\mid\left(  X-r\right)  ^{a}\cdot S$.
We must show that $\left(  X-s\right)  ^{b}\mid S$.

Since $b$ is positive, we have $X-s\mid\left(  X-s\right)  ^{b}\mid\left(
X-r\right)  ^{a}\cdot S$, and thus $s$ is a root of the polynomial $\left(
X-r\right)  ^{a}\cdot S$ (by Theorem \ref{thm.polys.root=fac}). In other
words, $\left(  s-r\right)  ^{a}\cdot S\left(  s\right)  =0$. Since the
$\left(  s-r\right)  ^{a}$ factor is nonzero (because $r$ and $s$ are
distinct), we can cancel it and obtain $S\left(  s\right)  =0$. Hence, $s$ is
a root of $S$, and therefore we have $X-s\mid S$ (by Theorem
\ref{thm.polys.root=fac}). Hence, $S=\left(  X-s\right)  \cdot T$ for some
$T\in\mathbb{K}\left[  X\right]  $. Consider this $T$. We have%
\begin{align}
\left(  X-s\right)  \cdot\left(  X-s\right)  ^{b-1}  &  =\left(  X-s\right)
^{b}\nonumber\\
&  \mid\left(  X-r\right)  ^{a}\cdot\underbrace{S}_{=\left(  X-s\right)  \cdot
T}=\left(  X-r\right)  ^{a}\cdot\left(  X-s\right)  \cdot T\nonumber\\
&  =\left(  X-s\right)  \cdot\left(  X-r\right)  ^{a}\cdot T.
\label{pf.thm.polys.roots=facs-mult.c1.div}%
\end{align}
However, it is easy to see that a nonzero polynomial can always be cancelled
from a divisibility: If three polynomials $A,B,C$ satisfy $AB\mid AC$ and
$A\neq0$, then $B\mid C$. Thus, cancelling $X-s$ from the divisibility
(\ref{pf.thm.polys.roots=facs-mult.c1.div}), we obtain $\left(  X-s\right)
^{b-1}\mid\left(  X-r\right)  ^{a}\cdot T$. By our induction hypothesis, we
can thus apply Claim 1 to $b-1$ and $T$ instead of $b$ and $S$. We conclude
that $\left(  X-s\right)  ^{b-1}\mid T$. Hence,
\[
\left(  X-s\right)  ^{b}=\left(  X-s\right)  \cdot\underbrace{\left(
X-s\right)  ^{b-1}}_{\mid T}\mid\left(  X-s\right)  \cdot T=S.
\]
This concludes the induction step. Thus, Claim 1 is proved.
\end{proof}

Now, for each $i\in\left\{  1,2,\ldots,m-1\right\}  $, the number $r_{i}$ has
a multiplicity $\geq a_{i}$ as a root of $P$. Hence, for each $i\in\left\{
1,2,\ldots,m-1\right\}  $, we have $\left(  X-r_{i}\right)  ^{a_{i}}\mid
P=\left(  X-r_{m}\right)  ^{a_{m}}\cdot Q$, and thus $\left(  X-r_{m}\right)
^{a_{m}}\mid Q$ (by Claim 1, applied to $r=r_{m}$ and $s=r_{i}$ and $a=a_{m}$
and $b=a_{i}$, since $r_{m}$ and $r_{i}$ are distinct). In other words, the
numbers $r_{1},r_{2},\ldots,r_{m-1}$ still have multiplicities $\geq
a_{1},\ \geq a_{2},\ \ldots,\ \geq a_{m-1}$ as roots of $Q$. Hence, we can
apply our induction hypothesis, and this easily finishes the induction step.
\end{proof}

The multiplicity of a root of a polynomial can also be described using the
derivative. Let us first define this derivative:

\begin{definition}
Let $\mathbb{K}$ be one of the sets $\mathbb{Z}$, $\mathbb{Q}$, $\mathbb{R}$
and $\mathbb{C}$. The \emph{derivative} $P^{\prime}$ of a polynomial
$P=c_{0}X^{0}+c_{1}X^{1}+c_{2}X^{2}+\cdots\in\mathbb{K}\left[  X\right]  $ is
defined to be the polynomial $1c_{1}X^{0}+2c_{2}X^{1}+3c_{3}X^{2}+\cdots
\in\mathbb{R}\left[  X\right]  $.
\end{definition}

This definition, of course, has been chosen deliberately to match the formula
for the derivative of a polynomial \textbf{function} known from calculus.
Standard laws of differentiation (such as the Leibniz rule $\left(  PQ\right)
^{\prime}=P^{\prime}Q+PQ^{\prime}$ and the chain rule $\left(  P\left(
Q\right)  \right)  ^{\prime}=P^{\prime}\left(  Q\right)  \cdot Q^{\prime}$)
are easily shown to hold for polynomials.

Using the notion of a derivative, we can define the $m$-th derivative for each
$m\in\mathbb{N}$:

\begin{definition}
Let $\mathbb{K}$ be one of the sets $\mathbb{Z}$, $\mathbb{Q}$, $\mathbb{R}$
and $\mathbb{C}$. Let $m\in\mathbb{N}$. The $m$\emph{-th derivative
}$P^{\left(  m\right)  }$ of a polynomial $P\in\mathbb{K}\left[  X\right]  $
is defined to be the polynomial $\left(  \left(  \left(  \left(  P^{\prime
}\right)  ^{\prime}\right)  ^{\prime}\right)  \cdots\right)  ^{\prime}$, with
$m$ many primes. (In other words, it is defined recursively by $P^{\left(
0\right)  }=P$ and $P^{\left(  m\right)  }=\left(  P^{\left(  m-1\right)
}\right)  ^{\prime}$ for each $m>0$.)
\end{definition}

For example, if $P=2X^{3}-7X+1$, then $P^{\left(  0\right)  }=P=2X^{3}-7X+1$
and $P^{\left(  1\right)  }=P^{\prime}=6X^{2}-7$ and $P^{\left(  2\right)
}=P^{\prime\prime}=12X$ and $P^{\left(  3\right)  }=P^{\prime\prime\prime}=12$
and $P^{\left(  m\right)  }=0$ for all $m>3$.

The connection between higher derivatives and multiplicities of roots is as follows:

\begin{theorem}
\label{thm.polys.multiplicity.deriv}Let $\mathbb{K}$ be one of the sets
$\mathbb{Z}$, $\mathbb{Q}$, $\mathbb{R}$ and $\mathbb{C}$. Let $P\in
\mathbb{K}\left[  X\right]  $ be a polynomial. Let $r\in\mathbb{K}$ be a
number. Then, the multiplicity of $r$ as a root of $P$ is the smallest
$m\in\mathbb{N}$ such that $P^{\left(  m\right)  }\left(  r\right)  \neq0$.
\end{theorem}

For example, if $P=\left(  X-4\right)  ^{2}\left(  X-5\right)  $, then
$P\left(  4\right)  =P^{\prime}\left(  4\right)  =0$ but $P^{\prime\prime
}\left(  4\right)  \neq0$, so that the multiplicity of $4$ as a root of $P$ is
$2$.

Theorem \ref{thm.polys.multiplicity.deriv} is not hard to prove using the
Leibniz rule, but we omit this proof.

\subsubsection{The Fundamental Theorem of Algebra}

As we have seen in Example \ref{exa.poly.realroot-none}, a polynomial over
$\mathbb{R}$ can be of arbitrarily high degree without having a single real
root. The situation for complex roots is completely different, as witnessed by
the celebrated
\href{https://en.wikipedia.org/wiki/Fundamental_theorem_of_algebra}{\emph{fundamental
theorem of algebra}}:

\begin{theorem}
[fundamental theorem of algebra]\label{thm.poly.fta}Let $n\in\mathbb{N}$. Let
$P\in\mathbb{C}\left[  X\right]  $ be a polynomial of degree $n$. Let
$\lambda$ be the leading coefficient of $P$. Then, $P$ can be written as%
\[
P=\lambda\left(  X-r_{1}\right)  \left(  X-r_{2}\right)  \cdots\left(
X-r_{n}\right)
\]
for $n$ complex numbers $r_{1},r_{2},\ldots,r_{n}\in\mathbb{C}$. Thus, $P$ has
$n$ complex roots, counted with multiplicity.
\end{theorem}

This theorem (first proved by Argand in 1806, after many attempts and
half-proofs by Euler, Gauss, Lagrange and other luminaries) is one of the main
reasons for the popularity of the complex numbers! In a sense, it reveals that
$\mathbb{C}$ is the best place to look for roots, even if one is only
interested in polynomials in $\mathbb{Z}\left[  X\right]  $ or $\mathbb{Q}%
\left[  X\right]  $ or $\mathbb{R}\left[  X\right]  $.

Proofs of Theorem \ref{thm.poly.fta} can be found in \cite[Chapter
3]{LaNaSc16}, \cite[Theorem 7.1]{Aluffi16}, \cite[Chapter IX, \S 10]{Knapp1},
\cite[Theorem 44.8]{Warner90}, \cite[Theorem 11.6.7]{Steinb06} and many other
places\footnote{Some of these sources only prove that any non-constant
polynomial in $\mathbb{C}\left[  X\right]  $ has at least one complex root.
This fact sounds weaker than Theorem \ref{thm.poly.fta}, but actually it
suffices to prove the whole theorem, since you can apply this fact to find a
root $r_{1}$ of $P$, then divide $P$ by $X-r_{1}$, then apply this fact again
to the quotient to find a further root $r_{2}$, then divide the quotient by
$X-r_{2}$, then apply this fact again to the new quotient, and so on, until
you have found $n$ roots and divided $P$ by $n$ linear factors.}. More exotic
proofs are listed in \url{https://mathoverflow.net/questions/10535} .

Ironically, Theorem \ref{thm.poly.fta} is nowhere near fundamental to modern
algebra. Algebraists don't need to hunt for their roots in $\mathbb{C}$; they
can always adjoin them to their favorite field\footnote{See \cite[\S 4.5]%
{23wa} for how this works.}! But Theorem \ref{thm.poly.fta} is fundamentally
important to anything analytic done with roots of polynomials, such as
inequalities, and such things can be useful even in seemingly unrelated
situations. For example, Problem A6 of the
\href{https://kskedlaya.org/putnam-archive/2021.pdf}{Putnam contest 2021} is a
purely number-theoretical statement about polynomials with integer
coefficients, but the only solutions known involve taking its complex roots,
whose existence is guaranteed by Theorem \ref{thm.poly.fta}. This is not an
isolated occurrence; \textquotedblleft pick a root\textquotedblright\ is a
useful technique whenever it comes to proving properties of polynomials. The
following exercise illustrates this technique on a baby example which is easy
enough to solve by hand but even easier using roots:

\begin{exercise}
\label{exe.polys.roots.remorov}Let $P\in\mathbb{Z}\left[  X\right]  $ be a
monic quadratic polynomial. Show that there exist two quadratic polynomials
$Q,R\in\mathbb{Z}\left[  X\right]  $ such that $P\left(  X\right)  \cdot
P\left(  X+1\right)  =Q\left(  R\left(  X\right)  \right)  $.
\end{exercise}

\begin{proof}
[Solution idea.]The polynomial $P$ has degree $2$ and leading coefficient $1$.
Thus, Theorem \ref{thm.poly.fta} (applied to $n=2$ and $\lambda=1$) shows that
$P$ can be written as%
\[
P=\left(  X-r_{1}\right)  \left(  X-r_{2}\right)
\]
for $2$ complex numbers $r_{1},r_{2}\in\mathbb{C}$. Consider these
$r_{1},r_{2}$. (Arguably, this can also be obtained from the quadratic
formula; our use of Theorem \ref{thm.poly.fta} was overkill. But imagine a
problem about a polynomial of higher degree...)

Substituting $X+1$ for $X$ in $P=\left(  X-r_{1}\right)  \left(
X-r_{2}\right)  $, we obtain
\[
P\left(  X+1\right)  =\left(  X+1-r_{1}\right)  \left(  X+1-r_{2}\right)  .
\]
Thus,%
\begin{align*}
&  \underbrace{P\left(  X\right)  }_{=P=\left(  X-r_{1}\right)  \left(
X-r_{2}\right)  }\cdot\underbrace{P\left(  X+1\right)  }_{=\left(
X+1-r_{1}\right)  \left(  X+1-r_{2}\right)  }\\
&  =\left(  X-r_{1}\right)  \left(  X-r_{2}\right)  \cdot\left(
X+1-r_{1}\right)  \left(  X+1-r_{2}\right) \\
&  =\underbrace{\left(  X-r_{1}\right)  \left(  X+1-r_{2}\right)  }%
_{=X^{2}-\left(  r_{1}+r_{2}-1\right)  X+r_{1}r_{2}-r_{1}}\cdot
\underbrace{\left(  X-r_{2}\right)  \left(  X+1-r_{1}\right)  }_{=X^{2}%
-\left(  r_{1}+r_{2}-1\right)  X+r_{1}r_{2}-r_{2}}\\
&  =\left(  X^{2}-\left(  r_{1}+r_{2}-1\right)  X+r_{1}r_{2}-r_{1}\right)
\cdot\left(  X^{2}-\left(  r_{1}+r_{2}-1\right)  X+r_{1}r_{2}-r_{2}\right)  .
\end{align*}
Setting $R:=X^{2}-\left(  r_{1}+r_{2}-1\right)  X+r_{1}r_{2}$, we can rewrite
this as
\[
P\left(  X\right)  \cdot P\left(  X+1\right)  =\left(  R-r_{1}\right)
\cdot\left(  R-r_{2}\right)  .
\]
Setting $Q:=\left(  X-r_{1}\right)  \left(  X-r_{2}\right)  $, we can
furthermore rewrite this as%
\[
P\left(  X\right)  \cdot P\left(  X+1\right)  =Q\left(  R\right)  =Q\left(
R\left(  X\right)  \right)  \ \ \ \ \ \ \ \ \ \ \left(  \text{since
}R=R\left(  X\right)  \right)  .
\]


Are we done? Not quite, since we want our polynomials $Q$ and $R$ to belong to
$\mathbb{Z}\left[  X\right]  $, but their construction does not make this
obvious (after all, the roots $r_{1}$ and $r_{2}$ are not usually integers).

But this is not overly hard to check either: The polynomial $Q$ belongs to
$\mathbb{Z}\left[  X\right]  $ since $Q=\left(  X-r_{1}\right)  \left(
X-r_{2}\right)  =P\in\mathbb{Z}\left[  X\right]  $. The polynomial $R$ belongs
to $\mathbb{Z}\left[  X\right]  $ since%
\[
R=X^{2}-\left(  r_{1}+r_{2}-1\right)  X+r_{1}r_{2}=\underbrace{\left(
X-r_{1}\right)  \left(  X-r_{2}\right)  }_{=P}+\,X=P+X
\]
(and again since $P\in\mathbb{Z}\left[  X\right]  $).

At this point, we have solved the problem. Of course, you might wonder whether
we actually need the roots $r_{1}$ and $r_{2}$ if we found out that $Q=P$ and
$R=P+X$ at the end. And indeed, we don't. We could just as well have defined
the polynomials $Q$ and $P$ by $Q:=P$ and $R:=P+X$, and checked that $P\left(
X\right)  \cdot P\left(  X+1\right)  =Q\left(  R\left(  X\right)  \right)  $
by direct computation: Writing the monic quadratic polynomial $P$ as
$P=X^{2}+aX+b$ (for $a,b\in\mathbb{Z}$), we have%
\begin{align}
P\left(  X+1\right)   &  =\left(  X+1\right)  ^{2}+a\left(  X+1\right)
+b=\left(  X^{2}+2X+1\right)  +\left(  aX+a\right)  +b\nonumber\\
&  =\underbrace{X^{2}+aX+b}_{=P}+\,2X+1+a\nonumber\\
&  =P+2X+1+a \label{sol.polys.roots.remorov.4}%
\end{align}
and%
\begin{align*}
Q\left(  R\left(  X\right)  \right)   &  =\underbrace{P\left(  P+X\right)
}_{\substack{\text{the value of }P\text{ at }P+X\text{,}\\\text{not the
product of }P\text{ and }P+X\text{!}}}\ \ \ \ \ \ \ \ \ \ \left(  \text{since
}Q=P\text{ and }R\left(  X\right)  =R=P+X\right) \\
&  =\left(  P+X\right)  ^{2}+a\left(  P+X\right)
+b\ \ \ \ \ \ \ \ \ \ \left(  \text{since }P=X^{2}+aX+b\right) \\
&  =\left(  P^{2}+2PX+X^{2}\right)  +\left(  aP+aX\right)  +b=P\left(
P+2X+a\right)  +\underbrace{\left(  X^{2}+aX+b\right)  }_{=P}\\
&  =P\left(  P+2X+a\right)  +P=\underbrace{P}_{=P\left(  X\right)  }%
\cdot\underbrace{\left(  P+2X+a+1\right)  }_{\substack{=P+2X+1+a\\=P\left(
X+1\right)  \\\text{(by (\ref{sol.polys.roots.remorov.4}))}}}=P\left(
X\right)  \cdot P\left(  X+1\right)  ,
\end{align*}
so that $P\left(  X\right)  \cdot P\left(  X+1\right)  =Q\left(  R\left(
X\right)  \right)  $. In hindsight, this is a more direct solution than the
one using $r_{1}$ and $r_{2}$. But it would probably not have been easy to
find without motivation.
\end{proof}

\subsubsection{Viete's theorem}

\emph{Viete's identities} (also known as \emph{Viete's formulas} or
\emph{Viete's theorem}\footnote{Viete (Fran\c{c}ois Vi\`{e}te, 1540--1603) is
also often spelled \textquotedblleft Vi\`{e}te\textquotedblright\ or
\textquotedblleft Vieta\textquotedblright.}) are relations between the
coefficients of a polynomial and its $n$ complex roots. For the sake of
simplicity, we state them for monic polynomials only\footnote{This is
sufficient for all practical purposes, since we can make any nonzero
polynomial monic by dividing it by its leading coefficient. (Clearly, this
operation does not change the roots of the polynomial.)}:

\begin{theorem}
\label{thm.poly.viete}Let $r_{1},r_{2},\ldots,r_{n}\in\mathbb{C}$ be $n$
complex numbers. Consider the polynomial%
\[
P:=\left(  X-r_{1}\right)  \left(  X-r_{2}\right)  \cdots\left(
X-r_{n}\right)  .
\]
Write this polynomial (which is clearly monic of degree $n$) in the form%
\[
P=a_{0}X^{0}+a_{1}X^{1}+\cdots+a_{n}X^{n}%
\]
with $a_{0},a_{1},\ldots,a_{n}\in\mathbb{C}$. Then, we have the $n+1$
identities%
\begin{align*}
1  &  =a_{n};\\
r_{1}+r_{2}+\cdots+r_{n}  &  =-a_{n-1};\\
\underbrace{r_{1}r_{2}+r_{1}r_{3}+\cdots+r_{n-1}r_{n}}_{\text{This is the sum
of all products }r_{i}r_{j}\text{ with }i<j}  &  =a_{n-2};\\
\underbrace{r_{1}r_{2}r_{3}+r_{1}r_{2}r_{4}+\cdots+r_{n-2}r_{n-1}r_{n}%
}_{\text{This is the sum of all products }r_{i}r_{j}r_{k}\text{ with }i<j<k}
&  =-a_{n-3};\\
&  \ldots;\\
r_{1}r_{2}\cdots r_{n}  &  =\left(  -1\right)  ^{n}a_{0}.
\end{align*}
In other words, for each $k\in\left\{  0,1,\ldots,n\right\}  $, we have%
\[
\sum_{i_{1}<i_{2}<\cdots<i_{k}}r_{i_{1}}r_{i_{2}}\cdots r_{i_{k}}=\left(
-1\right)  ^{k}a_{n-k},
\]
where the sum on the left hand side ranges over all $k$-tuples $\left(
i_{1},i_{2},\ldots,i_{k}\right)  \in\left\{  1,2,\ldots,n\right\}  ^{k}$
satisfying $i_{1}<i_{2}<\cdots<i_{k}$.
\end{theorem}

\begin{example}
\label{exa.poly.viete.3}To get a bit of intuition, let us see what Theorem
\ref{thm.poly.viete} says for $n=3$. For simplicity, let us rename the numbers
$r_{1},r_{2},r_{3}$ as $u,v,w$. Thus, Theorem \ref{thm.poly.viete} is saying
that if the polynomial
\[
P:=\left(  X-u\right)  \left(  X-v\right)  \left(  X-w\right)  .
\]
is written in the form%
\[
P=a_{0}X^{0}+a_{1}X^{1}+a_{2}X^{2}+a_{3}X^{3}%
\]
with $a_{0},a_{1},a_{2},a_{3}\in\mathbb{C}$, then%
\begin{align}
1  &  =a_{3};\label{eq.exa.poly.viete.3.a3}\\
u+v+w  &  =-a_{2};\label{eq.exa.poly.viete.3.a2}\\
uv+uw+vw  &  =a_{1};\label{eq.exa.poly.viete.3.a1}\\
uvw  &  =-a_{0}. \label{eq.exa.poly.viete.3.a0}%
\end{align}

\end{example}

\begin{proof}
[Proof idea for Theorem \ref{thm.poly.viete}.]Let $k\in\left\{  0,1,\ldots
,n\right\}  $. When we expand the product
\[
\left(  X-r_{1}\right)  \left(  X-r_{2}\right)  \cdots\left(  X-r_{n}\right)
,
\]
we obtain a sum of $2^{n}$ addends, each of which has the form
\textquotedblleft a power of $X$ times a product of some $-r_{i}%
$'s\textquotedblright\ (because from each factor $X-r_{i}$, we get to pick
either the $X$ or the $-r_{i}$). Moreover, the number of $-r_{i}$'s in the
product plus the exponent over the $X$ will always equal $n$ (since there are
$n$ factors in total). Thus, the power of $X$ in the addend will be $n-k$
precisely when the product contains $k$ many $-r_{i}$'s. Hence, the
coefficient of $X^{n-k}$ in the product $\left(  X-r_{1}\right)  \left(
X-r_{2}\right)  \cdots\left(  X-r_{n}\right)  $ is%
\[
\sum_{i_{1}<i_{2}<\cdots<i_{k}}\underbrace{\left(  -r_{i_{1}}\right)  \left(
-r_{i_{2}}\right)  \cdots\left(  -r_{i_{k}}\right)  }_{=\left(  -1\right)
^{k}r_{i_{1}}r_{i_{2}}\cdots r_{i_{k}}}=\left(  -1\right)  ^{k}\sum
_{i_{1}<i_{2}<\cdots<i_{k}}r_{i_{1}}r_{i_{2}}\cdots r_{i_{k}}.
\]


Thus, comparing the coefficients of $X^{n-k}$ on both sides of the equality
\[
\left(  X-r_{1}\right)  \left(  X-r_{2}\right)  \cdots\left(  X-r_{n}\right)
=P=a_{0}X^{0}+a_{1}X^{1}+\cdots+a_{n}X^{n},
\]
we obtain%
\[
\left(  -1\right)  ^{k}\sum_{i_{1}<i_{2}<\cdots<i_{k}}r_{i_{1}}r_{i_{2}}\cdots
r_{i_{k}}=a_{n-k}%
\]
(since the coefficient on the right hand side is clearly $a_{n-k}$).
Multiplying this equality by $\left(  -1\right)  ^{k}$, we readily obtain%
\[
\sum_{i_{1}<i_{2}<\cdots<i_{k}}r_{i_{1}}r_{i_{2}}\cdots r_{i_{k}}=\left(
-1\right)  ^{k}a_{n-k}.
\]
This proves Theorem \ref{thm.poly.viete}.
\end{proof}

Viete's theorem is helpful in a slew of contest-style problems; examples can
be found in \cite[\S 1.8]{AndEne12} and various other places. Let me just give
two examples:

\begin{exercise}
\label{exe.poly.viete.3-1}Assume that the cubic polynomial $X^{3}%
+aX^{2}+bX+c\in\mathbb{C}\left[  X\right]  $ has three roots $u,v,w$ (listed
with multiplicities). Express $\dfrac{u^{2}}{u+1}+\dfrac{v^{2}}{v+1}%
+\dfrac{w^{2}}{w+1}$ in terms of $a,b,c$.
\end{exercise}

\begin{proof}
[Solution idea.]Let $P$ be the cubic polynomial $X^{3}+aX^{2}+bX+c$. By
assumption, this polynomial $P$ has roots $u,v,w$ (listed with
multiplicities). Thus, by Theorem \ref{thm.polys.roots=facs-mult}, we have%
\[
\left(  X-u\right)  \left(  X-v\right)  \left(  X-w\right)  \mid P.
\]
That is, there exists a polynomial $Q\in\mathbb{C}\left[  X\right]  $ such
that%
\begin{equation}
P=\left(  X-u\right)  \left(  X-v\right)  \left(  X-w\right)  \cdot Q.
\label{sol.poly.viete.3-1.3}%
\end{equation}
Consider this $Q$. Then, comparing the degrees on both sides of
(\ref{sol.poly.viete.3-1.3}), we see that $\deg Q=0$\ \ \ \ \footnote{Here is
this argument in more detail: From (\ref{sol.poly.viete.3-1.3}), we find
\begin{align*}
\deg P  &  =\deg\left(  \left(  X-u\right)  \left(  X-v\right)  \left(
X-w\right)  \cdot Q\right) \\
&  =\underbrace{\deg\left(  \left(  X-u\right)  \left(  X-v\right)  \left(
X-w\right)  \right)  }_{=3}+\deg Q\ \ \ \ \ \ \ \ \ \ \left(  \text{by
Proposition \ref{prop.poly.deg.prod} \textbf{(b)}}\right) \\
&  =3+\deg Q,
\end{align*}
so that%
\[
\deg Q=\underbrace{\deg P}_{\substack{=3\\\text{(since }P\text{ is cubic)}%
}}-\,3=3-3=0.
\]
}. Hence, $Q$ is constant, i.e., we have $Q=\lambda$ for some $\lambda
\in\mathbb{C}$. Consider this $\lambda$. Therefore, the leading coefficient on
the right hand side of (\ref{sol.poly.viete.3-1.3}) is $\lambda$ (since the
polynomial $\left(  X-u\right)  \left(  X-v\right)  \left(  X-w\right)  $ has
leading coefficient $1$, while $Q$ is just $\lambda$). Comparing this with the
leading coefficient on the left hand side of (\ref{sol.poly.viete.3-1.3})
(which is visibly $1$), we obtain $\lambda=1$. Thus, $Q=\lambda=1$. Hence,
(\ref{sol.poly.viete.3-1.3}) simplifies to%
\begin{equation}
P=\left(  X-u\right)  \left(  X-v\right)  \left(  X-w\right)  .
\label{sol.poly.viete.3-1.5}%
\end{equation}


Compare this to $P=X^{3}+aX^{2}+bX+c=cX^{0}+bX^{1}+aX^{2}+1X^{3}$. Therefore,
we can apply Viete's theorem (specifically, the formulas
(\ref{eq.exa.poly.viete.3.a2}), (\ref{eq.exa.poly.viete.3.a1}) and
(\ref{eq.exa.poly.viete.3.a0})) to $a_{0}=c$ and $a_{1}=b$ and $a_{2}=a$ and
$a_{3}=1$. We obtain%
\begin{align}
u+v+w  &  =-a;\label{sol.poly.viete.3-1.=a}\\
uv+uw+vw  &  =b;\label{sol.poly.viete.3-1.=b}\\
uvw  &  =-c. \label{sol.poly.viete.3-1.=c}%
\end{align}
But we are looking for the sum $\dfrac{u^{2}}{u+1}+\dfrac{v^{2}}{v+1}%
+\dfrac{w^{2}}{w+1}$. Thus, we could use a way to express this sum in terms of
$u+v+w$ and $uv+uw+vw$ and $uvw$.

There are several ways to find such an expression; here is the easiest one:
Let us reduce the numerators of our three fractions. Polynomial long division
shows that $X^{2}=\left(  X-1\right)  \left(  X+1\right)  +1$. Thus,
$u^{2}=\left(  u-1\right)  \left(  u+1\right)  +1$, so that $\dfrac{u^{2}%
}{u+1}=u-1+\dfrac{1}{u+1}$. Similarly, $\dfrac{v^{2}}{v+1}=v-1+\dfrac{1}{v+1}$
and $\dfrac{w^{2}}{w+1}=w-1+\dfrac{1}{w+1}$. Summing these three equalities,
we obtain%
\begin{align*}
&  \dfrac{u^{2}}{u+1}+\dfrac{v^{2}}{v+1}+\dfrac{w^{2}}{w+1}\\
&  =\left(  u-1+\dfrac{1}{u+1}\right)  +\left(  v-1+\dfrac{1}{v+1}\right)
+\left(  w-1+\dfrac{1}{w+1}\right) \\
&  =\underbrace{\left(  u+v+w\right)  }_{=-a}-\ 3+\left(  \dfrac{1}%
{u+1}+\dfrac{1}{v+1}+\dfrac{1}{w+1}\right)  .
\end{align*}
It thus remains to compute $\dfrac{1}{u+1}+\dfrac{1}{v+1}+\dfrac{1}{w+1}$.
This we can just do by brute force:%
\begin{align*}
\dfrac{1}{u+1}+\dfrac{1}{v+1}+\dfrac{1}{w+1}  &  =\dfrac{\left(  v+1\right)
\left(  w+1\right)  +\left(  u+1\right)  \left(  w+1\right)  +\left(
u+1\right)  \left(  v+1\right)  }{\left(  u+1\right)  \left(  v+1\right)
\left(  w+1\right)  }\\
&  =\dfrac{\left(  vw+v+w+1\right)  +\left(  uw+u+w+1\right)  +\left(
uv+u+v+1\right)  }{uvw+uv+vw+wu+u+v+w+1}\\
&  =\dfrac{\left(  uv+uw+vw\right)  +2\left(  u+v+w\right)  +3}{uvw+\left(
uv+uw+vw\right)  +\left(  u+v+w\right)  +1}\\
&  =\dfrac{b+2\left(  -a\right)  +3}{\left(  -c\right)  +b+\left(  -a\right)
+1}\ \ \ \ \ \ \ \ \ \ \left(  \text{by (\ref{sol.poly.viete.3-1.=a}),
(\ref{sol.poly.viete.3-1.=b}) and (\ref{sol.poly.viete.3-1.=c})}\right) \\
&  =\dfrac{b-2a+3}{b+1-c-a}.
\end{align*}
Hence,%
\begin{align*}
\dfrac{u^{2}}{u+1}+\dfrac{v^{2}}{v+1}+\dfrac{w^{2}}{w+1}  &
=\underbrace{\left(  u+v+w\right)  }_{=-a}-\ 3+\underbrace{\left(  \dfrac
{1}{u+1}+\dfrac{1}{v+1}+\dfrac{1}{w+1}\right)  }_{=\dfrac{b-2a+3}{b+1-c-a}}\\
&  =-a-3+\dfrac{b-2a+3}{b+1-c-a}.
\end{align*}
Not the nicest expression, but it does answer the problem!
\end{proof}

\begin{exercise}
Assume that the cubic polynomial $X^{3}+aX^{2}+bX+c\in\mathbb{C}\left[
X\right]  $ has three roots $u,v,w$ (listed with multiplicities). Find a cubic
polynomial that has the three roots $u^{2},v^{2},w^{2}$, and express it in
terms of $a,b,c$.
\end{exercise}

\begin{proof}
[Solution idea.]As in the solution to Exercise \ref{exe.poly.viete.3-1}, we
can find that%
\begin{align}
u+v+w  &  =-a;\label{sol.poly.viete.3-2.=a}\\
uv+uw+vw  &  =b;\label{sol.poly.viete.3-2.=b}\\
uvw  &  =-c. \label{sol.poly.viete.3-2.=c}%
\end{align}


Now, we are looking for a cubic polynomial that has the three roots
$u^{2},v^{2},w^{2}$. Clearly, $\left(  X-u^{2}\right)  \left(  X-v^{2}\right)
\left(  X-w^{2}\right)  $ is such a polynomial, but we want to express it in
terms of $a,b,c$. Expanding it, we find%
\begin{align*}
&  \left(  X-u^{2}\right)  \left(  X-v^{2}\right)  \left(  X-w^{2}\right) \\
&  =X^{3}-\left(  u^{2}+v^{2}+w^{2}\right)  X^{2}+\left(  u^{2}v^{2}%
+u^{2}w^{2}+v^{2}w^{2}\right)  X-u^{2}v^{2}w^{2}.
\end{align*}
Thus, we must express the three coefficients $u^{2}+v^{2}+w^{2}$, $u^{2}%
v^{2}+u^{2}w^{2}+v^{2}w^{2}$ and $u^{2}v^{2}w^{2}$ in terms of $a,b,c$.

For $u^{2}v^{2}w^{2}$, this is very easy: We have $u^{2}v^{2}w^{2}=\left(
uvw\right)  ^{2}=\left(  -c\right)  ^{2}$ (by (\ref{sol.poly.viete.3-2.=c})).

For $u^{2}+v^{2}+w^{2}$, we recall the well-known trinomial formula%
\[
\left(  u+v+w\right)  ^{2}=u^{2}+v^{2}+w^{2}+2\left(  uv+uw+vw\right)
\]
(which follows by expanding the left hand side). Solving this for $u^{2}%
+v^{2}+w^{2}$, we find%
\begin{align}
u^{2}+v^{2}+w^{2}  &  =\left(  u+v+w\right)  ^{2}-2\left(  uv+uw+vw\right)
\label{sol.poly.viete.3-2.u2}\\
&  =\left(  -a\right)  ^{2}-2b\nonumber
\end{align}
(by (\ref{sol.poly.viete.3-2.=a}) and (\ref{sol.poly.viete.3-2.=b})).

Finally, for $u^{2}v^{2}+u^{2}w^{2}+v^{2}w^{2}$, we note that%
\begin{align*}
u^{2}v^{2}+u^{2}w^{2}+v^{2}w^{2}  &  =\left(  uv\right)  ^{2}+\left(
uw\right)  ^{2}+\left(  vw\right)  ^{2}\\
&  =\left(  uv+uw+vw\right)  ^{2}-2\underbrace{\left(  uv\cdot uw+uv\cdot
vw+uw\cdot vw\right)  }_{=uvw\left(  u+v+w\right)  }\\
&  \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \left(
\begin{array}
[c]{c}%
\text{by (\ref{sol.poly.viete.3-2.u2}), applied to }uv,\ uw,\ vw\\
\text{instead of }u,\ v,\ w
\end{array}
\right) \\
&  =\left(  uv+uw+vw\right)  ^{2}-2uvw\left(  u+v+w\right) \\
&  =b^{2}-2\left(  -c\right)  \left(  -a\right)  \ \ \ \ \ \ \ \ \ \ \left(
\text{by (\ref{sol.poly.viete.3-2.=a}), (\ref{sol.poly.viete.3-2.=b}) and
(\ref{sol.poly.viete.3-2.=c})}\right)  .
\end{align*}


Altogether, the polynomial we are looking for is%
\begin{align*}
&  \left(  X-u^{2}\right)  \left(  X-v^{2}\right)  \left(  X-w^{2}\right) \\
&  =X^{3}-\underbrace{\left(  u^{2}+v^{2}+w^{2}\right)  }_{\substack{=\left(
-a\right)  ^{2}-2b\\=a^{2}-2b}}X^{2}+\underbrace{\left(  u^{2}v^{2}+u^{2}%
w^{2}+v^{2}w^{2}\right)  }_{\substack{=b^{2}-2\left(  -c\right)  \left(
-a\right)  \\=b^{2}-2ca}}X-\underbrace{u^{2}v^{2}w^{2}}_{\substack{=\left(
-c\right)  ^{2}\\=c^{2}}}\\
&  =X^{3}-\left(  a^{2}-2b\right)  X^{2}+\left(  b^{2}-2ca\right)  X-c^{2}.
\end{align*}

\end{proof}

\subsection{Class problems}

The following problems are to be discussed during class.

\begin{exercise}
\label{exe.polys.even-odd}Let $P\in\mathbb{K}\left[  X\right]  $ be a
polynomial, where $\mathbb{K}$ is either $\mathbb{Z}$ or $\mathbb{Q}$ or
$\mathbb{R}$ or $\mathbb{C}$. Prove the following:

\begin{enumerate}
\item[\textbf{(a)}] If $P\left(  X\right)  =P\left(  -X\right)  $, then $P$
can be written as $P=Q\left(  X^{2}\right)  $ for some $Q\in\mathbb{K}\left[
X\right]  $.

\item[\textbf{(b)}] If $P\left(  X\right)  =-P\left(  -X\right)  $, then $P$
can be written as $P=X\cdot Q\left(  X^{2}\right)  $ for some $Q\in
\mathbb{K}\left[  X\right]  $.
\end{enumerate}
\end{exercise}

\begin{exercise}
\label{exe.polys.Pk=2k}Let $n\in\mathbb{N}$. Let $P\in\mathbb{Q}\left[
X\right]  $ be a polynomial of degree $\leq n$ that satisfies $P\left(
k\right)  =2^{k}$ for each $k\in\left\{  0,1,\ldots,n\right\}  $. Find
$P\left(  n+1\right)  $.
\end{exercise}

\begin{exercise}
\label{exe.polys.XX+1-iter}Let $P\in\mathbb{R}\left[  X\right]  $ be a
polynomial such that $P\left(  X^{2}+1\right)  =\left(  P\left(  X\right)
\right)  ^{2}+1$. Prove that $P$ is an iterate of $X^{2}+1$ -- that is, a
polynomial of the form $\underbrace{S\left(  S\left(  \cdots\left(  S\left(
X\right)  \right)  \right)  \right)  }_{k\text{ times}}$ for some
$k\in\mathbb{N}$, where $S:=X^{2}+1$.
\end{exercise}

\begin{exercise}
\label{exe.pols.Q(X)Q(-X)}\ \ 

\begin{enumerate}
\item[\textbf{(a)}] Let $P\in\mathbb{C}\left[  X\right]  $ be an even
polynomial (i.e., a polynomial satisfying $P\left(  X\right)  =P\left(
-X\right)  $). Prove that $P$ can be written as $P=Q\left(  X\right)  \cdot
Q\left(  -X\right)  $ for some $Q\in\mathbb{C}\left[  X\right]  $.

\item[\textbf{(b)}] Does this hold if $\mathbb{C}$ is replaced by $\mathbb{R}$ ?
\end{enumerate}
\end{exercise}

\begin{exercise}
\label{exe.polys.P'n=nPn-1}The polynomials $P_{n}\in\mathbb{R}\left[
X\right]  $ for all $n\in\mathbb{N}$ are defined recursively as follows: We
set $P_{0}=1$ and define the polynomial $P_{n}$ implicitly by the requirements%
\[
P_{n}^{\prime}=nP_{n-1}\left(  X+1\right)  \ \ \ \ \ \ \ \ \ \ \text{and}%
\ \ \ \ \ \ \ \ \ \ P_{n}\left(  0\right)  =0\ \ \ \ \ \ \ \ \ \ \text{for all
}n\geq1
\]
(where $P_{n}^{\prime}$ denotes the derivative of $P_{n}$). Factor the value
$P_{100}\left(  1\right)  $ into prime numbers.

\flushright(46th Putnam contest 1985, Problem B2)
\end{exercise}

\subsection{Homework exercises}

This homework set is optional; it will not be graded.

\begin{exercise}
\label{exe.polys.Pk=fk}Recall the Fibonacci sequence $\left(  f_{0}%
,f_{1},f_{2},\ldots\right)  $, defined by $f_{0}=0$ and $f_{1}=1$ and
$f_{n}=f_{n-1}+f_{n-2}$ for all $n\geq2$.

Let $n\in\mathbb{N}$. Let $P\in\mathbb{Q}\left[  X\right]  $ be a polynomial
of degree $\leq n$ that satisfies $P\left(  k\right)  =f_{k}$ for each
$k\in\left\{  0,1,\ldots,n\right\}  $. Find $P\left(  n+1\right)  $.
\end{exercise}

\begin{exercise}
\label{exe.polys.Pcos=Psin}Let $P\in\mathbb{R}\left[  X\right]  $ be a
polynomial such that $P\left(  \cos\alpha\right)  =P\left(  \sin\alpha\right)
$ for all $\alpha\in\mathbb{R}$. Prove that $P=Q\left(  X^{4}-X^{2}\right)  $
for some $Q\in\mathbb{R}\left[  X\right]  $.
\end{exercise}

\begin{exercise}
\label{exe.polys.prim*prim}A polynomial $P\in\mathbb{Z}\left[  X\right]  $ is
said to be \emph{primitive} if the gcd of its coefficients is $1$.

Let $Q$ and $R$ be two primitive polynomials in $\mathbb{Z}\left[  X\right]
$. Prove that their product $QR$ is also primitive. \medskip

[\textbf{Hint:} A bunch of integers are coprime if and only if they have no
common prime divisor.]
\end{exercise}

\begin{exercise}
\label{exe.polys.21hw3.5}Let $n\in\mathbb{N}$. Prove that we have
$X^{2}+X+1\mid X^{2n}+X^{n}+1$ in $\mathbb{Z}\left[  X\right]  $ if and only
if $3\nmid n$ in $\mathbb{Z}$. \medskip

[\textbf{Hint:} First, define $N:=X^{2}+X+1$, and show that $X^{3}%
\equiv1\operatorname{mod}N$ in $\mathbb{Z}\left[  X\right]  $.]
\end{exercise}

\begin{exercise}
\label{exe.polys.Pk=1/k.0}Let $n\in\mathbb{N}$. Let $P\in\mathbb{Q}\left[
X\right]  $ be a polynomial of degree $\leq n$ that satisfies $P\left(
k\right)  =\dfrac{1}{k}$ for each $k\in\left\{  1,2,\ldots,n+1\right\}  $.
Show that $P\left(  0\right)  =\dfrac{1}{1}+\dfrac{1}{2}+\cdots+\dfrac{1}%
{n+1}$. \medskip

[\textbf{Hint:} Take the derivative on both sides of (\ref{sol.polys.Pk=1/k.2}).]
\end{exercise}

\begin{exercise}
\label{exe.polys.sum-1/(uk+1)}Let $n$ be an even positive integer. Let
$u_{1},u_{2},\ldots,u_{n}$ be the $n$ roots of the polynomial $X^{n}-nX+1$.
Prove that%
\[
\dfrac{1}{u_{1}+1}+\dfrac{1}{u_{2}+1}+\cdots+\dfrac{1}{u_{n}+1}=\dfrac
{2n}{n+2}.
\]


[\textbf{Hint:} Find a degree-$n$ polynomial with roots $\dfrac{1}{u_{1}%
+1},\ \dfrac{1}{u_{2}+1},\ \ldots,\ \dfrac{1}{u_{n}+1}$.]
\end{exercise}

\begin{exercise}
\label{exe.polys.no-rat-root-if-all-odd}Let $P\in\mathbb{Z}\left[  X\right]  $
be a polynomial of even degree whose all coefficients (not counting the zero
coefficients in front of powers that are larger than the degree) are odd.
Prove that $P$ has no rational root.
\end{exercise}

\begin{exercise}
\label{exe.polys.integer-subsum}Let $P=c_{0}X^{0}+c_{1}X^{1}+\cdots+c_{n}%
X^{n}$ be a polynomial in $\mathbb{Z}\left[  X\right]  $ (with $c_{0}%
,c_{1},\ldots,c_{n}\in\mathbb{Z}$). Let $r\in\mathbb{Q}$ be a root of $P$.
Prove that $c_{n}r^{i}+c_{n-1}r^{i-1}+\cdots+c_{n-i}r^{0}\in\mathbb{Z}$ for
each $i\in\left\{  0,1,\ldots,n\right\}  $.
\end{exercise}

\begin{exercise}
\label{exe.polys.high-power-lagrange}Let $a_{0},a_{1},\ldots,a_{n}$ be $n$
pairwise distinct integers (where $n\in\mathbb{N}$). Prove that for any
$s\in\mathbb{N}$, the number%
\[
\sum_{j=0}^{n}\dfrac{a_{j}^{s}}{\prod_{k\neq j}\left(  a_{j}-a_{k}\right)  }%
\]
(where the \textquotedblleft$\prod_{k\neq j}$\textquotedblright\ sign means a
product over all $k\in\left\{  0,1,\ldots,n\right\}  $ satisfying $k\neq j$)
is an integer.
\end{exercise}

\begin{exercise}
\label{exe.polys.n+1-power-bincoeff}Let $n\in\mathbb{N}$. Prove that%
\[
\sum_{i=0}^{n}\left(  -1\right)  ^{n-i}\dbinom{n}{i}i^{n+1}=\dfrac{n\left(
n+1\right)  !}{2}.
\]


[\textbf{Hint:} Alas, the polynomial $P:=X^{n+1}$ has degree $n+1$, which is
too high for an obvious application of Lagrange interpolation. Can you find a
polynomial $Q$ that has degree $\leq n$ but a sum $\sum_{i=0}^{n}\left(
-1\right)  ^{n-i}\dbinom{n}{i}Q\left(  i\right)  $ closely related to the sum
on the left hand side?]
\end{exercise}

\begin{exercise}
\label{exe.polys-sumofsq1}Let $P\in\mathbb{R}\left[  X\right]  $ be a
polynomial such that $P\left(  x\right)  \geq0$ for all $x\in\mathbb{R}$.
Prove that $P$ can be written in the form $P=Q_{1}^{2}+Q_{2}^{2}+\cdots
+Q_{k}^{2}$ for some polynomials $Q_{1},Q_{2},\ldots,Q_{k}\in\mathbb{R}\left[
X\right]  $. \medskip

[\textbf{Hint:} First, show that if two polynomials $P_{1}$ and $P_{2}$ can be
written in this form, then so can their product $P_{1}P_{2}$. Next, show that
every polynomial of the type $\left(  X-z\right)  \left(  X-\overline
{z}\right)  $ for two conjugate complex numbers $z=a+bi$ and $\overline
{z}=a-bi$ can be rewritten in this form. Finally, use the Fundamental Theorem
of Algebra on $P$.]
\end{exercise}

\bigskip

\begin{thebibliography}{999999999}                                                                                        %


\bibitem[Aluffi16]{Aluffi16}\href{https://www.ams.org/books/gsm/104/}{Paolo
Aluffi, \textit{Algebra: Chapter 0}, Graduate Studies in Mathematics
\textbf{104}, 2nd printing, AMS 2016.}

\bibitem[Aluffi21]{Aluffi21}Paolo Aluffi, \textit{Algebra: Notes from the
Underground}, Cambridge University Press 2021.

\bibitem[AndDos10]{AndDos}\href{https://bookstore.ams.org/xyz-13}{Titu
Andreescu, Gabriel Dospinescu, \textit{Problems from the Book}, 2nd edition,
XYZ Press 2010}.

\bibitem[AndDos12]{AndDosS}\href{https://bookstore.ams.org/xyz-6}{Titu
Andreescu, Gabriel Dospinescu, \textit{Straight from the Book}, XYZ Press
2012}.

\bibitem[AndEne12]{AndEne12}%
\href{https://doi.org/10.1007/978-0-8176-8253-8}{Titu Andreescu, Bogdan
Enescu, \textit{Mathematical Olympiad Treasures}, 2nd edition, Springer 2012.}

\bibitem[Axler23]{Axler23}\href{https://linear.axler.net/}{Sheldon Axler,
\textit{Linear Algebra Done Right}, 4th edition, Springer 2023.}

\bibitem[Barbea89]{Barbea89}%
\href{https://link.springer.com/book/9780387406275}{Edward J. Barbeau,
\textit{Polynomials}, Springer 1989.}

\bibitem[BenQui03]{BenQui03}Arthur T. Benjamin and Jennifer J. Quinn,
\textit{Proofs that Really Count: The Art of Combinatorial Proof}, Dolciani
Mathematical Expositions \textbf{27}, The Mathematical Association of America, 2003.

\bibitem[Engel98]{Engel98}\href{https://doi.org/10.1007/b97682}{Arthur Engel,
\textit{Problem-Solving Strategies}, Springer 1998.}

\bibitem[GelAnd17]{GelAnd17}%
\href{https://doi.org/10.1007/978-3-319-58988-6}{R\u{a}zvan Gelca, Titu
Andreescu, \textit{Putnam and Beyond}, 2nd edition, Springer 2017.}

\bibitem[Granvi05]{Granvi05}Andrew Granville, \textit{Binomial coefficients
modulo prime powers}, preprint.\newline\url{https://web.archive.org/web/20181024055320/http://ebooks.bharathuniv.ac.in/gdlc1/gdlc1/Engineering Merged Library v3.0/Andrew Granville/Binomial Coefficients Modulo Prime Powers (5579)/Binomial Coefficients Modulo Prime Powers - Andrew Granville.pdf}

\bibitem[Grinbe19a]{19s}Darij Grinberg, \textit{Introduction to Modern Algebra
(UMN Spring 2019 Math 4281 notes)}, 1 October 2020.\newline\url{http://www.cip.ifi.lmu.de/~grinberg/t/19s/notes.pdf}

\bibitem[Grinbe19b]{19fco}Darij Grinberg, \textit{Enumerative Combinatorics:
class notes (Drexel Fall 2019 Math 222 notes)}, 11 September 2022.\newline\url{http://www.cip.ifi.lmu.de/~grinberg/t/19fco/n/n.pdf}

\bibitem[Grinbe20]{20f}Darij Grinberg, \textit{Math 235: Mathematical Problem
Solving}, 10 August 2021.\newline\url{https://www.cip.ifi.lmu.de/~grinberg/t/20f/mps.pdf}

\bibitem[Grinbe23]{23wa}Darij Grinberg, \textit{An introduction to the algebra
of rings and fields (Text for Math 332 Winter 2023 at Drexel University)}, 27
August 2023.\newline\url{https://www.cip.ifi.lmu.de/~grinberg/t/23wa/23wa.pdf}

\bibitem[GrKnPa94]{GKP}Ronald L. Graham, Donald E. Knuth, Oren Patashnik,
\textit{Concrete Mathematics}, 2nd edition, Addison--Wesley 1994.

\bibitem[Knapp16]{Knapp1}Anthony W. Knapp, \textit{Basic Algebra}, Digital 2nd
edition 2016.\newline\url{http://www.math.stonybrook.edu/~aknapp/download.html}

\bibitem[LaNaSc16]{LaNaSc16}Isaiah Lankham, Bruno Nachtergaele, Anne
Schilling, \textit{Linear Algebra As an Introduction to Abstract Mathematics},
2016.\newline\url{https://www.math.ucdavis.edu/~anne/linear_algebra/mat67_course_notes.pdf}

\bibitem[Nica23]{Nica23}%
\href{https://doi.org/10.1016/j.exmath.2023.06.003}{Bogdan Nica, \textit{On an
identity of Sylvester}, Expositiones Mathematicae \textbf{41}, Issue 4,
December 2023, 125511.}\newline Also available at
\href{https://arxiv.org/abs/2212.13624v2}{arXiv:2212.13624v2}.

\bibitem[Prasol04]{Prasol04}%
\href{https://doi.org/10.1007/978-3-642-03980-5}{Victor V. Prasolov,
\textit{Polynomials}, Springer 2004.}

\bibitem[Steinb06]{Steinb06}Mark Steinberger, \textit{Algebra}, 31 August
2006.\newline\url{https://math.hawaii.edu/~tom/algebra.pdf}

\bibitem[Warner90]{Warner90}Seth Warner, \textit{Modern Algebra: two volumes
bound as one}, Dover 1990.

\bibitem[Zeitz17]{Zeitz17}Paul Zeitz, \textit{The Art and Craft of Problem
Solving}, 3rd edition, Wiley 2017.
\end{thebibliography}


\end{document}