\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=Saturday, November 04, 2023 20:11:15}
%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}
\newcounter{exera}
\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 4, version \today}
\ohead{page \thepage}
\cfoot{Darij Grinberg}
\begin{document}
\setcounter{section}{3}

\section{Math 235 Fall 2023, Worksheet 4: Algebraic tricks}

This worksheet is devoted to some ways in which skilled algebraic
manipulations (in the sense of high-school algebra: combining terms, expanding
products, etc.) can help solve problems.

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

\subsection{Example problems}

\subsubsection{A few inequalities}

We begin with a fairly classical inequality:

\begin{exercise}
\label{exe.alg.e1}Let $a,b,c$ be three real numbers. Prove the inequality%
\[
a^{2}+b^{2}+c^{2}\geq bc+ca+ab.
\]

\end{exercise}

\begin{proof}
[Solution idea.]There is a one-paragraph solution:

\begin{proof}
[First solution to Exercise \ref{exe.alg.e1}.]Recall that $x^{2}\geq0$ for
each real number $x$. Hence, we have $\left(  b-c\right)  ^{2}\geq0$ and
$\left(  c-a\right)  ^{2}\geq0$ and $\left(  a-b\right)  ^{2}\geq0$. However,
by a straightforward computation, we can verify that%
\begin{align*}
\left(  a^{2}+b^{2}+c^{2}\right)  -\left(  bc+ca+ab\right)   &  =\dfrac{1}%
{2}\left(  \underbrace{\left(  b-c\right)  ^{2}}_{\geq0}+\underbrace{\left(
c-a\right)  ^{2}}_{\geq0}+\underbrace{\left(  a-b\right)  ^{2}}_{\geq0}\right)
\\
&  \geq\dfrac{1}{2}\left(  0+0+0\right)  =0.
\end{align*}
Thus, $a^{2}+b^{2}+c^{2}\geq bc+ca+ab$, so that the exercise is solved.
\end{proof}

Clearly, the trick in this solution was to rewrite $\left(  a^{2}+b^{2}%
+c^{2}\right)  -\left(  bc+ca+ab\right)  $ as $\dfrac{1}{2}\left(  \left(
b-c\right)  ^{2}+\left(  c-a\right)  ^{2}+\left(  a-b\right)  ^{2}\right)  $.
This can indeed be verified by a straightforward computation (just expand both
sides), but how could this be discovered? Confronted with the expression
$\left(  a^{2}+b^{2}+c^{2}\right)  -\left(  bc+ca+ab\right)  $, how would you
know to rewrite it as $\dfrac{1}{2}\left(  \left(  b-c\right)  ^{2}+\left(
c-a\right)  ^{2}+\left(  a-b\right)  ^{2}\right)  $ ?

There are several other solutions that are easier to find:

\begin{proof}
[Second solution to Exercise \ref{exe.alg.e1}.]The numbers $a,b,c$ play
symmetric roles in the exercise. Thus, we can permute them without changing
the claim of the exercise. (For instance, we can swap $a$ with $b$, or
cyclically rotate $a,b,c$.) By an appropriate such permutation, we can achieve
a situation in which $c$ is the largest of the three numbers $a,b,c$. So let
us WLOG assume that we are in this situation. Then, $c\geq a$ and $c\geq b$,
so that $c-a\geq0$ and $c-b\geq0$ and therefore $\left(  c-a\right)  \left(
c-b\right)  \geq0$. (By the way, the same conclusion could be obtained if $c$
was the smallest of $a,b,c$.) However,
\begin{align*}
\left(  a^{2}+b^{2}+c^{2}\right)  -\left(  bc+ca+ab\right)   &
=\underbrace{a^{2}+b^{2}-ab}_{=\left(  a-b\right)  ^{2}+ab}+\,c^{2}-bc-ca\\
&  =\left(  a-b\right)  ^{2}+\underbrace{ab+c^{2}-bc-ca}_{=\left(  c-a\right)
\left(  c-b\right)  }\\
&  =\underbrace{\left(  a-b\right)  ^{2}}_{\geq0}+\underbrace{\left(
c-a\right)  \left(  c-b\right)  }_{\geq0}\geq0+0=0.
\end{align*}
That is, $a^{2}+b^{2}+c^{2}\geq bc+ca+ab$. Exercise \ref{exe.alg.e1} is solved again.
\end{proof}

\begin{proof}
[Third solution to Exercise \ref{exe.alg.e1}.]The expression $\left(
a^{2}+b^{2}+c^{2}\right)  -\left(  bc+ca+ab\right)  $ (viewed as a polynomial
in any of $a,b,c$) is quadratic, so we use the time-tested method of
\textquotedblleft%
\href{https://en.wikipedia.org/wiki/Completing_the_square}{completing the
square}\textquotedblright\ (the same method used, e.g., to rewrite
$a^{2}+7a+2$ as $\left(  a+\dfrac{7}{2}\right)  ^{2}-\dfrac{41}{4}$). We treat
$a$ as the variable and $b$ and $c$ as constants. We obtain%
\begin{align*}
\left(  a^{2}+b^{2}+c^{2}\right)  -\left(  bc+ca+ab\right)   &  =\left(
a-\dfrac{b+c}{2}\right)  ^{2}+\dfrac{3}{4}\underbrace{\left(  b^{2}%
-2bc+c^{2}\right)  }_{=\left(  b-c\right)  ^{2}}\\
&  =\underbrace{\left(  a-\dfrac{b+c}{2}\right)  ^{2}}_{\geq0}+\,\dfrac{3}%
{4}\underbrace{\left(  b-c\right)  ^{2}}_{\geq0}\geq0+\dfrac{3}{4}0=0.
\end{align*}
In other words, $a^{2}+b^{2}+c^{2}\geq bc+ca+ab$. Exercise \ref{exe.alg.e1} is
solved again.
\end{proof}

There are many other solutions. The first solution is arguably the most
elegant, not last because it can be used to prove the following generalization:

\begin{proposition}
For any $n$ reals $a_{1},a_{2},\ldots,a_{n}$, we have%
\[
a_{1}^{2}+a_{2}^{2}+\cdots+a_{n}^{2}\geq a_{1}a_{2}+a_{2}a_{3}+a_{3}%
a_{4}+\cdots+a_{n-1}a_{n}+a_{n}a_{1}.
\]

\end{proposition}

\begin{proof}
Adapt the above first solution to Exercise \ref{exe.alg.e1}. (Exercise!)
\end{proof}
\end{proof}

\subsubsection{On $P\left(  a\right)  -P\left(  b\right)  $ and $a^{m}-b^{m}$}

Let us now return to the topic of divisibility.

\begin{exercise}
\label{exe.alg.e2}Let $P\left(  x\right)  $ be a polynomial in a single
variable $x$ with integer coefficients. Let $a$ and $b$ be two integers. Prove
that $a-b\mid P\left(  a\right)  -P\left(  b\right)  $.
\end{exercise}

\begin{proof}
[Solution idea.]This is particularly easy using the substitution principle for
congruences (from worksheet 2): Indeed, set $n=a-b$. Then, $a\equiv
b\operatorname{mod}n$ (why?), so that $P\left(  a\right)  \equiv P\left(
b\right)  \operatorname{mod}n$ (by the substitution principle). However, this
means that $n\mid P\left(  a\right)  -P\left(  b\right)  $. In view of
$n=a-b$, this becomes $a-b\mid P\left(  a\right)  -P\left(  b\right)  $, and
we are done. \medskip

However, let us give a more direct proof, as it is instructive in its own way.
It relies on the following identity, which is one of the most important
identities in mathematics:

\begin{theorem}
[generalized geometric series formula]\label{thm.alg.gs}Let $a$ and $b$ be any
two numbers (not necessarily integers), and let $m\in\mathbb{N}$. Then,%
\[
a^{m}-b^{m}=\left(  a-b\right)  \underbrace{\left(  a^{m-1}+a^{m-2}%
b+a^{m-3}b^{2}+\cdots+ab^{m-2}+b^{m-1}\right)  }_{=\sum_{k=0}^{m-1}%
a^{k}b^{m-1-k}}.
\]

\end{theorem}

For example, for $m=4$, this is saying that%
\[
a^{4}-b^{4}=\left(  a-b\right)  \left(  a^{3}+a^{2}b+ab^{2}+b^{3}\right)  .
\]
For $m=3$, this is saying that%
\[
a^{3}-b^{3}=\left(  a-b\right)  \left(  a^{2}+ab+b^{2}\right)  .
\]
The $m=2$ case, of course, should be particularly familiar:%
\[
a^{2}-b^{2}=\left(  a-b\right)  \left(  a+b\right)  .
\]


\begin{fineprint}
Why am I calling Theorem \ref{thm.alg.gs} the \textquotedblleft generalized
geometric series formula\textquotedblright? Because setting $b=1$ in Theorem
\ref{thm.alg.gs} yields%
\[
a^{m}-1=\left(  a-1\right)  \left(  a^{m-1}+a^{m-2}+a^{m-3}+\cdots+a+1\right)
,
\]
whence%
\[
a^{m-1}+a^{m-2}+a^{m-3}+\cdots+a+1=\dfrac{a^{m}-1}{a-1}%
\ \ \ \ \ \ \ \ \ \ \left(  \text{if }a\neq1\right)  ,
\]
which is a well-known formula for the sum of a (finite) geometric series. (The
infinite version follows by letting $m\rightarrow\infty$.)
\end{fineprint}

Theorem \ref{thm.alg.gs} is not hard to prove by induction on $m$ (see, e.g.,
\cite[solution to Exercise 1]{19s-hw0s}), but it is more instructive to prove
it directly using a string of cancellations:

\begin{proof}
[Proof of Theorem \ref{thm.alg.gs}.]By the law of distributivity, we have%
\begin{align}
&  \left(  a-b\right)  \left(  a^{m-1}+a^{m-2}b+a^{m-3}b^{2}+\cdots
+ab^{m-2}+b^{m-1}\right) \nonumber\\
&  =\underbrace{\left(  a-b\right)  a^{m-1}}_{=a^{m}-a^{m-1}b}%
+\underbrace{\left(  a-b\right)  a^{m-2}b}_{=a^{m-1}b-a^{m-2}b^{2}%
}+\underbrace{\left(  a-b\right)  a^{m-3}b^{2}}_{=a^{m-2}b^{2}-a^{m-3}b^{3}%
}+\cdots+\underbrace{\left(  a-b\right)  ab^{m-2}}_{=a^{2}b^{m-2}-ab^{m-1}%
}+\underbrace{\left(  a-b\right)  b^{m-1}}_{=ab^{m-1}-b^{m}}\nonumber\\
&  =\left(  a^{m}-a^{m-1}b\right)  +\left(  a^{m-1}b-a^{m-2}b^{2}\right)
+\left(  a^{m-2}b^{2}-a^{m-3}b^{3}\right) \nonumber\\
&  \ \ \ \ \ \ \ \ \ \ +\cdots+\left(  a^{2}b^{m-2}-ab^{m-1}\right)  +\left(
ab^{m-1}-b^{m}\right)  . \label{pf.thm.alg.gs.tls}%
\end{align}
A close look at the right hand side reveals that almost all of its terms
cancel each other: To wit, each term other than the \textquotedblleft bookend
terms\textquotedblright\ $a^{m}$ and $b^{m}$ has the form $a^{m-i}b^{i}$ for
some $i\in\left\{  1,2,\ldots,m-1\right\}  $, and appears once with a $+$ sign
and once with a $-$ sign (which, of course, means that its two appearances
cancel out). Thus, the right hand side equals $a^{m}-b^{m}$. Thus,
(\ref{pf.thm.alg.gs.tls}) simplifies to%
\[
\left(  a-b\right)  \left(  a^{m-1}+a^{m-2}b+a^{m-3}b^{2}+\cdots
+ab^{m-2}+b^{m-1}\right)  =a^{m}-b^{m}.
\]
This proves Theorem \ref{thm.alg.gs}. (A pedantic reader will observe that our
\textquotedblleft cancellation\textquotedblright\ argument does not work for
$m=0$, in which case there are no terms on the right hand side to begin with.
But this case can be safely left aside as obvious.)
\end{proof}

We can now finish our second, direct solution to Exercise \ref{exe.alg.e2}:
Write the polynomial $P\left(  x\right)  $ in the form $P\left(  x\right)
=\sum_{m=0}^{d}p_{m}x^{m}$, where $p_{0},p_{1},\ldots,p_{d}$ are integers (the
coefficients of $P\left(  x\right)  $). Then, $P\left(  a\right)  =\sum
_{m=0}^{d}p_{m}a^{m}$ and $P\left(  b\right)  =\sum_{m=0}^{d}p_{m}b^{m}$, so
that%
\begin{align*}
P\left(  a\right)  -P\left(  b\right)   &  =\sum_{m=0}^{d}p_{m}a^{m}%
-\sum_{m=0}^{d}p_{m}b^{m}\\
&  =\sum_{m=0}^{d}p_{m}\underbrace{\left(  a^{m}-b^{m}\right)  }%
_{\substack{=\left(  a-b\right)  \left(  a^{m-1}+a^{m-2}b+a^{m-3}b^{2}%
+\cdots+ab^{m-2}+b^{m-1}\right)  \\\text{(by Theorem \ref{thm.alg.gs})}}}\\
&  =\sum_{m=0}^{d}p_{m}\left(  a-b\right)  \left(  a^{m-1}+a^{m-2}%
b+a^{m-3}b^{2}+\cdots+ab^{m-2}+b^{m-1}\right) \\
&  =\left(  a-b\right)  \cdot\underbrace{\sum_{m=0}^{d}p_{m}\left(
a^{m-1}+a^{m-2}b+a^{m-3}b^{2}+\cdots+ab^{m-2}+b^{m-1}\right)  }_{\text{This is
obviously an integer!}}.
\end{align*}
This immediately yields $a-b\mid P\left(  a\right)  -P\left(  b\right)  $.
Thus, Exercise \ref{exe.alg.e2} is solved again.
\end{proof}

Some more comments are worth making here. First, Theorem \ref{thm.alg.gs} has
an analogue for $a^{m}+b^{m}$ instead of $a+b$, which however requires $m$ to
be odd:

\begin{theorem}
\label{thm.alg.gs-odd}Let $a$ and $b$ be any two numbers (not necessarily
integers), and let $m\in\mathbb{N}$ be odd. Then,%
\[
a^{m}+b^{m}=\left(  a+b\right)  \underbrace{\left(  a^{m-1}-a^{m-2}%
b+a^{m-3}b^{2}\pm\cdots-ab^{m-2}+b^{m-1}\right)  }_{=\sum_{k=0}^{m-1}\left(
-1\right)  ^{m-1-k}a^{k}b^{m-1-k}}.
\]

\end{theorem}

\begin{proof}
Apply Theorem \ref{thm.alg.gs} to $-b$ instead of $b$, and use the fact that
$\left(  -b\right)  ^{m}=-b^{m}$ (which is a consequence of $m$ being odd).
\end{proof}

For example, for $m=3$, Theorem \ref{thm.alg.gs-odd} is saying that%
\begin{equation}
a^{3}+b^{3}=\left(  a+b\right)  \left(  a^{2}-ab+b^{2}\right)
\label{eq.thm.alg.gs-odd.3}%
\end{equation}
for any numbers $a$ and $b$.

When $m$ is even, there is no such formula as Theorem \ref{thm.alg.gs-odd},
and indeed $a^{m}+b^{m}$ is not usually divisible by $a+b$ in this case (for
example, $a=1$ and $b=2$ and $m=2$).

\subsubsection{The telescope principle}

Let us also state the \textquotedblleft cancellation\textquotedblright%
\ argument that we used to simplify the right hand side of
(\ref{pf.thm.alg.gs.tls}) explicitly as a theorem:

\begin{theorem}
\label{thm.seqsum.telesc-fwd}Let $u$ and $v$ be two integers such that
$u-1\leq v$. Let $a_{s}$ be a number for each $s\in\left\{  u,u+1,\ldots
,v+1\right\}  $. Then,%
\[
\sum_{s=u}^{v}\left(  a_{s}-a_{s+1}\right)  =a_{u}-a_{v+1}.
\]

\end{theorem}

\begin{fineprint}
\begin{proof}
We have%
\[
\sum_{s=u}^{v}\left(  a_{s}-a_{s+1}\right)  =\left(  a_{u}-a_{u+1}\right)
+\left(  a_{u+1}-a_{u+2}\right)  +\left(  a_{u+2}-a_{u+3}\right)
+\cdots+\left(  a_{v}-a_{v+1}\right)  .
\]
If $v\geq u$, then all terms on the right hand side cancel out except for the
two \textquotedblleft bookend terms\textquotedblright\ $a_{u}$ and $a_{v+1}$;
thus we are left with the difference $a_{u}-a_{v+1}$. Thus, Theorem
\ref{thm.seqsum.telesc-fwd} holds if $v\geq u$. The case $v=u-1$ is even more
obvious (as the theorem is just saying that $0=0$ in that case).

Alternatively, Theorem \ref{thm.seqsum.telesc-fwd} can also be proved by a
completely straightforward induction on $v$.
\end{proof}
\end{fineprint}

Theorem \ref{thm.seqsum.telesc-fwd} is called the \emph{telescope principle
for sums} since the cancelling terms in the proof make the sum
\textquotedblleft fold like a telescope\textquotedblright. Here is an
alternative version of the principle (with \textquotedblleft
backward\textquotedblright\ instead of \textquotedblleft
forward\textquotedblright\ differences):

\begin{theorem}
[telescope principle for sums]\label{thm.seqsum.telesc}Let $u$ and $v$ be two
integers such that $u-1\leq v$. Let $a_{s}$ be a number for each $s\in\left\{
u-1,u,\ldots,v\right\}  $. Then,%
\[
\sum_{s=u}^{v}\left(  a_{s}-a_{s-1}\right)  =a_{v}-a_{u-1}.
\]

\end{theorem}

\begin{fineprint}
\begin{proof}
The same cancellation argument as in Theorem \ref{thm.seqsum.telesc-fwd} works
here, except that the cancelling terms are slightly further from each other.
Alternatively, this can easily be derived from Theorem
\ref{thm.seqsum.telesc-fwd} as follows: Set
\[
b_{i}:=-a_{i-1}\ \ \ \ \ \ \ \ \ \ \text{for each }i\in\left\{  u,u+1,\ldots
,v+1\right\}  .
\]
Then, for each $s\in\left\{  u,u+1,\ldots,v\right\}  $, we have%
\[
\underbrace{b_{s}}_{=-a_{s-1}}-\underbrace{b_{s+1}}_{=-a_{\left(  s+1\right)
-1}=-a_{s}}=\left(  -a_{s-1}\right)  -\left(  -a_{s}\right)  =a_{s}-a_{s-1}.
\]
Hence,%
\[
\sum_{s=u}^{v}\underbrace{\left(  b_{s}-b_{s+1}\right)  }_{=a_{s}-a_{s-1}%
}=\sum_{s=u}^{v}\left(  a_{s}-a_{s-1}\right)  .
\]
Comparing this with%
\begin{align*}
\sum_{s=u}^{v}\left(  b_{s}-b_{s+1}\right)   &  =\underbrace{b_{u}}%
_{=-a_{u-1}}-\underbrace{b_{v+1}}_{\substack{=-a_{\left(  v+1\right)
-1}\\=-a_{v}}}\ \ \ \ \ \ \ \ \ \ \left(  \text{by Theorem
\ref{thm.seqsum.telesc-fwd}, applied to }b_{i}\text{ instead of }a_{i}\right)
\\
&  =\left(  -a_{u-1}\right)  -\left(  -a_{v}\right)  =a_{v}-a_{u-1},
\end{align*}
we obtain $\sum_{s=u}^{v}\left(  a_{s}-a_{s-1}\right)  =a_{v}-a_{u-1}$. This
proves Theorem \ref{thm.seqsum.telesc}.
\end{proof}
\end{fineprint}

The telescope principle is often useful in computing or simplifying sums. When
one applies Theorem \ref{thm.seqsum.telesc-fwd} to simplify a sum of the form
$\sum_{s=u}^{v}\left(  a_{s}-a_{s+1}\right)  $ (or Theorem
\ref{thm.seqsum.telesc} to simplify a sum of the form $\sum_{s=u}^{v}\left(
a_{s}-a_{s-1}\right)  $), one says that the sum \emph{telescopes} to
$a_{u}-a_{v+1}$ (or $a_{v}-a_{u-1}$, respectively). Let me give two more
examples of telescoping sums: an easy and a less easy one. The easy one is
actually a famous property of factorials that can be easily proved by induction:

\begin{exercise}
\label{exe.alg.e25}Let $n\in\mathbb{N}$. Prove that%
\[
\sum_{k=1}^{n}k\cdot k!=\left(  n+1\right)  !-1.
\]

\end{exercise}

\begin{proof}
[Solution idea.]We want to make the sum $\sum_{k=1}^{n}k\cdot k!$ telescope.
To do so, we need to write its addend $k\cdot k!$ as a difference
$a_{k}-a_{k-1}$ for some numbers $a_{0},a_{1},\ldots,a_{n}$ (or to write it as
$a_{k}-a_{k+1}$ for some numbers $a_{1},a_{2},\ldots,a_{n+1}$, but this boils
down to the same thing because we can just multiply all the numbers by $-1$
and move them one step to the right). How can we find such numbers
$a_{0},a_{1},\ldots,a_{n}$ ? (They are not determined uniquely, but we just
need to find one good choice.)

A bit of \textquotedblleft backwards reasoning\textquotedblright\ helps us
guess what these numbers should be: If we write $k\cdot k!$ as $a_{k}-a_{k-1}%
$, then the sum $\sum_{k=1}^{n}k\cdot k!$ becomes $\sum_{k=1}^{n}\left(
a_{k}-a_{k-1}\right)  =a_{n}-a_{0}$ (by the telescope principle). But we want
to prove that this sum is $\left(  n+1\right)  !-1$. The simplest way how this
could happen is if $a_{n}=\left(  n+1\right)  !$ and $a_{0}=1$. And this, in
turn, leads us to guess that $a_{i}=\left(  i+1\right)  !$ for each
$i\in\left\{  0,1,\ldots,n\right\}  $ (because $1$ is nothing but $1!$).

Let us see if this guess is right. We set $a_{i}:=\left(  i+1\right)  !$ for
each $i\in\left\{  0,1,\ldots,n\right\}  $; then we just need to prove that
$k\cdot k!=a_{k}-a_{k-1}$ for each $k\in\left\{  1,2,\ldots,n\right\}  $. But
this follows from a simple computation:%
\[
\underbrace{a_{k}}_{=\left(  k+1\right)  !}-\underbrace{a_{k-1}}%
_{\substack{=\left(  \left(  k-1\right)  +1\right)  !\\=k!}%
}=\underbrace{\left(  k+1\right)  !}_{=\left(  k+1\right)  \cdot
k!}-k!=\left(  k+1\right)  \cdot k!-k!=k\cdot k!,
\]
so that $k\cdot k!=a_{k}-a_{k-1}$. Hence,
\begin{align*}
\sum_{k=1}^{n}\underbrace{k\cdot k!}_{=a_{k}-a_{k-1}}  &  =\sum_{k=1}%
^{n}\left(  a_{k}-a_{k-1}\right) \\
&  =\underbrace{a_{n}}_{=\left(  n+1\right)  !}-\underbrace{a_{0}%
}_{\substack{=\left(  0+1\right)  !\\=1!=1}}\ \ \ \ \ \ \ \ \ \ \left(
\begin{array}
[c]{c}%
\text{by the telescope principle}\\
\text{(Theorem \ref{thm.seqsum.telesc})}%
\end{array}
\right) \\
&  =\left(  n+1\right)  !-1,
\end{align*}
qed.
\end{proof}

Now comes the harder example:

\begin{exercise}
\label{exe.alg.e3}Let $n\in\mathbb{N}$. Prove that
\[
\sum_{k=0}^{n}\left(  -1\right)  ^{k}k!\left(  n-k\right)  !=%
\begin{cases}
\dfrac{2\left(  n+1\right)  !}{n+2}, & \text{if }n\text{ is even};\\
0, & \text{if }n\text{ is odd.}%
\end{cases}
\]

\end{exercise}

\begin{proof}
[Solution idea.]Again, we want to make the sum telescope. That is, we want to
write the addend $\left(  -1\right)  ^{k}k!\left(  n-k\right)  !$ in the form
$a_{k}-a_{k+1}$ for some numbers $a_{0},a_{1},\ldots,a_{n+1}$. How can we find
such numbers $a_{0},a_{1},\ldots,a_{n+1}$ ?

Let us get the $\left(  -1\right)  ^{k}$ out of the way first. To have
$\left(  -1\right)  ^{k}k!\left(  n-k\right)  !=a_{k}-a_{k+1}$ is tantamount
to having $k!\left(  n-k\right)  !=\left(  -1\right)  ^{k}\left(
a_{k}-a_{k+1}\right)  $. If we set
\[
b_{i}:=\left(  -1\right)  ^{i}a_{i}\ \ \ \ \ \ \ \ \ \ \text{for each }%
i\in\left\{  0,1,\ldots,n+1\right\}  ,
\]
then the latter equation rewrites as $k!\left(  n-k\right)  !=b_{k}+b_{k+1}$,
because we have
\[
\underbrace{b_{k}}_{=\left(  -1\right)  ^{k}a_{k}}+\underbrace{b_{k+1}%
}_{\substack{=\left(  -1\right)  ^{k+1}a_{k+1}\\=-\left(  -1\right)
^{k}a_{k+1}}}=\left(  -1\right)  ^{k}a_{k}-\left(  -1\right)  ^{k}%
a_{k+1}=\left(  -1\right)  ^{k}\left(  a_{k}-a_{k+1}\right)  .
\]
Thus, we want to find $n+2$ numbers $b_{0},b_{1},\ldots,b_{n+1}$ such that
$k!\left(  n-k\right)  !=b_{k}+b_{k+1}$ for all $k\in\left\{  0,1,\ldots
,n\right\}  $.

We fix $k\in\left\{  0,1,\ldots,n\right\}  $ and start playing around with
$k!\left(  n-k\right)  !$. On the one hand, from $\left(  k+1\right)
!=\left(  k+1\right)  \cdot k!$, we obtain $k!=\dfrac{\left(  k+1\right)
!}{k+1}$, so that%
\begin{align}
k!\left(  n-k\right)  !  &  =\dfrac{\left(  k+1\right)  !}{k+1}\cdot\left(
n-k\right)  !\nonumber\\
&  =\dfrac{\left(  k+1\right)  !\left(  n-k\right)  !}{k+1}.
\label{sol.alg.e3.1}%
\end{align}
On the other hand, from $\left(  n-k+1\right)  !=\left(  n-k+1\right)
\cdot\left(  n-k\right)  !$, we obtain $\left(  n-k\right)  !=\dfrac{\left(
n-k+1\right)  !}{n-k+1}$, so that%
\begin{align}
k!\left(  n-k\right)  !  &  =k!\cdot\dfrac{\left(  n-k+1\right)  !}%
{n-k+1}\nonumber\\
&  =\dfrac{k!\left(  n-k+1\right)  !}{n-k+1}. \label{sol.alg.e3.2}%
\end{align}


A ray of hope shines through: The numerator in (\ref{sol.alg.e3.1}) is the
same as the numerator in (\ref{sol.alg.e3.2}) with $k$ replaced by $k+1$. That
is, if the numerator in (\ref{sol.alg.e3.2}) was $b_{k}$, then the numerator
in (\ref{sol.alg.e3.1}) would be $b_{k+1}$. In order to obtain $b_{k}+b_{k+1}%
$, we thus somehow need to add the numerators and hope the result is still
$k!\left(  n-k\right)  !$. And we would also want the denominators to
disappear, or at least to become independent of $k$.

This is a lot to wish for, but it does indeed come true! The helpful fairy
here is the following lemma:

\begin{lemma}
[equal fractions lemma]\label{lem.efractions}Let $a,b,c,d,x$ be five real
numbers such that $b\neq0$ and $d\neq0$ and $b+d\neq0$ and%
\[
x=\dfrac{a}{b}=\dfrac{c}{d}.
\]
Then,%
\[
x=\dfrac{a+c}{b+d}.
\]

\end{lemma}

In other words, this lemma is saying that if two fractions are equal, then the
fraction obtained by adding their numerators and adding their denominators is
also equal to them (as long as its denominator is nonzero). The proof is so
easy that one might question whether the lemma deserves a name; but it is a
useful fact.

Now, recall the equalities (\ref{sol.alg.e3.1}) and (\ref{sol.alg.e3.2}).
Thanks to these two equalities, we can apply Lemma \ref{lem.efractions} to
$x=k!\left(  n-k\right)  !$ and $a=\left(  k+1\right)  !\left(  n-k\right)  !$
and $b=k+1$ and $c=k!\left(  n-k+1\right)  !$ and $d=n-k+1$. We thus obtain%
\begin{align}
&  k!\left(  n-k\right)  !\nonumber\\
&  =\dfrac{\left(  k+1\right)  !\left(  n-k\right)  !+k!\left(  n-k+1\right)
!}{\left(  k+1\right)  +\left(  n-k+1\right)  }\nonumber\\
&  =\dfrac{\left(  k+1\right)  !\left(  n-k\right)  !+k!\left(  n-k+1\right)
!}{n+2}\ \ \ \ \ \ \ \ \ \ \left(  \text{since }\left(  k+1\right)  +\left(
n-k+1\right)  =n+2\right) \nonumber\\
&  =\dfrac{\left(  k+1\right)  !\left(  n-k\right)  !}{n+2}+\dfrac{k!\left(
n-k+1\right)  !}{n+2}\nonumber\\
&  =\dfrac{k!\left(  n-k+1\right)  !}{n+2}+\dfrac{\left(  k+1\right)  !\left(
n-k\right)  !}{n+2}. \label{sol.alg.e3.5}%
\end{align}


Now it is clear what to do: We set
\begin{equation}
b_{i}:=\dfrac{i!\left(  n-i+1\right)  !}{n+2}\ \ \ \ \ \ \ \ \ \ \text{for
each }i\in\left\{  0,1,\ldots,n+1\right\}  . \label{sol.alg.e3.b}%
\end{equation}
Then, (\ref{sol.alg.e3.5}) rewrites as%
\begin{equation}
k!\left(  n-k\right)  !=b_{k}+b_{k+1}. \label{sol.alg.e3.6}%
\end{equation}
If we furthermore set%
\begin{equation}
a_{i}:=\left(  -1\right)  ^{i}b_{i}\ \ \ \ \ \ \ \ \ \ \text{for each }%
i\in\left\{  0,1,\ldots,n+1\right\}  \label{sol.alg.e3.a}%
\end{equation}
(so that we have $b_{i}=\left(  -1\right)  ^{i}a_{i}$, as intended above),
then we have%
\begin{align*}
\left(  -1\right)  ^{k}\underbrace{k!\left(  n-k\right)  !}_{\substack{=b_{k}%
+b_{k+1}\\\text{(by (\ref{sol.alg.e3.6}))}}}  &  =\left(  -1\right)
^{k}\left(  b_{k}+b_{k+1}\right)  =\left(  -1\right)  ^{k}b_{k}%
+\underbrace{\left(  -1\right)  ^{k}}_{=-\left(  -1\right)  ^{k+1}}b_{k+1}\\
&  =\underbrace{\left(  -1\right)  ^{k}b_{k}}_{\substack{=a_{k}\\\text{(by
(\ref{sol.alg.e3.a}))}}}-\underbrace{\left(  -1\right)  ^{k+1}b_{k+1}%
}_{\substack{=a_{k+1}\\\text{(by (\ref{sol.alg.e3.a}))}}}=a_{k}-a_{k+1}.
\end{align*}


Forget that we fixed $k$. We thus have proved that $\left(  -1\right)
^{k}k!\left(  n-k\right)  !=a_{k}-a_{k+1}$ for all $k\in\left\{
0,1,\ldots,n\right\}  $ (where the $b_{i}$ are defined by (\ref{sol.alg.e3.b}%
), and the $a_{i}$ are defined by (\ref{sol.alg.e3.a})). Thus,
\[
\sum_{k=0}^{n}\underbrace{\left(  -1\right)  ^{k}k!\left(  n-k\right)
!}_{=a_{k}-a_{k+1}}=\sum_{k=0}^{n}\left(  a_{k}-a_{k+1}\right)  =a_{0}-a_{n+1}%
\]
(by the telescope principle\footnote{or, to be specific, by Theorem
\ref{thm.seqsum.telesc-fwd}, applied to $u=0$ and $v=n$}). In view of%
\begin{align*}
a_{0}  &  =\underbrace{\left(  -1\right)  ^{0}}_{=1}b_{0}%
\ \ \ \ \ \ \ \ \ \ \left(  \text{by (\ref{sol.alg.e3.a})}\right) \\
&  =b_{0}=\dfrac{0!\left(  n-0+1\right)  !}{n+2}\ \ \ \ \ \ \ \ \ \ \left(
\text{by (\ref{sol.alg.e3.b})}\right) \\
&  =\dfrac{\left(  n+1\right)  !}{n+2}%
\end{align*}
and%
\[
a_{n+1}=\left(  -1\right)  ^{n+1}\dfrac{\left(  n+1\right)  !}{n+2}%
\ \ \ \ \ \ \ \ \ \ \left(  \text{by a similar computation}\right)  ,
\]
we can rewrite this as
\begin{align*}
\sum_{k=0}^{n}\left(  -1\right)  ^{k}k!\left(  n-k\right)  !  &
=\dfrac{\left(  n+1\right)  !}{n+2}-\left(  -1\right)  ^{n+1}\dfrac{\left(
n+1\right)  !}{n+2}\\
&  =\underbrace{\left(  1-\left(  -1\right)  ^{n+1}\right)  }_{=%
\begin{cases}
2, & \text{if }n\text{ is even};\\
0, & \text{if }n\text{ is odd}%
\end{cases}
}\dfrac{\left(  n+1\right)  !}{n+2}\\
&  =%
\begin{cases}
2, & \text{if }n\text{ is even};\\
0, & \text{if }n\text{ is odd}%
\end{cases}
\ \ \cdot\dfrac{\left(  n+1\right)  !}{n+2}=%
\begin{cases}
\dfrac{2\left(  n+1\right)  !}{n+2}, & \text{if }n\text{ is even};\\
0, & \text{if }n\text{ is odd.}%
\end{cases}
\end{align*}
This solves Exercise \ref{exe.alg.e3}.
\end{proof}

Many other examples of the use of the telescope principle are found in
\cite[\S 4.1.4]{20f}.

\subsubsection{Simon's Favorite Factoring Trick}

Let us go back to some number theory:

\begin{exercise}
\label{exe.alg.e4}Let $n$ be a positive integer. Let $u$ be the number of
pairs $\left(  j,k\right)  $ of positive integers satisfying $\dfrac{1}%
{j}-\dfrac{1}{k}=\dfrac{1}{n}$.

Prove that $u$ is the number of all integers $i\in\left\{  1,2,\ldots
,n-1\right\}  $ satisfying $i\mid n^{2}$.
\end{exercise}

\begin{proof}
[Solution idea.](See \cite[\S A.11.5]{20f} for details.) The core of the
solution is the following chain of equivalences (which holds for any three
nonzero numbers $j,k,n$, not just for integers):%
\begin{align*}
&  \left(  \dfrac{1}{j}-\dfrac{1}{k}=\dfrac{1}{n}\right) \\
\Longleftrightarrow\  &  \left(  nk-nj=jk\right)  \ \ \ \ \ \ \ \ \ \ \left(
\text{here, we multiplied both sides by }njk\right) \\
\Longleftrightarrow\  &  \left(  nk-nj-jk=0\right) \\
\Longleftrightarrow\  &  \left(  nk-nj-jk+n^{2}=n^{2}\right)
\ \ \ \ \ \ \ \ \ \ \left(
\begin{array}
[c]{c}%
\text{here, we added }n^{2}\text{ to both sides}\\
\text{for no visible reason}%
\end{array}
\right) \\
\Longleftrightarrow\  &  \left(  \left(  n-j\right)  \left(  n+k\right)
=n^{2}\right)  \ \ \ \ \ \ \ \ \ \ \left(  \text{since }nk-nj-jk+n^{2}=\left(
n-j\right)  \left(  n+k\right)  \right)  .
\end{align*}
This transformation is known as \emph{Simon's favorite factoring trick} (a
moniker it has gotten on the early 2000's webforums; its discovery, I am sure,
predates whatever Simon it is referring to). In a way, it is similar to
\textquotedblleft completing the square\textquotedblright: a quadratic
expression (in our case, $nk-nj-jk$) is made to factor by adding a new addend
to it.

The trick gives the exercise away. Indeed, replacing the condition $\dfrac
{1}{j}-\dfrac{1}{k}=\dfrac{1}{n}$ in the exercise by the equivalent relation
$\left(  n-j\right)  \left(  n+k\right)  =n^{2}$, we see immediately what
these pairs $\left(  j,k\right)  $ have to do with divisors of $n^{2}$.
Namely, if $\left(  j,k\right)  $ is a pair of positive integers satisfying
$\dfrac{1}{j}-\dfrac{1}{k}=\dfrac{1}{n}$, then $n-j$ is an integer
$i\in\left\{  1,2,\ldots,n-1\right\}  $ satisfying $i\mid n^{2}$ (indeed,
$\left(  n-j\right)  \left(  n+k\right)  =n^{2}$ yields that $n-j\mid n^{2}$,
and furthermore it shows that $n-j$ is positive (why?); but $n-j$ is also
$\leq n-1$ (since $j\geq1$)). Thus, we have found a map
\begin{align*}
&  \text{from the set }\left\{  \text{pairs }\left(  j,k\right)  \text{ of
positive integers satisfying }\dfrac{1}{j}-\dfrac{1}{k}=\dfrac{1}{n}\right\}
\\
&  \text{to the set }\left\{  \text{integers }i\in\left\{  1,2,\ldots
,n-1\right\}  \text{ satisfying }i\mid n^{2}\right\}
\end{align*}
which sends a pair $\left(  j,k\right)  $ to $n-j$. Let us denote this map by
$f$.

Conversely, we can define a map $g$%
\begin{align*}
&  \text{from the set }\left\{  \text{integers }i\in\left\{  1,2,\ldots
,n-1\right\}  \text{ satisfying }i\mid n^{2}\right\} \\
&  \text{to the set }\left\{  \text{pairs }\left(  j,k\right)  \text{ of
positive integers satisfying }\dfrac{1}{j}-\dfrac{1}{k}=\dfrac{1}{n}\right\}
\end{align*}
which sends each $i$ in the former set to the pair $\left(  n-i,\ \dfrac
{n^{2}}{i}-n\right)  $. It is straightforward to check that this map $g$ is
well-defined and inverse to $f$. (Indeed, the definition of $g$ was obtained
by solving for the pair $\left(  j,k\right)  $ satisfying $\dfrac{1}{j}%
-\dfrac{1}{k}=\dfrac{1}{n}$ and $n-j=i$.)

Now, the map $f$ is invertible (since $g$ is inverse to $f$), thus a
bijection\footnote{Reminder: \textquotedblleft Bijection\textquotedblright%
\ means \textquotedblleft bijective map\textquotedblright\ (also known as
\textquotedblleft one-to-one correspondence\textquotedblright).}. Hence, we
have found a bijection
\begin{align*}
&  \text{from the set }\left\{  \text{integers }i\in\left\{  1,2,\ldots
,n-1\right\}  \text{ satisfying }i\mid n^{2}\right\} \\
&  \text{to the set }\left\{  \text{pairs }\left(  j,k\right)  \text{ of
positive integers satisfying }\dfrac{1}{j}-\dfrac{1}{k}=\dfrac{1}{n}\right\}
\end{align*}
(namely, $f$). This shows that these two sets have the same size. In other
words, the number of all integers $i\in\left\{  1,2,\ldots,n-1\right\}  $
satisfying $i\mid n^{2}$ equals the number of all pairs $\left(  j,k\right)  $
of positive integers satisfying $\dfrac{1}{j}-\dfrac{1}{k}=\dfrac{1}{n}$.
Since the latter number is $u$, we have thus solved Exercise \ref{exe.alg.e4}.
\end{proof}

\subsubsection{Factoring polynomials}

We now come back to inequalities:

\begin{exercise}
\label{exe.alg.e5}Let $a,b,c$ be three nonnegative reals. Prove the inequality%
\[
a^{3}+b^{3}+c^{3}\geq3abc.
\]

\end{exercise}

\begin{proof}
[Solution idea.]This is similar to Exercise \ref{exe.alg.e1}, in that there is
again a magical one-paragraph solution:

\begin{proof}
[First solution to Exercise \ref{exe.alg.e5}.]Expanding the product
\newline$\left(  a+b+c\right)  \left(  a^{2}+b^{2}+c^{2}-bc-ca-ab\right)  $,
we obtain%
\begin{align}
&  \left(  a+b+c\right)  \left(  a^{2}+b^{2}+c^{2}-bc-ca-ab\right) \nonumber\\
&  =a^{3}+b^{3}+c^{3}-3abc. \label{sol.alg.e1.fac}%
\end{align}
Hence,
\[
a^{3}+b^{3}+c^{3}-3abc=\underbrace{\left(  a+b+c\right)  }_{\geq
0}\underbrace{\left(  a^{2}+b^{2}+c^{2}-bc-ca-ab\right)  }_{\substack{\geq
0\\\text{(since Exercise \ref{exe.alg.e1}}\\\text{says that }a^{2}+b^{2}%
+c^{2}\geq bc+ca+ab\text{)}}}\geq0.
\]
In other words, $a^{3}+b^{3}+c^{3}\geq3abc$. This solves Exercise
\ref{exe.alg.e5}.
\end{proof}

This is nice, but again completely unmotivated: How would one find the
identity (\ref{sol.alg.e1.fac}) if one didn't already know its left hand side?

There are, in fact, several ways. One is to treat $a,b,c$ as indeterminates
and try to factor the polynomial $a^{3}+b^{3}+c^{3}-3abc$. Factoring a
multivariate polynomial is not trivial, but there are algorithms that do it
mechanically (see, e.g., \url{https://math.stackexchange.com/q/3127648} for an
outline of such an algorithm). Sadly, these algorithms are too slow to be
useful on an exam, particularly when one is not sure whether a nontrivial
factorization actually exists (very often, it does not, so one would just
waste time looking for one!) and whether it will be helpful to solving the problem.

But when general methods fail, tricks can save the day. One trick is to reduce
the polynomial to a univariate one by fixing two of $a,b,c$. For example, if
$b=1$ and $c=1$, then the polynomial $a^{3}+b^{3}+c^{3}-3abc$ becomes
$a^{3}+1^{3}+1^{3}-3a\cdot1\cdot1=a^{3}-3a+2$, which can be easily factored by
finding rational roots (see
\href{https://en.wikipedia.org/wiki/Rational_root_theorem#Examples}{the
Wikipedia page for \textquotedblleft rational root theorem\textquotedblright}
for how this works). Thus one obtains the factorization $a^{3}-3a+2=\left(
a+2\right)  \left(  a-1\right)  ^{2}$. Likewise, setting $b=2$ and $c=1$, one
obtains the factorization $\left(  a+3\right)  \left(  a^{2}-3a+3\right)  $.
Of course, one should not forget simple cases like $b=0$ and $c=0$, in which
case the factorization $a^{3}$ comes out, or $b=0$ and $c=1$, in which case it
is $\left(  a+1\right)  \left(  a^{2}-a+1\right)  $. Based on these examples,
one might suspect that $a+b+c$ is always a factor in the factorization; that
is, there should be some polynomial $P$ in $a,b,c$ such that
\[
a^{3}+b^{3}+c^{3}-3abc=\left(  a+b+c\right)  \cdot P\left(  a,b,c\right)  .
\]
This polynomial $P$ should be quadratic (for degree reasons), and it can be
found by polynomial division (dividing $a^{3}+b^{3}+c^{3}-3abc$ by $a+b+c$),
again treating $b$ and $c$ as constants (but not specifying their values).
Thus one is led to (\ref{sol.alg.e1.fac}).

Yet another way to discover (\ref{sol.alg.e1.fac}) (using less work but more
insight) is the following:%
\begin{align*}
&  a^{3}+b^{3}+c^{3}-3abc\\
&  =a^{3}+b^{3}-\underbrace{\left(  a+b\right)  ^{3}}_{=a^{3}+3a^{2}%
b+3ab^{2}+b^{3}}+\left(  a+b\right)  ^{3}+c^{3}-3abc\\
&  =\underbrace{a^{3}+b^{3}-\left(  a^{3}+3a^{2}b+3ab^{2}+b^{3}\right)
}_{\substack{=-3a^{2}b-3ab^{2}\\=-3ab\left(  a+b\right)  }%
}+\underbrace{\left(  a+b\right)  ^{3}+c^{3}}_{\substack{=\left(  \left(
a+b\right)  +c\right)  \left(  \left(  a+b\right)  ^{2}-\left(  a+b\right)
c+c^{2}\right)  \\\text{(by (\ref{eq.thm.alg.gs-odd.3}), applied to }a+b\text{
and }c\\\text{instead of }a\text{ and }b\text{)}}}-\,3abc\\
&  =-3ab\left(  a+b\right)  +\left(  \left(  a+b\right)  +c\right)  \left(
\left(  a+b\right)  ^{2}-\left(  a+b\right)  c+c^{2}\right)  -3abc\\
&  =\underbrace{-3ab\left(  a+b\right)  -3abc}_{=-3ab\left(  a+b+c\right)
}+\underbrace{\left(  \left(  a+b\right)  +c\right)  }_{=a+b+c}\left(  \left(
a+b\right)  ^{2}-\left(  a+b\right)  c+c^{2}\right)  \\
&  =-3ab\left(  a+b+c\right)  +\left(  a+b+c\right)  \left(  \left(
a+b\right)  ^{2}-\left(  a+b\right)  c+c^{2}\right)  \\
&  =\left(  a+b+c\right)  \underbrace{\left(  -3ab+\left(  \left(  a+b\right)
^{2}-\left(  a+b\right)  c+c^{2}\right)  \right)  }_{\substack{=a^{2}%
+b^{2}+c^{2}-bc-ca-ab\\\text{(by expanding the squares and products)}}}\\
&  =\left(  a+b+c\right)  \left(  a^{2}+b^{2}+c^{2}-bc-ca-ab\right)  .
\end{align*}


However, discovering (\ref{sol.alg.e1.fac}) is not the only way to solve
Exercise \ref{exe.alg.e5}. There are several other approaches. Here is one
that is particularly dear to my heart.

We recall our Third solution to Exercise \ref{exe.alg.e1} above. In that
solution, we have \textquotedblleft completed a square\textquotedblright,
which was possible because the polynomial in question was quadratic.
Unfortunately, our polynomial $a^{3}+b^{3}+c^{3}-3abc$ is cubic in each of its
variables, so this does not work. However, we can do something ludicrous: We
introduce another variable in which the polynomial will have a lower degree!

For brevity, we set $F\left(  a,b,c\right)  :=a^{3}+b^{3}+c^{3}-3abc$ (so that
the claim of Exercise \ref{exe.alg.e5} can be rewritten as $F\left(
a,b,c\right)  \geq0$), and we consider the polynomial $F\left(
a+d,b+d,c+d\right)  $, where $d$ is a new indeterminate. (That is, we shift
each of $a,b,c$ by the same indeterminate amount $d$.) It is easy to see that
this new polynomial $F\left(  a+d,b+d,c+d\right)  $ will have degree at most
$2$ in $d$, since the $d^{3}$-terms all cancel out:%
\[
F\left(  a+d,b+d,c+d\right)  =\underbrace{\left(  a+d\right)  ^{3}+\left(
b+d\right)  ^{3}+\left(  c+d\right)  ^{3}}_{=3d^{3}+\left(  \text{lower powers
of }d\right)  }-\,3\underbrace{\left(  a+d\right)  \left(  b+d\right)  \left(
c+d\right)  }_{=d^{3}+\left(  \text{lower powers of }d\right)  }%
\]
(where we treat $a,b,c$ as constants). This makes $F\left(
a+d,b+d,c+d\right)  $ a good candidate for \textquotedblleft completing the
square\textquotedblright.

Actually computing this polynomial $F\left(  a+d,b+d,c+d\right)  $ reveals
that it is not quadratic but linear in $d$:%
\[
F\left(  a+d,b+d,c+d\right)  =\left(  a^{3}+b^{3}+c^{3}-3abc\right)
+3d\left(  a^{2}+b^{2}+c^{2}-bc-ca-ab\right)  .
\]
This is not quite what we wanted (there is no square to complete), but it
points us in a new direction: For any $d\geq0$ and any $a,b,c\in\mathbb{R}$,
we have%
\begin{align}
F\left(  a+d,b+d,c+d\right)   &  =\underbrace{\left(  a^{3}+b^{3}%
+c^{3}-3abc\right)  }_{=F\left(  a,b,c\right)  }+\,3d\underbrace{\left(
a^{2}+b^{2}+c^{2}-bc-ca-ab\right)  }_{\substack{\geq0\\\text{(by Exercise
\ref{exe.alg.e1})}}}\nonumber\\
&  \geq F\left(  a,b,c\right)  +3d\cdot0=F\left(  a,b,c\right)
.\label{sol.alg.e5.grow}%
\end{align}
In other words, if we shift each of $a,b,c$ to the right\footnote{on the real
axis} by one and the same nonnegative amount $d$, then the value $F\left(
a,b,c\right)  $ can only increase. Thus, conversely, if we shift each of
$a,b,c$ to the left by one and the same nonnegative amount $d$, then the value
$F\left(  a,b,c\right)  $ can only decrease. However, by this kind of
left-shift, we can always achieve a case in which one of $a,b,c$ is $0$ (we
just keep shifting until the smallest of $a,b,c$ reaches $0$; in other words,
we shift to the left by $\min\left\{  a,b,c\right\}  $). Thus, if we can show
that $F\left(  a,b,c\right)  \geq0$ in this simple case, then we will be able
to conclude that $F\left(  a,b,c\right)  \geq0$ always holds (i.e., holds for
all nonnegative reals $a,b,c$) -- because shifting $a,b,c$ back can only
increase $F\left(  a,b,c\right)  $.

The simple case is simple indeed: If one of $a,b,c$ is $0$, then $3abc=0$, so
that $F\left(  a,b,c\right)  =a^{3}+b^{3}+c^{3}\geq0$ obviously. Thus, we have
again solved Exercise \ref{exe.alg.e5}, but this time without factoring
$F\left(  a,b,c\right)  $. Again, this solution can be written up pretty neatly:

\begin{proof}
[Second solution to Exercise \ref{exe.alg.e5}.]Let $m:=\min\left\{
a,b,c\right\}  $. Thus, we have $m\leq a$ and $m\leq b$ and $m\leq c$, but $m$
is one of the three numbers $a,b,c$. The latter fact yields $m\geq0$.

Next, let $\alpha:=a-m$ and $\beta:=b-m$ and $\gamma:=c-m$. Then,
$\alpha,\beta,\gamma$ are nonnegative reals (since $m\leq a$ and $m\leq b$ and
$m\leq c$), and at least one of them is $0$ (since $m$ is one of the three
numbers $a,b,c$). Hence, $\alpha\beta\gamma=0$. However, from $\alpha=a-m$, we
obtain $a=\alpha+m$ and similarly $b=\beta+m$ and $c=\gamma+m$. Thus,%
\begin{align*}
&  a^{3}+b^{3}+c^{3}-3abc\\
&  =\left(  \alpha+m\right)  ^{3}+\left(  \beta+m\right)  ^{3}+\left(
\gamma+m\right)  ^{3}-3\left(  \alpha+m\right)  \left(  \beta+m\right)
\left(  \gamma+m\right) \\
&  =\underbrace{\alpha^{3}+\beta^{3}+\gamma^{3}}_{\substack{\geq
0\\\text{(since }\alpha,\beta,\gamma\text{ are nonnegative)}}%
}-\,3\underbrace{\alpha\beta\gamma}_{=0}+\,3m\underbrace{\left(  \alpha
^{2}+\beta^{2}+\gamma^{2}-\beta\gamma-\gamma\alpha-\alpha\beta\right)
}_{\substack{\geq0\\\text{(by Exercise \ref{exe.alg.e1}, applied to }%
\alpha,\beta,\gamma\text{ instead of }a,b,c\text{)}}}\\
&  \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \left(  \text{this can be checked
by straightforward computation}\right) \\
&  \geq0-3\cdot0+3m\cdot0=0.
\end{align*}
In other words, $a^{3}+b^{3}+c^{3}\geq3abc$. This solves Exercise
\ref{exe.alg.e5} again.

(Note that we have implicitly used $m\geq0$. Do you see where?)
\end{proof}
\end{proof}

One more factorization problem (this time explicitly stated as one):

\begin{exercise}
\label{exe.alg.e6}Factor the polynomial%
\[
x\left(  y-z\right)  ^{3}+y\left(  z-x\right)  ^{3}+z\left(  x-y\right)
^{3}.
\]

\end{exercise}

\begin{proof}
[Solution idea.]As already discussed in the solution to Exercise
\ref{exe.alg.e5}, this sort of exercise can be solved mechanically by a
computer: There are algorithms for factoring a polynomial with integer
coefficients. On an exam, however, tricks are more useful.

One trick that helps here is \emph{identifying factors}: We just try to find
the factors of the factorization one after the other, by asking ourselves what
these factors can be. The more factors we find, the easier it becomes to find
the rest, because we can divide our known factors out\footnote{using
polynomial division (e.g., treating $x$ as a variable and $y$ and $z$ as
constants)} and get a polynomial of smaller degree. Our polynomial%
\[
P\left(  x,y,z\right)  :=x\left(  y-z\right)  ^{3}+y\left(  z-x\right)
^{3}+z\left(  x-y\right)  ^{3}%
\]
has degree $4$; thus, if we can find two linear factors, then the quotient by
them will have degree $2$, which sounds rather manageable.

How do we find factors? If $Q\left(  x,y,z\right)  $ is a factor of $P\left(
x,y,z\right)  $, then $P\left(  x,y,z\right)  $ will always be $0$ whenever
$Q\left(  x,y,z\right)  $ is $0$. Thus, if we know a large set on which
$P\left(  x,y,z\right)  $ is $0$, then a factor of $P\left(  x,y,z\right)  $
is not far away. (I am not explaining what \textquotedblleft
large\textquotedblright\ means, so this should not be taken too literally.)

We are in luck: Our polynomial $P\left(  x,y,z\right)  $ is $0$ whenever
$x=y$. Indeed, if $x=y$, then%
\begin{align*}
P\left(  x,y,z\right)   &  =\underbrace{x}_{=y}\left(  y-z\right)
^{3}+y\left(  z-\underbrace{x}_{=y}\right)  ^{3}+z\underbrace{\left(
x-y\right)  ^{3}}_{\substack{=0\\\text{(since }x=y\text{)}}}\\
&  =y\left(  y-z\right)  ^{3}+y\underbrace{\left(  z-y\right)  ^{3}%
}_{=-\left(  y-z\right)  ^{3}}=y\left(  y-z\right)  ^{3}-y\left(  y-z\right)
^{3}=0.
\end{align*}
In other words, our polynomial $P\left(  x,y,z\right)  $ is $0$ whenever the
linear polynomial $x-y$ is $0$. This suggests that $x-y$ should be a factor of
$P\left(  x,y,z\right)  $. For analogous reasons, $y-z$ and $z-x$ should be
factors of $P\left(  x,y,z\right)  $ as well. Thus, we try to successively
divide $P\left(  x,y,z\right)  $ by $x-y$, $y-z$ and $z-x$, and see what comes out.

This works indeed, and what comes out is $x+y+z$. Thus, we obtain%
\[
P\left(  x,y,z\right)  =\left(  x-y\right)  \left(  y-z\right)  \left(
z-x\right)  \left(  x+y+z\right)  .
\]
Our factorization is therefore%
\[
x\left(  y-z\right)  ^{3}+y\left(  z-x\right)  ^{3}+z\left(  x-y\right)
^{3}=\left(  x-y\right)  \left(  y-z\right)  \left(  z-x\right)  \left(
x+y+z\right)  .
\]
Of course, once this factorization has been found, verifying it is a matter of
just expanding both sides; thus, you don't need to write up the above thinking
process on an exam.

Here is another way to find this factorization: Let $f=y-z$ and $g=z-x$. Then,
$f+g=\left(  y-z\right)  +\left(  z-x\right)  =y-x=-\left(  x-y\right)  $, so
that $x-y=-\left(  f+g\right)  $. Thus, $\left(  x-y\right)  ^{3}=\left(
-\left(  f+g\right)  \right)  ^{3}=-\left(  f+g\right)  ^{3}$. Now,%
\begin{align*}
&  x\left(  \underbrace{y-z}_{=f}\right)  ^{3}+y\left(  \underbrace{z-x}%
_{=g}\right)  ^{3}+z\underbrace{\left(  x-y\right)  ^{3}}_{=-\left(
f+g\right)  ^{3}}\\
&  =xf^{3}+yg^{3}+z\left(  -\left(  f+g\right)  ^{3}\right)  \\
&  =xf^{3}+yg^{3}-z\underbrace{\left(  f+g\right)  ^{3}}_{=f^{3}%
+3f^{2}g+3fg^{2}+g^{3}}\\
&  =xf^{3}+yg^{3}-z\left(  f^{3}+3f^{2}g+3fg^{2}+g^{3}\right)  \\
&  =\underbrace{\left(  xf^{3}-zf^{3}\right)  }_{=\left(  x-z\right)  f^{3}%
}+\underbrace{\left(  yg^{3}-zg^{3}\right)  }_{=\left(  y-z\right)  g^{3}%
}-\underbrace{\left(  z\cdot3f^{2}g+z\cdot3fg^{2}\right)  }_{=3zfg\left(
f+g\right)  }\\
&  =\underbrace{\left(  x-z\right)  }_{\substack{=-\left(  z-x\right)
=-g\\\text{(since }z-x=g\text{)}}}f^{3}+\underbrace{\left(  y-z\right)  }%
_{=f}g^{3}-\,3zfg\left(  f+g\right)  \\
&  =\underbrace{\left(  -g\right)  f^{3}+fg^{3}}_{=-fg\left(  f^{2}%
-g^{2}\right)  }-\,3zfg\left(  f+g\right)  \\
&  =-fg\underbrace{\left(  f^{2}-g^{2}\right)  }_{=\left(  f-g\right)  \left(
f+g\right)  }-\,3zfg\left(  f+g\right)  \\
&  =-fg\left(  f-g\right)  \left(  f+g\right)  -3zfg\left(  f+g\right)  \\
&  =\underbrace{f}_{=y-z}\ \ \underbrace{g}_{=z-x}\ \ \underbrace{\left(
f+g\right)  }_{=-\left(  x-y\right)  }\ \ \underbrace{\left(  -\left(
f-g\right)  -3z\right)  }_{\substack{=-\left(  x+y+z\right)  \\\text{(by easy
computation)}}}\\
&  =\left(  y-z\right)  \left(  z-x\right)  \left(  -\left(  x-y\right)
\right)  \left(  -\left(  x+y+z\right)  \right)  \\
&  =\left(  x-y\right)  \left(  y-z\right)  \left(  z-x\right)  \left(
x+y+z\right)  .
\end{align*}

\end{proof}

See also \cite[Exercise 1.1.7]{20f} for an exercise similar to Exercise
\ref{exe.alg.e6}.

\subsection{Class problems}

The following problems are to be discussed during class.

\begin{exercise}
\label{exe.alg.c1}Let $n\geq2$ be an integer. Simplify the product
$\prod_{k=2}^{n}\dfrac{k-1}{k+1}$.

[\textbf{Hint:} The telescope principle applies to products just as it does to sums.]
\end{exercise}

\begin{exercise}
\label{exe.alg.c2}Solve Exercise 1.3.2 from worksheet 1 again using the
telescope principle.

(Here is the exercise: Let $n$ be a positive integer. For each $k\in\left\{
1,2,\ldots,n-1\right\}  $, we let
\[
a_{k}:=\left(  n-k\right)  \prod_{i=0}^{k-2}\left(  n-i\right)  =\left(
n-k\right)  \left(  n-k+2\right)  \left(  n-k+3\right)  \cdots n.
\]
Prove that%
\[
\sum_{k=1}^{n-1}a_{k}=n!-1.
\]
)
\end{exercise}

\begin{exercise}
\label{exe.alg.c3}Let $a$ and $b$ be positive integers such that $\left(
a,b\right)  \neq\left(  1,1\right)  $. Prove that $a^{4}+4b^{4}$ cannot be prime.
\end{exercise}

\begin{exercise}
Let $a$ and $b$ be two positive reals. Show that $\dfrac{a}{b}+\dfrac{b}%
{a}\geq2$.
\end{exercise}

\begin{exercise}
\label{exe.alg.c4}Let $n\in\mathbb{N}$. Let $P\left(  x\right)  $ be an
arbitrary polynomial of degree smaller than $n$ in a single variable $x$.
Prove that%
\[
\sum_{k=0}^{n}\left(  -1\right)  ^{k}\dbinom{n}{k}P\left(  k\right)  =0.
\]

\end{exercise}

\begin{exercise}
\label{exe.alg.c5}Let $x,y,z$ be three positive reals such that $xyz=1$.
Simplify%
\[
\dfrac{1}{1+x+xy}+\dfrac{1}{1+y+yz}+\dfrac{1}{1+z+zx}.
\]

\end{exercise}

\subsection{Homework exercises}

Solve 4 of the 10 exercises below and upload your solutions on gradescope by
October 31.

\begin{exercise}
\label{exe.alg.h1}Let $n$ be a positive integer. Let $u$ be the number of
pairs $\left(  j,k\right)  $ of positive integers satisfying $\dfrac{1}%
{j}+\dfrac{1}{k}=\dfrac{1}{n}$.

Prove that $u$ is the number of all positive divisors of $n^{2}$.
\end{exercise}

\begin{exercise}
\label{exe.alg.h2}Let $n\geq2$ be an integer. Simplify the product
$\prod_{k=2}^{n}\dfrac{k^{3}-1}{k^{3}+1}$.
\end{exercise}

\begin{exercise}
Let $n\in\mathbb{N}$. Find a closed-form expression for the sum $\sum
_{k=1}^{n}\left(  k^{2}+1\right)  \cdot k!$.
\end{exercise}

\begin{exercise}
\label{exe.alg.h3}Prove that%
\[
a\left(  a-b\right)  \left(  a-c\right)  +b\left(  b-c\right)  \left(
b-a\right)  +c\left(  c-a\right)  \left(  c-b\right)  \geq0
\]
for any three nonnegative reals $a,b,c$. \medskip

[\textbf{Hint:} Don't look for a factorization! This polynomial does not have
a nontrivial factorization.]
\end{exercise}

\begin{exercise}
Prove that%
\[
\left\vert \dfrac{a}{b-c}\right\vert +\left\vert \dfrac{b}{c-a}\right\vert
+\left\vert \dfrac{c}{a-b}\right\vert \geq2
\]
for any three distinct reals $a,b,c$. \medskip

[\textbf{Hint:} Denote the left hand side by $F\left(  a,b,c\right)  $, and
study $F\left(  a-x,b-x,c-x\right)  $ as a function of the real variable $x$.
Where can this function take its minimum?]
\end{exercise}

\begin{exercise}
\label{exe.alg.h4}Let $a,b,c$ be three real numbers such that $\left(
a+b+c\right)  ^{3}=a^{3}+b^{3}+c^{3}$. Prove that $\left(  a+b+c\right)
^{n}=a^{n}+b^{n}+c^{n}$ for each odd positive integer $n$.
\end{exercise}

\begin{exercise}
Let $n$ be an even positive integer. Find (and prove) the expanded form of%
\[
\underbrace{\left(  1-x+x^{2}-x^{3}\pm\cdots+x^{n}\right)  }_{=\sum_{i=0}%
^{n}\left(  -1\right)  ^{i}x^{i}}\cdot\underbrace{\left(  1+x+x^{2}%
+\cdots+x^{n}\right)  }_{=\sum_{i=0}^{n}x^{i}}.
\]

\end{exercise}

\begin{exercise}
\label{exe.alg.h5}Let $n>1$ be an integer. Factor the polynomial%
\[
\left(  1+x+x^{2}+\cdots+x^{n}\right)  ^{2}-x^{n}%
\]
as a product of two non-constant polynomials.
\end{exercise}

\begin{exercise}
Let $f\left(  x\right)  $ be a polynomial with integer coefficients. Consider
the plot of this polynomial (in the usual xy-plane). Let $P_{1}$ and $P_{2}$
be two distinct points on this plot. Assume that the coordinates of $P_{1}$
and $P_{2}$ as well as the distance $\left\vert P_{1}P_{2}\right\vert $ are
integers. Prove that the line $P_{1}P_{2}$ is parallel to the x-axis. \medskip

[\textbf{Hint:} Use Exercise \ref{exe.alg.e2}. You can use the fact
(\cite[Exercise 9.3.2 for $k=2$]{20f}) that if an integer $n$ is the square of
a rational number, then $n$ is the square of an integer.]
\end{exercise}

\begin{exercise}
\label{exe.alg.h6}Let $n$ be a positive integer. Let $g\left(  x\right)  $
denote the polynomial $-\left(  x^{1}+x^{2}+\cdots+x^{n}\right)  $. Let
$h\left(  x\right)  $ denote the polynomial
\[
\sum_{k=0}^{n}\left(  g\left(  x\right)  \right)  ^{k}=\left(  g\left(
x\right)  \right)  ^{0}+\left(  g\left(  x\right)  \right)  ^{1}+\left(
g\left(  x\right)  \right)  ^{2}+\cdots+\left(  g\left(  x\right)  \right)
^{n}.
\]
Prove that the coefficients of the powers $x^{2},x^{3},\ldots,x^{n}$ in
$h\left(  x\right)  $ are $0$.
\end{exercise}

\begin{thebibliography}{99999999}                                                                                         %


\bibitem[Grinbe19]{19s-hw0s}Darij Grinberg, \textit{UMN Spring 2019 Math 4281
homework set \#0 with solutions}, \url{http://www.cip.ifi.lmu.de/~grinberg/t/19s/hw0s.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}
\end{thebibliography}


\end{document}