\section{Convergents}


\definition{}
Let $\alpha = [a_0, a_1, a_2, ...]$ be an infinite continued fraction (aka an irrational number). \par
The \emph{$n$th convergent to $\alpha$} is the rational number $[a_0, a_1, ..., a_n]$ and is denoted $C_n(\alpha)$.

\problem{}
Calculate the following convergents and write them in lowest terms: \\
\begin{itemize}
	\item $C_3([~ 1,2,3,4, ... ~])$
	\item $C_4([~ 0,\overline{2,3} ~])$
	\item $C_5([~ \overline{1,5} ~])$
\end{itemize}

\vfill






\problem{}<sqrt5>
Recall from last week that $\sqrt{5} = [2,\overline{4}]$.
Calculate the first five convergents to $\sqrt{5}$ and write them in lowest terms.
Do you notice any patterns? \par
\hint{Look at the numbers $\sqrt{5}-C_j(\sqrt{5})$ for $1 \leq j \leq 5$}


\vfill






\generic{Properties of Convergents}
In this section, we want to show that the $n$th convergent to a real number
$\alpha$ is the best approximation of $\alpha$ with the given denominator.
Let $\alpha = [a_0, a_1, ...]$ be fixed, and we will write $C_n$ instead of
$C_n(\alpha)$ for short. Let $p_n / q_n$ be the expression of $C_n$ as a rational number
in lowest terms. We will eventually prove that $|\alpha-C_n|<\frac{1}{q_n^2}$,
and there is no better rational estimate of $\alpha$ with denominator less than or equal to $q_n$.

First we want the recursive formulas $p_n=a_np_{n-1}+p_{n-2}$ and $q_n=a_nq_{n-1}+q_{n-2}$ given $p_{-1}=1$, $p_0=a_0$, $q_{-1}=0$, and $q_0=1$.


\pagebreak




\problem{}
Verify the recursive formula for $1\leq j\leq 3$ for the convergents $C_j$ of: \par
\begin{itemize}
	\item $[~ 1,2,3,4, ... ~]$
	\item $[~ 0,\overline{2,3} ~]$
	\item $[~ \overline{1,5} ~]$
\end{itemize}


\vfill




\problem{Challenge IV}<rec>
Show that $p_n = a_np_{n-1} + p_{n-2}$ and $q_n = a_nq_{n-1} + q_{n-2}$ by induction.
\begin{itemize}
	\item As the base case, verify the recursive formulas for $n=1$ and $n=2$.
	\item Assume the recursive formulas hold for $n\leq m$ and show the formulas hold for $m+1$.
\end{itemize}



\vfill





\problem{}<form1>
Using the recursive formula from \ref{rec},
we will show that $p_n q_{n-1} - p_{n-1}q_n = (-1)^{n-1}$.
\begin{itemize}
	\item What is $p_1q_0-p_0q_1$?
	\item Substitute $a_np_{n-1}+p_{n-2}$ for $p_n$ and $a_nq_{n-1}+q_{n-2}$ for $q_n$ in $p_n q_{n-1}-p_{n-1}q_n$. Simplify the expression.
	\item What happens when $n=2$? Explain why $p_n q_{n-1}-p_{n-1}q_n = (-1)^{n-1}$.
\end{itemize}


\vfill







\problem{Challenge V}
Similarly derive the formula $p_nq_{n-2}-p_{n-2}q_n = (-1)^{n-2}a_n$.



\vfill
\pagebreak








\problem{}<diff>
Recall $C_n=p_n/q_n$.
Show that $C_n-C_{n-1}=\frac{(-1)^{n-1}}{q_{n-1}q_n}$
and $C_n-C_{n-2}=\frac{(-1)^{n-2}a_n}{q_{n-2}q_n}$. \par
\hint{Use \ref{form1} and $p_nq_{n-2}-p_{n-2}q_n = (-1)^{n-2}a_n$ respectively}

In \ref{sqrt5}, the value $\alpha-C_n$ alternated between negative and positive
and $|\alpha-C_n|$ got smaller each step. Using the relations in \ref{diff},
we can prove that this is always the case.
Specifically, $\alpha$ is always between $C_n$ and $C_{n+1}$.



\vfill



\problem{}
Let's figure out how well the $n$th convergents estimate $\alpha$.
We will show that $|\alpha-C_n|<\frac{1}{q_n^2}$.
\begin{itemize}
	\item Note that $|C_{n+1}-C_n|=\frac{1}{q_nq_{n+1}}$.
	\item Why is $|\alpha-C_n|\leq|C_{n+1}-C_n|$?
	\item Conclude that $|\alpha-C_n|<\frac{1}{q_n^2}$.
\end{itemize}

We are now ready to prove a fundamental result in the theory of rational approximation.
\problem{Dirichlet's approximation theorem}
Let $\alpha$ be any irrational number.
Show that there are infinitely many rational numbers $\frac{p}{q}$ such that $|\alpha - \frac{p}{q}| < \frac{1}{q^2}$.




\vfill
\pagebreak






\problem{Challenge VI}
Show that if $\alpha$ is \emph{rational}, then there are only \emph{finitely} many rational numbers $\frac{p}{q}$
satisfying $|\alpha - \frac{p}{q} | < \frac{1}{q^2}$.


The above result shows that the $n$th convergents estimate $\alpha$ extremely well.
Are there better estimates for $\alpha$ if we want small denominators?
In order to answer this question, we introduce the Farey sequence.



\vfill






\definition{}
The \emph{Farey sequence} of order $n$ is the set of rational numbers between
0 and 1 whose denominators (in lowest terms) are $\leq n$, arranged in increasing order.


\problem{}
List the Farey sequence of order 4. Now figure out the Farey sequence of order 5 by including the relevant rational numbers in the Farey sequence of order 4.

\vfill




\problem{}
Let $\frac{a}{b}$ and $\frac{c}{d}$ be consecutive elements of the Farey sequence of order 5. What does $bc-ad$ equal?


\vfill





\problem{Challenge VII}<farey>
Show that $bc-ad=1$ for $\frac{a}{b}$ and $\frac{c}{d}$ consecutive rational numbers in Farey sequence of order $n$.

\begin{itemize}[itemsep=2mm]
	\item In the plane, draw the triangle with vertices (0,0), $(b,a)$, $(d,c)$.
	Show that the area $A$ of this triangle is $\frac{1}{2}$ using Pick's Theorem.
	Recall that Pick's Theorem states $A=\frac{B}{2}+I-1$ where $B$ is the number of
	lattice points on the boundary and $I$ is the number of points in the interior. \par
	\hint{B=3 and I=0}

	\item Show that the area of the triangle is also given by $\frac{1}{2}|ad-bc|$.

	\item Why is $bc>ad$?

	\item Conclude that $bc-ad=1$.
\end{itemize}






\vfill
\pagebreak



\problem{}
Use the result of \ref{farey} to show that there is no rational number between
$C_{n-1}$ and $C_n$ with denominator less than or equal to $q_n$.
Conclude that if $a/b$ is any rational number with $b \leq q_n$, then
$|\alpha - \frac ab| \geq |\alpha - \frac{p_n}{q_n}|$

%What the above exercise shows is that relative to the size of the denominator, the convergents of the continued fraction expansion of $\a$ are the absolute best rational approximations to $\a$.


\vfill





\problem{Challenge VIII}
Prove the following strengthening of Dirichlet's approximation theorem.
If $\alpha$ is irrational, then there are infinitely many rational numbers
$\frac{p}{q}$ satisfying $|\alpha - \frac pq| < \frac{1}{2q^2}$.

\begin{itemize}[itemsep = 2mm]

	\item Prove that $(x+y)^2 \geq 4xy$ for any real $x,y$.
	\item Let $p_n/q_n$ be the $n$th convergent to $\alpha$. Prove that
	\[
	\biggl|\frac{p_n}{q_n} - \frac{p_{n+1}}{q_{n+1}}\biggr|^2 \ \geq \ 4 \biggl| \frac{p_n}{q_n} - \alpha \biggr| \biggl| \frac{p_{n+1}}{q_{n+1}} - \alpha \biggr|
	\]
	\hint{$\alpha$ lies in between $\frac{p_n}{q_n}$ and $\frac{p_{n+1}}{q_{n+1}}$}


	\item Prove that either $\frac{p_n}{q_n}$ or $\frac{p_{n+1}}{q_{n+1}}$ satisfies the desired inequality (Hint: proof by contradiction).

	\item Conclude that there are infinitely many rational numbers $\frac{p}{q}$ satisfying $|\alpha - \frac pq| < \frac{1}{2q^2}$.
\end{itemize}


\vfill
\pagebreak