\documentclass[a4paper,11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{amsmath,amssymb,amsthm,amsopn}
\usepackage{mathrsfs}
\usepackage{graphicx}
%\usepackage{tikz}
%\usepackage{array}
%\usepackage[top=1cm,bottom=1cm]{geometry}
%\usepackage{listings}
\usepackage{xcolor}
\usepackage{hyperref}
\hypersetup{
    colorlinks=true,
    linkcolor=blue,
    citecolor=red,
}

\newtheoremstyle{break}%
{}{}%
{\itshape}{}%
{\bfseries}{}%  % Note that final punctuation is omitted.
{\newline}{}

\newtheoremstyle{sc}%
{}{}%
{}{}%
{\scshape}{}%  % Note that final punctuation is omitted.
{\newline}{}

\theoremstyle{break}
\newtheorem{thm}{Theorem}[section]
\newtheorem{lm}[thm]{Lemma}
\newtheorem{prop}[thm]{Proposition}
\newtheorem{cor}[thm]{Corollary}

\theoremstyle{sc}
\newtheorem{exo}{Exercise}

\theoremstyle{definition}
\newtheorem{defi}[thm]{Definition}
\newtheorem{ex}[thm]{Example}

\theoremstyle{remark}
\newtheorem{rem}[thm]{Remark}

\DeclareMathOperator{\Ker}{Ker}
\DeclareMathOperator{\Id}{Id}
\DeclareMathOperator{\Img}{Im}
\DeclareMathOperator{\Card}{Card}
\DeclareMathOperator{\Vect}{Vect}
\DeclareMathOperator{\Tr}{Tr}

% Nouvelles commandes
\newcommand{\ps}[2]{\left\langle#1,#2\right\rangle}
\newcommand{\ent}[2]{[\![#1,#2]\!]}
\newcommand{\diff}{\mathop{}\!\mathrm{d}}
\newcommand{\ie}{\emph{i.e. }}
% know what is going on or when I still need to ckeck

% opening
\title{}
\author{The powers-of-2 descent\\\textcolor{violet}{\textbf{Work in progress}}}

\begin{document}

\maketitle

%\begin{abstract}

%\end{abstract}

%\tableofcontents

%\clearpage

\section{Introduction}

The discrete logarithm problem has seen dramatic improvements these last
years in the \emph{small characteristic} case~\cite{Joux13, BGJT13, GKZ14},
culminating with two \emph{quasi-polynomial} algorithms in 2014. ``On the powers
of $2$'' is the paper~\cite{GKZ14} introducing one of those two algorithms and this document is
meant to give some explanations about it. First we explain the
terminology: a quasi-polynomial complexity is of the form $l^{\log l}$, where
$l$ is the bitsize of the input. And if we work with a finite field
$\mathbb{F}_{q^n}$, it is said to be of small characteristic if $q\ll q^n$, here
we ask that $q$ is polynomial in $\log(q^n)$. Before going into details about this
algorithm, we recall a few facts about discrete logarithm. A more complete
panorama can be found in suveys such as~\cite{JP16, GKZ16a}.

\section{The Discrete Logarithm Problem (DLP)}
Let $\mathcal G=\left\langle g\right\rangle$ be a cyclic group generated by an element
$g$, and denote by $N=|\mathcal G|$ its cardinal. We have the isomorphism:
\[
 \begin{array}{cccc}
   exp_g: & \mathbb{Z}/N\mathbb{Z} & \to & \mathcal G \\
   & n & \mapsto & g^n,
 \end{array}
\]
and we denote by $\log_g=\exp_g^{-1}$ the inverse isomorphism (sometimes only
denoted by $\log$). In practice, the
\emph{square and multiply} algorithm allows us to compute $g^n=\exp_g(n)$
efficiently, \ie in polynomial time. But, given $y = g^k$, the computation of $k
= \log_g(y)$ is not as easy. This kind of function $f$, where $f$ is easy to
compute but $f^{-1}$ is hard to compute, are called \emph{one-way} functions. They are
typically used in cryptology to make the encryption fast and the deciphering
slow. Gauss, in its \emph{Disquisitiones Arithmeticae}, was already computing
logarithms, that he reffered to as \emph{indices}. Nevertheless, the DLP first
appeared as an important computationnal problem in the article of Diffie and
Hellman in 1976, ``New Directions in Cryptography''~\cite{DH76}. It was supposed to be a very hard problem,
\ie only an exponential time algorithm was known at that time, and all the
security of the protocol invented in this article relied on the hardness of the
DLP. This article attracted a lot of attention, and so did the DLP, which has
been widely studied since then. Originally, the group involved in the Diffie-Hellman
protocol was $(\mathbb{Z}/N\mathbb{Z})^\times$, but there are other interesting
groups, such as the points of an elliptic curve or the invertible element of a
finite field. Over the years, two types of algorithms emerged:
\begin{itemize}
  \item the \emph{generic} algorithms, that can be used for any group, with an
    exponential complexity of type $O(\sqrt N)$, where $N=|\mathcal G|$ is the cardinal
    of the group;
  \item the \emph{index calculus} algorithms, that are built on the structure of
    the group considered, and that have very different complexities, depending
    on the kind of the studied group.
\end{itemize}

The recent algorithms that achieve quasi-polynomial complexity are index
calculus algorithms, so we introduce these algorithms a bit more.

\section{The index calculus method}

Here again, we consider a group $\mathcal G=\left\langle g \right\rangle$, an element
$g^k = y\in \mathcal G$, and we want to compute $k$. The index calculus algorithms always
follow the same pattern:
\begin{enumerate}
  \item[0.] we choose $\mathcal F\subset \mathcal G$ such that $\left\langle
    \mathcal F \right\rangle = \mathcal G$
    (we often have $g\in \mathcal F$), this subset is called the \emph{factor base};
  \item we generate multiplicative relations between the elements of $\mathcal F$, \ie we
    find $f_1, \dots, f_n \in \mathcal F$ and $e_1, \dots, e_n\in \mathbb{Z}$ such that
    $\prod_i f_i^{e_i} = 1$, that is equivalent to the linear equation $\sum_i
    e_i\log_g(f_i) = 0$;
  \item we solve the linear system with unknowns $\log_g(f_i)$ arising from step
    1 to obtain $\log(f)$ for all $f\in \mathcal F$;
  \item we find a multiplicative relation between $y$ and elements of $\mathcal F$, or
    equivalently, we express $\log_g y = k$ as a linear combination of the
  $\log_g(f_i)$.
\end{enumerate}
\textcolor{red}{Example : Hellman-Reyneri algorithm, like in the slides for
  F.Paulin ?}
  \newline
  \newline
  An \textcolor{red}{(other ?)} example is given by the algorithm of Granger,
  Kleinjung and Zumbrägel in~\cite{GKZ14}, that we call powers-of-2 algorithm here.
\section{The powers-of-2 algorithm}
\subsection{Setup of the algorithm}

Let $\mathcal G = (\mathbb{F}_{q^n})^\times$ the group of invertible elements of a finite
field of small characteristic $\mathbb{F}_{q^n}$, where $q=p^l$ is a prime
power, and we represent elements of $\mathbb{F}_{q^n}$ by polynomials over
$\mathbb{F}_q$ of degree less than $n$. The setup in which we present the algorithm is slightly different from
the original, thanks to the work of Joux and Pierrot in \cite{JP14}. Indeed,
they remarked that working with polynomials of degree up to $d$ over $\mathbb{F}_q$ is
essentially equivalent as working with linear polynomials over $\mathbb{F}_{q^d}$. Thus,
instead of working with a factor base composed of linear polynomials over
$\mathbb{F}_{q^d}$ (with $d$ usually between $2$ and $4$), we work with a
factor base composed of irreducible polynomials up to degree $4$. Joux and Pierrot
precisely give a way to compute such a factor base in~\cite{JP14}, that is based
on previous work~\cite{Joux13, BGJT13} and has a complexity of $O(q^6)$. Since
we work in the case where $q$ is polynomial in the bitsize of the field
$\log(q^n)$, this precomputation time is polynomial.

Let us come back to the elements of $\mathbb{F}_{q^n}$, we said that they were
represented by polymomials of degree at most $n-1$ over $\mathbb{F}_q$. More
precisely, we consider $\mathbb{F}_{q^n}\cong \mathbb{F}_{q}[X]/(P)$ where $P\in
\mathbb{F}_{q}[X]$ is an irreducible polynomial of degree $n$ over
$\mathbb{F}_{q}$ dividing $h_1X^q-h_0$, and $h_0, h_1\in \mathbb{F}_q[X]$ are
polynomials of degree at most $2$ over $\mathbb{F}_q$. Different options are
available to choose $h_0$ and $h_1$, and the respective results are also
discussed in~\cite{JP14}. The existence of such parameters $h_0$ and $h_1$ is
critical for the algorithm, and the fact that every finite field admits such a
structure is \emph{heuristic}, and remains one of the major open problems in the
area.

We now assume that the factor base $\mathcal F$ is composed of all the
elements of $\mathcal G$ represented by an irreducible polynomial of degree at
most $4$. We also suppose that we know the logarithm of each element in
$\mathcal F$. In other words, we assume that the steps $1$ and $2$ of the index
calculus method have already been performed. The only remaining step is $3$,
where we express the logarithm of an element in $\mathcal G$ as the linear
combination of the logarithms of elements in $\mathcal F$. In order to perform
that step, we express the logarithm of the element that we want to study, denoted by
$Q\in\mathcal G$, as a linear combination of ``simpler'' $q+2$ elements $Q_j$,
\ie elements represented by polynomials of degree two times smaller. We
still note $Q$ for the polynomial representing $Q\in
\mathcal G$, and so we have $\deg Q_i\leq \lceil \frac{1}{2}\deg Q\rceil$. Doing
the same process reccursively, we are able to express $\log Q$ as a linear
combination of elements of degree at most $4$, \ie elements in $\mathcal F$.
This whole procedure is called the \emph{descent}, and we explain it in the
following.

\subsection{On-the-fly degree $2$ elimination}

The crucial part of the descent is called the \emph{on-the-fly}
elimination. It allows one to express a degree $2$ polynomial
$Q\in\mathbb{F}_{q^m}[X]$ over $\mathbb{F}_{q^m}$ as a product of degree $1$
polynomials over $\mathbb{F}_{q^m}$. The name ``on the fly'' is due to the fact
that no relation gathering or linear algebra is performed during this
elimination. At the core of this elimination we also use the fact that the
polynomial $\mathcal P_B = X^{q+1}-BX+B$ splits completely over $\mathbb{F}_{q^m}$ (\ie is a
product of polynomial of degree $1$ over $\mathbb{F}_{q^m}$) very often. Let
$\mathcal B$ be the set of elements $B\in \mathbb{F}_{q^m}$ such that $\mathcal
P_B$ splits completely. In~\cite{Bluher04}, the roots and the splitting field of
$\mathcal P_B$ are studied and it is shown that the cardinality of $\mathcal B$
is approximately $q^{m-3}$ ($(q^{m-1}-1)/(q^2-1)$ when $m$ is odd,
$(q^{m-1}-q)/(q^2-1)$ when $m$ is even). Thus, if $B\in \mathcal B$,
$a,b,c\in\mathbb{F}_{q^m}$ such that $c\neq ab$, $a^q\neq b,
B=\frac{(b-a^q)^{q+1}}{(c-ab)^q}$, we see by the change of variable
$X\to\frac{c-ab}{a^q-b}X-a$ in $X^{q+1}+aX^q+bX+c$ that this polynomials
splits completely whenever $\mathcal P_B$ does.
Note that using~\cite{Bluher04,
HK10, GKZ14}, we also know that $\mathcal B$ is the image of
$\mathbb{F}_{q^m}\setminus\mathbb{F}_{q^2}$ under the map
\[
  u\mapsto \frac{(u-u^{q^2})^{q+1}}{(u-u^q)^{q^2+1}}\footnote{There is a proof
  in \cite{GKZ16b} but it is quite mysterious to me.}.
\]
In order to eliminate the polynomial $Q$, we define the lattice $L_Q\subset
\mathbb{F}_{q^m}[X]^2$ by
\[
  L_Q = \left\{ (w_0,
    w_1)\in\mathbb{F}_{q^m}[X]^2\;|\;w_0h_0+w_1h_1\equiv0\;\mod Q \right\}.
\]
If $Q$ divides $w_0h_0+w_1h_1\neq0$ for $w_0, w_1\in \mathbb{F}_{q^m}$, then we have
$Q = w(w_0h_0+w_1h_1)$ for some $w\in\mathbb{F}_{q^m}^\times$ because the degree
of the right hand side is at most $2$. Hence, the logarithm of $Q$ is linked
with the logarithm of $w_0X^q+w_1=(w_0^{q^{m-1}}X+w_1^{q^{m-1}})^q$, and so the
logarithm of $Q$ is linked to the logarithm of a linear
polynomial over $\mathbb{F}_{q^m}$. Otherwise we can find a basis of $L_Q$
of the form $(u_0, X+u_1), (X+v_0, v_1)$ with $u_i, v_i\in\mathbb{F}_{q^m}$.
Since we have
\[
  h_1(X^{q+1}+aX^q+bX+c)\equiv(X+a)h_0+(bX+c)h_1\mod P,
\]
if $Q$ divides $(X+a)h_0+(bX+c)h_1$, a polynomial of degree at most $3$, then we
have that $(X+a)h_0+(bX+c)h_1=Q\times R$, where $R$ is a linear polynomial. If
on top of that, the polynomial $X^{q+1}+aX^q+bX+c$ splits completely over
$\mathbb{F}_{q^m}$, then we have a relation between $Q$, polynomials of degree
$1$, and $h_1$ (which logarithm is supposed to be known). The goal is thus to
find a triple $(a, b, c)$ satisfying the two conditions. To do that, we choose
$B\in \mathcal B$ and we remark that $(X+a,
bX+c)\in L_Q$ implies that $(X+a, bX+c)=b(u_0, X+u_1)+(X+v_0, v_1)$. Hence, we
have $a=bu_0+v_0$ and $c=bu_1+v_1$. Rewriting $a$ and $c$ in the conditions
on $(a,b,c)$: $c\neq ab,b\neq a^q$ and $\frac{(b-a^q)^{q+1}}{(c-ab)^q}=B$, we
get the condition
\[
  B = \frac{(-u_0^qb^q+b-v_0^q)^{q+1}}{(-u_0b^2+(u_1-v_0)b+v_1)^q}
\]
and we can find a suitable $b$ in polynomial time in $q$ and $m$ by finding a root to a degree
$q^2+q$ polynomial. Alternatively, we can write $b$ in a $\mathbb{F}_{q^m}/\mathbb{F}_q$
basis and solve a quadratic system in $m$ variables with Gröbner bases
algorithms, with an exponential time in $m$. In practice~\cite{Adj16}, the
second option is used, because this on-the-fly elimination is used with small $m$.

We also emphasize on the fact that this elimination works if a suitable element
$b$ is found. For each $B\in\mathcal B$, the probability of finding a suitable
$b$ is $\frac{1}{2}$\footnote{This information is in \cite{Adj16}, but
without any explanation, I have to think about it or ask Gora.}, so if
$m\geq4$, then $|\mathcal B|\approx q$ and the probability than the
elimination works is overwhelming.

\subsection{The descent}

Let now $Q\in\mathbb{F}_{q}[X]$ be an irreducible polynomial over $\mathbb{F}_{q}$ of degree
$2m$, with $m\geq4$. We have
\[
  Q = \prod_{i=0}^{m-1}Q_{i}
\]
where the polynomials $Q_i\in\mathbb{F}_{q^m}[X]$ are irreducible
polynomials over $\mathbb{F}_{q^m}$ of degree $2$, and are all
conjugates. By conjugates, we mean that for all $0\leq i\leq m-1$,
$Q_i=Q_0^{[i]}$, where $Q_0^{[i]}$ denotes the polynomial $Q_0$ with all
coefficients raised to the power $q^i$. By applying the on-the-fly
elimination to $Q_0$, wo obtain
\[
  R_0Q_0=\prod_{j=1}^{q+1}R_j
\]
where, for all $0\leq j\leq q+1$, $R_j\in\mathbb{F}_{q^m}[X]$ is a linear
polynomial over $\mathbb{F}_{q^m}$. We also deduce that
\[
  R_{0}^{[i]}Q_i=\prod_{j=1}^{q+1}R_j^{[i]}
\]
and it follows that
\[
  (\prod_{i=0}^{m-1}R_{0}^{[i]})\times Q =
  \prod_{j=1}^{q+1}(\prod_{i=0}^{m-1}R_j^{[i]}).
\]
Now recall that $N_j:=\prod_{i=0}^{m-1}R_{j}^{[i]}$ is the norm of the
polynomial $R_j$, and that the norm of a linear polynomial over
$\mathbb{F}_{q^m}/\mathbb{F}_q$ is an irreducible polynomial over
$\mathbb{F}_q$ of degree
$e$, raised to the power $f$, such that $ef=m$. Hence, we have
$N_j=T_j^{f_j}$, with $T_j\in\mathbb{F}_{q}[X]$, $\deg T_j = e_j$, and
$e_jf_j=m$. In the end, we have expressed the polynomial $Q$ as a product of
polynomials with degree dividing $m$.

To be able to really perform this descent, we must have a polynomial $Q$ with a
power of $2$ degree, this is possible thanks to Theorem $5.1$ proved
in~\cite{Wan97} by Wan that roughly states that we can represent any element in
$\mathcal G$ by a polynomial with a power of $2$ degree. Performing the
descent, a tree is built in which the logarithm of a node is expressed
as a linear combination of its children. The total complexity of the algorithm
is then the number of nodes of this tree. We have seen that the arity of the
tree is $q+2$, and the height of the tree is $O(\log n)$, the number of nodes
is then $(q+2)^{\log n}$. Since we are in the small characteristic case, we
can write this complexity $l^{O(\log l)}$, where $l=\log(q^n)$ is the bitsize of
$\mathcal G$, and we see that the algorithm is quasi-polynomial.
\section{A few comments}

\begin{itemize}
  \item In practical works, summarised in Gora Adj PhD thesis~\cite{Adj16}, we
    can see that this algorithm in not really used all the way from elements
    of high degree (\ie $\geq 200$ in~\cite{Adj16}) to elements in the factor base. Instead, other descents
    with smaller arity are first used to reduce the degree of the elements
    until having elements of small degree (\ie $16$ in~\cite{Adj16}).
  \item There are technicalities hidden in this document, they are discussed
    in~\cite{GKZ14}. For example there are ``traps'' that we must avoid: it is
    impossible to eliminate a polynomial $Q\neq P$ that divides
    $h_1X^q-h_0$, where $P$ is again the defining polynomial of
    $\mathbb{F}_{q^n}$. The reason behind that is that we act as if our
    computations were living in $\mathbb{F}_{q^m}$, but they are in fact living
    in $\mathbb{F}_{q}[X]/(h_1X^q-h_0)$.
\end{itemize}

\clearpage
\bibliographystyle{plain}
\bibliography{dlog}
\end{document}


\documentclass[t]{beamer}
\usetheme{Copenhagen}
\setbeamertemplate{headline}{} % remove toc from headers
\beamertemplatenavigationsymbolsempty

\usepackage{amsmath, tikz, bm, tkz-euclide,pgfplots}
\pgfplotsset{compat = 1.16}
\usetkzobj{all}
\everymath{\displaystyle}

\title{Rational Equations and Inequalities}
\author{}
\date{}

\AtBeginSection[]
{
  \begin{frame}
    \frametitle{Objectives}
    \tableofcontents[currentsection]
  \end{frame}
}

\begin{document}

\begin{frame}
\maketitle
\end{frame}

\section{Solve rational equations}

\begin{frame}{Rational Equations}
In this section we will look at solving equations containing rational functions. \newline\\ \pause

Similar to the technique of simplifying complex fractions, we will eliminate our fractions by multiplying everything on both sides by the least common denominator.    \newline\\ \pause

However, because our fractions contain variables in the denominator, we must remember that the denominator can never equal zero. \newline\\ \pause

Thus, we must always check for extraneous solutions when solving rational equations and inequalities.
\end{frame}

\begin{frame}{Example 1}
Solve each of the following. Remember to check for extraneous solutions.	\newline\\
(a)	\quad $\frac{1}{5x} = \frac{1}{5x^2} - \frac{x+5}{x^2}$
\onslide<2->{\qquad \alert{$x \neq 0$}}
\onslide<3->{\qquad LCD is $5x^2$}
\begin{align*}
\onslide<4->{\left(5x^2\right)\left(\frac{1}{5x}\right) &= \left(\frac{1}{5x^2} - \frac{x+5}{x^2}\right)\left(5x^2\right)}	\\[10pt]
\onslide<5->{x &= 1-5(x+5)} \\[8pt]
\onslide<6->{x &= 1 - 5x - 25} \\[8pt]
\onslide<7->{6x &= -24} \\[8pt]
\onslide<8->{x &= -4}
\end{align*}
\end{frame}

\begin{frame}{Example 1}
(b)	\quad	$\frac{5}{3} - \frac{1}{x} = \frac{1}{3x}$
\onslide<2->{\qquad \alert{$x \neq 0$}}
\onslide<3->{\qquad LCD is $3x$}
\begin{align*}
\onslide<4->{\left(3x\right)\left(\frac{5}{3} - \frac{1}{x}\right) &= \left(\frac{1}{3x}\right)\left(3x\right)}	\\[10pt]
\onslide<5->{5x-3 &= 1} \\[10pt]
\onslide<6->{x &= \frac{4}{5}}
\end{align*}
\end{frame}

\begin{frame}{Example 1}
(c)	\quad	$\frac{1}{x+4} = \frac{6x-42}{x^2+4x} + \frac{x-8}{x^2+4x}$
\onslide<2->{\[\frac{1}{x+4} = \frac{6(x-7)}{x(x+4)} + \frac{x-8}{x(x+4)}\]}	\\[4pt]
\onslide<3->{$x \neq 0, -4$}
\onslide<4->{\qquad LCD is $x(x+4)$}
\begin{align*}
\onslide<5->{\left(x(x+4)\right)\left(\frac{1}{x+4}\right) &= \left(\frac{6(x-7)}{x(x+4)} + \frac{x-8}{x(x+4)}\right)\left(x(x+4)\right)}	\\[10pt]
\onslide<6->{x &= 6(x-7)+x-8}	\\[8pt]
\onslide<7->{x &= 6x-42+x-8}
\end{align*}
\end{frame}

\begin{frame}{Example 1c	\quad $x \neq 0, -4$}
\begin{align*}
x &= 6x-42+x-8	\\[8pt]
\onslide<2->{x &= 7x-50} \\[8pt]
\onslide<3->{-6x &= -50} \\[10pt]
\onslide<4->{x &= \frac{25}{3}}
\end{align*}
\end{frame}

\begin{frame}{Example 1}
(d)	\quad	$\frac{1}{x^2-x} + \frac{1}{x} = \frac{5}{x^2-x}$
\onslide<2->{\[\frac{1}{x(x-1)} + \frac{1}{x} = \frac{5}{x(x-1)}\]}	\\[4pt]
\onslide<3->{$x \neq 0, 1$}
\onslide<4->{\qquad LCD is $x(x-1)$}
\begin{align*}
\onslide<5->{\left(x(x-1)\right)\left(\frac{1}{x(x-1)} + \frac{1}{x}\right) &= \left(\frac{5}{x(x-1)}\right)\left(x(x-1)\right)}	\\[10pt]
\onslide<6->{1 + x - 1 &= 5} \\[6pt]
\onslide<7->{x &= 5}
\end{align*}
\end{frame}

\begin{frame}{Example 1}
(e)	\quad	$1 = \frac{2}{x^2+x} + \frac{2}{x+1}$
\onslide<2->{\[1 = \frac{2}{x(x+1)} + \frac{2}{x+1}\]}	\\[4pt]
\onslide<3->{$x \neq 0, -1$} \onslide<4->{\qquad LCD is $x(x+1)$}
\begin{align*}
\onslide<5->{\left(x(x+1)\right)1 &= \left(\frac{2}{x(x+1)} + \frac{2}{x+1}\right)\left(x(x+1)\right)}		\\[10pt]
\onslide<6->{x^2+x &= 2 + 2x} \\[6pt]
\onslide<7->{x^2 - x - 2 &= 0}
\end{align*}
\end{frame}

\begin{frame}{Example 1e \quad $x \neq 0, -1$}
\begin{align*}
x^2 - x - 2 &= 0		\\[8pt]
\onslide<2->{(x+1)(x-2) &= 0} \\[8pt]
\onslide<3->{x &= -1, \, 2} \\[8pt]
\end{align*}
\onslide<4->{Since $x \neq -1$ from the domain, our final answer is $x = 2$.}
\end{frame}

\begin{frame}{Example 1}
(f)		\quad	$\frac{1}{3x-15} = \frac{1}{x^2-2x-15} + \frac{x^2}{3x^2-6x-45}$
\onslide<2->{\[\frac{1}{3(x-5)} = \frac{1}{(x-5)(x+3)} + \frac{x^2}{3(x-5)(x+3)}\]}		\\[4pt]
\onslide<3->{$x \neq 5, -3$} \onslide<4->{\qquad LCD is $3(x-5)(x+3)$}
\onslide<4->{\[\left(3(x-5)(x+3)\right)\left(\frac{1}{3(x-5)}\right) \onslide<5->{=x+3}\]}
\onslide<5->{\[\left(\frac{1}{(x-5)(x+3)} + \frac{x^2}{3(x-5)(x+3)}\right)\left(3(x-5)(x+3)\right)\]}
\onslide<6->{\[=3+x^2\]}
\end{frame}

\begin{frame}{Example 1f \quad $x \neq 5, -3$}
\begin{align*}
3+x^2 &= x + 3 \\[8pt]
\onslide<2->{x^2 - x &= 0} \\[8pt]
\onslide<3->{x(x-1) &= 0} \\[8pt]
\onslide<4->{x &= 0, \, 1}
\end{align*}
\end{frame}

\section{Solve rational inequalities}

\begin{frame}{Rational Inequalities}
We will continue the theme of solving inequalities like equations, setting up a number line, and using test values.    \newline\\

However, in addition to the answers we get from treating the inequality like an equation, we must also use the values outside the domain (i.e. where the denominator equals zero) on our number line.
\end{frame}

\begin{frame}{Example 2}
Solve each of the following and graph your solution on a number line.	\newline\\
(a)  \quad   $\frac{1}{5x} < \frac{1}{5x^2} - \frac{x+5}{x^2}$	\\[5pt]
\onslide<2->{\[\frac{1}{5x} = \frac{1}{5x^2} - \frac{x+5}{x^2}\]}	\\[5pt]
\onslide<3->{From Example 1a, we got $x=-4$ and $x \neq 0$}	\\[5pt]
\begin{center}
\onslide<4->{
\begin{tikzpicture}
\draw [<->, >=stealth] (-2.5,0) -- (2.5,0);
\draw (-1.5,0.15) -- (-1.5,-0.15) node [below] {$-4$};
\draw (1.5,0.15) -- (1.5,-0.15) node [below] {$0$};
\onslide<5->{\draw[color=blue, fill=white] (-1.5,0) circle [radius=2.5pt];}
\onslide<6->{\draw[color=blue, fill=white] (1.5,0) circle [radius=2.5pt];}
\onslide<7->{\draw[color=blue, ultra thick, ->, shorten <=2.5pt] (-1.5,0) -- (-2.5,0);}
\end{tikzpicture}
}
\end{center}
\onslide<8->{\[x < - 4\]}
\end{frame}

\begin{frame}{Example 2}
(b)	\quad	$\frac{5}{3} - \frac{1}{x} \geq \frac{1}{3x}$
\onslide<2->{\[\frac{5}{3} - \frac{1}{x} = \frac{1}{3x}\]}	\\[5pt]
\onslide<3->{From Example 1b, we got $x=\frac{4}{5}$ and $x \neq 0$}	\\[5pt]
\begin{center}
\onslide<4->{
\begin{tikzpicture}
\draw [<->, >=stealth] (-2.5,0) -- (2.5,0);
\draw (-1.5,0.15) -- (-1.5,-0.15) node [below] {$0$};
\draw (1.5,0.15) -- (1.5,-0.15) node [below] {$\tfrac{4}{5}$};
\onslide<5->{\draw[color=blue, fill=white] (-1.5,0) circle [radius=2.5pt];}
\onslide<6->{\draw[color=blue, fill=blue] (1.5,0) circle [radius=2.5pt];}
\onslide<7->{\draw[color=blue, ultra thick, ->, shorten <=2.5pt] (-1.5,0) -- (-2.5,0);
\draw[color=blue, ultra thick, ->, shorten <=2.5pt] (1.5,0) -- (2.5,0);}
\end{tikzpicture}
}
\end{center}
\onslide<8->{\[x < 0 \text{\quad or \quad} x \geq \frac{4}{5}\]}
\end{frame}

\begin{frame}{Example 2}
(c)	\quad	$\frac{1}{x+4} \leq \frac{6x-42}{x^2+4x} + \frac{x-8}{x^2+4x}$
\onslide<2->{\[\frac{1}{x+4} = \frac{6x-42}{x^2+4x} + \frac{x-8}{x^2+4x}\]}	\\[5pt]
\onslide<3->{From Example 1c, we got $x=\frac{25}{3}$ and $x \neq 0, \, -4$}	\\[5pt]
\begin{center}
\onslide<4->{
\begin{tikzpicture}
\draw [<->, >=stealth] (-2.5,0) -- (2.5,0);
\draw (-1.5,0.15) -- (-1.5,-0.15) node [below] {$-4$};
\draw (0,0.15) -- (0,-0.15) node [below] {$0$};
\draw (1.5,0.15) -- (1.5,-0.15) node [below] {$\tfrac{25}{3}$};
\onslide<5->{\draw[color=blue, fill=white] (-1.5,0) circle [radius=2.5pt];}
\onslide<6->{\draw[color=blue, fill=blue] (1.5,0) circle [radius=2.5pt];}
\onslide<5->{\draw[color=blue, fill=white] (0,0) circle [radius=2.5pt];}
\onslide<7->{\draw[color=blue, ultra thick, shorten <=2.5pt, shorten >=2.5pt] (-1.5,0) -- (0,0);
\draw[color=blue, ultra thick, ->, shorten <=2.5pt] (1.5,0) -- (2.5,0);}
\end{tikzpicture}
}
\end{center}
\onslide<8->{\[-4 < x < 0 \text{\quad or \quad} x \geq \frac{25}{3}\]}
\end{frame}

\begin{frame}{Example 2}
(d)	\quad	$\frac{1}{x^2-x} + \frac{1}{x} > \frac{5}{x^2-x}$
\onslide<2->{\[\frac{1}{x^2-x} + \frac{1}{x} = \frac{5}{x^2-x}\]}	\\[5pt]
\onslide<3->{From Example 1d, we got $x=5$ and $x \neq 0, \, 1$}	\\[5pt]
\begin{center}
\onslide<4->{
\begin{tikzpicture}
\draw [<->, >=stealth] (-2.5,0) -- (2.5,0);
\draw (-1.5,0.15) -- (-1.5,-0.15) node [below] {$0$};
\draw (0,0.15) -- (0,-0.15) node [below] {$1$};
\draw (1.5,0.15) -- (1.5,-0.15) node [below] {$5$};
\onslide<5->{\draw[color=blue, fill=white] (-1.5,0) circle [radius=2.5pt];}
\onslide<5->{\draw[color=blue, fill=white] (1.5,0) circle [radius=2.5pt];}
\onslide<5->{\draw[color=blue, fill=white] (0,0) circle [radius=2.5pt];}
\onslide<7->{\draw[color=blue, ultra thick, shorten <=2.5pt, shorten >=2.5pt] (-1.5,0) -- (0,0);
\draw[color=blue, ultra thick, ->, shorten <=2.5pt] (1.5,0) -- (2.5,0);}
\end{tikzpicture}
}
\end{center}
\onslide<8->{\[0 < x < 1 \text{\quad or \quad} x > 5\]}
\end{frame}

\begin{frame}{Example 2}
(e)	\quad	$1 \leq \frac{2}{x^2+x} + \frac{2}{x+1}$
\onslide<2->{\[1 = \frac{2}{x^2+x} + \frac{2}{x+1}\]}	\\[5pt]
\onslide<3->{From Example 1e, we got $x=2$ and $x \neq 0, \, -1$}	\\[5pt]
\begin{center}
\onslide<4->{
\begin{tikzpicture}
\draw [<->, >=stealth] (-2.5,0) -- (2.5,0);
\draw (-1.5,0.15) -- (-1.5,-0.15) node [below] {$-1$};
\draw (0,0.15) -- (0,-0.15) node [below] {$0$};
\draw (1.5,0.15) -- (1.5,-0.15) node [below] {$2$};
\onslide<5->{\draw[color=blue, fill=white] (-1.5,0) circle [radius=2.5pt];}
\onslide<6->{\draw[color=blue, fill=blue] (1.5,0) circle [radius=2.5pt];}
\onslide<5->{\draw[color=blue, fill=white] (0,0) circle [radius=2.5pt];}
\onslide<7->{\draw[color=blue, ultra thick, shorten <=2.5pt, shorten >=2.5pt] (0,0) -- (1.5,0);}
\end{tikzpicture}
}
\end{center}
\onslide<8->{\[0 < x \leq 2\]}
\end{frame}

\begin{frame}{Example 2}
(f)		\quad	$\frac{1}{3x-15} \geq \frac{1}{x^2-2x-15} + \frac{x^2}{3x^2-6x-45}$
\onslide<2->{\[\frac{1}{3x-15} = \frac{1}{x^2-2x-15} + \frac{x^2}{3x^2-6x-45}\]}	\\[5pt]
\onslide<3->{From Example 1f, we got $x=0, \, 1$ and $x \neq 5, \, -3$}	\\[5pt]
\begin{center}
\onslide<4->{
\begin{tikzpicture}
\draw [<->, >=stealth] (-3.5,0) -- (3.5,0);
\draw (-2.5,0.15) -- (-2.5,-0.15) node [below] {$-3$};
\draw (-0.75,0.15) -- (-0.75,-0.15) node [below] {$0$};
\draw (0.75,0.15) -- (0.75,-0.15) node [below] {$1$};
\draw (2.5,0.15) -- (2.5,-0.15) node [below] {$5$};
\onslide<5->{\draw[color=blue, fill=white] (-2.5,0) circle [radius=2.5pt];}
\onslide<6->{\draw[color=blue, fill=blue] (0.75,0) circle [radius=2.5pt];}
\onslide<6->{\draw[color=blue, fill=blue] (-0.75,0) circle [radius=2.5pt];}
\onslide<5->{\draw[color=blue, fill=white] (2.5,0) circle [radius=2.5pt];}
\onslide<7->{\draw[color=blue, ultra thick, shorten <=2.5pt, shorten >=2.5pt] (-2.5,0) -- (-0.75,0);
\draw[color=blue, ultra thick, shorten <=2.5pt, shorten >=2.5pt] (0.75,0) -- (2.5,0);}
\end{tikzpicture}
}
\end{center}
\onslide<8->{\[-3 < x \leq 0 \text{\quad or \quad} 1 \leq x < 5\]}
\end{frame}

\end{document}