\chapter{Real Numbers, Algebra and Trigonometry\label{RealsChapter}}
In order to successfully
study calculus, it is necessary to have a reasonably good
background in college algebra, or
at least a fairly rigorous senior-level high school algebra.
As we move through the textbook trigonometry also becomes
increasingly important.  It is difficult but possible
for a motivated student to learn enough
trigonometry ``along the way'' to complete a calculus course,
but if a student's algebra is very weak that usually dooms the student
to fail a study of calculus.

Now it should be pointed out that many students who are not
completely proficient in the prerequisite
algebra or trigonometry finally
discover many of the nuances of these two fields in the study
of calculus.
Technicalities of algebra and trigonometry
that may have been ignored or de-emphasized in those courses
can loom large in importance in rather common calculus problems,
and students usually respond by sharpening their pre-calculus skills
along the way.
Put another way, applying algebra and trigonometry to the very
rich topics of calculus makes them
``come alive'' for many students.

However, a ``D'' student in algebra is very unlikely to pass a calculus
course.  In fact at university, a ``C'' student in algebra
will have much difficulty passing  calculus, while for ``B'' or ``A''
students in algebra, it is often difficult to predict the level of
success---or failure---in subsequent calculus courses.
This is because calculus is so different from algebra or
trigonometry, despite these being prerequisites.\footnote{%
%%% FOOTNOTE
Once into the calculus sequence, it is easier to predict
future success.
A ``C'' student in Calculus~I has to work much harder to
earn a ``C'' in Calculus~II, and a ``D'' student in Calculus~I
is almost certain to fail Calculus~II.  In fact it is common
to drop one letter grade from Calculus~I to Calculus~II, but
most find multivariable calculus (Calculus~III) easier than
Calculus~II.  For our purposes Calculus~I is, roughly, through
Chapter~\ref{FirstIntegrationChapter}.%
%%% END FOOTNOTE
}

Almost all calculus textbooks begin with a short chapter devoted
to review of
some of the algebra and trigonometry skills that are needed later
in the textbook.  We will have something similar here, but
for a few reasons it will differ significantly from the usual
approach.
\begin{itemize}
\item  First, it is difficult or impossible to include every
technicality which will occur later in the text, and still have
a coherent review.
\item Second, many students have seen some of the concepts
in two, three, or even more classes and thus tend
to ``go through the motions'' of solving the problems
without thinking about the logic, and so a repeat of the same concepts
in the same settings will probably do little good.\footnote{%
%%% FOOTNOTE
Some of the reviews found in the textbooks are actually quite good
in summarizing the algebra and trigonometry principles needed
in the course.  However, particularly in college courses
it is rare that a professor
has the time or inclination to follow through with the complete review.
Indeed, for whatever reasons the professor is usually impatient to get
to the calculus, which for us starts with
Chapter~\ref{LimitsAndContinuityChapter}.

This resistance to starting
with a standard algebra and trigonometry review is actually reasonable
for pedagogical reasons.  The tone
set for the course by a review of high school algebra is arguably
incompatible with a tone appropriate for the much more sophisticated
study of calculus.  In the author's experience, it lowers the expectations
of the students for load and level of the work required for the
actual calculus, and thus can be very counter-productive.  Indeed, for
calculus it usually works better to communicate to the students
that these skills are expected to be already posessed, putting students
who may be somewhat weak ``on notice'' that they will have to
work even harder, to resolve those weaknesses and not be ``too comfortable''
with their pre-calculus skills.%
%%% END FOOTNOTE
}
\item
Finally, the student reading along this textbook has some knowledge
of formal symbolic logic, and this can better illuminate
what may seem like mundane topics.
\end{itemize}

This chapter does therefore contain a review of algebra
and trigonometry, but with a more sophisticated
(and perhaps less comprehensive) approach.
Much of the notation used here is familiar to senior-level
mathematics majors, and much of it is even smuggled quietly
into the lectures of calculus professors, but it is rarely found
in calculus textbooks.

We begin with all of the axioms that define the real numbers
$\Re$, in part to help us to see how we can manipulate and solve
certain equations and inequalities.  We then proceed to a section
dealing with polynomial and radical methods, and then to functions, and
finally trigonometric functions.

It is important for the student to read this chapter, but it is also
important not to bog down here.  This can be read quickly and revisited
on occasion as one reads through the text.  As mentioned before,
the actual calculus  begins in the next chapter.

For reference we mention again some special sets of numbers:
\begin{alignat}{3}
&\text{Natural Numbers:}&\qquad&{\mathbb N}&&=\left\{1,2,3,4,\cdots\right\}\\
&\text{Integers:}&&
 {\mathbb Z}&&=\left\{\cdots,-4,-3,-2,-1,0,1,2,3,4,\cdots\right\}\\
&\text{Rational Numbers:}&&
 {\mathbb Q}&&=\left\{\left.{p}/{q}\ \right|\ (p,q\in{\mathbb Z})
           \wedge(q\ne0)\right\}\\
&\text{Real Numbers:}&&\Re&&\ \text{(to be defined)}\end{alignat}

\newpage
\section{Real Numbers Defined\label{RealNumbersSection}}

We will see that
there is something special about the set $\Re$ of real numbers.
This is not to say $\mathbb{N}$, $\mathbb{Z}$ and $\mathbb{Q}$
are not interesting.  After all, $\mathbb{N}$
has infinitely many elements, $\mathbb{Z}$
is infinite in two directions and contains
zero and negative numbers, and $\mathbb{Q}$
allows us to divide  any member by any other member
except  zero and the result will still be rational.
In fact the leap from $\mathbb{Z}$ to $\mathbb{Q}$
is impressive for more than algebraic reasons since---unlike
$\mathbb{N}$ and $\mathbb{Z}$---the
rational number set $\mathbb{Q}$ is ``infinitely crowded''
in the sense that between any two rational
numbers is another rational number.
Indeed,
given $x_1,x_2\in\mathbb{Q}$, where $x_1\ne x_2$, we can
find the number halfway between these, say $x_3$, and
we will show that it too will be rational (a ratio of integers).
To see this, we begin with the definition of $x_1,x_2\in\mathbb{Q}$:
$x_1=\frac{p_1}{q_1}$, $x_2=\frac{p_2}{q_2}$, where
$p_1,p_2,q_1,q_2\in\mathbb{Z}$, $q_1,q_2\ne0$.
Then  $x_3$ is given by
$$x_3=\frac{x_1+x_2}{2}=\frac12\left[\frac{p_1}{q_1}+\frac{p_2}{q_2}
\right]=\frac{p_1q_2+p_2q_1}{2q_1q_2}\in\mathbb{Q}.$$
That $x_3\in\mathbb{Q}$
is due to the fact that the numerator and denominator
of $x_3=(p_1q_2+p_2q_1)/(2q_1q_2)$ are both integers (since
sums and products of integers are also integers),
and $q_1q_2\ne0$ (see Theorem~\ref{NoZeroDivisors}).
It is not hard to see that we can repeat this construction
to find a rational number halfway between $x_3$ and $x_1$
(or between $x_3$ and $x_2$),
and then find  a rational number halfway between the new number and
$x_1$, and so on {\it ad infinitum}\footnotemark,%
\footnotetext{Latin, meaning without end (literally, {\it to
infinity}).}
and thus find  infinitely many
rational numbers between any such $x_1,x_2\in\mathbb{Q}$.
Note that this is not the case with either $\mathbb{N}$
or $\mathbb{Z}$.

Despite $\mathbb{Q}$'s apparent density of elements,
there are very important omissions in assuming
all numbers are rational.  For instance,
it was known even to the ancient Greeks that numbers like $\sqrt2$
exist, but are not rational.  To see it exists, we need
only consider an isosceles right triangle with
small sides $1$ and $1$ as in Figure~\ref{sqrt2figure}.
(Recall that we know the hypotenuse $c$ will be some
number whose square is $2$ because $1^2+1^2=c^2$.)
So such a number does exist (in the sense that we
can measure it as a length!).

That $\sqrt2\notin\mathbb{Q}$ is not so obvious, but
a proof is not difficult.  The jist of a proof would go
like this:  Suppose $\sqrt2\in\mathbb{Q}$.  Then
$\sqrt{2}=p/q$, where $p$ and $q$
are integers.  Squaring both sides we get
$2=p^2/q^2$, upon which multiplying by $q^2$ gives
$2q^2=p^2$. But if we were to do a prime factorization of
both sides of this equation, the left-hand side would
have an odd number of factors of $2$, and the right-hand
side an even number of factors of $2$.
This is a contradiction, so our assumption
$\sqrt2\in\mathbb{Q}$ must be false.
(Recall $P\longrightarrow \F\iff(\sim P)$.
Here $P:\sqrt2\in\mathbb{Q}$.)

\begin{figure}
\begin{center}\begin{pspicture}(-1,0)(4,2)
\psline(0,0)(2,2)(4,0)(0,0)
\psline(1.8,1.8)(2,1.6)(2.2,1.8)
\rput(.8,1.2){$1$}
\rput(3.2,1.2){$1$}
\rput(2,-.3){$\sqrt2$}
\end{pspicture}

\end{center}
\label{sqrt2figure}\caption{Construction of the
length $\sqrt2$ from lengths $1$ and $1$. The
hypotenuse (side opposite the right angle) of the
triangle will have some length $c$, where
$1^2+1^2=c^2$, i.e., $c=\sqrt2$.}
\end{figure}

The argument that $\sqrt2\notin\mathbb{Q}$ was not based
on calculus, and it would be a long distraction to justify
it rigorously here.\footnotemark\footnotetext{It should still at
least have the
ring of truth to the reader familiar with elementary
algebra and prime factorization of natural numbers
(other than 1).
For example,
\begin{align*}3000&=3\cdot1000=3\cdot2\cdot500=3\cdot2\cdot2\cdot250
=3\cdot2\cdot2\cdot2\cdot125=3\cdot2^3\cdot5\cdot25\\
&=2^3\cdot3^1\cdot5^3. \end{align*}
So we have factored 3000 into a product of powers of prime
numbers.  A fact used often in elementary arithmetic is that
such a factorization is unique, no matter what path we
take to achieve a prime factorization (for instance, we could
have begun by dividing by 5 first) so the number of factors of
2, for instance, is determined uniquely at the start, for the
given natural number
being factored.  As we see in  our example, there are exactly 3 factors of 2
in the prime factorization of 3000.}
\hphantom{. }%
Nonetheless we should take note that, despite
its  density,  the set $\mathbb{Q}$ of rational numbers
is not sufficient to make measures on a {\it continuum}
like the real line.  (Recall Figure~\ref{numberline}.)

But we are not being careful in the above discussion.
To remedy this, we will list  thirteen axioms which
have been used historically to
define the real numbers.  We will then derive some
familiar properties of the real numbers,
including their arithmetic, and
show how to exploit these to solve algebraic problems.

Indeed the real numbers are special.  Technically, they form
the smallest ordered field\footnote{%
%%% FOOTNOTE
See comments after A8, page~\pageref{A8Page} for the definition
of field.
%%% END FOOTNOTE
} which contains $\mathbb{Q}$
and possesses the least upper bound property.  Less
formally $\Re$ is the set which can be identified
member-by-point with the geometric line we regard as
a continuum.  And its elements
are precisely those we must include in order
to do calculus.

\bigskip

Before we go on, we should recognize that
many students (and even some professionals!)
perform calculations without knowing the
underlying principles  which  justify
their work.  Much worse, students are often
mistaken about what can and cannot be done, for example
to both sides of an equation or inequality.
It is important that we be always
faithful to valid mathematical principles or our work will be
incorrect.

At the same time, we should strive
for clarity in our work, or else we will again be at much
greater risk of error.  We should be precise in
our use of notation.  We should  avoid consolidating
too many steps.  With every manipulation,
we should check that it is valid.  If we are clear in
our presentation,
we can re-read (rather than re-do) our work to check
for errors.  Sometimes this requires us to re-examine, and
possibly discard old algebraic habits, so let the
reader beware!

In fairness, it should be noted that the next section is
very technical.  To exercise one's ability to think abstractly,
Section~\ref{RealNumbersSection} should be re-read
on occasion, for it is usually difficult to fully understand and
appreciate upon the first reading.  In fact,
it is not likely to be transparent upon a first reading.
If that is the case, it is useful to go on to other sections,
and then revisit Section~\ref{RealNumbersSection} in light of what
is learned in later sections.  The material in the later sections
is likely familiar, but our logic studies should cast a new light
upon the algebraic material there.

\newpage

\subsection{Axioms}
In mathematics, we begin with fundamental statements which we
assume to be true, and so we state them without proof.  These
are called {\em axioms}.\footnotemark\footnotetext{Also known
as postulates. Borrowing an image from chemistry, we can
identify axioms with the atomic elements we construct
molecules (mathematical systems)
from, with valid logic assuming the role of chemical bonds.
Recall Section~\ref{LogicEpilogue}.}
In particular, we assume the following
rules about the real numbers $\Re$, and these in turn
are collectively the defining properties of $\Re$
with the familiar operations
of addition ($+$) and multiplication($\cdot$)
(note that we often simply write $xy$ instead of $x\cdot y$).
\begin{description}
%\item[\ul{A0. Superset of  Natural Numbers}] $R\supseteq\mathbb{N}$, and
%$+$, $\cdot$ for $\Re$ is consistent with the same operations
%within $\mathbb{N}$.
%\end{description}
%Many texts do not include this axiom, as it is actually
%redundant after A9.  However,  for simplicity
%we  include it here, designate it A0, and do not count it
%as one of the thirteen.
%
%To be rigorous, we should note that we have not formally
%defined $\mathbb{N}$, but natural numbers are intuitive and
% it would be a distraction
%to do so define them here.  Instead we will  rely on our intuition and
%leave the development of a formal definition of
%$\mathbb{N}$ for  the exercises.
\item[\ul{A1.\vphantom{g} Closures}] $\Re$ possesses two well-defined
operations $+$ and $\cdot$ so that\footnote{%
%%%%% FOOTNOTE
By well-defined, we mean that any time we combine the same
two numbers in the same order, we get the same result.
In other words, $x+y$ and $x\cdot y$ stay the same if $x$ and $y$
stay the same.  Thus $2+3$ gives the same result every time
it is computed, and so does $2\cdot3$.
%%%%% END FOOTNOTE
}
$$(\forall x,y\in\Re) [(x+y\in\Re)\wedge(x y\in\Re)].$$

In other words, we do not leave the real numbers when we
take two real numbers and add or multiply them.
To state these separately, we say the real numbers are
{\it closed under addition,}  and {\it closed under multiplication.}

Note also that $x+y$ is called the {\it sum} of $x$ and $y$,
while $xy$ is called the {\it product} of $x$ and $y$.

\item[\ul{A2. Commutative Properties of Addition
and Multiplication}] $$(\forall x,y\in\Re)
[(x+y=y+x)\wedge(xy=yx)].$$
These are just the familiar properties that order does not
matter when we add, and does not matter when we multiply.
Of course, if we do both in the same expression we must be
more careful (see A8).
\item[\ul{A3. Associative Properties of Addition and Multiplication}:]
\begin{align*}
(\forall x,y,z\in\Re)
\left\{\vphantom{\frac12}
 [x+(y+z)\right.&=(x+y)+z]\\
\wedge\quad [x(yz)&=(xy)z]\left.\vphantom{\frac12}\right\}
\end{align*}
Again, these should be familiar.  The idea is that, in a sum
we can group terms however we like, and that the same holds for
a product.  However, again we need to be cautious if we do both
(see again  A8).
\item[\ul{A4. Existence of an Additive Identity}]
$(\exists0\in\Re)(\forall x\in\Re)(0+x=x).$

At this point we are departing slightly from the natural numbers
$\mathbb{N}$, in that we require the presence of a zero element.
Without it, the next axiom would be meaningless, and without that
axiom, there would be no subtraction.

We should also note that the mere existence of such an identity
implies its uniqueness:
\end{description}
\begin{theorem}
$(\exists\, !\, y\in\Re)(\forall x\in\Re)(x+y=x)$.
\end{theorem}
Note that existence is an axiom, so the real import
of the theorem is that the additive identity element
of $\Re$ is unique.
\newpage

\begin{proof}Existence is assumed in A4.
To prove uniqueness, suppose $0,0'$ are both additive identities.
Then\footnote{%
%%%% FOOTNOTE
Note that $0'$ is pronounced ``zero prime.''}
\begin{alignat*}{2}
0+0'&=0&\qquad&\text{since $0'$ is an additive identity, and}\\
0'+0&=0'&&\text{since $0$ is an additive identity.}\end{alignat*}
But then commutivity gives $0=0+0'=0'+0=0'$, so $0=0'$.
Thus any two additive identities must be the same, q.e.d.\end{proof}

\begin{description}
\item[\ul{A5. Existence of\vphantom{g} Additive Inverses}] $(\forall x\in\Re)
(\exists (-x)\in\Re)  (x+(-x)=0).$

Now we can define subtraction in the familiar way
(see Section~\ref{ArithmeticWithRealNumbers}:
$x-y=x+(-y)$.)  From this axiom and the closure under
addition, we have
closure under subtraction, for
$$x,y\in\Re\implies x,-y\in\Re\implies x-y=x+(-y)\in\Re,$$
where the first implication follows from A5 and the second from A1.

The uniqueness of the additive inverse now follows in
a manner similar in spirit to the previous uniqueness
theorem:
\end{description}
\begin{theorem} $(\forall x\in\Re)(\exists \,!\, y\in\Re)(x+y=0)$.
\end{theorem}
\begin{proof}
The existence is given by A5.  For uniqueness, suppose
$y_1,y_2\in\Re$ are additive inverses of $x$.
Also let $-x$ denote some fixed additive inverse of $x$.
Then
\begin{alignat*}{2}
&&x+y_1&=0=x+y_2\\
\implies&& x+y_1&=x+y_2\\
\implies&\qquad&x+y_1-x&=x+y_2-x\qquad\text{(by the well-defined nature of
    addition, A1)\footnotemark}\\
\implies&&x-x+y_1&=x-x+y_2\\
\implies&&0+y_1&=0+y_2\\
\implies&&y_1&=y_2,\qquad\text{q.e.d.}
\end{alignat*}\end{proof}
\footnotetext{We used that $(x+y_1)=(x+y_2)\implies
  (x+y_1)+(-x)=(x+y_2)+(-x)$, which is true because addition is
well-defined, i.e., whenever we add the same two numbers, we get
the same result.  In fact we actually have $\iff$ here, because
if we  next add $x$ to both sides (and insert parentheses
for clarity) we get
\begin{align*}(x+y_1)=(x+y_2)&\implies
  (x+y_1)+(-x)=(x+y_2)+(-x)\\
  &\implies(x+y_1)+(-x)+x=(x+y_2)+(-x)+x\\
  &\implies (x+y_1)=(x+y_2),\end{align*}
so we have a case of the form $P\implies Q\implies P$, which
summarizes to $P\iff Q$.}
\begin{description}
\item[\ul{A6. Existence of a Multiplicative Identity}]
$(\exists1\in\Re)(\forall x\in\Re)(1\cdot x=x)$.

Just as the presence of $0\in\Re$ was needed for subtraction,
so is the presence of $1\in\Re$ necessary for division.
Furthermore, just as existence implies uniqueness in
A4 and A5, the same is true here.  The proof of the following
is left as an exercise (See
Exercise~\ref{UniquenessOfIdentitiesExercise}).
\end{description}
\begin{theorem}$(\exists \,!\, y\in\Re)(\forall x\in\Re)(xy=x)$.
\end{theorem}
\begin{description}
\item[\hphantom{HI}]\hfill
\newline
With this axiom we are almost ready to construct
$\mathbb{N}$ and $\mathbb{Z}$, except that---upon
careful inspection---we notice that there is no
guarantee that $1\ne0$.  If we knew for certain
that $1,0$ were separate
elements of $\Re$, then we could define $2=1+1\in\Re$,
$3=2+1\in\Re$, $\dots$, allowing us to construct $\mathbb{N}$,
as well as defining $-1=0-1\in\Re$, $-2=-1-1\in\Re$,
etc., to finish the job of constructing $\mathbb{Z}$ as well.
Unfortunately, if $1=0$ then these are all the same
numbers, and so we would just be describing $\{0\}$.  Of course
we expect  $\Re$ to contain more than one element,
or it would be of little use.  So we must assume more.

\item[\ul{A7. Existence of Multiplicative Inverses}]
$$(\forall x\in\Re-\{0\})
(\exists x^{-1}\in\Re)( xx^{-1}=1).$$
Just as we had uniqueness of the additive inverse, so too
can we prove uniqueness of the multiplicative inverse:
\end{description}
\begin{theorem}
$(\forall x\in\Re-\{0\})(\exists \,!\, y\in\Re)(xy=1)$.
\label{UniquenessOfAdditiveInverseTheorem}
\end{theorem}
\begin{description}
\item[]\hfill\newline
The proof is the same as for the additive inverse, except
we replace $+$ with $\cdot$, $0$ with $1$ and
$-x$ with $x^{-1}$. Note that this is all vacuously true
if $\Re=\{0\}$, but we will eventually prove that
$1\ne0$, and then we will know $\Re$ is more than just
$\{0\}$.

At this point  we can define division
(and ratios) by defining,
for all $x,y\in\Re$, $y\ne0$
the ratio
\begin{equation}
\frac{x}y=x\cdot y^{-1}.\end{equation}

\item[\ul{A8. Distributivity of Multiplication over Addition}]
$(\forall x,y,z\in\Re)$
\begin{equation}x(y+z)=xy+xz.\label{DistributiveEquation}\end{equation}
\end{description}
Note that we carry out multiplications before additions on the
right hand side of (\ref{DistributiveEquation}), i.e.,
$xy+xz=(xy)+(xz)$. One intuitive way to think about
(\ref{DistributiveEquation}) is that the left-hand side
represents $x$ ``$(y+z)$'s,'' while the right-hand side
represents $x$ ``$y$'s'' plus $x$ ``$z$'s.''  Another
way to look at it, at least for $x,y,z$ all positive (which we
define later), to compare the areas that both sides of
(\ref{DistributiveEquation}) represent, as in
Figure~\ref{DistributiveFigure}.

\begin{figure}
\begin{center}
\begin{pspicture}(0,0)(6,4)
\psline(1,1)(5,1)(5,3)(1,3)(1,1)
\psline(2.5,1)(2.5,3)
\psline{<-}(.7,1)(.7,1.8)
\psline{->}(.7,2.2)(.7,3)
\rput(.7,2){$x$}

\psline{<-}(1,3.3)(1.55,3.3)
\psline{->}(1.95,3.3)(2.5,3.3)
\rput(1.75,3.3){$y$}

\psline{<-}(2.5,3.3)(3.55,3.3)
\psline{->}(3.95,3.3)(5,3.3)
\rput(3.75,3.3){$z$}

\rput(1.75,2){$xy$}
\rput(3.75,2){$xz$}

\psline{<-}(1,.7)(2.5,.7)
\psline{->}(3.5,.7)(5,.7)
\rput(3,.7){$y+z$}

\end{pspicture}
\qquad\qquad
\begin{pspicture}(0,0)(5,4)
\rput(1.5,2){$\ds{\begin{array}{rcl}\text{Area}&=&xy+xz,\\
                           \text{Area}&=&x(y+z),\\
                           \implies x(y+z)&=&xy+xz,\text{ q.e.d.}\end{array}}$}
\end{pspicture}
\end{center}
\caption{Figure showing the distributive axiom (A8) for
the case that $x$, $y$ and $z$ are all positive, by
examining the areas illustrated above.}
\label{DistributiveFigure}
\end{figure}

Axioms A1--A8 are algebraic in nature and
are called {\it field axioms; }any set which has a structure
conforming to A1--A8 is called a {\it field}.\label{A8Page}  $\mathbb{Q}$ is
a field, as is $\Re$, though $\mathbb{N}$ and $\mathbb{Z}$ are
not.

We now prove a theorem of arithmetic:
\begin{theorem}$(\forall x\in\Re)(x\cdot 0=0).$
\label{ZeroAnnihilates}\end{theorem}
\begin{proof}
Suppose $x\in\Re$.  Then by the nature of $0$ and
the distributive axiom we have
\begin{alignat*}{2}
&&x\cdot0&=x\cdot(0+0)=x\cdot0+x\cdot0\\
\implies&&x\cdot0&=x\cdot0+x\cdot 0\\
\implies&\qquad&x\cdot 0 - x\cdot 0&=x\cdot 0+x\cdot 0-x\cdot 0\\
\implies&&0&=x\cdot 0,\qquad\text{q.e.d.}\end{alignat*}

\end{proof}

Next we have the
{\it axioms of order:}
\begin{description}
\item[\ul{A9. Trichotomy}]
 $(\forall x,y\in\Re) [(x< y)\vee(y< x)\vee(x=y)]$.  Furthermore,
	the three cases are mutually exclusive.  Thus,
\begin{align*}
	(\forall x,y\in\Re)&[(x<y)\longleftrightarrow\sim((y<x)\vee(x=y))],\\
	(\forall x,y\in\Re)&[(y<x)\longleftrightarrow\sim((x<y)\vee(x=y))],\\
	(\forall x,y\in\Re)&[(x=y)\longleftrightarrow\sim((x<y)\vee(y<x))].
\end{align*}
In other words, {\it exactly one} of these three cases will
hold for a given $x$ and $y$.

\item[\ul{A10. Transitivity}]
 $(\forall x,y,z\in\Re)[(x< y)\wedge(y< z)\longrightarrow (x< z)]$.
\end{description}
These first two axioms of order, A9 and A10, allow us to position
elements of $\Re$ on a line in a consistent
order from left to right.  Two elements $x,y\in\Re$
are placed so that $x$ is left of, right of, or
at the same position as $y$, and the ranking is
consistent in that if $z$ is right of $y$ (i.e.,
$y<z$), and $y$ is right of $x$ ($x<y$), then $z$ is to the right
of $x$ ($y<z$) on the line.

Before moving to the next axiom, we make mention of a couple
 familiar definitions.
\begin{definition} For a given $x,y\in\Re$, define
$>$, $\le$, $\ge$, {\rm positive, negative, nonpositive,
nonnegative, less than, greater than, less than or equal to},
and {\rm greater than or equal to} as follow:
\begin{align}
x>y&\iff y<x\\ x\le y&\iff (x<y)\vee(x=y)\\
x\ge y&\iff (x>y)\vee(x=y).\end{align}
Next,  $x$ is called
{\rm positive} iff $x>0$,   and {\rm negative}
iff $x<0$.   We also call $x$ {\rm nonpositive}
iff $x\le0$, and {\rm nonnegative} iff $x\ge 0$.
For $x<y$, we say $x$ is {\rm less than} $y$, or equivalently, $y$ is
{\rm greater than} $x$.  For $x\le y$, we say
$x$ is {\rm less than or equal to }$y$, or equivalently,
$y$ is {\rm greater than or equal to }$x$.
\label{TrichotomyCasesDefinitions}\end{definition}

\begin{description}

\item[\ul{A11. Translation \vphantom{g}Preserves Order}]
 $(\forall x,y,z\in\Re)[(x< y)\longrightarrow x+z< y+z]$.
\end{description}
This is probably familiar, and is a very important property of $\Re$.
Later we will take advantage of the fact that $\Re$ can be
interpreted as a set of translations\footnotemark\
on the number line (which is
also a representation of $\Re$) from any fixed point.
\footnotetext{The term {\it translation}  motion,
in this case to the left or right on the number line,
which is introduced in Figure~\ref{NumberLineII}.
It may seem strange to think of $\Re$ as translations along
$\Re$, but it is really no different than contemplating transporting
one
vehicle on top of another vehicle.  Even if they are exactly the
same type of vehicle, it is not hard to imagine circumstances
when such an arrangement would be useful.}
\begin{description}
\item[\ul{A12. Existence of Positive Numbers}]
$(\exists x\in\Re)(x>0)$.

After adding this assumption we know that $\Re\ne\{0\}$, since $\Re$
contains numbers which are greater than $0$ and therefore
cannot be equal to $0$.

\item[\ul{A13. Product of\vphantom{g}
 Positives is Positive}]
 $(\forall x,y\in\Re)[( x>0)\wedge(y>0)\longrightarrow xy>0]$.
\end{description}

With these axioms we can prove a very simple but important theorem which
helps us construct a geometrical interpretation of $\Re$:
\begin{theorem}$1>0$.\label{1>0}\end{theorem}
\bigskip

\begin{proof} First we show  that $1\ne0$.
Suppose $1=0$.  By A12, we can choose some real $x>0$.  Then
by Theorem~\ref{ZeroAnnihilates} and
A13, we have $0=0\cdot x= 1\cdot x=x>0$,
which is a contradiction (since it implies $0>0$).
We must conclude $0\ne1$.

Since we showed above that $\sim(0=1)$,
by trichotomy we now need only show $\sim(1<0)$
to conclude the desired result.

Suppose
$1<0$.  By translation by $-1$ (i.e., adding $-1$ to
both sides) we would get $0<-1$, i.e., $-1>0$.
But then we would have $1=(-1)(-1)>0$ by A12, which gives $1>0$,
contradicting our assumption that $1<0$.  Hence the assumption is
false, and $\sim(1<0)$, so (with $1\ne 0$) we conclude $1>0$, q.e.d.
\end{proof}

With this theorem and the axioms of order, we are led to a
geometric interpretation
of the real numbers, as we saw earlier (in Figure~\ref{numberline}
of Section~{\ref{Sets}}). In particular, with the theorem
and the translation invariance of $<$, we can add
$1$ or $-1$ to both sides repeatedly to get
$$\cdots\Longleftarrow
-2<-1\Longleftarrow-1<0\Longleftarrow
\boxed{0<1}\implies 1<2\implies 2<3\implies\cdots.$$
Indeed, we are justified in representing the
real numbers by a horizontal line with negative numbers
to the left of zero, and positive numbers to the right,
as in Figure~\ref{NumberLineII}.
\begin{figure}

\begin{center}\begin{picture}(250,30)(0,-10)
\put(0,0){\vector(1,0){250}}
\put(0,0){\vector(-1,0){0}}
\put(25,-3){\line(0,1){6}}\put(15,-12){$-5$}
\put(45,-3){\line(0,1){6}}\put(35,-12){$-4$}
\put(65,-3){\line(0,1){6}}\put(55,-12){$-3$}
 \put(85,-3){\line(0,1){6}}\put(75,-12){$-2$}
\put(105,-3){\line(0,1){6}}\put(95,-12){$-1$}
\put(125,-3){\line(0,1){6}}\put(123,-12){0}
\put(145,-3){\line(0,1){6}}\put(143,-12){1}
\put(165,-3){\line(0,1){6}}\put(163,-12){2}
\put(185,-3){\line(0,1){6}}\put(183,-12){3}
  \put(205,-3){\line(0,1){6}}\put(203,-12){4}
 \put(225,-3){\line(0,1){6}}\put(223,-12){5}

\end{picture}\end{center}

\caption{Real number line, with positive numbers to the left of
zero, and negative numbers to the right of zero.  See also
Figure~\ref{numberline}.}
\label{NumberLineII}\end{figure}

Actually, at this point the axioms describe exactly the rational
numbers $\mathbb{Q}$ and not the real numbers $\mathbb{R}$.
The final axiom of the real numbers is at the
heart of the idea of continuum, and is perhaps the deepest of
the thirteen axioms. It is called the least upper bound property.
First we begin with some definitions:
\begin{definition} Given a set $S\subseteq \Re$,
\begin{enumerate}
%\item A number $m$ is called a {\bf lower bound} for $S$
%	iff $(\forall s\in S)(m\le s)$.
%\item A number $M$ is called an {\bf upper bound} for $S$
%	iff $(\forall s\in S)(s\le M)$.
\item Suppose $(\exists m\in\Re)(\forall s\in S)(m\le s)$.
Then we say $S$ is {\bf bounded from below},
and call $m$ a {\bf lower bound} for $S$.
\item Suppose $(\exists M\in\Re)(\forall s\in S)(M\ge s)$.
Then we say $S$ is {\bf bounded from above},
and call $M$ an {\bf upper bound} for $S$.
\item If such $m$ and $M$ both exist, we say $S$ is {\bf bounded}.
Otherwise we say $S$ is {\bf unbounded} (meaning from above, or below,
or both).
\end{enumerate}
\label{LUBPropDefinition}\end{definition}
If $S$ has finitely many elements, it will be bounded,
i.e., $(\forall s\in S)(m\le s\le M$), where  $m$ is
the least and $M$ the greatest element  of $S$, respectively.
On the other hand, $S$ can have infinitely many
elements and still be bounded.  For instance,
if $S=\{x\in\Re|-2< x< 5\}$, then $m=-2$ and
$M=5$ will work.    Of course so will $m=-10$, $M=1000$.
But there is something special about our first choices.
There is no greater choice for $m$ which will work, and
there is no lesser choice for $M$ which will work, then
$m=-2$ and $M=5$.  We call $m$ a {\it greatest lower bound}
(glb) of $S$, and $M$ a {\it least upper bound} (lub)
of $S$.\footnote{Some texts call $m=\text{glb }S$ the {\it infimum}
of $S$, and write $m=\inf S$, and call $M=\text{lub }S$ the
{\it supremum} of $S$, written $M=\sup S$.}
\begin{definition}
Given a set $S$.  Define the following, if they exist:
\begin{align*}
M=\lub(S) &\iff ((\forall s\in S)(s\le L))\longrightarrow(M\le L)\\
m=\glb(S) &\iff ((\forall s\in S)(s\le l))\longrightarrow(m\ge l).
\end{align*}\end{definition}
In other words, $M$ is less than or equal to every upper bound
for $S$, and $m$ is greater than or equal to every lower bound for $S$.
Remember that not all sets are bounded, and a set can be bounded
from above and not below, or vice-versa.  But if a set has a
bound, then our final axiom applies.
\begin{description}
\item[\ul{A14. Least Upper Bound Property}]
If $S\subseteq \Re$ has an upper bound, then it has
a least upper bound.  Restated,
\begin{equation}
(\exists L\in\Re)(\forall s\in S)(s\le L)\implies
(\exists M\in \Re)(M=\lub(S)).\end{equation}
\end{description}
This is equivalent to the existence of a lower bound for $S$ implying
existence of $\glb(S)$,  a fact which is left as an exercise
but stated below:
\begin{theorem}
If $S\subseteq\Re$ has a lower bound, then it has a greatest lower
bound.\label{GLBTheorem}\end{theorem}
As stated just above, Theorem~\ref{GLBTheorem} $\iff$ A14.
\label{GLBPage}

Now we consider a simple example which demonstrates
how the least upper bound property distinguishes the real
numbers, $\Re$ from the rationals, $\mathbb{Q}$.
Consider the decimal expansion for $\sqrt2$.
We can construct a set $S$ which contains all the
finite expansions:
$$S=\{1, 1.4, 1.41, 1.414, 1.4142, 1.41421,
1.414213, 1.4142135, 1.41421356, \cdots\}.$$
Now, $S\subseteq\mathbb{Q}$ since all of its elements are in $\mathbb{Q}$:
$1\in\mathbb{Q}$,
$1.4=\frac{14}{10}\in\mathbb{Q}$, $1.41=\frac{141}{100}
\in\mathbb{Q}$, etc.
Furthermore, clearly $S$ is bounded from above by $2$.
Of course we can find  lesser upper bounds even with rational numbers,
such as $1.42$, or $1.415$, or $1.4143$, or $1.41422$, etc.
However, for any rational upper bound we find, we can find a better
(i.e., lesser) rational upper bound. This leads us to
conclude that $\mathbb{Q}$ does not
have the least upper bound property.  If we instead look to
$\Re$, we can see that $\sqrt2\in\Re$ is the least upper bound
we are seeking for $S$, i.e., $\sqrt2=\lub(S)$.\footnotemark
\footnotetext{Actually, we are {\it defining} $\Re$ to have
numbers like $\sqrt2$ by requiring $\Re$ to contain the
least upper bounds of  sets such as $S$.
It would be a distraction from our eventual goal---calculus---to
be too rigorous in our axiomatic development here.  It is
really the role of
junior or senior real analysis courses to define the
real numbers from scratch. In such a course,
one begins by defining $\mathbb{N}$, then generalizes to
$\mathbb{Z}$ (requiring A1--A5), then generalizes further requiring
A1--A13  to define $\mathbb{Q}$, and finally adding A14, so
that A1--A14
define $\Re$.  At each step one adds another requirement
on the abilities of the set and possibly requiring the
set to be expanded to have all the new capabilities.
In doing so we created the superset
hierarchy $$\mathbb{N}\subseteq\mathbb{Z}
\subseteq\mathbb{Q}\subseteq\Re.$$
%$\Re$ can be constructed from even more basic structures,
%but here we instead rely on
%intuition from earlier mathematics courses to trim
%the process to a manageable level.
}

For most of the remainder of this chapter we will be more
concerned with the algebraic (or, more mundanely, the
arithmetic) properties of $\Re$ which are contained in
A1--A12.  However, the calculus relies heavily on A13.
In fact, there would be no calculus without it.
Much of the time we can perform the mechanics of calculus
without worrying about the least upper bound property,
but there will be several occasions where it will be
prominent in our mathematical arguments.
For now we will content ourselves with some important
 algebraic propositions.

%\newpage\newpage
%%%%%%%%%%%%%%%% COMPLETE THESE AXIOMS LATER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{theorem} {\bf (No Real Zero Divisors)} If $x,y\in\Re$, then
$$x\cdot y=0 \quad \iff \quad (x=0)\vee(y=0).$$
\label{NoZeroDivisors}\end{theorem}
\begin{proof}
We prove the direction ``$\implies$"  by exhausting the cases:
$x\ne0$, $y\ne0$, or $x,y=0$.
\begin{enumerate}
\item Case $x\ne0$:
$$\begin{array}{rcl} (x\cdot y=0)\wedge(x\ne0)&\implies& (x\cdot y=0)\wedge
[(\exists x^{-1})(x^{-1}x=1)]\\
& \implies &x^{-1}xy=x^{-1}0\\
&\implies &1y=0\implies y=0.\end{array}$$
\item Case $y\ne0$:
$$\begin{array}{rcl} (y\cdot x=0)\wedge(y\ne0)&\implies& (y\cdot x=0)\wedge
[(\exists y^{-1})( y^{-1}y=1)]\\
& \implies &xyy^{-1}=0y^{-1}\\
&\implies &x\cdot1=0\implies x=0.\end{array}$$
\item Case $x,y=0$.  Clearly $x,y=0\implies (x=0)\vee(y=0)$, independent
of the fact that $xy=0$.
\end{enumerate}
This proves the direction $\implies$.
Conversely, $(x=0)\vee(y=0)\implies xy=0$, q.e.d.
\end{proof}

This principle is crucial for many problems in algebra.  For instance,
solving $x^2-9x+14=0$ is the same as solving $(x-7)(x-2)=0$, which
occurs if and only if $(x-7=0)\vee(x-2=0)$, i.e., if and only if
$(x=7)\vee(x=2)$.  We will make more use of this principle in the
next section, and then throughout the rest of the book.
Like many other principles, this one can be easily extended
as follows:
\begin{corollary} For any $x_1,x_2,\cdots,x_n\in\Re$,
$$x_1x_2\cdots x_n=0\iff (x_1=0)\vee(x_2=0)\vee\cdots\vee(x_n=0).$$
\end{corollary}
We will go ahead and list the proof here to show what such
a proof would look like.  It is a matter of applying the previous
theorem several times.

\begin{proof}
\begin{align*}
x_1x_2x_3\cdots x_n=0&\iff x_1(x_2x_3\cdots x_n)=0\\
                     &\iff (x_1=0)\vee(x_2x_3\cdots x_n=0)\\
                     &\iff (x_1=0)\vee(x_2=0)\vee(x_3\cdots x_n=0)\\
                     &\hphantom{11^1}\vdots\\
                     &\iff (x_1=0)\vee(x_2=0)\vee(x_3=0)\vee\cdots
                           \vee(x_n=0).
\end{align*}

\end{proof}

\newpage

\begin{center}{\Large{\bf Exercises}}\end{center}
\begin{multicols}{2}
\begin{enumerate}

\item (Uniqueness of multiplicative inverse)
Show that the existence of a multiplicative inverse
implies its uniqueness.  In other words, prove
Theorem~\ref{UniquenessOfAdditiveInverseTheorem}.
\label{UniquenessOfIdentitiesExercise}

\item Assume $a,b\ne0$. Show that $(ab)^{-1}=a^{-1}b^{-1}$.
(Hint: It is enough to show that $(ab)(a^{-1}b^{-1})=1$,
since then $a^{-1}b^{-1}$ must then be {\it the} inverse of
$(ab)$.  By definition that inverse is $(ab)^{-1}$.
Thus they must be equal.)
\item Assume $a,b\in\Re$.  Show that $-(a+b)=-a-b$.\label{-(x+y)=-x-yExercise}
\item Assume that $x,y\in\Re$.  Show the following
implications, based on the fact that
$\T\iff((x<y)\vee(x>y)\vee(x=y))$.
See Definition~\ref{TrichotomyCasesDefinitions},
de Morgan's laws and Equation~(\ref{PorQandNotQImpliesP}).
It might also be helpful to recall that
$P\iff P\wedge\T$.)
\begin{align*}
\sim(x\le y)&\implies x>y\\
\sim(x<y)&\implies x\ge y\\
\sim(x=y)&\implies (x<y)\vee(x>y)\\
(x\le y)\wedge(x\ge y)&\implies x=y.\end{align*}
\underline{Hint}: So the first computation should
begin $\sim(x\le y)\iff\T\wedge[\sim(x\le y)]\iff\cdots$.
(Actually, since in Definition~\ref{TrichotomyCasesDefinitions},
we had exclusive or's, the above are implications can be
equivalences.)

\item Use A11 to show that
$$x<y\implies x-z<y-z.$$  (Hint:
$z\in\Re\implies(-z)\in\Re$.  Now what, by definition, is $x-z$?, $y-z$?)

\item Define
\begin{align*}
\mathbb{N}&=\left\{1,2,3,\cdots\right\},\\
\mathbb{Z}&=\left\{\cdots,-3,-2,-1,0,1,2,3,\cdots\right\},\\
\mathcal{E}&=\left\{\left.\vphantom{\frac11}2k\ \right|\ k\in\mathcal{Z}
             \right\},\\
\mathcal{O}&=\left\{\left.\vphantom{\frac11}2k+1\ \right|\ k\in\mathcal{Z}
             \right\}.\end{align*}
In other words, $\mathbb{N}$ and $\mathbb{Z}$ are as before, while
                $\mathcal{E}$ is the set of all even integers and
                $\mathcal{O}$ is the set of all odd integers.
\begin{enumerate}[(a)]
  \item Is $\mathbb{N}$ closed under addition? subtraction? multiplication?
                      division?
  \item Is $\mathbb{Z}$ closed under addition? subtraction? multiplication?
                      division?
  \item Is $\mathcal{E}$ closed under addition? subtraction? multiplication?
                      division?
  \item Is $\mathcal{O}$ closed under addition? subtraction? multiplication?
                      division?
\end{enumerate}
\item Consider the set $S=\{.1, .12, .123, .1234,$ $ .12345,
                .123456, .1234567, .12345678,$ $ .123456789,
                .12345678910, \cdots\}$.
\begin{enumerate}[(a)]
  \item Find an upper bound within $0.1$ of $\lub (S)$.
  \item Find an upper bound within $0.01$ of $\lub (S)$.
  \item Find an upper bound within $0.001$ of $\lub (S)$.
  \item Find $\glb (S)$.  (See page~\pageref{GLBPage}.)
\end{enumerate}
\item Find $\lub(S)$ if
$$S=\{.9, .99, .999, .9999, .99999\cdots\}.$$

\item Show that $\ds{\frac{a}b=\frac{c}d\implies ad=bc}$.
To do so, recall that $a/b=ab^{-1}$, and $c/d=cd^{-1}$, and
multiply both sides of $a/b=c/d$ by the same expression,
which gives an implication because of the fact that multiplication
is well-defined.

\end{enumerate}

\end{multicols}
\vfill\eject

\section{Arithmetic with Real Numbers\label{ArithmeticWithRealNumbers}}
There are several familiar manipulations allowed by the
axioms of real numbers.  When expressions become complicated,
we need to be sure our methods of
calculating,  simplifying or recombining
the terms of an expression are consistent with those axioms.
In short,
it is important that we are aware of exactly what we
can do, and what we cannot in general do.

There are a few simple principles which we will employ
often, and which are only small steps from our real
number axioms.  These are important arithmetically,
and therefore algebraically, and so are  necessary
for an effective knowledge of calculus.  We begin
with subtraction and division.

\subsection{Subtraction is Addition of the Additive Inverse
\label{SubsectionOnSubtraction}}

%\begin{itemize}
%
%\item Subtraction is addition of the additive inverse.
\begin{equation}
x-y=x+(-y)\label{SubtractionIsAddingAdditiveInverse}\end{equation}
This is quite useful because, though subtraction is
not  commutative or associative,\footnotemark
addition is.
\footnotetext{To see subtraction is neither
commutative nor associative, notice the  examples
\begin{align*}
2-3&\ne3-2,\\
3-(2-1)&\ne(3-2)-1.\end{align*}}\hphantom{. }%
Thus if we translate a difference into a
sum, we can perform manipulations such as
$$x-y=x+(-y)=(-y)+x,$$
$$x-y-z=x+(-y)+(-z)=x+(-z)+(-y)=x-z-y.$$
As long as we regard subtracting $y$ as an abbreviation
for adding  $(-y)$,
we have all the freedom afforded by addition.  We just
need to be careful in our implementation.

Next we list several consequences of
 this approach to subtraction, and a few observations
which follow from our real axioms.

\begin{itemize}
\item $-y=(-1)y$.

To prove this, we need only show that $y+(-1)y=0$, because then
$(-1)y$ would act as the (unique) additive inverse of $y$, that
additive inverse being $-y$ by definition.
In light of the distributive axiom, this is easy:
$$y+(-1)y=1y+(-1)y=(1+(-1))y = 0y=0.$$
The last equality follows from Theorem~\ref{ZeroAnnihilates}.
\item $-(-y)=y$.  This is rather obvious when we
analyze what this equation says: that the additive inverse of $(-y)$
is $y$ which of course follows
from the fact that $(-y)+y=0$.

It is worth pointing out that, by our definition of $(-y)$,
this new equation and what we know of uniqueness of additive
inverses, we have that $y$ and $(-y)$ are inverses
{\em of each other}.

\item $-(x+y)=-x-y$.

This was Exercise~\ref{-(x+y)=-x-yExercise},
page~\pageref{-(x+y)=-x-yExercise}. Another proof of this is given below:
$$-(x+y)=(-1)(x+y)=(-1)x+(-1)y=-x-y.$$

\item $-(x-y)=y-x$.

Restated, $x-y$ and $y-x$ are additive inverses of
each other. One proof is:
$$-(x-y)=-x-(-y)=-x+(-(-y))=-x+y=y-x.$$

\end{itemize}

\subsection{Division is Multiplication by the Reciprocal}
\begin{equation}
\frac{x}y=x\cdot y^{-1}\label{DivisionIsMultiplicationByTheReciprocal}
\end{equation}

Here we have to assume that $y\ne0$.  Of course, given a
{\it fraction} $x/y$, we call $x$ the {\it numerator}
and $y$ the {\it denominator} of the fraction. The terms
{\it reciprocal} and
{\it multiplicative inverse} are
interchangeable.

Equation~(\ref{DivisionIsMultiplicationByTheReciprocal})
 is as useful for multiplication and division as
Equation~(\ref{SubtractionIsAddingAdditiveInverse}) is
for addition and subtraction.  Many of the following
have their analogs in Subsection~\ref{SubsectionOnSubtraction}.

\begin{itemize}
\item $\ds{a^{-1}=\frac1a}$.

This follows from (\ref{DivisionIsMultiplicationByTheReciprocal}),
though is read right to left:
$$\frac1a=1\cdot a^{-1}=a^{-1}.$$

\item $\ds{\frac{a}a=1}$.

This is also obvious from
Equation~(\ref{DivisionIsMultiplicationByTheReciprocal}):
$\frac{a}a=aa^{-1}=1$.

\item $(ab)^{-1}=a^{-1}b^{-1}$, assuming $a,b\ne0$
(and thus $ab\ne0$, see
Theorem~\ref{NoZeroDivisors}).

To prove this, note that $(ab)^{-1}$ is that
unique real number such that $(ab)^{-1}(ab)=1$.
We need only show that $(a^{-1}b^{-1})(ab)=1$ as well, so that we have two
expressions for the inverse of $ab$, so they must be the same.
$$(a^{-1}b^{-1})(ab)=a^{-1}b^{-1}ab
=a^{-1}ab^{-1}b=1\cdot 1=1,\qquad \text{q.e.d.}$$
We used associativity and commutativity several
times here.\footnotemark
\footnotetext{If we want to be careful in the
extreme, we could take one step at a time and
write something like
\begin{multline*}
(a^{-1}b^{-1})(ab)
=((a^{-1})(b^{-1}))(ab)
=(a^{-1})((b^{-1})(ab))
=(a^{-1})((b^{-1})(ba))\\
=(a^{-1})((b^{-1}b)a)
=(a^{-1})(1a)=a^{-1}a=1.\end{multline*}
Since this can be unnecessarily tiresome,
instead we will shorten such arguments with the
knowledge that for a ``pure product'' of many terms
(as for a ``pure sum'') we can  regroup and reorder
however we like, ultimately because of such
repeated applications of commutative and associative
axioms.}

\item $\ds{\frac{a}b\cdot\frac{c}d=\frac{ac}{bd}}$.

Thus, to multiply two fractions, we simply multiply their
numerators and multiply their denominators to
produce a new fraction.
With Equation~(\ref{DivisionIsMultiplicationByTheReciprocal}),
such things become trivial to prove.
$$\frac{a}b\cdot\frac{c}d=ab^{-1}cd^{-1}
=acb^{-1}d^{-1}=(ac)(bd)^{-1}=\frac{ac}{bd}.$$

\item $\ds{\left(\frac{a}b\right)^{-1}=\frac{b}a}$.

Here we have to assume that $a,b\ne0$.\footnotemark
\footnotetext{In essence, we have to assume that
nowhere in any expressions are we dividing by
zero, i.e., trying to multiply by a multiplicative
inverse of $0$.  This is because no such
inverse exists.  Indeed, since $1\ne 0$ (See Theorem~\ref{1>0}),
the existence of such a multiplicative inverse---say some
$z\in\Re$---would
lead to a contradiction:
$$1=z\cdot 0=0 \implies\F.$$
Thus
\begin{equation}(\not\exists z\in\Re)(z\cdot0=1).\end{equation}
}% End Footnote
\hphantom{. }Note that this can also be written:
$$\frac1{\left(\frac{a}b\right)}=\frac{b}a.$$
Another summary of this is the statement that
the reciprocal of $a/b$ is $b/a$. The proof is left to the reader.

\item $(a^{-1})^{-1}=a$.

There are several ways to prove this.  For instance,
$$(a^{-1})^{-1}=\left(\frac1a\right)^{-1}=
\frac1{\left(\frac1a\right)}=\frac{a}\cdot1=a\cdot1^{-1}=a\cdot1=a.$$
This relied on the earlier items and the fact that
$1$ is its own multiplicative inverse (since $1\cdot1=1$).
Alternatively, we could have gone back to the definition
of multiplicative inverse, the fact that it is unique,
and what this equation says in light of the definition:
that $a$ is the multiplicative inverse of
$a^{-1}$---which is true since $a\cdot a^{-1}=1$.

This is worth a second (quick) look. Taken with the definition
of $a^{-1}$, we conclude that $a$ and $a^{-1}$ are multiplicative
inverses (i.e., reciprocals) of {\it each other}.  It thus
makes sense to say $a/b$ and $b/a$ are reciprocals
of each other as well.

\item $\ds{\frac{ab}{bc}=\frac{a}c}$.

This is the familiar ``cancellation of common factors''
often used to simplify fractions.  Note that it requires
$b,c\ne0$. It is sometimes illustrated
$$\frac{a\!\not{\!b}}{\not{\!b}\,c}=\frac{a}c,$$
though we must be careful to not be in the habit
of ``canceling'' in cases where it is invalid%
\footnotemark.
\footnotetext{The following manipulation
is invalid but tempting, especially with more complicated
expressions:
$$\frac{5+3}{5+8}=\frac38\implies\F.$$
The problem is that addition and division are not related
the same way that multiplication and division are.
It is important to only cancel {\it factors of products},
if the factors are common to both the numerator and
denominator (which must first both
be written as  products).}
 To prove
this is not difficult:
$$\frac{ab}{bc}=(ab)(bc)^{-1}
=abb^{-1}c^{-1}=abb^{-1}c^{-1}=a\cdot 1\cdot c^{-1}=\frac{a}c.$$

\item $\ds{\frac{\left(\frac{a}b\right)}{\left(\frac{c}d\right)}
=\frac{a}b\cdot\frac{d}c}$.
\end{itemize}

Now we restate the title of this subsection in light of
all that  we showed earlier:
\begin{equation}\frac{\left(\frac{a}b\right)}{\left(\frac{c}d\right)}
=\frac{a}b\cdot\frac{d}c.\end{equation}
This is what many think of when stating that
division is simply multiplication
by the reciprocal.  It is easy to prove (several
ways) with what we had before, and will be left as an exercise.

\subsection{Addition \& Subtraction with Multiplication \& Division}

We cannot list exhaustively all the possible combinations of
these operations, but we can show how the real axioms, further
developed in the previous subsections, dictate how we can compute,
simplify or recombine the terms of an expression.
Some examples are presented in the items below.
\begin{itemize}

\item $a(b-c)=ab-ac$.

This is not difficult to see, when we recall that $-c=(-1)c$.
$$a(b-c)=a[b+((-1)c)]=ab+a((-1)c)=ab+(-1)(ac)=ab-ac.$$
Of course in practice we do not bother with all the
intermediate steps, unless things are complicated and we
want to be unusually careful.

\item $(a+b)(c+d)=ac+ad+bc+bd$.\footnotemark\hphantom{. }%

This is just the distributive axiom twice:
$$(a+b)(c+d)=a(c+d)+b(c+d)=ac+ad+bc+bd.$$
An alternative method is to distribute the terms as below:
$$(a+b)(c+d)=(a+b)c+(a+b)d=ac+bc+ad+bd,$$
which is the same except for a rearrangement valid by
the commutativity  of addition.
\footnotetext{This is a statement of
what some call ``FOIL,'' meaning you multiply
($a$ and $c$) the ``\underline{f}irst'' terms of each, then the
($a$ and $d$) ``\underline{o}uter,''
($b$ and $c$) ``\underline{i}nner''
and finally ($b$ and $d$) the ``\underline{l}ast'' terms of
of the factors $(a+b)$ and $(c+d)$.  This is a fine
mnemonic device for such products, but does not so
easily generalize to more complicated products.}

\item $a(b+c+d)=ab+ac+ad$.

Thus the distributive axiom is easily generalized.
One form of proof is given below:
$$a(b+c+d)=a(b+(c+d))=ab+a(c+d)=ab+(ac+ad)=ab+ac+ad.$$
Recall that in a sum of three terms, we do not need
parentheses because the associativity axiom guarantees
we get the same result regardless of grouping.

\item $(a+b+c)(d+e+f)=ad+bd+cd+ae+be+ce+af+bf+cf$.

This takes longer to prove but is straightforward.
\begin{align*}(a+b+c)(d+e+f)=(a+b+c)d+(a+b+c)e+(a+b+c)f\\
 =ad+bd+cd+ae+be+ce+af+bf+cf.\end{align*}
With practice we see that the product requires all
possible terms which are products of one term
of $(a+b+c)$ and one from $(d+e+f)$.  Perhaps
a better way of stating this is that
$a$ must distribute across $(d+e+f)$, and
so must $b$ and $c$.  Again, we have to be careful.

\item $(a+b)(a+b)=aa+2ab+bb$.

The proof of this is a simple exercise:
\begin{align*}
(a+b)(a+b)=a(a+b)+b(a+b)&=aa+ab+ba+bb=aa+ab+ab+bb\\
&=aa+(1+1)ab+bb=aa+2ab+bb.\end{align*}
Later
we will have more compact ways of writing such things.\footnotemark
\footnotetext{When we have exponential notation
  we will write this more compactly as
$$(a+b)^2=a^2+2ab+b^2.$$}

\item $\ds{\frac{a}c+\frac{b}c=\frac{a+b}c}$.

This is the familiar manipulation allowed when the
fractions have the same, i.e.,
{\it common}, denominators.
It is easy to prove:
$$\frac{a}c+\frac{b}c=ac^{-1}+bc^{-1}=(a+b)c^{-1}=\frac{a+b}c.$$
Notice that we used the distributive axiom but in the reverse
of the order it is written.  To use the distributive axiom in
such a way is referred to as {\it factoring}, i.e., writing a
sum as a product (when possible).  The second equal sign represents such
a process, which we will employ throughout the text in
different settings.

\item $\ds{-\frac{a}b=\frac{-a}b=\frac{a}{-b}}$.

Thus we can put the negative sign in any of three
places. This is not difficult to see if we
recall that the negative sign can be treated
as a factor of $(-1)$.
 We leave the details of a proof as an exercise.

\item $\ds{\frac{a}b+\frac{c}d=\frac{ad+bc}{bd}}$.

The most obvious  approach to proving this is
to read it backwards.  Perhaps more satisfying
is a proof that reads this left to right while
filling in some details.  The usual approach then
includes a basic mathematics technique which is
to multiply by $1$, which does not change the
value of the terms, but can be done in
such a way that  $1$ is written in a particularly
useful form.  For the problem at hand
we use $1=bb^{-1}$ and $1=aa^{-1}$:
\begin{multline*}
\frac{a}b+\frac{c}d=ab^{-1}+cd^{-1}=ab^{-1}dd^{-1}
+cd^{-1}bb^{-1}=adb^{-1}d^{-1}+bcb^{-1}d^{-1}\\
=ad(bd)^{-1}+bc(bd)^{-1}=(ad+bc)(bd)^{-1}
=\frac{ad+bc}{bd}.
\end{multline*}
This can be re-written as follows:\footnotemark
\footnotetext{A common mistake in adding fractions
is to just simply add the numerators and add the
denominators. In that sense adding fractions is
very different from multiplying fractions.
 It is very important that
we take the distinction to heart:
\begin{align*}
\frac{a}b\cdot\frac{c}d\ & =\ \frac{ac}{bd};\\
\pmb{\frac{a}b+\frac{c}d}\ &\pmb{\pmb{\ne}\ \frac{a+c}{b+d}.}
\end{align*}
}
$$
\frac{a}b+\frac{c}d
=\frac{a}b\cdot\frac{d}d+\frac{c}d\cdot\frac{b}b
=\frac{ad}{bd}+\frac{bc}{bd}=
\frac{ad+bc}{bd}.$$
\end{itemize}

\subsection{Integer Exponents}

We first define exponents for the positive
integer case.  For $a\in\Re$ and $n\in\mathbb{N}$,
define
\begin{equation}
a^n=\underbrace{a\cdot a\cdot a\cdots a}_{n \text{\ terms}}.\end{equation}
Thus,
\begin{align*}
a^1&=a,\\ a^2&=a\cdot a,\\ a^3&=a\cdot a\cdot a,\end{align*}
and so on.
Here $a$ is called the {\it base}, $n$ the {\it exponent},
and $a^n$ is called the $n$th {\it power} of $a$. There are
several rules for this notation which follow quickly.
\begin{itemize}
\item $a^na^m=a^{n+m}$.

We can easily observe the truth of this:
$$a^na^m=\underbrace{a\cdot a\cdots a}_{n\text{ copies}}
\underbrace{a\cdot a\cdots a}_{m\text{ copies}}
=a^{n+m}.$$

\item $(ab)^n=a^nb^n.$

This is straightforward.
\begin{align*}(ab)^n&=\underbrace{ab\cdot ab\cdots ab}_{n\text{\ copies of }
 ab}\\
&=\underbrace{a\cdot a\cdots a}_{n\text{\ copies of }a}\cdot
\underbrace{b\cdot b\cdots b}_{n\text{\ copies of } b}\\
\\
&=a^nb^n.\end{align*}
\item $(a^n)^m=a^{nm}$.

This is also not difficult to see:
$$(a^n)^m=\underbrace{a^n\cdot a^n\cdots a^n}_{m \text{ copies}}
\qquad
=\underbrace{\underbrace{a\cdots a}_{n\text{ copies}}
\cdot\underbrace{a\cdots a}_{n\text{ copies}}
\cdots\underbrace{a\cdots a}_{n\text{ copies}}}_%
{m\text{ copies of }a^n,\text{ i.e., } mn\text{ copies of }a}=a^{nm}.$$
\end{itemize}
Next we define what it means to have a negative power
of $a$.  In what follows, assume $a\ne0$.
For the moment we will also assume $n\in\mathbb{N}$ and define
$$a^{-n}=\frac1{a^n}.$$
Note that this is consistent with the earlier definition:
$a^{-1}=\frac1{a^1}=\frac1a$.  Now we make some observations regarding
positive and negative exponents.
\begin{itemize}
\item $\ds{\frac1{a^{-n}}=a^n}$.

We leave the proof as an exercise.  Next we have, if $n\ne m$,
that
\item $\ds{\frac{a^n}{a^m}=a^{n-m}}$.

If $n>m$, then $m$ factors will cancel in the numerator
and denominator and leave $n-m$ factors in the numerator
(and only a factor of 1 left in the denominator).
On the other hand, if $m>n$, then $n$ factors will
cancel, leaving $m-n>0$ factors in the denominator
and 1 in the numerator, i.e., $1/a^{m-n}=a^{n-m}$,
albeit a negative power of $a$.  Notice that this is
formally consistent with the earlier observation---with
positive exponents---that $a^na^m=a^{n+m}$.

Now we have definitions of $a^n$ for $n\in\mathbb{Z}-\{0\}$,
with negative $n$ for $a>0$.  It is natural to ask next
if we can make sense of $a^0$, at least for
positive $a$.
Since $a^na^{-n}=\frac{a^n}{a^n}=1$, it is natural
to define:
\item $a^0=1$.

It will useful to make a very simple observation
regarding powers of $(-1)$.  Notice that
$(-1)^1=-1$, $(-1)^2=1$, $(-1)^3=-1$,
$(-1)^4=1$, etc.  So even powers of $(-1)$
yield 1, whereas odd powers yield $-1$.  This
also has implications for powers of $-a$:
\item $(-1)^{2n}=1$.
\item $(-1)^{2n-1}=-1$.
\item $(-a)^{2n}=a^{2n}$.
\item $(-a)^{2n-1}=-a^{2n-1}.$
The last term is shorthand for $-(a^{2n-1})$.
\end{itemize}
Though we have far from checked all the possible complications
(some of which are left as exercises), it is not difficult
to see that the following are consistent, as long as
we do not allow for any division by, or negative powers
of zero:

\begin{align}
a^{n}a^m&=a^{n+m}\\ \notag\\
\frac{a^n}{a^m}&=a^{n-m}\\ \notag \\
(a^n)^m&=a^{nm}\\ \notag\\
(ab)^n&=a^nb^n\\ \notag\\
a^{-n}&=\frac{1}{a^n}\\ \notag\\
\left(\frac{a}b\right)^n&=\frac{a^n}{b^n}\\ \notag\\
a^0&=1\\
\notag\\ (-1)^{2n}&=1\\ \notag \\
(-1)^{2n-1}&=-1
\end{align}

\subsection{Miscellaneous Manipulations}

\begin{itemize}
\item $(a+b)^2=a^2+2ab+b^2$.
\item $(a-b)^2=a^2-2ab+b^2$.

We proved the first one in an earlier section, before we had exponential
notation.  The second can also be proved by ``multiplying out''
the left hand side using the distributive axiom, or
we can simply replace $b$ with $-b$ in the first equation to
give us the second.  The next two are similarly related:
\item $(a+b)^3=a^3+3a^2b+3ab^2+b^3$.
\item $(a-b)^3=a^3-3a^2b+3ab^2-b^3$.

We will prove the first one, and leave the second for the
exercises.
\begin{align*}
(a+b)^3&=(a+b)(a^2+2ab+b^2)\\
	&=a(a^2+2ab+b^2)+b(a^2+2ab+b^2)\\
	&=a^3+2a^2b+ab^2+a^2b+2ab^2+b^3\\
	&=a^3+2a^2b+a^2b+ab^2+2ab^2+b^3\\
	&=a^3+(2+1)a^2b+(1+2)ab^2+b^3\\
	&=a^3+3a^2b+3ab^2+b^3. \end{align*}
Of course one learns to consolidate steps in such a calculation.
The next equations establish a pattern.  These
can be  verified by multiplication.\footnotemark
\footnotetext{We will have a method for actually
deriving, rather than verifying, these and similar
equations later using {\it polynomial long division}
and other methods.}
\item $(a-b)(a+b)=a^2-b^2$.
\item $(a-b)(a^2+ab+b^2)=a^3-b^3$.
\item $(a-b)(a^3+a^2b+ab^2+b^3)=a^4-b^4$.
\item $(a-b)(a^4+a^3b+a^2b^2+ab^3+b^4)=a^5-b^5$.
\item $(a-b)(a^{n-1}+a^{n-2}b+a^{n-3}b^2+\cdots
+ab^{n-2}+b^{n-1})=a^n-b^n$.\label{aN-bN}
\end{itemize}
The first is how we factor a ``difference of two squares,''
the second a ``difference of two cubes,'' and so on.
Actually, when we have an even power
$a^{2n}-b^{2n}$,  we have a difference
of two squares and can write $(a^n-b^n)(a^n+b^n)$
and proceed from there.  For instance,
$$a^4-b^4=(a^2-b^2)(a^2+b^2)
=(a-b)(a+b)(a^2+b^2).$$
Note that for the odd exponents we can replace $b$
with $-b$ to get, for instance,
\begin{itemize}
\item $(a+b)(a^2-ab+b^2)=a^3+b^3$.
\item $(a+b)(a^4-a^3b+a^2b^2-ab^3+b^4)=a^5+b^5$.
\end{itemize}
\subsection{Absolute Value and Distance}
We define the absolute value of $x\in\Re$ as follows:
\begin{equation}
|x|=\left\{\begin{array}{ccl}x&\text{ if }&x\ge 0,\\
                            -x&\text{ if }&x<0.\footnotemark
           \end{array}\right.\label{AbsoluteValueDefined}
\end{equation}
\footnotetext{%%
%%%%  FOOTNOTE
Note that if $x=0$, either definition for $|x|$ works, so we
could also define
$$|x|=\left\{\begin{array}{ccl}x&\text{ if }&x> 0,\\
                            -x&\text{ if }&x\le0.
           \end{array}\right.$$
%%%%  END FOOTNOTE
}
Thus $|5|=5$, and $|-7|=-(-7)=7$.  Note that in all cases we
have
\begin{equation}|x|\ge0,\end{equation}
since $x\ge0\implies|x|=x\ge0$, while $x<0\implies|x|=-x>0$.
However, we must be careful to note that the absolute value
does not mean that we ignore any ``negative'' signs:
$|x|=-x$ is a possibility, iff $x\le0$. (See footnote on
why we have ``$\le0$'' instead of ``$<0$'' here.)
Next note that
\begin{align*}
|a-b|=\left\{\begin{array}{ccl}a-b&\text{ if }&a-b\ge0\\
                              -(a-b)&\text{ if }&a-b<0\end{array}\right.
     =\left\{\begin{array}{ccl}a-b&\text{ if }&a\ge b\\
                               b-a&\text{ if }&a<b.\end{array}\right.
\end{align*}
But that is exactly what we expect to be the distance between
$a$ and $b$: we subtract the lesser from the greater (right point
minus left point).  Hence
\begin{equation}
(\text{distance between $a$ and $b$})=|a-b|.\label{DistanceFromAtoB}
\end{equation}
Note that $|a-b|=|b-a|$, as we would expect.  Furthermore, note
that $|x|=|x-0|$, which is the distance between $x$ and $0$.

Later in the text we will often refer to {\it how large}
a number is, meaning its
{\it absolute size} (absolute value), so $-10,000$ is a ``larger''
number than $2$, even though $-10,000<2$.

For a few examples of this distance relationship, consider
\begin{align}
 |5-3|&=|2|=2,\\
 |-3-5|&=|-8|=8\\
 |2+3|&=|5|=5.\end{align}
These we calculated from the definition of absolute value. However,
note that $|5-3|$ is the distance between 5 and 3 on the line,
while $|-3-5|$ is the distance between $-3$ and $5$, and
$|2+3|=|2-(-3)|$ is the distance between 2 and $-3$ on the line.
\bex
Next consider the set
$$S=\left\{x\in\Re\left.\vphantom{\frac11}\right| |x-3|<5\right\}.$$
This is all the points $x$ which are less than 5 units away from
3, since $|x-3|<5$ can be read ``the distance between $x$ and 3
is less than 5.  Note that $S=(-2,8)$.
\label{FirstAbsoluteValueAsDistanceExample}\eex
It is useful to then notice the following equivalences, which are
easy to see if we refer to the number line.
\begin{align*}
 |x|<K&\iff (x<K)\wedge(x>-K)\iff -K<x<K,\\
 |x|>K&\iff (x>K)\vee(x<-K).\end{align*}
These are easy to see if $K>0$, but are also true (the first one
vacuously, and the second trivially) if $K<0$.  Using these principles,
we could have read Example~\ref{FirstAbsoluteValueAsDistanceExample}
as follows:
$$ |x-3|<5\iff -5<x-3<5\iff-5+3<x-3+3<5+3\iff -2<x<8.$$
Thus $x\in S\iff -2<x<8\iff x\in(-2,8)$, as before.

Finally we should notice some properties of absolute values
which are clear if we realize that, when casually multiplying or dividing
positive and negative numbers, we can do so with the absolute values
of the numbers (i.e., ignoring the signs) until the end, where
we account for the signs.  That is the gradeschool approach.
Thus $7\cdot(-5)=-35$ because $7\cdot5=35$, but we had an extra
negative sign.  That naive approach is perhaps best when noticing the
following:
\begin{align}
|ab|&=|a|\cdot|b|,\\
\left|\frac{a}b\right|&=\frac{|a|}{|b|},\\
\left|a^n\right|&=|a|^n.\end{align}
One last one, which we leave for the reader to verify, is that
\begin{equation}|a+b|\le|a|+|b|.\label{TriangleInequality1}\end{equation}
This last one gives the $=$ case if $a$ and $b$ are the same ``sign,''
or if one of them is zero, while giving the $<$ case when opposite sign.
It is called the triangle inequality for reasons that are more clear
when dealing with vectors.
\subsection{Binomial Expansion}
The binomial expansion gives us a shortcut for writing out
$(a+b)^n$.  It would be somewhat of a distraction to prove
the expansion, so its proof is left for the appendix.
The expansion is given by the {\it Binomial Theorem} given
below:

\begin{theorem} {\rm\bf (Binomial Theorem):} Given $(a+b)^n$,
 where $n\in\mathbb{N}$,
the following holds\footnotemark:
\footnotetext{Of course this may terminate after only two terms if
$n=1$, or three terms if $n=2$.
The pattern listed here is for general $n\in\mathbb{N}$.}
\begin{equation}
\begin{aligned}
(a+b)^n&=a^n+\frac{n\cdot a^{n-1}b^1}{1}
+\frac{n(n-1)\cdot a^{n-2}b^2}{1\cdot 2}\\
&+\frac{n(n-1)(n-2)\cdot a^{n-2}b^2}{1\cdot2\cdot3}+\cdots\\
&+\frac{n(n-1)(n-2)\cdots(2)\cdot a^{1}b^{n-1}}{1\cdot2\cdots(n-1)}
+\frac{n\cdots2\cdot1\cdot b^n}{1\cdot 2\cdots n}.
\end{aligned}\label{Binomial1}
\end{equation}\end{theorem}
Notice that the powers are all $a^kb^{n-k}$ (if we assume $a^0$
is  1--of course we have to be careful, but the formula
works fine with that assumption no matter what $a,b$ we
are given).
Thus the powers of $a$ and $b$ always add to $n$.

Notice also that we should get $(a+b)^n=(b+a)^n$.  In other
words, $a$ and $b$ are interchangeable in  (\ref{Binomial1}).
Clearly the $a^n$ and $b^n$ terms are both multiplied by 1,
and the $a^{n-1}b$, $ab^{n-1}$ both have coefficients $n$.
As we work toward the middle of the left hand side of
(\ref{Binomial1}) we see other terms $a^kb^{n-k}$, $a^{n-k}b^k$
are multiplied by the same constant factors.

\bex We now see a few expansions based on
the binomial theorem.
\begin{align*}
(a+b)^4&=a^4+\frac41a^3b+\frac{4\cdot 3}{1\cdot 2}a^2b^2
         +\frac{4\cdot3\cdot2}{1\cdot2\cdot3}ab^3
         +\frac{4\cdot3\cdot2}{1\cdot2\cdot3\cdot4}b^4\\
 &=a^4+4a^3b+6a^2b^2+4ab^3+b^4.\\ \\
(a-b)^5&=(a+(-b))^5\\
&=a^5+\frac{5}{1}a^4(-b)+\frac{5\cdot4}{1\cdot2}a^3(-b)^2
      +\frac{5\cdot4\cdot3}{1\cdot2\cdot3}a^2(-b)^3\\
&\qquad+\frac{5\cdot4\cdot3\cdot2}{1\cdot2\cdot3\cdot4}a(-b)^4
       +\frac{5\cdot4\cdot3\cdot2\cdot1}{1\cdot2\cdot3\cdot4\cdot5}
         (-b)^5\\ \vphantom{\frac12}
&=a^5-5a^4b+10a^3b^2-10a^2b^3+5ab^4-b^5.\\ \\
(3x-2y)^3&=(3x)^3+\frac32(3x)^2(-2y)+\frac{3\cdot2}{1\cdot2}(3x)(-2y)^2
         +\frac{3\cdot2\cdot1}{1\cdot2\cdot3}(-2y)^3\\
&=8x^3-27x^2y+36xy^2-8y^3.
\end{align*}

\eex

There is an interesting relationship between the numbers
multiplying the terms $a^kb^{n-k}$ in (\ref{Binomial1}),
i.e., the {\it binomial coefficients}, and
a mathematical curiosity known as Pascal's Triangle,
shown in Figure~\ref{Pascal'sTriangle}.
The entries of the ``triangle'' are computed by
summing the two entries directly above right and above left.
The rows of Pascal's Triangle correspond to the
coefficients of $(a+b)^0$, $(a+b)^1$, $(a+b)^2$.
and so on.
\bex We can use Pascal's Triangle to compute $(a+b)^7$.
We know that the first term will be $a^7$, and the
second will be $7a^6b$, so we find the row that begins
with 1 and 7 and compute:
$$(a+b)^7
=a^7+7a^6b+21a^5b^2+35a^4b^3+35a^3b^4+21a^2b^5+7ab^6+b^7.$$

\eex

\begin{figure}
$$\begin{array}{ccccccccccccccc}
&&\quad&\quad&\quad&\quad&\quad&1&    \quad&\quad&\quad&\quad&\quad\\
&\quad&&\quad&\quad&\quad&1&\quad&1&\quad&\quad&\quad&\quad\\
&&&\quad&\quad&1&\quad&2&    \quad&1&\quad&\quad&\quad\\
&&&\quad&1&\quad&3&\quad&3&\quad&1&\quad&\quad\\
&&&1&\quad&4&\quad&6&\quad&4&\quad&1&\quad\\
&&1&\quad&5&\quad&10&\quad&10&\quad&5&\quad&1\\
&1&\quad&6&\quad&15&&20&&15&&6&\quad&1\\
1&&7&&21&&35&&35&&21&&7&\quad&1
\end{array}$$
\caption{Pascal's Triangle.  Except for the first and
last 1 in each row, every entry is the sum of the two
closest entries  above.  One application is the
coefficients of the binomial expansion (\ref{Binomial1}).}
\label{Pascal'sTriangle}\end{figure}

\vfill\eject

%%%%%%%%%%%%%%   First Algebra Section  %%%%%%%%%%%%%%%%%%%%%%%%%

\section{Algebra}
Algebra is a very wide field, but we will restrict ourselves
to the familiar real-variable algebra, in which we have at least one
unspecified quantity, say $x$, which we nonetheless attempt
to say something about.  Perhaps we know one equation the
quantity is supposed to satisfy, and try to find others
which are equivalent to,  or implied by, the first equation.
(Instead of an equation it could be an inequality we would
like to derive other facts from.)
In this section, we will delve into
``solving'' equations, i.e., finding all the values of
$x$ for which a given equation is satisfied.

Our purpose here and in subsequent sections
is not to simply review high school algebra.
Instead we will look at the topics from the standpoint
of our understanding of real numbers and logic.
In fact, these sections are
designed to slow down and make thoughtful the
reasoning processes which too often come across to students
as plays in a symbol manipulation game, with rules that seem
as arbitrary and numerous as a tax code. The ``rules''
are not!  They follow immediately from the properties
of real numbers and logic.  Indeed, we have already
begun to build arithmetic on top of these, albeit keeping
that discussion abstract so we could focus on the
principles involved rather than special cases.

True, it is important to master the ``mechanics" of algebra, since
there are numerous strategies for solving the myriad of
problems which present themselves, but it is
equally important to understand the principles as they are invoked,
and the limitations of those principles.  Indeed, there are technicalities
which the student must be aware of in order to avoid errors.
  Many of the ``manipulations'' can be done with seeming impunity
as, for instance,  $x$ is solved for. Nonetheless we
should always be aware of the rules we are using, and whether
or not some principle is being violated.  It is a truism that
most calculus mistakes students make are really algebra mistakes,
so it is of utmost importance that we do not undermine
our calculus with errors at the (more fundamental) level of algebra.

A general principle used in algebra is the following:

\begin{principle}
Given an equality  $x=y$ of real numbers,
any algebraic operation which can be performed on one side
can be also performed on the other, and equality will still hold.
In other words, if $A(.)$ is some algebraic operation,
and $A(x)$ is defined, then
$$x=y \qquad\implies\qquad A(x)=A(y).$$
\end{principle}

Here $A(.)$ might represent adding a fixed number, multiplying or dividing
by a fixed number, squaring what is inside $(.)$, taking the
tangent $\tan(.)$, etc.  Basically, we can do whatever we like
algebraically\footnotemark
\footnotetext{We cannot make {\it typographical} changes to both
sides of an equation.  For instance,
$$x+3=4+9\not{\!\!\!\!\implies}x-3=4-9,$$
even though we made the same typographical change (switching
the ``$+$'' before the last term to a ``$-$''). We could write
$$x+3=4+9\implies-(x+3)=-(4+9),$$
in which we negated (an algebraic operation) both sides.

This example may seem a bit ridiculous.  For more subtle example
compare the first line below (which is a very common mistake)
with the second.
$$\begin{array}{cccl}
2+3=4+1&\implies&2^2+3^2=4^2+1^2&\text{False}\\
2+3=4+1&\implies&(2+3)^2=(4+1)^2&\text{True.}\end{array}$$}
to both sides of a true equation and still have a true equation,
provided the new equation has meaning.\footnote{We can not, for example,
divide both sides by zero, or take the square root of
both sides if the sides are negative, or take the
reciprocals if a side is somewhere zero, etc.}\hphantom{. }However,
we are only
guaranteed implication and not logical equivalence for many
operations $A$, and so
some precision may be lost by applying $A$ to both sides.
For example,
$$2x=1 \implies 0\cdot2x=0\cdot 1\implies 0=0,$$
which is true, but we can not read the solution $x=1/2$ from the
resulting statement.  A better situation is when $A$ is ``invertible,"
which actually gives
us logical equivalence.
\begin{definition}An operation $A$ is called \underline{invertible}
if and only if
\begin{equation}A(x)=A(y)\qquad\implies x=y.\end{equation}
\end{definition}
The other implication being obvious if $A$ is a legitimate operation,
we can replace the definition with $A(x)=A(y)\iff x=y$.
For example, we have the following:
\begin{principle}
If $k\in\Re$ is any real number, then
\begin{eqnarray}x=y&\qquad\iff\qquad &x+k=y+k, \\
x=y&\qquad\iff\qquad &x-k=y-k.\end{eqnarray}
\label{addtobothsides}\end{principle}
\begin{proof}
 Assume $x,y,k \in\Re$.  Then
$$x=y\implies x+k=y+k \implies x+k+(-k)=y+k+(-k)\implies x=y.$$
Thus $x=y$ implies $x+k=y+k$, and vice versa. The second statement
of the principle is exactly the first statement, where we substitute
$-k$ for $k$.
\end{proof}
What this principle says is that we can add  any real number
to both
sides of an equation and get a logically equivalent statement,
or subtract any real number from both sides, also without changing
the logical truth value.
A similar principle states that we can multiply or divide both
sides by a nonzero real number and have a logically equivalent
statement.
In the following, the notation $\Re-\{0\}$ represents
the set of real numbers with the zero element deleted.
\begin{principle} \label{multiplybothsides}For any $k\in\Re-\{0\}$,
\begin{eqnarray}x=y&\qquad\iff \qquad &kx=ky\\
x=y&\qquad\iff\qquad &x/k=y/k.\end{eqnarray}
\end{principle}
The second statement is exactly the first, where we substitute
$k^{-1}$ for $k$.  The proof is very similar to the proof of the
preceding principle.  To see how these principles are used
to solve equations, consider the following example:

\bex
Find $x$ such that $5x+11=37.$
\eex
\noindent We will begin with the equation and find logically
equivalent statements of increasing simplicity, until we can read
the solution.

\begin{tabular}{crcll}
&$5x+11$ & $=$ & $37$ &'original equation\\[2pt]
$\iff$ & $5x+11+(-11)$ & $=$ & $37+(-11)$ &'added $(-11)$ to both sides\\[2pt]
$\iff$ & $5x$ & $=$ & $26$ &'simplified\\[2pt]
$\iff$ & $\frac15\cdot 5x$ & $=$ & $\frac15\cdot26$
	&'multiplied both sides by $\frac15$\\[2pt]
$\iff$ & $1x$ & $=$ & $\frac{26}5$ &'simplified\\[2pt]
$\iff$ & $x$ &$=$& $\frac{26}5$ &'done.
\end{tabular}

\noindent
Here we borrowed the BASIC computer language notation (') to signify
a ``comment" which explains what was done.
A student well-versed in algebra would likely write only the
first, third and last lines of this list.  However, there is a
constant need for vigilance.  In the above we have logical
equivalence at each step.  We  do not always have that luxury.
For instance we have the following propositions:
\begin{principle} Given any real number $x$,
\begin{equation} x=k\qquad\implies\qquad x^2=k^2.\end{equation}
\end{principle}
The converse ``$\Longleftarrow$"
is not true, for $(-1)^2=(1)^2$, but clearly
$(-1)\ne1$.
\begin{definition}For any nonnegative real number $x$, define
the \underline{square root} of $x$, written $\sqrt{x}$, to be that
nonnegative number $k$ such that $k^2=x$.  Thus $k$ is the number
satisfying the following statement:
\begin{equation}
\sqrt{x}=k\qquad\iff\qquad(k\ge0)\wedge(k^2=x).
\end{equation}
\end{definition}
Notice first that the right hand side is automatically false if
$x<0$, because $k^2$ cannot be negative.  Thus only nonnegative
numbers $x$ can possess square roots.\footnote{There is
a superset of real numbers, called {\it complex numbers}
and denoted by $\mathbb{C}$, in which every nonzero element has
two square roots.  Though that set is surprisingly useful,
we will not delve deeply at all into the structure
of  $\mathbb{C}$
in this text.}
  Next, notice that
when we discuss the square root of a number, we do not choose
the ``negative square root" of that number.  In some contexts
it is acceptable to say ``$-5$ is {\em a} square root
of $25$."  However, we would say ``5 is {\em the}
square root of 25," and write $5=\sqrt{25}$.

We will take for granted
the existence of the square root $\sqrt{x}$ of any $x\ge0$ (as,
for instance, the length of a side of a square with area $x$),
and discuss
the properties of this operation $\sqrt{.}$ as we need them.
First we should point out the following:
\begin{principle}
Suppose $k\ge0$.  Then
\begin{equation} x^2=k\qquad \iff\qquad \left(x=\sqrt{k}\right)
\vee\left(x=-\sqrt{k}\right).\end{equation}
\end{principle}
Instead of writing out that whole right hand side, we can
simply write $x=\pm\sqrt{k}$.
For a proof, notice that if $k\ge0$ then $\sqrt{k}$ exists, and then
\begin{alignat*}{3}
&&x^2&=k\\
\iff&\qquad&x^2-k&=0\\
\iff&&\left(x-\sqrt{k}\right)\left(x+\sqrt{k}\right)&=0\\
\iff&&\left(x-\sqrt{k}=0\right)&\vee\left(x+\sqrt{k}=0\right)\\
\iff&&\left(x=\sqrt{k}\right)&\vee\left(x=-\sqrt{k}\right),
\text{ q.e.d.}
\end{alignat*}

From the above proposition we can
see a problem with squaring both sides
of an equation: there is a loss of information about the sign
(positive, negative or zero)
of the number being squared.  This can be summarized in the
following logical statement, which
ultimately says $x=\sqrt{k}\implies x=\pm\sqrt{k}$
(see (\ref{stronger->weaker->weakest}), $P\implies P\vee Q$):

\begin{equation}
x=\sqrt{k}\qquad\implies\qquad x^2=k\qquad\iff
\qquad x=\pm\sqrt{k}.\label{sqrtbothsides}\end{equation}

\bex
Consider the following:

\begin{tabular}{crcll}
&\qquad\qquad$x$ &$=$&$-5$&\\
$\implies$&$(x)^2$&$=$&$(-5)^2$&'squared both sides\\
$\iff$&$x^2$&$=$&$25$&'simplified\\
$\iff$&$(x=5)$&$\vee$&$(x=-5)$&'from (\ref{sqrtbothsides})\\
$\iff$&$x$&$=$&$\pm5$&'restatement
\end{tabular}

 When we summarize, we get $x=-5\implies x=\pm5$, which
is true, but we lost some information about $x$, and introduced
an {\em extraneous} solution, $x=5$.
\eex

The loss
of information came in the second line, where  we had implication
only, instead of equivalence.   Thus the student must be aware
that raising both sides of an equation to an even power may introduce
extraneous solutions, and that these must be checked with the original
equation for consistency.  In fact, whenever we have only simple
implication, we need only check the resulting statement
 with the original, and all true solutions will hold true,
while extraneous ones will be detected false.  In the next example,
we see how this complication arises in a less obvious way, and
how we deal with it by checking the possible solutions in the
original equation to see if they are truly solutions.

\bex Consider the following:

\noindent\begin{tabular}{crcll}
& $\sqrt{x-1}+3$&=&$x$ &'given\\
$\iff$ &$\sqrt{x-1}$&=&$x-3$&'added $(-3)$ to both sides\\
$\implies$ &$\left(\,\sqrt{x-1}\,\right)^2$ &=& $(x-3)^2$ &'squared both sides\\
$\iff$ & $x-1$ &=& $x^2-6x+9$ &'multiplied out the right\\
$\iff$ &$0$&=& $x^2-7x+10$ &'added $(-x+1)$ to both sides\\
$\iff$ &$0$&=&$(x-2)(x-5)$ &'factoring\\
$\iff$ &$(x-2=0)$&$\vee$& $(x-5=0)$&'no zero divisors\\
$\iff$ &$x$&$\in$&$\{2,5\}$&'solving the above equations.
\end{tabular}

\qquad\underline{Check}:

$$\begin{array}{lrcl}
\underline{x=2}:&\sqrt{2-1}+3&=&2\ ?\\
&\sqrt1+3&=&2 \ ?\\
&1+3&=&2\ ?\qquad \textstyle{False.}\\
\underline{x=5}:&\sqrt{5-1}+3&=&5\ ?\\
&\sqrt4+3&=&5\ ?\\
&2+3&=&5\ ?\qquad\textstyle{True.}
\end{array}$$
Conclude that the solution of the original equation is $x=5$.
(Note how the computations above yielded
$\sqrt{x-1}+3=x\iff x=5\implies (x=5)\vee(x-2)$, giving an
extraneous value $x=2$.)

\eex

\noindent We noticed that we did not have equivalence all the way down,
so we could only follow the implication from end to end one way.  It is
true that the first statement implies the last, but the reverse is
not clear.  However, we do know
that if there is a solution, it is contained in the last statement
(along with any extraneous solutions).
Thus we need only check our possible solutions in the original equation.

One further complication of the loss of information, coupled
with the fact that $\sqrt{.}$ refers only to nonnegative
square root, is the following (readers should verify
(\ref{SqrtAndAbsValue})):
\begin{principle} The relationship between $(.)^2$ and $\sqrt{.}$
is summarized in the following statements:
\begin{eqnarray}
\sqrt{x^2}&=|x|&\qquad\forall x\in\Re,\label{SqrtAndAbsValue}\\
\left(\sqrt{x}\right)^2&=\hphantom{|}x\hphantom{|}
&\qquad\forall x\ge0.\end{eqnarray}
\end{principle}

\bex Solve the equation $\ds{\sqrt{x^2+6x+9}=7}$.

\noindent\begin{tabular}{crcll}
&$\ds{\sqrt{x^2+6x+9}}$&=&$7$&'given\\
$\iff$&$\ds{\sqrt{(x+3)^2}}$&=&$7$ &'rewritten\\
$\iff$&$\ds{|x+3|}$&=&$7$&'principle\\
$\iff$&$x+3$&=&$\pm 7$&'absolute value fact\\
$\iff$&$x$&=&$-3\pm7$&'subtracted $3$\\
$\iff$&$x$&$\in$&$\{-10,4\}$&'simplified, done.\end{tabular}

This does not have to be checked, because we have logical
equivalence all the way down.  An alternative method might
be simpler algebraically, but would not have equivalence:

\noindent\begin{tabular}{crcll}
&$\ds{\sqrt{x^2+6x+9}}$&=&$7$&'given\\
$\implies$&$x^2+6x+9$&=&$49$&'squared both sides\\
$\iff$&$x^2+6x-40$&=&$0$&'subtracted $49$ \\
$\iff$&$(x-4)(x+10)$&=&$0$&'factored\\
$\iff$&$(x-4=0)$&$\vee$&$(x+10=0)$&'no  zero divisors\\
$\iff$&$x$&$\in$&$\{4,-10\}$&'solved both equations.
\end{tabular}

A quick check shows that $x=4$ and $x=-10$ in the original
equation both give $\sqrt{49}=7$, which is true. Thus
both solution candidates solve the
original equation, and we conclude $x\in\{4,-10\}$ as before.
\eex
To show that the final check is crucial in such a case,
consider the same example with a simple modification:

\bex Solve the equation $\ds{\sqrt{x^2+6x+9}=-7}$.

Everything is the same as before, except for the $-7$ in the first
line:

\noindent\begin{tabular}{crcll}
&$\ds{\sqrt{x^2+6x+9}}$&=&$-7$&'given\\
$\implies$&$x^2+6x+9$&=&$49$&'squared both sides\\
$\iff$&$x^2+6x-40$&=&$0$&'subtracted $49$ \\
$\iff$&$(x-4)(x+10)$&=&$0$&'factored\\
$\iff$&$(x-4=0)$&$\vee$&$(x+10=0)$&'no  zero divisors\\
$\iff$&$x$&$\in$&$\{4,-10\}$&'solved both equations.
\end{tabular}

However, the first line reads $\sqrt{49}=-7$ for either of our
solution candidates, and this is clearly false.  There are
no solutions of this equation.  A trained student would likely
notice this from the first line if he were to use the other method,
since the first line gives immediately
$|x+3|=-7$ which is clearly false
for all $x$.
\eex

Another pitfall comes in multiplication by unknown quantities.
One  problem comes from the fact that there may be some
values for the unknown which, when used for multiplying both
sides of an equation, may be in effect multiplying both sides
by zero.  Once both sides are multiplied by zero,  precise information
about the quantities may be lost.  Consider the following
example:

\bex  Consider the following equation:

\begin{tabular}{crcll}
&$x^2-9$&=& $0$&'given\\
$\implies$&$x\cdot\left(x^2-9\right)$&=&$x\cdot0$&'multiplied by $x$\\
$\iff$&$x(x+3)(x-3)$&=&$0$&'factored left, simplified right\\
$\iff$&$x=0$&&&\\
&$\vee (x+3)=0$&&\\
&$\vee(x-3)=0$ &&&'no  zero divisors\\
$\iff$&$x$&$\in$&$\{0,-3,3\}$&'but  $x=0$ is wrong!
\end{tabular}
\eex

\noindent We began with an equation which had solution $x=-3,3$, and
ended with the statement $x=0,-3,3$.  The problem here occurred in the
second line, where we multiplied both sides by $x$, without knowing
what $x$ is.  In particular, for one value of $x$---namely $x=0$---we
multiplied both sides by zero.  Here it is not so difficult to see
what went wrong:  for some reason we decided to multiply
both sides by $x$, which introduced the extraneous solution
$x=0$.

Though it seems unlikely we would arbitrarily multiply both side
of an equation by, say, $x$, there are times we may feel forced to.
Consider the following:

\bex  Solve the following equation:

\begin{tabular}{crcll}
&$\ds{\frac{x^2+9}{x}}$&=&$\ds{\frac{9-x}{x}}$ &'given\\[10pt]
$\implies$ &$x^2+9$&=&$9-x$&'multiplied by $x$\\
$\iff$ &$x^2+x$&=&$0$&'added $(-9)+x$ to both sides\\
$\iff$ &$x(x+1)$&=&0&'factored\\
$\iff$ &$(x=0)$&$\vee$&$x+1=0$&'no  zero divisors\\
$\iff$ &$x$&$\in$&$\{0,-1\}$&'solved above equations.
\end{tabular}

\noindent A quick check shows that $x=0$ is not a solution
(since we would be dividing by zero in the first line), while
$x=-1$ is indeed a solution.
\eex

One could argue that, what we effectively did in that second
line, was to multiply both sides by zero for a certain value
of $x$ (namely, when $x=0$).  Multiplying by that particular
value on both sides may introduce extraneous solutions, as indeed
occurred in this case.

Another approach to the above problem is to note from the outset that
$x\ne0$, and then we can have equivalence all the way down.
It would read something like the following:

\noindent\begin{tabular}{crclcl}
&$\ds{\frac{x^2+9}{x}}$&=&$\ds{\frac{9-x}{x}}$, &$x\ne0$ &'given\\[10pt]
$\iff$ &$x^2+9$&=&$9-x$ &$\wedge (x\ne0)$&'multiplied by $x$\\
$\iff$ &$x^2+x$&=&$0$ &$\wedge (x\ne0)$&'added $x-9$ to both sides\\
$\iff$ &$x(x+1)$&=&0 &$\wedge (x\ne0)$&'factored\\
$\iff$ &$(x=0)$&$\vee$&$(x+1=0)$ &$\wedge (x\ne0)$&'no zero divisors\\
$\iff$ &$x$&$\in$&$\{0,-1\}$ &$\wedge (x\ne0)$ &'solved above equations\\
$\iff$ &$x$&=&$-1$&&'done.
\end{tabular}
\subsection{Completing the Square}
\begin{definition} A \underline{quadratic polynomial} is
an expression of the form
\begin{equation}ax^2+bx+c,\qquad\text{where\ }a,b,c\in\Re, \ a\ne0.
\end{equation}
\end{definition}
In this section we will exploit the form of the perfect square
\begin{equation*} (x+k)^2=\underbrace{x^2+2kx+k^2}_{\ds{x^2+bx+k^2}}.\end{equation*}
If we assume that $2k=b$, i.e., that $b=k/2$, or just
perform a brute-force computation, we can re-write this
\begin{equation} \left(x+\frac{b}2\right)^2=x^2+bx+\frac{b^2}{4}.\end{equation}
Next  we notice the solution to the following special type of
equation (see (\ref{sqrtbothsides})), where $d\ge0$:
\begin{equation}
(x+k)^2=d\iff x+k=\pm \sqrt{d}\iff x=-k\pm\sqrt{ d} .\end{equation}
Written with the same substitution as before gives
\begin{equation}
\left(x+\frac{b}2\right)^2=d\iff x+\frac{b}2=\pm\sqrt{d}
\iff x=-\frac{b}2\pm\sqrt{d}.\end{equation}
This provides a useful technique for solving quadratic equations
for which factoring is not easily accomplished.
\bex
Solve the equation $\ds{x^2+4x=9}$.

Recognizing that $b=4$ here, we calculate $b^2/4=16/4=4$, which
``completes the square'' on the left of the equation, and
so we add that term to both sides:
\begin{alignat*}{2}
&&x^2+4x+\left(\frac42\right)^2&=9+\left(\frac42\right)^2\\
\iff&\qquad&x^2+4x+4&=9+4\\
\iff&&(x+2)^2&=13\\
\iff&&x+2&=\pm\sqrt{13}\\
\iff&&x&=-2\pm\sqrt{13}.
\end{alignat*}

\eex

\subsection{The Quadratic Formula}
\begin{theorem}\label{QuadraticFormulaTheorem}
Given a quadratic equation of the form
\begin{equation}
ax^2+bx+c=0,\qquad a\ne0\label{quadraticequation}
\end{equation}
\begin{itemize}
\item if $b^2-4ac\ge0$, then the solution to the equation is given by
\begin{equation}
x=\frac{-b\pm\sqrt{b^2-4ac}}{2a};\label{QuadraticFormula}\end{equation}
\item if $b^2-4ac<0$, the equation \rm{(\ref{quadraticequation})}
has no real solution.\end{itemize}
\end{theorem}
The quadratic formula (\ref{QuadraticFormula}) helps us avoid factoring
or completing the square.  If the right hand side of (\ref{quadraticequation})
factors readily, then factoring is easier.  Otherwise the quadratic
formula is usually simpler than completing the square.  This method is
certainly amenable to programming.  The proof relies on the method of
completing the square, but once we have the result, we should and will
quote it with impunity.
\bigskip

\underline{Proof:} Assume that $a\ne0$.\footnotemark
\footnotetext{If $a=0$ the formula
(\ref{quadraticequation}) does not work (since we would
be dividing by zero), but in such a case  we are really solving $bx+c=0$,
which is linear and can be easily solved without resorting to
quadratic methods.} Then we rewrite (\ref{quadraticequation})
as follows:
\begin{align*}
ax^2+bx+c=0&\iff ax^2+bx=-c\\
&\iff x^2+\frac{b}ax=-\frac{c}a\\
&\iff x^2+\frac{b}ax+\left(\frac12\cdot\frac{b}a\right)^2
	=-\frac{c}a+\left(\frac12\cdot\frac{b}a\right)^2\\
&\iff x^2+\frac{b}ax+\frac{b^2}{4a^2}=-\frac{c}a+\frac{b^2}{4a^2}\\
&\iff \left(x+\frac{b}{2a}\right)^2=\frac{b^2}{4a^2}-\frac{c}a\\
&\iff x+\frac{b}{2a}=\pm\sqrt{\frac{b^2}{4a^2}-\frac{c}a}\\
&\iff x=-\frac{b}{2a} \pm\sqrt{\frac{b^2}{4a^2}-\frac{4a\cdot c}{4a\cdot a}}\\
&\iff x=-\frac{b}{2a}\pm\sqrt{\frac1{4a^2}}\sqrt{b^2-4ac}\\
&\iff x=-\frac{b}{2a}\pm\left|\frac1{2a}\right|\sqrt{b^2-4ac}\\
&\iff x=-\frac{b}{2a}\pm\frac1{2a}\sqrt{b^2-4ac}
=\frac{-b\pm\sqrt{b^2-4ac}}{2a}.
\end{align*}
The proof is essentially complete, but a couple of comments should be made.
First, since we need the two cases $+/-$, we get both quantities with
or without the absolute values.  If $a>0$, we still have $\pm$, whereas
if $a<0$, we have $\mp$, giving the same two cases, so we can leave
them written with $\pm$.  Also, we are looking for solutions $x\in\Re$,
so if $b^2-4ac<0$ in the last line, the final line is equivalent to
$\F$, meaning that so is (\ref{quadraticequation}), meaning
there are no real solutions.

The quantity $b^2-4ac$ is important enough to warrant a name:
\begin{definition}The quantity $b^2-4ac$ in Equation
{\rm (\ref{quadraticequation})}
is called the \underline{discriminant} of the equation.
\end{definition}
Given the form of the quadratic formula, in particular
the term $\ds{\pm\frac{1}{2a}\sqrt{b^2-4ac}}$, the following
implications for the sign of the discriminant are clear:
\begin{theorem}
Given {\rm (\ref{quadraticequation})}.
\begin{enumerate}
\item $\ds{b^2-4ac=0\qquad\iff\qquad(\ref{quadraticequation})\quad}$
has exactly one real solution.
\item $\ds{b^2-4ac>0\qquad\iff\qquad(\ref{quadraticequation})\quad}$
has exactly two real solutions.
\item $\ds{b^2-4ac<0\qquad\iff\qquad(\ref{quadraticequation})\quad}$
has no real solutions.
\end{enumerate}
\end{theorem}
\begin{center}\underline{\Large{\bf Exercises}}\end{center}
\bigskip

\begin{enumerate}
\item  Prove Principle \ref{multiplybothsides},
page \pageref{multiplybothsides}.  You may wish to look at
Principle \ref{addtobothsides}.

\item Show by direct calculation that, if $a\ne 0$, then
$$x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}$$
satisfies $ax^2+bx+c=0$.  (You need to check both
values for $x$.)
\label{QuadExercise1}

\item Show that, if $a\ne 0$, then
$$a\left(x-\frac{-b+\sqrt{b^2-4ac}}{2a}
\right)\left(x-\frac{-b-\sqrt{b^2-4ac}}{2a}\right)
=ax^2+bx+c.$$
Notice that once this is established, Exercise~\ref{QuadExercise1}
is trivial.\label{QuadExercise2}

\end{enumerate}

\section{Functions}

Behind every calculus problem lurks at least one function.
In fact calculus is  ultimately an analysis of functions---an
analysis  which far exceeds  what can be accomplished with algebra.
Because so many physical quantities can be modeled with
functions, calculus also offers a great leap in
our ability to analyze physical phenomena.

Still, to get the most out of studying calculus it is important
to have a fairly complete, pre-calculus understanding of
functions.\footnote{%%%
%%%% FOOTNOTE
These days there is a gap in the training of most calculus students
in the sense that calculus is attempted before the concept of
function is well-understood and well-analyzed.
It is a bit like
a modern problem in English training, in that students are asked to
write creative or expository papers while understanding relatively
little about grammar or style.
%%%% END FOOTNOTE
}
This chapter contains many of the standard algebraic and trigonometric
preliminaries to calculus, but also delves into deeper perspectives
usually left out of those courses. In that sense it is not meant
to be just a standard review of these topics, but is meant to
challenge the reader to think about the topics presented here
in a deeper, more coherent (that is, interconnected) manner.

In fact there are many rich perspectives from which we can analyze functions
without recourse to calculus:
philosophically (i.e., just the concept itself), algebraically,
and geometrically to name a few.

\newpage
\section{The Cartesian Plane, Distance and Circles}

\begin{figure}[h]
\begin{center}
\begin{picture}(300,220)(-150,-100)
\thicklines
\put(-150,0){\vector(1,0){300}}
\put(0,-100){\vector(0,1){200}}
\thinlines
\put(-13,105){$y$-axis}
\put(135,5){$x$-axis}
\put(104,72){\circle*{3}}
\put(106,72){$P(x,y)$}
%\put(8,72){\line(1,0){8.5}}
%\put(25,72){\line(1,0){8.5}}
%\put(42,72){\line(1,0){8.5}}
%\put(59,72){\line(1,0){8.5}}
%\put(76,72){\line(1,0){8.5}}
%\put(93,72){\vector(1,0){10}}
\put(-4,72){\line(1,0){8}}
\put(-9,70){$y$}
\put(104,-3){\line(0,1){6}}
\put(102,-10){$x$}

%\put(104,9){\line(0,1){9}}
%\put(104,27){\line(0,1){9}}
%\put(104,45){\line(0,1){9}}
%\put(104,63){\vector(0,1){9}}

\put(0,72){\vector(1,0){103}}
\put(104,0){\vector(0,1){71}}
\put(20,75){$x$-displacement}
\put(126,50){$y$-}
\put(106,40){displacement}

\put(0,0){\circle*{3}}
\put(20,-20){\vector(-1,1){18}}\put(20,-20){\line(1,0){20}}
\put(42,-30){\shortstack{$(0,0)$, i.e., \\ the {\it origin}}}

\end{picture}
\end{center}
\caption{Cartesian Plane, $\Re^2$ with a  point $(x,y)\in\Re^2$.
For this particular point
$x,y>0$.}
\label{cartesianplane}\end{figure}
%\section{The Cartesian Plane}

The Cartesian plane is one of the most useful analytical tools for
calculus and mathematics in general.
It allows geometric problems to be framed algebraically, and
many algebraic problems to be investigated geometrically.
Some relatively difficult algebraic problems are trivial when
framed geometrically, and vice versa.  Some problems benefit
significantly from both settings.
This marriage of geometry to algebra was the brainchild of
Ren\'e des Cartes and is the central theme in the mathematical
field of {\it analytic geometry}.

The Cartesian Plane is a graphical representation of the set
of {\it ordered pairs} of real numbers, and is denoted
$\Re^2=\{(x,y)| x,y\in\Re\}$. Examples of ordered pairs include
$(2,1)$, $(-5,0)$, $(\pi,29)$, and so on.  By {\it ordered}
we mean, for instance, $\ds{(1,2)\ne(2,1)}$.
In the usual formulation of the Cartesian Plane, we represent
the ordered pair $(x,y)$ by a point $P$ which is arrived at
by a displacement---from some fixed point
called the {\it origin}---of $x$ in the horizontal direction (with
the positive direction being to the right), and
a displacement of $y$ in the vertical direction (with the
positive direction being upwards).  A displacement of zero in
both directions would leave us at the origin, which we
thus designate as the $(0,0)$.

In keeping with this convention, two number lines called
{\it axes}  are drawn through
the origin to represent
the horizontal and vertical displacement scales.  The horizontal
axis is called the {\it $x$-axis}, and the vertical axis is
called the {\it $y$-axis}.  We draw the $x$-axis to coincide
with the line of zero vertical displacement, and the $y$-axis
to coincide with the line of zero horizontal displacement, with
these two axes therefore meeting at the origin $(0,0)$.
See Figure \ref{cartesianplane}.

For a point $(x,y)$, we will call the first number the $x$-{\it{coordinate}}
and the second the $y$-{\it{coordinate}}.\footnotemark
\footnotetext{These are also called, respectively, the
first and second coordinates or (more archaically)
the  {\it abscissa} and the {\it ordinate.}}
The two axes divide the plane into four geometrically identical
quarter-planes, called {\it quadrants}.  These are labeled
Quadrants I--IV, beginning with the upper right and
increasing counterclockwise.  They correspond to the four
different cases of signs $(+/-)$ for $x$ and $y$.
In Figure \ref{cartesianquadrants} we see some points graphed
in each of the four quadrants.  A point on an axis we will
not consider to be in any of the quadrants.\footnotemark
\footnotetext{Some texts use the term {\it axial} to signify
points which lie on either of the axes.}
\begin{figure}
\begin{center}
\begin{picture}(300,270)(-150,-125)
\put(-150,0){\vector(1,0){300}}
\put(-150,0){\vector(-1,0){0}}
\put(0,-115){\vector(0,1){230}}
\put(0,-115){\vector(0,-1){0}}

%%%%%%%%%%%%%%%%%%%%%%     Mark Quadrants  %%%%%%%%%%%%%%%%%%%%%%%%%%%
\put(100,100){\shortstack{Quadrant I\\ $x,y>0$\\ \vphantom{$x>0$}}}
\put(-160,100){\shortstack{Quadrant II\\ $x<0$\\ $y>0$}}
\put(-160,-130){\shortstack{Quadrant III\\ $x,y<0$\\ \vphantom{$x>0$}}}
\put(100,-130){\shortstack{Quadrant IV\\ $x>0$\\ $y<0$}}
%%%%%%%%%%%%%%%%%%%%%%     Mark Scales, x then y %%%%%%%%%%%%%%%%%%%%%
\put(20,-4){\line(0,1){8}}\put(18,-13){1}
\put(40,-4){\line(0,1){8}}\put(38,-13){2}
\put(60,-4){\line(0,1){8}}\put(58,-13){3}
\put(80,-4){\line(0,1){8}}\put(78,-13){4}
\put(100,-4){\line(0,1){8}}\put(98,-13){5}
\put(120,-4){\line(0,1){8}}\put(118,-13){6}
\put(140,-4){\line(0,1){8}}\put(138,-13){7}

\put(-20,-4){\line(0,1){8}}\put(-30,-13){$-1$}
\put(-40,-4){\line(0,1){8}}\put(-50,-13){$-2$}
\put(-60,-4){\line(0,1){8}}\put(-70,-13){$-3$}
\put(-80,-4){\line(0,1){8}}\put(-90,-13){$-4$}
\put(-100,-4){\line(0,1){8}}\put(-110,-13){$-5$}
\put(-120,-4){\line(0,1){8}}\put(-130,-13){$-6$}
\put(-140,-4){\line(0,1){8}}\put(-150,-13){$-7$}

\put(-4,20){\line(1,0){8}}\put(-10,18){1}
\put(-4,40){\line(1,0){8}}\put(-10,38){2}
\put(-4,60){\line(1,0){8}}\put(-10,58){3}
\put(-4,80){\line(1,0){8}}\put(-10,78){4}
\put(-4,100){\line(1,0){8}}\put(-10,98){5}

\put(-4,-20){\line(1,0){8}}\put(-18,-22){$-1$}
\put(-4,-40){\line(1,0){8}}\put(-18,-42){$-2$}
\put(-4,-60){\line(1,0){8}}\put(-18,-62){$-3$}
\put(-4,-80){\line(1,0){8}}\put(-18,-82){$-4$}
\put(-4,-100){\line(1,0){8}}\put(-18,-102){$-5$}

%%%%%%%%%%%%%%%%%%% Plot some points and label %%%%%%%%%%%%%%%%%
\put(40,80){\circle*{3}}\put(42,80){$(2,4)$}
\put(100,20){\circle*{3}}\put(102,20){$(5,1)$}
\put(0,60){\circle*{3}}\put(2,60){$(0,3)$}
\put(-120,0){\circle*{3}}\put(-130,10){$(-6,0)$}
\put(-100,80){\circle*{3}}\put(-132,80){$(-5,4)$}
\put(80,-40){\circle*{3}}\put(82,-40){$(4,-2)$}
\put(-60,-40){\circle*{3}}\put(-100,-40){$(-3,-2)$}

\end{picture}
\end{center}
\caption{Quadrants and some plotted points.}
\label{cartesianquadrants}\end{figure}

Now suppose we have two points $\ds{P_1(x_1,y_1)}$
and $\ds{P_2(x_2,y_2)}$, and we would like to
find the distance $\dist\left(P_1,P_2\right)$
between the two points.
This is given by the following proposition:
\begin{figure}\begin{center}
\begin{picture}(300,100)(-10,-50)
\put(-10,-40){\vector(1,0){300}}
\put(10,-50){\vector(0,1){100}}
\put(70,40){\circle*{3}}\put(74,40){$P_1\left(x_1,y_1\right)$}
\put(190,-20){\circle*{3}}\put(192,-20){$P_2\left(x_2,y_2\right)$}

\put(70,40){\line(2,-1){120}}
\multiput(70,35)(0,-10){5}{\line(0,-1){5}}
\multiput(70,-20)(10,0){11}{\line(1,0){5}}
\put(70,-20){\line(0,1){10}}
\put(70,-20){\line(1,0){10}}

\put(70,-10){\line(1,0){10}}
\put(80,-20){\line(0,1){10}}

\put(20,10){$\left|\,y_2-y_1\right|$}
\put(110,-35){$\left|x_2-x_1\right|$}

\put(7,40){\line(1,0){6}}\put(-6,40){$y_1$}
\put(7,-20){\line(1,0){6}}\put(-6,-20){$y_2$}
\put(190,-43){\line(0,1){6}}\put(187,-53){$x_2$}
\put(70,-43){\line(0,1){6}}\put(67,-53){$x_1$}

\put(130,15){$d$}
\end{picture}\end{center}
\caption{Illustration for Proposition \ref{DistanceProposition}.
From the Pythagorean Theorem, we get
$\ds{d\,^2=\left|x_2-x_1\right|^2+\left|\,y_2-y_1\right|^2}$.}
\label{DistancePropositionIllustration}\end{figure}
\begin{proposition} The distance
$d$ between two points  $\ds{P_1(x_1,y_1)}$
and $\ds{P_2(x_2,y_2)}$ is given by
\begin{equation}
\dist\left(P_1,P_2\right)
=\sqrt{\left(x_2-x_1\right)^2+\left(y_2-y_1\right)^2}.
\label{DistanceFormula}\end{equation}
\label{DistanceProposition}\end{proposition}
\begin{proof}
To see this, we take
$d=\dist\left(P_1,P_2\right)$ and
 use the Pythagorean Theorem\footnotemark.
\footnotetext{Recall that the Pythagorean Theorem is
a result from geometry which
states  that, given any right triangle with hypotenuse length
$c$ and other sides of lengths $a$ and $b$, we have
\begin{equation}a^2+b^2=c^2.
\end{equation}
The hypotenuse is the side opposite the right ($90^\circ$) angle.
The square in the lower corner of the triangle indicates that
the included angle is $90^\circ$, since all four angles of
any square are $90^\circ$.
\begin{center}\begin{picture}(100,50)(0,0)
\put(10,0){\line(0,1){50} }\put(0,25){$a$}
\put(10,0){\line(1,0){75}}\put(47,-10){$b$}
\put(10,50){\line(3,-2){75}}\put(54,26){$c$}

\put(10,10){\line(1,0){10}}
\put(20,0){\line(0,1){10}}

\end{picture}
\end{center}}
We construct a right triangle with the desired distance $d$
as the hypotenuse, as in Figure \ref{DistancePropositionIllustration}.
Wherever such a triangle lies, the horizontal side will
be $\ds{\left|x_2-x_1\right|}$
and the vertical side  $\ds{\left|y_2-y_1\right|}$.
From the figure we get
\begin{align*}
d\,^2&=\left|x_2-x_1\right|^2+\left|y_2-y_1\right|^2\\
&=\left(x_2-x_1\right)^2+\left(y_2-y_1\right)^2.\end{align*}
This is because $|u|^2=u^2$ for any $u\in\Re$, and in
this case we use that fact for $u=x_2-x_1$ and for
$u=y_2-y_1$. Continuing, we take the square root of both sides.
Thus we get
$$|d|=\sqrt{\left(x_2-x_1\right)^2+\left(y_2-y_1\right)^2}.$$
Now distance is a nonnegative quantity\footnotemark
\footnotetext{Displacement, by contrast, need not be nonnegative.
Much later
 in the text we will also allow for displacements in ``vector'' directions,
including the direction one must follow to move from
$\left(x_1,y_1\right)$ to $\left(x_2,y_2\right)$.  Such a direction
cannot be simply classified as positive or negative.}
and so $|d|=d$.  Thus we get
$$d=\sqrt{\left(x_2-x_1\right)^2+\left(y_2-y_1\right)^2},
\qquad\text{q.e.d.}$$
\end{proof}
\bex Find the distance between the points
$(-3,5)$ and $(7,10)$.

\underline{Solution:} From our formula, we get
\begin{align*}
\dist\left(\vphantom{x_2^2}(-3,5),(7,10)\right)
&=\sqrt{(7-(-3))^2+(10-5)^2}\\
&=\sqrt{10^2+5^2}\\
&=\sqrt{125}
=5\sqrt5.\end{align*}
\eex
The distance formula (\ref{DistanceFormula}) is worth memorizing
so we do not have to construct a graph like
Figure~\ref{DistancePropositionIllustration}
whenever the quantity $d$ is needed.
It is also worth noting that
\begin{equation}
\dist\left(P_1,P_2\right)=\dist\left(P_2,P_1\right),
\label{SymmetryOfDistanceFormula}\end{equation}
which follows from the facts that
$\left|x_2-x_1\right|=\left|x_1-x_2\right|$ and
$\left|y_2-y_1\right|=\left|y_1-y_2\right|$.
(One might prefer to notice $(x_2-x_1)^2=(x_1-x_2)^2$, etc.)
Now that we have the distance formula, we can illustrate
our first example of a geometric problem in the plane and its algebraic
counterpart, but first we need the following definition:
\begin{definition} Given an equation in the variables $x$ and $y$,
the \underline{graph}
of that equation is the set of all points $(x,y)$ for which
the equation is true.\end{definition}
The graph is identified with the visual  representation
in the plane in
which every point ``on the graph''\footnotemark\  is darkened
on an otherwise white (for instance) plane.
\footnotetext{A better syntax would be ``in the graph,''
since the graph is technically a set,
but ``on the graph'' has become standard due to the
visual interpretation of ``graph.''}
\bex Let $\ds{S=\left\{(x,y)\left.\vphantom{x_2^2}\right|
\dist\left(\vphantom{x_2^2}(3,-4),(x,y)\right)=5\right\}}$.
\begin{description}
\item a. What geometric object does the graph of $S$
represent?
\item b. Graph $S$.
\item c. Write an equation in $x$ and $y$ for which
$S$ is the graph.
\end{description}

\underline{Solution:} To answer part a, recall from geometry that the set
of all points in the plane  which are 5 units from $(3,-4)$ is simply
a circle, of radius 5, centered at $(3,-4)$.  With
that the graph is easily drawn---with a compass perhaps---to
satisfy part b, as in Figure~\ref{FigureForSimpleCircleGraphExample}.
 To answer part c, we recall the distance formula
(\ref{DistanceFormula}), and see that
\begin{align*}
S&=\left\{(x,y)\left|\sqrt{(x-3)^2+(y-(-4))^2}=5\right.\right\}\\
&=\left\{(x,y)\left|(x-3)^2+(y+4)^2=25\right.\right\}.
\end{align*}
We were allowed to square both sides within the set
because the squared quantities were all nonnegative.
In other words, $a,b\ge0\implies\left((a=b)\longleftrightarrow(a^2=b^2)
\right)$.

\begin{figure}
\begin{center}
\begin{pspicture}(-1.5,-5)(4.5,1)
\psset{xunit=.5cm,yunit=.5cm}
\psaxes{<->}(0,0)(-3,-10)(9,2)
\pspolygon[linecolor=white,fillstyle=solid,fillcolor=white]%
(-1.5,-1.5)(-1.5,-.5)(-.5,-.5)(-.5,-1.5)(-1.5,-1.5)
\rput(-1,-1){$-1$}
\pscircle(3,-4){2.5}
\pscircle[fillstyle=solid,fillcolor=black](3,-4){.05}
\rput(3,-3.2){$(3,-4)$}
\psline[linestyle=dashed](3,-4)(5.5,-8.330127)
\rput(4.8,-6){5}
\end{pspicture}
\end{center}

\caption{The graph of all points a distance 5 from the fixed point
$(3,-4)$ is the circle centered at $(3,-4)$ with radius 5.  It is also
the set of all points $(x,y)$ satisfying $(x-3)^2+(y+4)^2=25$, which follows
from the distance formula.}
\label{FigureForSimpleCircleGraphExample}
\end{figure}\label{SimpleCircleGraphExample}\eex

Because we knew the graph was a circle, and we knew its center and
radius, graphing was simple.  If instead we had the equation
and desired a graph, and if we did not already know the nature of the
figure, we could plot a sufficiently large number of points
satisfying the equation until we can ``connect the dots'' with
confidence to get, more or less,  the correct shape of the graph.  However
when we produce a visual graph, it is likely to be imperfect since
we cannot carefully plot infinitely many points, and our
precision in plotting is not absolute.  Fortunately, one of the
strengths of analytic geometry is that we can always check the
{\it equation} to see if a particular point is on the graph.
For instance, in Figure~\ref{FigureForSimpleCircleGraphExample} it appears
that the points $(0,0)$, $(3,1)$, $(8,-4)$, $(3,-9)$, $(-2,-4)$
are all on the graph. Indeed they are, since
\begin{align*}
(0-3)^2+(0+4)^2&=25,\\
(3-3)^2+(1+4)^2&=25,\\
(8-3)^2+(-4+4)^2&=25,\\
(3-3)^2+(-9+4)^2&=25,\\
(-2-3)^2+(-4+4)^2&=25.\end{align*}
Note that, except for the point $(0,0)$, these points can be
arrived at by moving respectively $5$ units up, right, down and left of
the center $(3,-4)$, so we could have even checked these
with the definition of circle.
But how do we find less obvious exact points on the circle,
for instance where $x=2$?  We can ``zoom in'' on our picture and
make approximations for the $y$ values at those points,
but the equation can give us the exact answer:
\begin{alignat*}{2}
(2,y)\in S&\iff &\qquad (2-3)^2+(y+4)^2&=25\\
&\iff&1+(y+4)^2&=25\\
&\iff&(y+4)^2&=24\\
&\iff&(y+4)&=\pm\sqrt{24}\\
&\iff&y&=-4\pm2\sqrt6.\end{alignat*}
Thus the points on the circle where $x=2$ are
$\left(2,-4+2\sqrt6\right)$ and $\left(2,-4-2\sqrt6\right)$.
Now if we want an approximation we can have as much precision
as we would like.  One calculator gives
$\left(2,-4+2\sqrt6\right)\approx(2,0.89897949)$,
 and $\left(2,-4-2\sqrt6\right)\approx(2,-8.8989795)$.
It would be quite difficult to achieve this level of precision
without knowing the {\it exact} values, $\left(2,-4\pm2\sqrt6\right)$.
Indeed, reading values from the printed graph is
usually unreliable and is to be avoided whenever more
analytic methods (such as algebra) are available.\footnotemark
\footnotetext{That is not to say all equations succumb quickly
to algebraic methods.  Indeed not all equations are solvable
using such methods, and numerical approximations must be employed.
Fortunately, thanks in large part to the discovery of the
calculus, so-called numerical methods of approximation can
be as accurate as needed, only falling short of exactitude.
The accuracy is usually limited only by the availability of computational
resources.}

It is easy to generalize Example \ref{SimpleCircleGraphExample}
with the following proposition:
\bprop The circle centered at $(h,k)$, with radius $r>0$, is
exactly the graph of the equation
\begin{equation}(x-h)^2+(y-k)^2=r^2.
	\label{EquationOfCircle}\end{equation}
\eprop
The left hand side is just $\left[\dist\left((x,y),(h,k)\right)\right]^2$,
so taking the square root of each side (recalling that $r$ and
the left hand side are nonnegative),
this is just the statement that $(x,y)$ is a distance $r$ from
the center $(h,k)$. With this we can find the equation associated
with a circle, and vice versa.
\bex Below are the equations of circles, with respective centers and radii:
\begin{enumerate}
\item $\ds{(x+3)^2+(y-2)^2=81}$.  Center $(-3,2)$, radius $9$.
\item $\ds{(x-21)^2+(y-13)^2=17}$.  Center $(21,13)$, radius $\sqrt{17}$.
\item $\ds{x^2+y^2=1}$.  Center $(0,0)$, radius $1$.  Also known as
the \underline{unit circle}.
\end{enumerate}
\eex
Sometimes more sophisticated analysis is required, as in the next example.
\bex Show that the following is a circle, and find its center and radius.
$$x^2+y^2+3x-10y-9=0.$$

\underline{Solution:}
This requires completing the square.  First we will add $9$ to both sides,
group the $x$-terms together, do the same with $y$-terms, and
work from there:
\begin{alignat*}{2}
&&x^2+y^2+3x-10y-9&=0\\
&\iff\qquad&x^2+3x+y^2-10y&=9\\
&\iff&x^2+3x+(3/2)^2+y^2-10y+({-10}/2)^2&=
9+(3/2)^2+({-10}/2)^2\\
&\iff&x^2+3x+9/4+y^2-10y+25&=9+9/4+25\\
&\iff&(x+3/2)^2+(y-5)^2&=145/4.
\end{alignat*}
This is clearly the equation of a circle, for which
the center is $(-3/2,5)$, and the radius is
$\sqrt{145/4}=\frac12\sqrt{145}\approx6.02$.
The circle is graphed in Figure~\ref{FigureForCircleNeedingCompletingSquares}.
Note that a casual observer might be led to believe that $(2,0)$ is on the
graph, but it clearly does not satisfy the original equation we were given
(since $(x,y)=(2,0)$ in that equation would give $1=0$)
and is therefore not on the graph.\footnote{It is often
easier to work algebraically
with an equation of a circle other than (\ref{EquationOfCircle}).
For instance, checking to see if $(2,0)$ satisfies $x^2+y^2+3x-10y-9=0$
is easier than checking whether that point satisfies the equivalent
equation in the
form (\ref{EquationOfCircle}), namely
$(x+3/2)^2+(y-5)^2=145/4$, after completing the squares.}
\label{ExampleOfCircleNeedingCompletingSquares}
If we are interested in knowing where the circle does cross the
$x$-axis, we simply set $y=0$ and solve for $x$:
\begin{alignat*}{2}
&&x^2+3x-9&=0\\
&\iff\qquad&x&=\frac{-3\pm\sqrt{3^2-4(1)(-9)}}{2(1)}\\
&&&=\frac{-3}{2}\pm\frac12\sqrt{45}\\
&&&=-\frac32\pm\frac32\sqrt5\\
&&&\approx-4.8541019662, 1.8541019662.
\end{alignat*}
So our earlier-mentioned  casual observer is actually looking at the
point $\left(-3/2+\frac32\sqrt5\right)\approx(1.8541019662,0)$.
Again we see the advantage of having both an equation and a visual graph.
\eex
\begin{figure}
\begin{center}
\begin{pspicture}(-4,-1)(3,6)
\psset{xunit=.5cm,yunit=.5cm}
\psaxes[Dx=2,Dy=2]{<->}(0,0)(-8,-2)(6,12)
\pscircle(-1.5,5){3.0103986}%Radius is divided by 2 for psset,
                            %which the pscircle command ignores.
\pscircle[fillstyle=solid,fillcolor=black](-1.5,5){.05}
\rput(-3.2,5.5){$(-3/2,5)$}
\end{pspicture}
\end{center}
\caption{Drawing of circle $x^2+y^2+3x-10y-9=0$ from
Example~\ref{ExampleOfCircleNeedingCompletingSquares}, in which we
completed the squares to rewrite $(x+3/2)^2+(y-5)^2=145/4$,
from which we could read the center $(-3/2,5)$ and radius
$\frac12\sqrt{145}$.}\label{FigureForCircleNeedingCompletingSquares}
\end{figure}

For the present, let us return to the case of circles centered
at the origin.  Consider for example the circle $x^2+y^2=9$,
centered at $(0,0)$ with radius $3$.  If we solve for the
variable $y$, we get
\begin{alignat*}{2}
&&y^2&=9-x^2\\
&\iff\qquad&\sqrt{y^2}&=\sqrt{9-x^2}\\
&\iff&|y|&=\sqrt{9-x^2}\\
&\iff&y&=\sqrt{9-x^2}\qquad\text{or} \quad y=-\sqrt{9-x^2}.
\end{alignat*}
(It is common to skip the second and third lines entirely with
practice.)  Since the square root is defined to be nonnegative, the
first equation for $y$ represents those points $(x,y)$ on the circle
for which $y\ge0$, and the second represents those
for which $y\le0$.  These are given in Figure~\ref{SemicirclesFigure}a.

Alternatively we can solve for $x$.  The computations are
very similar, and we get
$$x=\sqrt{9-y^2}\qquad\text{or}\quad x=-\sqrt{9-y^2}.$$
Respectively, these are the left and right semicircles
shown in Figure~\ref{SemicirclesFigure}b.

Later in the text we will come across equations such as
$y=\sqrt{9-x^2}$, or circles where we need to have
$y$ as an expression in $x$.  For these reasons it is useful
to recognize the connections among the equations and
the circles they partially represent.

It is also useful to notice what are the possible values for
$x$ in $y=\sqrt{9-x^2}$, for instance.  Note that
we need $9-x^2\ge0$, so $9\ge x^2$, which gives
us $\sqrt9\ge\sqrt{x^2}$, or $3\ge|x|$, i.e., $|x|\le3$
so $x\in[-3,3]$.  This is easily seen from the graph.
Similarly for $y$, though we can notice that by realizing
that if $x\in[-3,3]$, then (as before) $x^2\in[0,9]$,
so $9-x^2\in[0,9]$, so finally $y=\sqrt{9-x^2}\in[0,3]$.
With some practice it is more immediately clear by inspection that
$y=\sqrt{9-x^2}$ requires $x\in[-3,3]$ and $y\in[0,3]$.

\begin{figure}
\begin{center}
\begin{pspicture}(-3,-4.125)(3,3)
\psset{xunit=.75cm,yunit=.75cm}
\psaxes{<->}(0,0)(-4,-3.5)(4,3.5)
\psarc(0,0){2.25}{0}{180}
\rput(0,4){$y=\sqrt{9-x^2}$}
\rput(0,-4){$y=-\sqrt{9-x^2}$}
\psarc[linestyle=dashed](0,0){2.25}{180}{360}
\rput(0,-5.5){\small\bf{Figure \ref{SemicirclesFigure}a}}
\end{pspicture}
\qquad\qquad
\begin{pspicture}(-3,-4.125)(3,3)
\psset{xunit=.75cm,yunit=.75cm}
\psaxes{<->}(0,0)(-4,-3.5)(4,3.5)
\psarc(0,0){2.25}{-90}{90}
\psarc[linestyle=dashed](0,0){2.25}{90}{270}
\rput(0,-5.5){\small\bf{Figure \ref{SemicirclesFigure}b}}
\rput(-2.5,3.2){$x=-\sqrt{9-y^2}$}
\rput(2.5,3.2){$x=\sqrt{9-y^2}$}
\end{pspicture}
\end{center}
\caption{Semicircular graphs which arise from solving the
equation of the circle $x^2+y^2=9$ for $y$ and $x$.}
\label{SemicirclesFigure}\end{figure}

\begin{center}\underline{\Large{\bf Exercises}}\end{center}
\bigskip
\bhw Find the distance between the pairs of points.
\begin{description}
\item[a.]$(2,3)$, $(0,0)$.
\item[b.]$(1,2)$, $(-5,-2)$.
\item[c.]$(-3,7)$, $(9,2)$.
\end{description}
\ehw

\bhw Describe the graphs of the following equations:
\begin{description}
\item[a.] $\ds{(x-3)^2+(y+5)^2=16}$.
\item[b.] $\ds{(x-3)^2+(y+5)^2=0}$.
\item[c.] $\ds{(x-3)^2+(y+5)^2=-1}$.
\item[d.] $\ds{y=\sqrt{1-x^2}}$.
\item[e.] $\ds{y=\sqrt{16-x^2}}$.
\item[f.] $\ds{x=-\sqrt{7-y^2}}$.
\item[g.] $\ds{y=\pm\sqrt{25-(x-2)^2}}$.
\item[h.] $\ds{y=\sqrt{25-(x-2)^2}}$.
\end{description}
\ehw
\bhw Find equations for the following figures.
\begin{description}
\item[a.] Circle, centered at $(2,3)$ with radius $4$.
\item[b.] Circle, centered at $(-1,7)$ with radius $\sqrt5$.
\item[c.] Circle, centered at $(0,0)$ with radius $2$.
\item[d.] Upper semicircle, centered at $(0,0)$ with radius $2$.
\item[e.] Lower semicircle, centered at $(0,0)$ with radius $2$.
\item[f.] Right semicircle, centered at $(0,0)$ with radius $2$.
\item[g.] Left semicircle, centered at $(0,0)$ with radius $2$.
\item[h.] Lower semicircle, centered at $(2,0)$ with radius $3$.
\item[i.] Upper semicircle, centered at $(2,1)$ with radius $3$.
\end{description}
\ehw
\bhw Consider the equation $y=x^2$.
\begin{description}
\item[a.] Graph several points and connect them in a reasonable manner.
\item[b.] Consider the point $(0,1/4)$ and the line made up of
          all points $(x,y)$ for which $y=-1/4$.
\item[c.] Prove algebraically that $(x,y)$ is the same distance from
          the point $(0,1/4)$ and the line $y=-1/4$ if and
          only if $y=x^2$. (You will first have to calculate
          the distance of a point $(x,y)$ to both $(0,1/4)$ and
          the line $y=-1/4$, and then show that these are
          equal if and only if $y=x^2$.)  It will be usefully
          to note that if $r,s\ge0$, then $\sqrt{r}=\sqrt{s}
          \iff r=s$.
\end{description}
This shows that the equation $y=x^2$ is consistent with the
geometric definition of a parabola, which is the set of
all points in a plane which are equidistant from a fixed
point (focus) in the plane, and a line (directrix) not containing
the fixed point but also lying in the plane.
\ehw

\newpage
\section{Lines}
We will assume a few of the better known postulate regarding lines
from the classical Euclidean geometry, for instance that
two points in the plane lie in exactly one line. We also assume that
there exist parallel lines, which lie in the
plane and are the same line or never intersect, and that any
two nonparallel lines in the plane intersect in exactly one point.
Because we assume Euclidean geometry in the Cartesian Plane,
it is also often called the Euclidean Plane, though it was
des~Cartes whose work lead to the  first coordinatized plane.

What follows if fairly standard, with a few
exceptions (the ``modified point-slope form''
especially comes to mind).  Though elementary, understanding lines
(as opposed to memorizing their formulas) is fundamental and
should be taken seriously despite the familiarity one might
have with the conclusions.  For this reason we devote a considerable
number of pages to a discussion of this topic, rather than present
an example-laden, but  {\it ad hoc} treatment found in some other texts.

\subsection{Slope}

In the Cartesian Plane, there are four different types of lines:
vertical lines, horizontal lines, upward slanting lines, and downward
slanting lines.  See Figure~\ref{LineTypes} for examples of these.
\begin{figure}%[h]
\begin{center}
\begin{picture}(300,220)(-150,-100)
\thicklines
\put(-150,0){\vector(1,0){300}}
%\put(-150,-.3){\line(1,0){300}}
%\put(-150,.3){\line(1,0){300}}
\put(135,5){$x$-axis}
\put(0,-100){\vector(0,1){200}}
%\put(0.3,-100){\line(0,1){200}}
%\put(-0.3,-100){\line(0,1){200}}
\put(-13,105){$y$-axis}
\thinlines
\put(-100,-100){\line(2,3){134}}\put(34,102){$l_3$}
\put(-60,100){\line(1,-1){200}}\put(143,-106){$l_4$}
\put(-40,100){\line(0,-1){200}}\put(-42,102){$l_1$}
\put(-150,-70){\line(1,0){300}}\put(145,-65){$l_2$}
\end{picture}
\end{center}

\caption{Examples of the four different types of lines in the Cartesian Plane:
vertical ($l_1$); horizontal ($l_2$); upward slanting ($l_3$); and
downward slanting ($l_4$).} \label{LineTypes}\end{figure}
By upward slanting, we mean that, as we move on the line toward
the right, we also move upwards.  In contrast, as we move rightward
on a downward slanting line, we move downward as well.  Of course on
a vertical line we cannot move rightwards (or leftwards),
and on a horizontal line
we can but we neither rise nor fall.

We will now find equations for these lines.  Eventually we will
find a general form of equation which encompasses all four cases
but is not the most convenient.  Inbetween, we will find other
forms which have their own advantages according to the situation
we find ourselves in.

It is interesting to first consider vertical and horizontal
lines as separate from those with some ``slant.''
The forms of these lines are as follows:
\begin{description}
\item[Vertical lines] are sets  of the following form, where $h$ is fixed:
\begin{equation}l=\left\{(x,y)\ |\ x=h,\ y\in\Re\right\}
=\left\{(h,y)\ |\ y\in\Re\right\}.
\end{equation}
\item[Horizontal lines] are sets of the following form, where $k$ is fixed:
\begin{equation}
l=\left\{(x,y)\ | \ x\in\Re,\ y=k\right\}
=\left\{(x,k)\ |\ x\in\Re\right\}.\end{equation}
\end{description}
We see that for the vertical line $x$ is fixed and $y$ is ``free.''
By contrast, for the horizontal line $y$ is fixed and $x$ is ``free.''
Thus we feel justified in writing equations for such lines as follows.
\begin{alignat}{3}
&&\text{\bf Vertical Lines:}&&\qquad x&=h,\\
&&\text{\bf Horizontal Lines:}&&y&=k.
\end{alignat}
An easy way to see what $h$ is for a particular vertical
line is to
read where it crosses the $x$-axis.  That particular point is called
the {\it $x$-intercept}, and will have coordinates $(h,0)$.
Similarly for the horizontal line, finding $k$ is as easy as
finding the point $(0,k)$ which is the {\it $y$-intercept}.
Clearly all vertical lines are parallel to each other, and
all horizontal lines are parallel to each other.
Note also that the $y$-axis is given by the equation $x=0$,
while the $x$-axis is given by $y=0$.
See Figure~\ref{VerticalLinesFigure}.
\begin{figure}
\begin{center}
\begin{picture}(300,270)(-150,-125)
\put(-150,0){\vector(1,0){300}}
\put(0,-125){\vector(0,1){250}}
\put(125,5){$x$-axis}
\put(-15,130){$y$-axis}

\put(20,-4){\line(0,1){8}}\put(18,-13){1}
\put(40,-4){\line(0,1){8}}\put(38,-13){2}
\put(60,-4){\line(0,1){8}}\put(58,-13){3}
\put(80,-4){\line(0,1){8}}\put(78,-13){4}
\put(100,-4){\line(0,1){8}}\put(98,-13){5}
\put(120,-4){\line(0,1){8}}\put(118,-13){6}
\put(140,-4){\line(0,1){8}}\put(138,-13){7}

\put(-20,-4){\line(0,1){8}}\put(-30,-13){$-1$}
\put(-40,-4){\line(0,1){8}}\put(-50,-13){$-2$}
\put(-60,-4){\line(0,1){8}}\put(-70,-13){$-3$}
\put(-80,-4){\line(0,1){8}}\put(-90,-13){$-4$}
\put(-100,-4){\line(0,1){8}}\put(-110,-13){$-5$}
\put(-120,-4){\line(0,1){8}}\put(-130,-13){$-6$}
\put(-140,-4){\line(0,1){8}}\put(-150,-13){$-7$}

\put(-4,20){\line(1,0){8}}\put(-10,18){1}
\put(-4,40){\line(1,0){8}}\put(-10,38){2}
\put(-4,60){\line(1,0){8}}\put(-10,58){3}
\put(-4,80){\line(1,0){8}}\put(-10,78){4}
\put(-4,100){\line(1,0){8}}\put(-10,98){5}

\put(-4,-20){\line(1,0){8}}\put(-18,-22){$-1$}
\put(-4,-40){\line(1,0){8}}\put(-18,-42){$-2$}
\put(-4,-60){\line(1,0){8}}\put(-18,-62){$-3$}
\put(-4,-80){\line(1,0){8}}\put(-18,-82){$-4$}
\put(-4,-100){\line(1,0){8}}\put(-18,-102){$-5$}
%%%%%%%%%%%%%%%  LINE X=-4  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\put(-80,-125){\line(0,1){250}}
\put(-96,126){\shortstack{line\\ {$x\!=\!-4$}}}

\put(-80,0){\circle*{3}}\put(-130,25){$(-4,0)$}
\put(-100,20){\vector(1,-1){19}}

\put(-80,40){\circle*{3}}\put(-75,40){$(-4,2)$}
\put(-80,100){\circle*{3}}\put(-75,100){$(-4,5)$}
\put(-80,-52){\circle*{3}}\put(-75,-52){$(-4,-\sqrt7\, )$}
\put(-80,-100){\circle*{3}}\put(-75,-100){$(-4,-5)$}

%%%%%%%%%%%%%%%  LINE X=3  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\put(60,-125){\line(0,1){250}}
\put(60,0){\circle*{3}}
\put(83,-27){$(3,0)$}\put(80,-20){\vector(-1,1){19}}
\put(60,40){\circle*{3}}\put(65,40){$(3,2)$}
\put(60,100){\circle*{3}}\put(65,100){$(3,5)$}
\put(60,-60){\circle*{3}}\put(65,-60){$(3,-3)$}
\put(60,-90){\circle*{3}}\put(65,-90){$(3,-4.5)$}
\put(50,126){\shortstack{line\\ {$x=3$}}}

%%%%%%%%%%%%%%%%%%%%  Line y=3  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\put(-150,60){\line(1,0){300}}
\put(-120,60){\circle*{3}} \put(-135,65){$(-6,3)$}
\put(-60,60){\circle*{3}} \put(-75,65){$(-3,3)$}
\put(40,60){\circle*{3}} \put (30,65){$(2,3)$}
\put(100,60){\circle*{3}} \put(90,65){$(5,3)$}
\put(0,60){\circle*{3}}
\put(20,80){\vector(-1,-1){19}}\put(20,80){$(0,3)$}
\put(125,52){\shortstack{line \\ $y=3$}}

%%%%%%%%%%%%%%%%%%%%  Line y=-4  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\put(-150,-80){\line(1,0){300}}
\put(-60,-80){\circle*{3}} \put(-75,-75){$(-3,-4)$}
\put(40,-80){\circle*{3}} \put(25,-75){$(2,-4)$}
\put(120,-80){\circle*{3}} \put(105,-90){$(6,-4)$}
\put(0,-80){\circle*{3}} \put(20,-100){\vector(-1,1){19}}
\put(20,-105){$(0,-4)$}
\put(-150,-88){\shortstack{line\\ $y\!=\!-4$}}

\end{picture}\end{center}
\caption{Vertical lines $x=-4$ and $x=3$, and horizontal lines
$y=-4$ and $y=3$.  Several points are highlighted.  For vertical
lines, $x$ is fixed and $y$ is free, while for horizontal
lines $y$ is fixed and $x$ is free.  Two special cases are the
$y$-axis ($x-0$) and the $x$-axis ($y=0$).}
\label{VerticalLinesFigure}\end{figure}

Now we turn our attention to upward slanting lines, which
are distinguished from others by the characteristic that,
starting from one point on the line,
if we increase the $x$-coordinate and wish
to remain on the line we must also increase the $y$-coordinate.
Similarly, decreasing the $x$-coordinate would decrease the
$y$-coordinate as well.  The change in the $y$-coordinate
will be proportional to that in the $x$-coordinate, as
we will soon see.

The geometric facts which allow us to find an equation
for such a line are the theorems involving {\it similar
triangles\footnotemark}.\label{SimilarTrianglesPage}
%%%%%%%%%%%%%%%%%%%%% Footnote Text %%%%%%%%%%%%%%%%%%%%%%%%%%
\footnotetext{Recall that triangles with the same interior angles
are called {\it similar}.  For two such triangles, the
corresponding sides are proportionate.  Suppose the triangles
below have the same interior angles opposite
$a_1$ and $a_2$, \ $b_1$ and $b_2$, \  and $c_1$ and $c_2$.
\begin{center}
\begin{picture}(240,70)(-100,-10)
\put(-100,0){\line(1,0){60}}
\put(-100,0){\line(3,2){45}}
\put(-40,0){\line(-1,2){15}}
\put(-88,17){$a_1$} \put(-70,-8){$b_1$} \put(-45,15){$c_1$}

\put(20,0){\line(1,0){120}}
\put(20,0){\line(3,2){90}}
\put(140,0){\line(-1,2){30}}
\put(53,34){$a_2$} \put(80,-8){$b_2$} \put(130,30){$c_2$}
\end{picture}
\end{center}
Then the following relationships hold:
$$\frac{a_1}{a_2}=\frac{b_1}{b_2}=\frac{c_1}{c_2}.$$
From simple algebra we then get the following:
$$\frac{a_1}{b_1}=\frac{a_2}{b_2},
\qquad \frac{a_1}{c_1}=\frac{a_2}{c_2},
\qquad \frac{b_1}{c_1}=\frac{b_2}{c_2}.$$
}
%%%%%%%%%%%%%%%%%% End Footnote Text %%%%%%%%%%%%%%%%%%%%%%%
Suppose one point on an upward slanting line is $(x_1,y_1)$.
From there, we move upwards and rightwards to another
point on the line $(x,y)$.  Regardless of how far along
the line we move, the following ratio will remain the
same:
$$m=\frac{y-y_1}{x-x_1}.$$
To see this, let us consider two different points $(x,y)$
which are both up and right of $(x_1,y_1)$.
The triangles formed will be similar, and the ratio $m$ will
be a ratio of corresponding sides of similar triangles.
See Figure~\ref{FirstSlopeGraph}.
\begin{figure}
\begin{center}\begin{picture}(300,120)(0,-10)
\put(0,0){\vector(1,0){100}}
\put(10,-10){\vector(0,1){100}}
\put(0,-10){\line(2,3){66}}
\put(20,20){\circle*{3}}
\put(40,50){\circle*{3}}
\put(20,20){\vector(1,0){20}}
\put(40,20){\vector(0,1){30}}
\put(42,30){$y\!-\!y_1$}
\put(20,10){$x\!-\!x_1$}
%\put(-43,50){$(x_1,y_1)$}
%\put(-10,50){\vector(1,-1){29}}
\put(20,-3){\line(0,1){6}} \put(17,-12){$x_1$}
\put(40,-3){\line(0,1){6}} \put(39,-12){$x$}
\put(7,20){\line(1,0){6}}\put(-2,20){$y_1$}
\put(7,50){\line(1,0){6}}\put(0,50){$y$}
\put(70,90){$l$}

\put(200,0){\vector(1,0){100}}
\put(210,-10){\vector(0,1){100}}
\put(200,-10){\line(2,3){66}}
\put(220,20){\circle*{3}}
\put(260,80){\circle*{3}}
\put(220,20){\vector(1,0){40}}
\put(260,20){\vector(0,1){60}}
\put(230,10){$x\!-\!x_1$}
\put(264,40){$y\!-\!y_1$}
\put(220,-3){\line(0,1){6}}\put(217,-12){$x_1$}
\put(260,-3){\line(0,1){6}}\put(259,-12){$x$}
\put(207,20){\line(1,0){6}}\put(198,20){$y_1$}
\put(207,80){\line(1,0){6}}\put(200,80){$y$}
\put(270,90){$l$}

\end{picture}
\end{center}
\caption{For a given, upward slanting line $l$,
The ratio ${\frac{y-y_1}{x-x_1}}$ is the same
for both cases of $(x,y)$ drawn above because the
associated triangles are similar. }
\label{FirstSlopeGraph}
\end{figure}

Fortunately,  if
we draw $(x,y)$ below and to the left of our fixed point
$(x_1,y_1)$, then the ratio of the sides is
$$\frac{y_1-y}{x_1-x}=\frac{-(y-y_1)}{-(x-x_1)}
=\frac{y-y_1}{x-x_1},$$
which is the same form as before.  We designate this
number to be $m$, and call it the {\it slope} of the line.

As we will soon see, we can define the slope for downward,
or more generally nonvertical, lines as follows:

\begin{definition} For any nonvertical line \,$l$, and any
two points $(x_1,y_1)$, $(x_2,y_2)\in l$, define the
\,{\rm slope}\, of \ $l$ \,to be the ratio
\begin{equation} m =\frac{y_2-y_1}{x_2-x_1}.\label{SlopeOfLine}\end{equation}
\end{definition}

To see that this definition also makes sense for downward
slanting lines, notice first that when we move from a
point $(x_1,y_1)$ on such a line to another point
$(x_2,y_2)$, if we increased the $x$-coordinate we had
do decrease the $y$-coordinate, and if we decreased the
$x$-coordinate we had to increase the $y$-coordinate.
Thus if the denominator in (\ref{SlopeOfLine}) is positive,
the numerator will be negative, and if the denominator
is negative the numerator will be positive.

\begin{figure}
\begin{center}\begin{picture}(300,120)(0,-10)
\put(0,0){\vector(1,0){100}}
\put(10,-10){\vector(0,1){100}}
\put(0,90){\line(2,-3){66}}
\put(40,30){\circle*{3}}
\put(20,60){\circle*{3}}
\put(20,-3){\line(0,1){6}} \put(17,-12){$x_1$}
\put(40,-3){\line(0,1){6}} \put(37,-12){$x_2$}
\put(7,60){\line(1,0){6}}\put(-2,60){$y_1$}
\put(7,30){\line(1,0){6}}\put(0,30){$y_2$}
\put(-10,90){$l$}
\put(20,60){\vector(1,0){20}}
\put(40,60){\vector(0,-1){30}}
\put(20,70){$x_2\!-\!x_1\!>\!0$}
\put(50,45){$y_2\!-\!y_1\!<\!0$}

\put(200,0){\vector(1,0){100}}
\put(210,-10){\vector(0,1){100}}
\put(200,90){\line(2,-3){66}}
\put(220,60){\circle*{3}}
\put(254,9){\circle*{3}}
\put(220,-3){\line(0,1){6}}\put(217,-12){$x_2$}
\put(254,-3){\line(0,1){6}}\put(251,-12){$x_1$}
\put(207,9){\line(1,0){6}}\put(198,9){$y_1$}
\put(207,60){\line(1,0){6}}\put(200,60){$y_2$}
\put(190,90){$l$}
\put(254,60){\vector(-1,0){34}}
\put(254,9){\vector(0,1){51}}
\put(220,70){$x_2\!-\!x_1\!<\!0$}
\put(260,34){$y_2\!-\!y_1\!>\!0$}
\end{picture}
\end{center}
\caption{For the case of a downward sloping line,
we can still define the slope to be $m=\frac{y_2-y_1}{x_2-x_1}$.
In such a case this ratio will be negative.
This is the same no matter which two points
we choose (so long as there really are {\it two} points),
since similar triangles give us that $|m|=\frac{|y_2-y_1|}{|x_2-x_1|}$,
and therefore $m<0$ will be the same for both triangles.}
\label{DownwardSlopingLineFigure}
\end{figure}

When we consider the concept of slope, it is worth briefly focusing
on the vertical and horizontal line cases.  With the horizontal
line case, any change in $x$ results in no change in $y$, and
(\ref{SlopeOfLine}) gives $m=0$.  In the vertical case, there
can be change in $y$ but not $x$, and so (\ref{SlopeOfLine})
will always have zero in its denominator, making $m$ undefined.

We summarize all these results for a line $l$ with slope $m$:
\begin{itemize}
 \item $l$ is an upward sloping line $\iff  m>0$;
 \item $l$ is a downward sloping line $\iff m<0$;
 \item $l$ is a horizontal line $\iff m=0$;
 \item $l$ is a vertical line $\iff m$ is undefined.
\end{itemize}

We already know that vertical lines are represented by
equations $x=h$, and horizontal lines by $y=k$.
There are several equations which describe exactly
the relationship between $x$ and $y$, especially for
lines with defined slope.  The most important equation
of a line for calculus purposes is the {\it point-slope}
form, which we now develop.

\subsection{Point-Slope Form}
Suppose that the line $l$ is a nonvertical line, with
slope $m$, and through the point $(x_1,y_1)$.  Then any
other point $(x,y)\in l$ will satisfy
$$\frac{y-y_1}{x-x_1}=m.$$
Multiplying both sides by $x-x_1$ gives us the following:
\begin{definition}Given a point $(x_1,y_1)$ on a nonvertical line
with slope $m$, the corresponding {\rm point-slope}
equation of the line is
\begin{equation}
y-y_1=m(x-x_1).
\label{PointSlopeFormula}
\end{equation}\end{definition}
Notice that the above formula also works for the point $(x,y)=(x_1,y_1)$,
since substituting into $(\ref{PointSlopeFormula})$ gives $0=0$.
\bex  We can quickly write equations for the following lines:
\begin{itemize}
\item through $(1,3)$, with slope $2/3$ gives
$\ds{y-3=\frac23(x-1)}$;
\item through $(5,-9)$, slope $-7$ gives $\ds{y+9=-7(x-5)}$;
\item through $(7,4)$ and $(9,-1)$ first gives
      $m=(-1-4)/(9-7)=-5/2$, and so using either of these points as
      $(x_1,y_1)$ gives
      \begin{align*}
           y-4&=-\frac52(x-7),\\
           y+1&=-\frac52(x-9).
      \end{align*}
\end{itemize}
\eex

\subsection{Slope-Intercept Form}
We see from the above example that there can be more than one
equation of point-slope form for a given line.  Indeed, since
the line contains infinitely many choices for $(x_1,y_1)$,
there are infinitely many such equations for the same nonvertical line.
Another---perhaps more familiar---form of such a line is the
so-called {\it slope-intercept} form.  For such a line, we
are given the $y$-intercept, $(0,b)$, and the slope $m$.
The point-slope form then gives
$$y-b=m(x-0),$$
from which we quickly obtain the following:
\begin{definition}The {\rm slope-intercept} equation
of the nonvertical line with $y$-intercept $(0,b)$ and slope $m$
is given by
\begin{equation}y=mx+b.\label{SlopeIntercept}
\end{equation}\end{definition}
In fact given an equation of this form, where
$y$ is a first-degree polynomial in $x$, we can read
the slope and $y$-intercept from the equation.  Similarly,
any equation which looks like a point-slope form is
the equation of a line as well:
\begin{theorem}\label{EquationsOfLinesTheorem}  The following hold:
\begin{enumerate}
\item
Any equation of the form $$y-y_1=m(x-x_1)$$ is satisfied
by exactly that set of points lying on the unique line
through $(x_1,y_1)$ with slope $m$.
\item
The unique line with slope $m$ and $y$-intercept $(0,b)$ is
exactly the set of points in the plane which satisfy
$$y=mx+b.$$
Moreover, this form of the line is unique, i.e., if
$y=m_1x+b_1$ and $y=m_2x+b_2$ are equations of the same line,
then $m_1=m_2$ and $b_1=b_2$.
\end{enumerate}
\end{theorem}
We can always take any point-slope form
and solve for $y$ to obtain the unique slope-intercept form.
For example, above we had the same line represented by
$y-4=-5/2(x-7)$ and $y+1=-5/2(x-9)$.
If we solve these for $y$, respectively  we get
\begin{alignat*}3
y&=4-\frac52(x-7)&&=4-\frac52x+\frac{35}2&&=-\frac52x+\frac{43}2,\\
y&=-1-\frac52(x-9)&&=-1-\frac52x+\frac{45}2&&=-\frac52x+\frac{43}2.
\end{alignat*}
In both cases we get the slope-intercept form $y=-\frac52x+\frac{43}2$,
giving the slope $-\frac52$ (which we already knew) and $y$-intercept
$(0,43/2)$.

Clearly the slope-intercept form has three advantages over
the point-slope form:  its uniqueness, its information about
the $y$-intercept, and the fact that we compute that form
by the natural process of solving for $y$.  So why do we
ever use the point-slope form?  There are two reasons which
help justify its use.  First, it follows quickly from the
definition of slope.  Second, it is often the case
in calculus that  we will are presented exactly the slope
and one point on a line, and need a quick equation to describe
that line.  The point-slope
form offers an efficient method to write {\it an} equation of the
line, from which we can later derive the slope-intercept form
if we so desire.

\subsection{Modified Point-Slope Form}
A slight but very useful variant of the point-slope form
is what we will refer to as the {\it modified point-slope}
equation of a line through $(x_1,y_2)$ with slope $m$.
\begin{definition} Given a point $(x_1,y_1)$ on a nonvertical
line with slope $m$, the corresponding {\rm modified point-slope}
equation of the line is given by
\begin{equation}
y=y_1+m(x-x_1).\label{ModifiedPointSLope}
\end{equation}\end{definition}
This comes from the point-slope form (\ref{PointSlopeFormula}) after
adding $y_1$ to both sides.  This has the advantage we
have solved for $y$ (though the right hand side is not
simplified), and we can still see from the equation
one bona fide  point $(x_1,y_1)$
on the line, though it is not necessarily the $y$-intercept.
Thus the modified point-slope carries all the utility of
the point-slope form, but falls short on uniqueness and
slightly short in readability when compared to the slope-intercept
form.  This form is especially useful when $x$ is near $x_1$.

\bex Find the modified point-slope form of the following lines:
\begin{itemize}
\item Through $(3,9)$ with slope $\frac12$: \qquad
  ${y=9+\frac12(x-3)}$.
\item Through $(-4,5)$ with slope $-7$: \qquad  $\ds{y=5-7(x+4)}$.
\item Through $(7,-11)$ with slope $\frac23$: \qquad
  $y=-11+\frac23(x-7).$
\end{itemize}
\eex

\subsection{General Linear Form}
The final equation of lines that we will consider is called
the {\it general form} equation of a line:

\begin{definition}An equation of the form
\begin{equation}\label{GeneralEquationOfLine}
Ax+By=C,\qquad A,B\text{ not both zero},\end{equation}
is a {\rm general linear equation}.\end{definition}
This is mainly useful when solving linear systems of equations,
such as
$$\begin{array}{ccccc}
A_1x&+&B_1y&=&C_1\hphantom{.}\\
A_2x&+&B_2y&=&C_2.\end{array}$$
This can be further generalized to include more than two variables
$x,y$.
For our purposes it is the most general form (though not usually the
most convenient) in the sense that it includes
vertical lines as well. Here are the cases:
\begin{itemize}
\item \underline{Vertical \vphantom{p}Lines $x=h$}: Set $A=1$, $B=0$, $C=h$.
\item \underline{Horizontal \vphantom{p}Lines $y=k$}: Set $A=0$, $B=1$, $C=k$.
\item \underline{Lines with slope $m$}: If the line is given by
$y=mx+b$, this can be rewritten $mx-y=-b$, so $A=m$, $B=-1$ and $C=-b$
works.
\end{itemize}
Furthermore, if $A$ and $B$ are not both zero in
(\ref{GeneralEquationOfLine}), it is clear
we will be able to either solve for $y$ (if $B\ne0$), with
the other side of the equation of the form $mx+b$,
or get $x=h$ form, if $B=0$.

The general form is not unique.  For instance,
\begin{alignat*}{2}
&&x+3y&=5\\ \iff&\qquad&2x+6y&=10.\end{alignat*}
(Recall that we can multiply any equation by a nonzero constant
and the resulting equation will be logically equivalent.)
If we are given a line in general form, it is easy to
find its slope by finding its slope-intercept form:  we simply solve for
$y$.\footnotemark
%%%%%%%%%%%%%%%%%%%% FOOTNOTE TEXT  %%%%%%%%%%%%%%%%%%%%%%%%%%
\footnotetext{Because the process of finding the slope of a line given
in general form is straightforward, many texts do not include
a formula for the slope of such a line.  However some do,
and it is very simple to derive.  Assume a nonvertical
line is given by $Ax+By=C$.  Then $B\ne0$, and so
$By=-Ax+C\iff$
\begin{equation} y=-\frac{A}Bx+\frac{C}B.\label{GeneralToSlope-Intercept}
\end{equation}
Thus the slope is $m=-\frac{A}B$ and the $y$-intercept
is $\left(0,\frac{C}B\right)$.  We will derive this result
as we need it, though  (\ref{GeneralToSlope-Intercept})
is a natural thing to memorize if it is needed often enough.
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\bex Find the slopes of the following line  $2x-5y=27$.

\underline{Solution}:
$$2x-5y=27\iff -5y=-2x+27\iff y=\frac{-1}5(-2x+27)\iff
 y=\frac25x-\frac{27}5.$$
Thus the slope is $2/5$.
From this we also get that the $y$-intercept is $\left(0,-27/5\right)$.
\eex
It is also sometimes useful to take a form, such as the slope-intercept
form, and write it in the general form.  This is trivial, but
one often multiplies the equation by some constant to present
an equation with more pleasant coefficients.
\bex Write the line $y=\frac59x-\frac74$ in general form.

\underline{Solution}:
\begin{alignat*}{2}
&&\qquad\qquad\qquad\qquad y&=\frac59x-\frac74\\
&\iff&-\frac59x+y&=-\frac74\\
&\iff&5x-9y&=\frac{63}4\\
&\iff&20x-36y&=63.\end{alignat*}
As a matter of fact, all but the first line are in general form,
but one often prefers an equation with integer coefficients for
aesthetic and other reasons.
\eex

\subsection{Parallel and Perpendicular Lines, Midpoints}
The key to determining if lines $l_1$ and $l_2$ are
parallel, perpendicular or neither is the slopes.
We have the following theorems:

\begin{theorem} Given lines $l_1$ and $l_2$.
Then these lines are parallel, written $l_1\parallel l_2$,
if and only if one of the following holds:
\begin{enumerate}
\item $l_1$ and $l_2$ are both vertical;
\item If $l_1$ and $l_2$ have respective slopes $m_1$ and $m_2$,
then $$m_1=m_2.$$
\end{enumerate}
\end{theorem}

\begin{theorem} Given lines $l_1$ and $l_2$.
Then these lines are perpendicular, written $l_1\perp l_2$,
if and only if one of the following holds:
\begin{enumerate}
\item one of the lines $l_1$, $l_2$ is horizontal, the other vertical;
\item If $l_1$ and $l_2$ have respective slopes $m_1$ and $m_2$,
then $$m_1=-\frac{1}{m_2}, \qquad m_2=-\frac{1}{m_1}.$$
\end{enumerate}
\end{theorem}
Summarized, if the lines are parallel then they have the same
slope or both slopes are undefined;  if they are perpendicular
then their slopes are ``opposite reciprocals'' of each other, or
one is zero and the other undefined.

\bex
Find the line through $(-2,5)$ which is
\begin{enumerate}
\item parallel to the line $5x+9y=15$,
\item perpendicular to the line $5x+9y=15$.
\end{enumerate}

\underline{Solution}: First we need to know the slope of the
given line (which is the same for both):
$$5x+9y=15\iff 9y=-5x+15\iff y=\frac59x+\frac{15}9.$$
The given line has slope $\frac59$, and so the
parallel line has slope $m_\parallel=\frac59$, and the
perpendicular line has slope $m_\perp=-\frac95$.
Thus we have the line
\begin{alignat*}{2}
\text{\underline{parallel}:}&\qquad& y-5&=\hphantom{-}\frac59\,(x+2),
	\qquad\text{and}\\
\text{\underline{perpendicular}:}&& y-5&=-\frac95\,(x+2).
\end{alignat*}
\eex

Occasionally we will be interested in the {\it midpoint}
$(\bar{x},\bar{y})$
of
a line segment with endpoints $(x_1,y_1)$ and $(x_2,y_2)$.
The formula is given by
\begin{equation}\label{MidpointFormula}
\left(\bar{x},\bar{y}\right)=\left(\frac{x_1+x_2}2,
\frac{y_1+y_2}2\right),
\end{equation}
and so the coordinates of the midpoint are just the averages
of the $x$ and $y$-coordinates, respectively.
It will be left as an exercise (Exercise~\ref{MidpointProofExercise})
 to prove that
(\ref{MidpointFormula}) does in fact give the midpoint, i.e.,
that point on the line determined by the endpoints and
is equidistant\footnotemark
\footnotetext{The same distance.}
from each endpoint.
A common and simple problem which can be easily dispatched is
finding the {perpendicular bisector} of a line segment
with given endpoints, i.e., that line which both bisects
the segment, and is perpendicular to it.
\bex
Find the perpendicular bisector for the line segment
with endpoints $(-1,2)$ and $(5,9)$.

\underline{Solution}: We will find a point and a slope for the
line which is the perpendicular bisector.  The point is the
midpoint, and the slope is the slope of lines perpendicular
to the line segment.
Again, the point is
$$(\bar{x},\bar{y})=\left(\frac{-1+5}2,\frac{2+9}2\right)
=\left(2,\frac{11}2\right).$$
The slope of the line segment is $\ds{m=\frac{9-2}{5-(-1)}=\frac76}$.
The perpendicular slope is thus
$$m_\perp=-\frac67.$$
The line is thus $y-\bar{y}=m_\perp(x-\bar{x})$, or
$$y-\frac{11}2=-\frac67(x-2).$$
\eex

\newpage
\begin{center}\underline{\Large{\bf Exercises}}\end{center}
\bigskip

\bhw Write an equation for the lines $l_1,\cdots,l_4$
given in Figure~???
\ehw
\bhw Graph the following lines.
\ehw
\bhw Find a point-slope form for each of the following
lines:
\ehw
\bhw Find the slope-intersect for each of the following
lines:
\ehw
\bhw Write the modified point-slope form of the following
lines.
\ehw
\bhw Write a general form of the following lines:
\ehw
\bhw The tangent line to a circle at a point $(x_0,y_0)$ on
that circle is the line perpendicular to the line
connecting $(x_0,y_0)$ and the center of the circle.
Consider the circle $x^2+y_2=100$.  Find the
tangent lines to the circle at the following points:
\begin{description}
\item[(a)]$(6,8)$,
\item[(b)]$(0,10)$,
\item[(c)]$(-10,0)$,
\item[(d)]$(8,-6)$,
\item[(e)]$(-2\sqrt5,-2\sqrt5)$
\item[(f)] Both points on the circle where $x=4$.
\end{description}
\ehw

\bhw Why is it important that $A$ and $B$ not both be zero
in the general form of the line?  If these are both zero,
what are the two possible solutions of $Ax+By=C$?
\ehw

\bhw Prove the midpoint formula (\ref{MidpointFormula}) the
following way:
\begin{description}
\item[(a)] Show that the point does lie the same distance
from $(x_1,y_1)$ and $(x_2,y_2)$, i.e.,
$$\dist\left((x_1,y_1),(\bar{x},\bar{y})\right)
=\dist\left((x_2,y_2),(\bar{x},\bar{y})\right).$$
\item[(b)] Show that the midpoint lies on the same
line as those two points.  To do so requires
consideration of two cases:
\begin{description}
\item[(i)] First prove the case of a  vertical line segment,
i.e., $y_1=y_2$, but $x_1\ne x_2$.
\item[(ii)] Next assume the nonvertical line case.  It
is enough to show that the slopes of the line segments
gotten with any two pairings of the three points will be
the same. (See Theorem~\ref{EquationsOfLinesTheorem}
and Figure~\ref{FirstSlopeGraph}.)
\end{description}
\end{description}
\label{MidpointProofExercise}\ehw
\bhw Show geometrically that every point on the perpendicular
bisector of a line segment is equidistant from the endpoints.
(For a challenge, show the same thing algebraically, i.e.,
using an equation for the perpendicular bisector
and the distance formula.)
\ehw
\bhw Find where the line and circle intersect.
\ehw

\newpage\section{Functions I\label{FirstFunctionsSection}}

Since functions play such a central role, here we make the
effort to develop the language and algebra of functions.
With these notions established, in later chapters we
will transcend
this basic  understanding of functions as merely processes
defined by their actions on certain objects,
and see  the functions as
objects {\it in their own right, }%
to be analyzed through
calculus.

\begin{figure}
\begin{center}
\begin{pspicture}(0,1)(12,8)
%%%%%%%%%%%%%%%%%% Function as Machine Picture %%%%%%%%%%%%%%%%
%\psline(0,0)(12,0)(12,8)(0,8)(0,0)
\psellipse[linewidth=.02](2,6.5)(.8,.2)
\psline(1.2,6.5)(1.5,5.5)(1,5.5)(1,3.5)(1.7,3.5)(1.3,3)
\psline(2.8,6.5)(2.5,5.5)(3,5.5)(3,3.5)(2.3,3.5)(2.7,3)
%%%%%%%
\psellipse[linewidth=.02](2,3)(.7,.2)
\psline(3,4.5)(3.5,4.5)(3.5,5)(4,5)% Crank !!!!!!!!!!!!!!
\pscircle[fillstyle=solid,fillcolor=black](4,5){.07}
\rput(2,4.8){Function}
\rput(2,4.3){``$f$\,''}
%%%%%%%   Inputs
\rput(1,7.5){$x_1$}
\pscircle(1,7.5){.3}
\psbezier{->}(1.21,7.287)(1.6,6.9)(1.6,6.8)(1.8,6.5)
%%%%%%%
\rput(3,7.5){$x_2$}
\pscircle(3,7.5){.3}
\psbezier{->}(2.787,7.287)(2.397,6.9)(2.397,6.8)(2.2,6.5)
%%%%%%%   Outputs
\rput(1,1.5){\psframebox{$f(x_1)$}}
\psbezier{->}(1.8,3)(1.7,2.5)(1.7,2.4)(1,1.8)
\rput(3,1.5){\psframebox{$f(x_2)$}}
\psbezier{->}(2.2,3)(2.3,2.5)(2.3,2.4)(3,1.8)

%%%%%%%%%%%%%%%%%% Oval Sets Picture  %%%%%%%%%%%%%%%%%%%%%%%%%%

\psellipse(7.5,4.5)(.6,2.5)
\rput(7.5,1.5){Domain}
\psellipse(10.5,4.5)(.6,2.5)
\rput(10.5,1.5){Target Set}

\pscircle[fillstyle=solid,fillcolor=black](7.5,5.75){.07}
\rput(7.5,6){$x_1$}
\pscircle[fillstyle=solid,fillcolor=black](7.5,4.5){.07}
\rput(7.5,4.75){$x_2$}
\pscircle[fillstyle=solid,fillcolor=black](7.5,3.25){.07}
\rput(7.5,3.5){$x_3$}

\pscircle[fillstyle=solid,fillcolor=black](10.5,5.75){.07}
\rput(10.5,6.1){$f(x_1)$}
\pscircle[fillstyle=solid,fillcolor=black](10.5,4.5){.07}
\rput(10.5,4.85){$f(x_2)$}
\pscircle[fillstyle=solid,fillcolor=black](10.5,3.25){.07}
\rput(10.5,3.6){$f(x_3)$}

\psbezier{->}(7.5,5.75)(8.5,6)(9.5,6)(10.43,5.75)
\rput(9,6.2){$f$}
\psbezier{->}(7.5,4.5)(8.5,4.75)(9.5,4.75)(10.43,4.5)
\rput(9,4.95){$f$}
\psbezier{->}(7.5,3.25)(8.5,3.5)(9.5,3.5)(10.43,3.25)
\rput(9,3.7){$f$}
\end{pspicture}\end{center}
\caption{Two illustrations of the nature of functions
as deterministic processes.  The first is the
``machine'' view, while the second is more in the
spirit of ``assignment'' or ``mapping.''}\label{FunctionDrawings}
\end{figure}

\subsection{Functions Defined}
Rather than immediately stating an exact mathematical
definition of function, it is useful to recall the
elementary school approach (though with a more
sophisticated diction).  In that setting, a function
is defined as a process, or machine, which we usually
denote by some letter (Latin, Greek  or otherwise)
such as  $f,g,h,\alpha,\Phi$, and so on.
Such a process, say $f$, allows for inputs
$x$, but only from a fixed set called the {\it domain} of the function
$f$.  Furthermore, for each $x$ in the domain,
the function $f$ will output exactly one element
which is designated $f(x)$.  Thus, for $f$ to be considered
a function, the value of $f(x)$ is completely determined
by the input value $x$, so that every time we input the same
value for $x$ we get the same output $f(x)$:
$$(\forall x,y\in\text{ Domain of }f)[x=y\longrightarrow f(x)=f(y)].$$
The values from which $f(x)$ can be chosen will be elements of
some {\it target set}.\footnotemark
%%%%%%%%%%%%%%%%%%% Foot note text %%%%%%%%%%%%%%%%%%%
\footnotetext{The reader already very familiar
with functions will likely wonder why we do not simply
define the {\it range} of $f$ here, the range
of $f$ is being the smallest possible target set
for $f$, i.e., the set of possible outputs of $f$,
which we could write $\{f(x)\ | \ x\in\text{Domain of }f\}$.
We do not for the following reasons.
Although it is useful and interesting to know the range,
it is often unnecessary for a particular problem.
Furthermore, finding the actual range can be rather
tricky, while finding a target set is usually trivial.
(In fact for most of our work we can state that
a valid target set is $\Re$ and be done with it.)
All this said, we will visit the subject of determining
the range in several contexts later in the text.
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
See Figure~\ref{FunctionDrawings}.

If $f$ is a function with domain $S$ and a target set $T$,
we will use the notation, in the spirit of Figure~\ref{FunctionDrawings}
(but not in the spirit of implication) we write
\begin{equation}
f:S\longrightarrow T\end{equation}
to signify this.  For instance, throughout most of this
textbook, $f$ will be a function whose domain is
a subset of the real numbers $\Re$, and which returns
real numbers for output.  Then we will write
$f:S\longrightarrow\Re$, where we replace $S$ with its
exact definition.

Very often the action of $f$ on an arbitrary $x$ in the
domain will be given by a formula.  For example, perhaps
$f$ acts on every real number by squaring the number and
then adding 1.  Then we could write
\begin{equation}
f:\Re\longrightarrow\Re,\qquad f(x)=x^2+1.\label{Funct.Example}
\end{equation}
This is read, ``$f$ maps $\Re$ into $\Re$, where $f$ of $x$
equals $x^2+1$.''
The variable $x$ in (\ref{Funct.Example})
is a place holder, or {\it dummy variable} in which we follow
through the formula to define, or even ``probe'' the action
of $f$ on an arbitrary input $x$.\footnotemark
%%%%%%%%%%%%%%%%%%%%% FOOTNOTE TEXT  %%%%%%%%%%%%%%%%%%%%%%%%%
\footnotetext{An elegant term found in computer science
for the formula which defines a function, as in $f(x)=x^2+1$,
is {\it function prototype},
in which the  dummy variable $x$ has no other significance
than to describe the function's action to the compiler.
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
The variable $x$ is also often called the {\it argument} of
the function $f$ in the expression $f(x)$.
Another notation which is commonly used is (notice the
difference in the arrow) is
\begin{equation}x\overset{f}{\Longmapsto}x^2+1,\label{Longmapsto}\end{equation}
showing that $x$ is ``transformed'' or ``mapped'' to the
value $x^2+1$ through the function $f$.  In the notation
of (\ref{Funct.Example}) we can calculate
\begin{alignat*}{2}
f(1)&=(1)^2+1&&=2,\\
f(2)&=(2)^2+1&&=5,\\
f(-10)&=(-10)^2+1&&=101,
\end{alignat*}
while in the notation of (\ref{Longmapsto}) we would write
\begin{alignat*}{2}
1&\overset{f}{\Longmapsto}1^2+2&&=2,\\
2&\overset{f}{\Longmapsto}2^2+1&&=5,\\
-10&\overset{f}{\Longmapsto}(-10)^2+1&&=101.
\end{alignat*}
This may seem simple enough with numbers, since we simply
substituted $x=1, 2, -10$ respectively into, say,  (\ref{Funct.Example}).
Our understanding of the role of $x$ in the formula
becomes more important when our inputs become
more complicated or abstract.  For some examples, consider
\begin{alignat*}{2}
f\left(\sqrt{x}\right)&=\left(\sqrt{x}\right)^2+1&&=x+1,\\
f\left(\frac1x\right)&=\left(\frac1x\right)^2+1&&=\frac{1+x^2}{x^2},\\
f(-x)&=(-x)^2+1&&=x^2+1,\\
f(x+2)&=(x+2)^2+1&&=x^2+4x+4+1=x^2+4x+5,\\
f(\text{Bob})&=(\text{Bob})^2+1.\end{alignat*}
In the above, we again replaced $x$ from (\ref{Funct.Example})
with $\sqrt{x},\frac1x,-x,x+2$ and Bob, respectively.
This may seem unnatural until we again remember that $x$
was just a place holder in the formula which defined the
action of $f$ (always one of
squaring the input, and then adding 1).  We also have to be careful
for which values of $x$ the expression makes sense for.  In
the first example, because the first action on $x$ is
taking its square root we require $x\ge0$, even though the simplified
expression glosses over this requirement. We must look
at the original expression for $f\left(\sqrt{x}\right)$ to decide
which $x$-values it is valid for.  In the second example, we need
$x\ne0$, while the expressions for $f(-x)$ and $f(x+2)$ were
valid for all $x\in\Re$.  Finally, the last expression is
valid as long as $\text{Bob}\in\Re$.

We are given great latitude in defining functions.
The only condition is that they are deterministic processes,
so that if we know the input $x$ from the domain, then the
unique output $f(x)$ is completely determined.
(For each $x$ in the domain, there is exactly
one $f(x)$ in the target set.)  Of course the
definition of $f(x)$ must also make sense for each $x$
in the domain.

\subsection{Natural Domains}
When a function is given by a formula,
there is a {\it natural domain} which is all the values
of $x$ for which the formula makes sense as a real number.
(Again though,
we are allowed to define $f$ to have a more restricted
domain if it suits us.)  If the domain of a function $f$ is not
specified, and $f$ is given by a formula,
we assume the domain is this natural domain.  At this point in the text
we have only two restrictions (though there will be more later):
that we must only allow $x$'s for which we nowhere divide by
zero in the definition of $f$; and that we can take even
roots of nonnegative numbers only, anywhere in the formula.
Hence a function given
by $f(x)=\frac1{x+1}$ has domain $x\ne-1$ unless otherwise
specified.  If we prefer a more positive way of stating the
domain of such an $f$, we can write that the domain is
$(-\infty,-1)\cup(-1,\infty)$.  Similarly, if $g(x)=\sqrt{x-2}$,
we require $x\ge2$, i.e., $[2,\infty)$ for the domain.
(As will usually be the case the target set we take to
be $\Re$.)

\bex Find the natural domains of each of the following:
\begin{itemize}
\item $\ds{f(x)=\frac{1}{\sqrt{x}}}.$
Here we need $x\ge 0$ so that the square root is defined, but
then we also need $\sqrt{x}\ne0\iff x\ne 0$ so we are not
dividing by zero.  Combined we get $x>0$, i.e., $x\in(0,\infty)$.
\item  $\ds{g(x)=\frac1{x^4-16}}$.  We can rewrite $g(x)$ as follows:
$$g(x)=\frac1{x^4-16}=\frac1{(x^2+4)(x^2-4)}=\frac1{(x^2+4)(x+2)(x-2)}.$$
From this we see that the function is defined except at $x=-2,2$,
which are the only places where the denominator is zero.
This gives the domain $x\ne\pm2$, i.e., $x\in(-\infty,-2)\cup
(-2,2)\cup(2,\infty)$.
\item $\ds{h(x)=\sqrt{x^2-25}}$.  Here we need $x^2-25\ge 0$,
i.e., $x^2\ge25$, which, taking square roots, gives
$|x|\ge 5$, i.e., $x\in(-\infty,-5]\cup[5,\infty)$.
\item $\ds{f(x)=\frac1{\sqrt{x^2-25}}}$.  This has all the complications
of the previous problem, and the fact that we cannot divide by
zero, so we require $\sqrt{x^2-25}>0$, which will lead us to
$|x|>5$, i.e., $x\in(-\infty,-5)\cup(5,\infty)$.
\item $\ds{g(x)=\frac1{\left(\frac1x\right)}}$.  Here we have to be careful.
There can be no zero denominators anywhere in the definition, so
here we need $x\ne0$, i.e., $x\in(-\infty,0)\cup(0,\infty)$.
(Note that there are no real $x$'s
which would give $\left(\frac1x\right)=0$.)  If we want to show
a simplified version of $g$, we would need to clarify this and
write
$$g(x)=\frac1{\left(\frac1x\right)}=x, \qquad x\ne0.$$
\item $\ds{h(x)=\left(\sqrt{9-x^2}\right)^2}$.
Here we need $9-x^2\ge0$, i.e., $9\ge x^2$, giving
$3\ge|x|$ (i.e., $|x|\le3$) so $x\in[-3,3]$.  Once
again there is an obvious simplification which
makes $h$ appear to have domain $\Re$, but we need to
look back at the original form in which the radical
is calculated first and therefore must be defined.
We can legitimately simplify $h$ if we just specify the true domain:
$$h(x)=\left(\sqrt{9-x^2}\right)^2=9-x^2,\qquad |x|\le3.$$
\item $\ds{f(x)=\sqrt[3]{\frac{1+\sqrt{1-x^2}}{x^2-9}}}$.
First note that the cube (or any other odd) root is defined
on all of $\Re$, so that part in itself will not disqualify
any values of $x$.  Next we see we need $|x|\ge1$ for the
square root in the numerator under the radical, and $x\ne\pm3$
for the denominator.  Putting all this together we see
the domain of $f(x)$ as $x\in(-\infty,-3)\cup(-3,-1)\cup(1,3)
\cup(3,\infty)$.  It might not be as obvious, but we
could also write for the domain  $|x|\ge1, x\ne\pm3$.
\item $g(x)=\ds{\frac1x-\frac{x-1}{x^2-x}}$.  Again we need
to look at the original form. We require $x\ne0$ from the first
fraction, and $x^2-x=x(x-1)\ne0$ from the second, so we need
$x\ne0,1$.  Again note how we simplify but keep the domain:
$$g(x)=\frac1x-\frac{x-1}{x^2-x}=\frac1x-\frac{x-1}{x(x-1)}
=\frac1x-\frac1x=0,\qquad x\ne0,1.$$
\end{itemize}
\eex
It is useful to think of functions as above as they would
be evaluated, perhaps by a computer.  If any part of the function
is undefined at a particular $x$, then it cannot be evaluated.
When we simplify,  problematic operations sometimes ``cancel,'' but the
function was defined by the original form and not the simplified
form.  Different parts of a function may come from different
physical considerations, so we have to  exclude any $x$-value
which causes any part of the function to be undefined.
Thus we must always read the natural
domain from the original definition of the function,
not from any simplified form.

\subsection{Compositions of Functions}
It is often the case that a variable is processed by
one function, and that output immediately fed into
another function.  For instance, perhaps
we have a chain
\begin{equation}x\overset{g}{%
%%%%%%%%%%%%%%%%%%%  LLONGMAPSTO  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Longmapsto
%%%%%%%%%%%%%%%%%%%  ENDLLONGMAPSTO  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
}g(x)\overset{f}{%
\Longmapsto
}
f(g(x)).\label{FirstChainOfFunctions}\end{equation}
It is important to note that this defines a new function,
which we could call $h(x)$, defined by
\begin{equation}
h(x)=f(g(x)).
\label{RenameFirstChainOfFunctions}\end{equation}
Since $h(x)$ requires first that $x$ is first processed by $g$, and
then that output processed by $f$, we see the domain of
$h$ contains exactly those
$x$'s for which {\it both} of the following hold:
\begin{itemize}
\item $x$ is in the domain of $g$; and
\item $g(x)$ is in the domain of $f$.
\end{itemize}
If the functions are all given by formulas we can read
the natural domain from the exact, verbose and unsimplified
expression for $f(g(x))$ (which is, after all, the nature of $h(x)$).
The notation we use for this new function $h(x)=f(g(x))$ is
\begin{equation} (f\circ g)(x)=f(g(x)),
\end{equation}
and is read, ``$f$ of $g$ of $x$,'' or ``$f$ composed with $g$ of $x$.''
We will opt for the former in most cases.  If we are only interested
in computing $(f\circ g)(x)$ at a particular value of $x$
the computations are straightforward.

\bex If $f(x)=6x+7$ and $g(x)=x^2$, find
\begin{description}
\item a. $f(g(3))$.
\item b. $g(f(3))$.
\end{description}
These can be computed directly.
\begin{align*}
f(g(3))&=f(3^2)=f(9)=6(9)+7=54+7=61,\\
g(f(3))&=g(6(3)+7)=g(25)=25^2=625.\end{align*}
\eex

Notice that to compute these we worked ``inside-out,''
computing the value of the ``inner function,'' and evaluating
the ``outer function'' at that value.  Notice also that
$f\circ g\ne g\circ f$ as functions, since these do not
even coincide at the single value $3$.

In calculus, more often we would like an actual representation
of $f\circ g$, in the form of a formula.  This can often be accomplished
algebraically. However, there are some complications which arise
when so combining functions.  In particular we need to be
careful about simplifying, and establishing the domain of the
composite function.

\bex Calculate and simplify $(f\circ g)(x)$ and give the domain
for each of the following:
\begin{itemize}
\item $f(x)=x^2+1$, $g(x)=\sqrt{x-2}$.  This gives
$$(f\circ g)(x)=f(g(x))
            =f\left(\sqrt{x-2}\right)
            =\left(\sqrt{x-2}\right)^2+1
            =(x-2)+1=x-1.$$
We must read the domain from the fourth expression
$\left(\sqrt{x-2}\right)^2+1$, which is the
actual definition of $(f\circ g)(x)$.
We see that the square root requires $x-2\ge 0$, i.e., $x\ge 2$.
In fact reading the actual definition of $(f\circ g)(x)$, i.e.,
before simplifying, is the easiest way to read the domain, but
we can also see that we need
$x\ge 2$ to be processed by $g$, but then $f$ can process
whatever the output of $g$.  Either way we see $x\ge 2$ is the domain,
i.e., $x\in[2,\infty)$.
\item $\ds{f(x)=\frac{x-3}{x+5}}$, $\ds{g(x)=\frac1x}$.
$$
          (f\circ g)(x)=f(g(x))
                       =f\left(\frac1x\right)
                       =\frac{\frac1x-3}{\frac1x+5}
                       =\frac{\frac1x-3}{\frac1x+5}\cdot\frac{x}x
                       =\frac{1-3x}{1+5x}.$$
Again from the unsimplified definition (before we multiplied
by $x/x$), we see that $x\ne0$, but also from
the denominator on that line we need
$\frac1x+5\ne0$, i.e., $\frac1x\ne-5$, i.e., $x=-\frac15$.
Hence the domain is $x\ne-\frac15,0$, i.e.,
$x\in\left(-\infty,-\frac15\right)
\cup\left(-\frac15,0\right)\cup(0,\infty)$.
\end{itemize}
\label{CompositionExamples}
\eex
It is useful to note that we can compute the unsimplified
form of $f\circ g(x)=f(g(x))$ working either ``inside-out'' or
``outside-in.''  In the examples above, we worked
from the inside out.  However the alternative is conceptually
useful when we need to compute derivatives---especially of
the ``chain rule'' type---beginning in Chapter~\ref{DerivativeChapter}.
To see what is meant
by outside-in, in Example~\ref{CompositionExamples} we could
have instead written
\begin{itemize}
\item $f(x)=x^2+1$, $g(x)=\sqrt{x-2}$ implies
$\ds{f(g(x))=(g(x))^2+1=\left(\sqrt{x-2}\right)^2+1, \quad\text{etc., and}}$
\item $f(x)=\ds{\frac{x-3}{x+5}}$, $g(x)=\ds{\frac1x}$ implies
$\ds{f(g(x))=\frac{g(x)-3}{g(x)+5}=\frac{\frac1x-3}{\frac1x+5},
\quad\text{etc.}}$
\end{itemize}
In both cases we formally applied $f$ to $g$ without first computing $g$.
Of course we do get the same results either way.
The first method is more in the
spirit of actual computations, as with computers.
Both methods are well within the
spirit of functions in the abstract.  However, when we apply
derivative rules, as in Chapter~\ref{DerivativeChapter} and beyond,
we begin our work from the outside, ``superstructure'' of a given
function such as $h(x)=f(g(x)$, and proceed to work our way
inward, so the latter approach is better suited for those
calculations.

\section{Graphs of Functions}
Now we define what is the {\it graph} of a function
with domain and target sets both containing real numbers.
\begin{definition}
If $f:S\longrightarrow\Re$, where $S\subset\Re$, then
the {\rm graph} of $f$ is the set
$$\left\{(x,f(x)) \ | \ x\in\text{ Domain of }f\right\}.$$
\end{definition}
Put another way, the graph is the set of all $(x,y)\in\Re^2$
so that $y=f(x)$ and $x$ is in the domain of $f$.

We will eventually devote a lot of time to graphing functions.
There is much that can be done with algebra only, and then
calculus allows us many more tools for graphing functions.
Here we will only graph a few.

\bex Graph the function $f(x)=x^2$.

\underline{Solution}: For now we will simply plot enough points
$(x,f(x))$ that we feel justified in making some predictions.
First, some points with nonnegative integer values for $x$:
$(0,0)$, $(1,1)$, $(2,4)$, $(3,9)$, $(4,16)$, $(5,25)$, $(6,36)$, $\cdots$,
$(10,100)$, $(11,121)$, $\cdots$, $(20,400)$, etc.
We see that the $y$-values are
increasing at an accelerating pace.  When we instead consider
negative integers, we get $(-1,1)$, $(-2,4)$, $(-3,9)$, etc.,
which have the same $y$-values as we had for the positive $x$-values.

On the other hand, consider what occurs if we have $x$ values
which are ``fractional'' and shrinking:
$(1/2,1/4)$, $(1/3,1/9)$, $(1/4,1/16)$, $(1/5,1/25)$, etc.
In decimal form this is also clear:
$(0.1,0.01)$, $(0.01,0.0001)$, $(0.001,0.000001)$.

To summarize, when a large number is inputted into this function,
an even larger number is outputted, while small inputs give
even smaller outputs.  Both trends are important: squaring
takes large numbers and returns even larger ones,
while taking small numbers (less than 1 in absolute value)
and returning even smaller ones (except for zero, which
can not be any smaller).

The graph of $y=x^2$ is given in Figure~\ref{X-SquaredGraph}.
\begin{figure}
\begin{center}
\begin{pspicture}(-3,-.5)(3,5)
\psset{xunit=.5cm,yunit=.5cm}
\psaxes{<->}(0,0)(-4,-1)(4,10)
\psplot{-3}{3}{x dup mul}

\end{pspicture}
\end{center}
\caption{Partial graph of $y=x^2$.  The shape is parabolic.}
\label{X-SquaredGraph}\end{figure}
The shape is technically a parabola, which we will carefully define
later in the text.  Here the point $(0,0)$ is called the
{\it vertex}.
\label{X-SquaredFunction}\eex

\bex Graph the function $f(x)=x^3$.

\underline{Solution}: We will use the same strategy as before.
For nonnegative integers, we have $(0,0)$, $(1,1)$, $(2,8)$,
$(3,27)$, $(4,64)$, etc. We see the $y$-values increase even
more rapidly than before, which is not surprising when we consider
the nature of $x^3=x\cdot x\cdot x$.  Next we look at $x$ values
which are negative integers: $(-1,-1)$, $(-2,-8)$, $(-3,-27)$, etc.
These are the same as before except with negative signs.

For the smaller values, we see $(1/2,1/8)$, $(1/3, 1/27)$, $(1/4,1/64)$,
etc.  In decimals, $(.1,.001)$, $(.01, .000001)$, etc., and
$(-.1,-.001)$, $(-.01,-.000001)$, etc.

So where $x^2$ grew in size for large $x$, the function
$f(x)=x^3$ grows much more rapidly.  Furthermore, $x^3$
shrinks faster for shrinking $x$.  Finally, $f(x)=x^3$
does preserve the sign of $x$, and the graph is given
in Figure~\ref{X-CubedGraph}.
\begin{figure}
\begin{center}
\begin{pspicture}(-2.5,-4.25)(2.5,4.25)
\psset{yunit=.5cm}
\psaxes{<->}(0,0)(-2.5,-8.5)(2.5,8.5)
\psplot{-2}{2}{x 3 exp}
\end{pspicture}
\end{center}
\caption{Partial graph of $y=x^3$. The $y$-axis unit length
         shown is half that of the $x$-axis, because the
         function grows very rapidly and the graph would
         be too tall to reasonably show here otherwise. }
\label{X-CubedGraph}
\end{figure}
\eex

\bex Graph the function $f(x)=|x|$.

\underline{Solution}: Of course for $x\ge0$ this outputs
exactly what is input, so we have points like $(0,0)$, $(1,1)$,
$(2,2)$, etc. For negative numbers this function switches the
sign, giving points like $(-1,1)$, $(-2,2)$, $(-3,3)$, etc.
Later in this section we will further discuss {\it casewise-defined}
functions, which is a method we can use to describe this function.
In that notation, we could write:
$$f(x)=\begin{cases}-x& \text{if }x<0,\\ x& \text{if }x\ge0.\end{cases}$$
It is useful to see how this definition of $f(x)=|x|$ corresponds
to the graph:  where $x<0$, the graph lies along the line
$y=-x$; where $x\ge0$, the graph lies along the line $y=x$.
This method for describing functions is very common and useful.
This particular function is graphed in Figure~\ref{|X|Graph}.
\begin{figure}
\begin{center}
%\begin{pspicture}(-4,-1)(4,4)
\begin{pspicture}(-3,-1)(3,3)
\psset{xunit=.75cm,yunit=.75cm}
\psaxes{<->}(0,0)(-4,-1)(4,4)
\psplot{0}{4}{x}
\psplot{-4}{0}{0 x sub}
  \rput{45}(2,2.4){$y=x$}
  \rput{-45}(-2,2.4){$y=-x$}
\end{pspicture}
\end{center}
\caption{Partial graph of $y=|x|$, which lies along the line $y=x$
for $x\ge0$, and along the line $y=-x$ for $x<0$.}
\label{|X|Graph}\end{figure}
\eex

\bex Graph the function $f(x)=\sqrt{x}$.

\underline{Solution}: The domain of this function is $x\ge0$.
Here we will take a small shortcut in graphing this.  First
we will note that $y=\sqrt{x}\implies y^2=x$.  Thus the
desired graph is contained in the graph of $x=y^2$, which
is similar to the graph Figure~\ref{X-SquaredGraph}
except that $x$ and $y$ trade roles.
If we want a logical equivalence, we can write
$$y=\sqrt{x}\iff (x=y^2)\wedge(y\ge0).$$
This functionn is graphed in Figure~\ref{SqrtXGraph}.

\begin{figure}
\begin{center}
\begin{pspicture}(-2,-3)(7.5,3)
\psset{xunit=.75cm,yunit=.75cm}
\psaxes{<->}(0,0)(-2,-4)(10,4)
\psplot[plotpoints=100]{0}{9}{x sqrt}
\psplot{1}{9}{x sqrt}
\psplot[plotpoints=100,linestyle=dashed]{0}{9}{0 x sqrt sub}
  \rput{13.26}(4.5,2.4){$y=\sqrt{x}$}
  \rput{-13.26}(4.5,-1.8){$y=-\sqrt{x}$}
\end{pspicture}
\end{center}
\caption{The solid graph above is a partial plot of
$f(x)=\sqrt{x}$. It is contained in the graph of $x=y^2$, which
includes both the solid and the  dashed parts of the illustration above.
In fact, $x^2=y\iff (y=\sqrt{x})\vee(y=-\sqrt{x})$, with  the
solid graph representing $y=\sqrt{x}$,
and the  dashed graph representing $y=-\sqrt{x}$.
The function $f(x)=\sqrt{x}$ grows very slowly as $x$ grows,
and shrinks very quickly as $x$ shrinks down to zero.
The domain is $x\in[0,\infty)$ and the range is $y\in[0,\infty)$.}
\label{SqrtXGraph}
\end{figure}

\eex

The next example illustrates a very important fact about
reciprocals by examining the graph of $f(x)=1/x$.
The fact is this: that reciprocals of large numbers are
small numbers of the same sign, and reciprocals of small numbers are
large numbers of the same sign.

\bex Graph the function $f(x)=1/x$.

\underline{Solution}: Note first that the domain of $f(x)$
is $x\in(-\infty,0)\cup(0,\infty)$, i.e., $x\ne0$.
We will look at four different trends in the points
$(x,y)$ on the graph:
\begin{enumerate}
\item $(1,1),\ (2,1/2),\ (3,1/3),\ \cdots,\ (10,.1),\ (100,.01),\
       (1000,.001)$, etc.
\item $(1/2,2),\ (1/3,3),\ (1/4,4),\ \cdots,\ (.1,10),\ (.01,100),\
(.001,1000)$, etc.
\item $(-1/2,-2),\ (-1/3,-3),\ \cdots,\ (-.1,-10),\ (-.01,-100),
\ (-.001,-1000)$, etc.
\item $(-1,-1),\ (-2,-1/2),\ (-3,-1/3),\ \cdots,\ (-10,-.1),\ (-100,-.01),\
(-1000,-.0001)$, etc.
\end{enumerate}
Thus large positive numbers map to small positive numbers,
small positive numbers map to large positive numbers;
large negatives map to small negatives and small
negatives map to large negatives.  This is graphed
in Figure~\ref{ReciprocalGraph}.
\begin{figure}
\begin{center}
%\begin{pspicture}(-6,-5)(6,5)
\begin{pspicture}(-4,-3.4)(4,3.4)
\psset{xunit=.666,yunit=.666}

\psaxes[labels=none]{<->}(0,0)(-6,-5)(6,5)
\psplot{-6}{-.2}{1 x div}
\psplot{.2}{6}{1 x div}
  \pscircle[fillstyle=solid,fillcolor=black](2,.5){.05}
    \rput(2.1,1){$\left(2,\frac12\right)$}
  \pscircle[fillstyle=solid,fillcolor=black](.5,2){.05}
    \rput(1.3,2){$\left(\frac12,2\right)$}
  \pscircle[fillstyle=solid,fillcolor=black](.25,4){.05}
    \rput(1,4){$\left(\frac14,4\right)$}
  \pscircle[fillstyle=solid,fillcolor=black](4,.25){.05}
    \rput(4,.8){$\left(4,\frac14\right)$}

  \pscircle[fillstyle=solid,fillcolor=black](-2,-.5){.05}
    \rput(-2,-1.3){$\left(-2,-\frac12\right)$}
  \pscircle[fillstyle=solid,fillcolor=black](-.5,-2){.05}
    \rput(-1.7,-2.1){$\left(-\frac12,-2\right)$}
  \pscircle[fillstyle=solid,fillcolor=black](-.25,-4){.05}
    \rput(-1.4,-4){$\left(-\frac14,-4\right)$}
  \pscircle[fillstyle=solid,fillcolor=black](-4,-.25){.05}
    \rput(-4.1,-.75){$\left(-4,-\frac14\right)$}
\end{pspicture}
\end{center}
\caption{Partial graph of $f(x)=1/x$, which maps large numbers
to small, and vice versa, while preserving the sign.
The graph is said to show a vertical asymptote which is
the line $x=0$ ($y$-axis), and a two-sided horizontal asymptote
which is $y=0$ ($x$-axis).}
\label{ReciprocalGraph}
\end{figure}

A related feature of this graph is the presence of {\rm asymptotes},
which will be discussed in more detail later in the text.
This graph has a two-sided {\rm vertical asymptote} which is the
line $x=0$ (or $y$-axis), and a two-sided {\rm horizontal asymptote},
which is the line $y=0$ (or $x$-axis).  This means, roughly,
that the graph starts to approach the line $x=0$---in proximity
and shape---as $x$ gets
near zero from either side, and approaches the line
$y=0$ when $x$ gets large, either positive or negative.
\eex

We tend to get vertical asymptotes when we take reciprocals
of a quantity which, while staying in the domain, gets close
to zero.  The function values get very large in such a case.
Horizontal asymptotes are more complicated, but whenever
we are taking the reciprocal of large numbers as $x$ gets
large, the function shrinks and if the trend continues indefinitely,
we get $y=0$ as a horizontal asymptote.

The thinking in the previous paragraph will be made more precise
as we discuss limits.  However, we can make some use of
a graphing device which takes these things into account,
as in the following example.

\bex Graph the function $f(x)=1/x^2$.

\underline{Solution}: Since this is the reciprocal of a
function we plotted earlier (see
Figure~\ref{X-SquaredGraph}, which accompanies
Example~\ref{X-SquaredFunction}), we will first plot
$y=x^2$ (dashed), and generate the graph of $f(x)$,
which is its reciprocal, keeping in mind what
the reciprocal does to large and small numbers.
The graphs of both are given in Figure~\ref{1/x^2Graph}.
\begin{figure}
\begin{center}
%\begin{pspicture}(-3.2,-1)(3.2,10.25)
\begin{pspicture}(-6,-.7)(6,7.175)
\psset{xunit=.7,yunit=.7}
\psaxes{<->}(0,0)(-3.2,-1)(3.2,10.25)
\psplot[linestyle=dashed]{-3.2}{3.2}{x dup mul}
\psplot{-3}{-.3123}{1 x dup mul div}
\psplot{.3123}{3}{1 x dup mul div}
\psline[linestyle=dashed](4,5)(5,5)
  \rput[Bl](5.4,5){$y=x^2$}
\psline(4,4)(5,4)
  \rput[Bl](5.4,4){$y=1/x^2$}
\end{pspicture}
\end{center}
\label{1/x^2Graph}
\caption{Partial graph of $y=1/x^2$ based upon the graph
of $y=x^2$.  Where the reciprocal function is large,
$f(x)$ will be small and vice versa.}
\end{figure}

Of course the graph in the figure is computer-generated, but
the general trend is what we should expect:
where we had $(2,1/4)$ on the graph of $y=x^2$, we have
$(2,4)$ on the graph of the reciprocal.  The point
$(1,1)$ remains the same, but $(1/2,1/4)$ on $y=x^2$
becomes $(1/2,4)$ on $y=1/x^2$.  As the values
of $y$ on $y=x^2$ shrink (as we approach zero in $x$),
the values on $y=1/x^2$ ``blow up,'' and vice versa.

\eex

\begin{definition}
If $f(x)g(x)=1$ except where one of these is zero and
the other is undefined, then we will call $f(x)$ and $g(x)$
{\bf reciprocal functions} in this text.
\end{definition}
  We have already
taken advantage of the relationships between the two
graphs of such $f$ and $g$ in the previous example.

\bex Graph the function $\ds{y=\frac1{2x+3}}$.
\medskip

\underline{Solution}: First we will graph $y=2x+3$ and
then see how the $y$-values translate to values of the
reciprocal function $y=1/(2x+3)$.
(Of course, $y=2x+3$ is a line with slope $2$ and
$y$-intercept $(0,3)$.) See Figure~\ref{1/(2x+3)Graph}.
\begin{figure}
\begin{center}
\begin{pspicture}(-6,-4.9)(6,4.9)
\psset{xunit=.7cm,yunit=.7cm}
\psaxes{<->}(0,0)(-5,-7)(3,7)
\psline[linestyle=dotted, linewidth=.06](-5,-7)(2,7)
\psline[linestyle=dashed](-1.5,-7)(-1.5,7)
\psplot{-5}{-1.5715}{1 2 x mul 3 add div}
\psplot{-1.429}{3}{1 2 x mul 3 add div}
  \psline[linestyle=dotted,linewidth=.06](4,-4)(5,-4)
  \rput[Bl](5.4,-4){$y=2x+3$}
  \psline[linestyle=dashed](4,-5)(5,-5)
  \rput[Bl](5.4,-5){$x=-3/2$}
  \psline(4,-6)(5,-6)
  \rput[Bl](5.4,-6){$y=1/(2x+3)$}
\end{pspicture}
\end{center}
\caption{Partial graph of $f(x)=1/(2x+3)$, which can be plotted
         from the graph of $y=2x+3$ (represented by dots),
         which is the graph of the
         reciprocal function.}
\label{1/(2x+3)Graph}\end{figure}
The dotted line represents $y=2x+3$.  Where that shrinks towards
zero (at $x=-3/2$), the size of its reciprocal function blows
up, in either the positive or negative direction, depending
upon if $2x+3$ is positive or negative.  There is a vertical
asymptote at $x=-3/2$, which is represented in the diagram
by a dashed line.  There is also a two-sided horizontal asymptote
$y=0$, since $2x+3$ grows large, in a consistent and unbounded manner,
as $x$ grows large, so the reciprocal function shrinks as $x$ grows.
\eex

\bex Graph $f(x)=\sqrt{9-x^2}$.

\underline{Solution}: This was graphed earlier
in Figure~\ref{SemicirclesFigure}.
The terms of the discussion there were different, but we saw that
the graph of $y=\sqrt{9-x^2}$ is a subset of the circle
$x^2+y^2=9$, since
$$y=\sqrt{9-x^2}\implies y^2=9-x^2\iff x^2+y^2=9.$$
Since $f(x)\ge0$, and in fact we can replace ``$\implies$'' with
``$\iff$'' above if we attach ``$\wedge(y\ge0)$'' to the first
statement, when we graph $y=f(x)$ we get that part of the
circle for which $y\ge0$, which here means the upper semicircle.

Note also from the definition of $f(x)$ that we require $x\in[-3,3]$
for the domain:
$$9-x^2\ge0\iff9\ge x^2\iff x^2\le9\iff \sqrt{x^2}\le\sqrt9\iff|x|\le3.$$
\eex

It happens frequently enough that a function's graph is a
subset of some recognizable geometric figure, such as
a parabola, an ellipse, a circle, or a hyperbola.
When we develop conic sections later in the text we
will define the parabola, ellipse and hyperbola precisely,
as we have already done with the circle.  There are a couple
of common functions with graphs which are subsets of
hyperbolas (or more traditionally, hyperbol\ae).
\newpage
\bex Graph $f(x)=\sqrt{x^2-4}$.

\underline{Solution}: First we will compute the domain.
$$x^2-4\ge0\iff x^2\ge4\iff \sqrt{x^2}\ge\sqrt4\iff|x|\ge2.$$
Thus the domain is $x\in(-\infty,-2]\cup[2,\infty)$.
We will also see that $y=\sqrt{x^2-4}$ will grow larger
as $x$ grows larger\footnote{Here as always,
when we write that $x$ is getting larger, we mean in absolute
size, i.e., $|x|$ is getting greater.}, and the minimum value of $y$ is
zero at $x=\pm2$.

One last observation we will make is that, given what we know of the
square root function (see Figure~\ref{SqrtXGraph}), namely
that for large inputs the output does not change rapidly,
we can argue that for large $x$ we have
\begin{equation}f(x)=\sqrt{x^2-4}\approx\sqrt{x^2}=|x|.\label{HypApproxEx}
\end{equation}
Thus the graph's height will get close to the height
of the graph $y=|x|$ as $x$ gets larger.  This is born out
by the actual graph in Figure~\ref{HypGraph1}.

\begin{figure}
\begin{center}
\begin{pspicture}(-5,-1)(5,5)
\psset{xunit=.75cm,yunit=.75cm}
\psaxes{<->}(0,0)(-6,-2)(6,6)
\psplot{-6}{-2}{x dup mul 4 sub sqrt}
\psplot{2}{6}{x dup mul 4 sub sqrt}
\psline[linestyle=dashed](-6,6)(0,0)(6,6)
\end{pspicture}
\end{center}
\caption{Partial graph of $f(x)=\sqrt{x^2-4}$, with oblique asymptotes
drawn.  Note that this is part of the graph of
$y^2=x^2-4$, i.e., $x^2+y^2=4$, which is a hyperbola.}
\label{HypGraph1}\end{figure}

The hyperbola of which this is a subset is given by
the equation $x^2+y^2=4$, which comes from squaring both
sides of $y=\sqrt{x^2-4}$ and rearranging the terms algebraically.
Solving the hyperbola's equation for $y$ gives
$y=\pm\sqrt{x^2-4}$, and so our graph is the ``$+$'' case
case, and the bottom half of the hyperbola is the other.

\label{HypPieceEx1}\eex

We will have to be very careful when making
approximations as in (\ref{HypApproxEx}), because it
is very easy to be deceived.  Later we will have more
tools at our disposal, and equally important, plenty
of examples for which tempting approximations do not
work.  Note that for Example~\ref{HypPieceEx1}
we effectively have asymptotes
$y=x$ as $x$ gets large and positive, and
$y=-x$ as $x$ gets large and negative.  These are
neither vertical nor horizontal asymptotes, but
the function does approach them nonetheless for
large $x$.  The lines $y=-x$ and $y=x$ might each
be called one-sided {\it oblique}, or {\it slant} asymptotes.

The function in Example~\ref{HypPieceEx1} had a graph
in two pieces.  There are also one-piece graphs which
give half-parabolas, as in the next example.
\newpage
\bex Graph $f(x)=\sqrt{x^2+4}$.

\underline{Solution}: Here the domain is $x\in\Re$, which we
can see by either solving $x^2+4\ge0$, or just recognizing
that it is true for all real $x$.  Next notice that
$$y=\sqrt{x^2+4}\implies y^2=x^2+4\iff y^2-x^2=4,$$
the last equation being of a hyperbola.

As in the previous example,
$$f(x)=\sqrt{x^2+4}\approx\sqrt{x^2}=|x|,$$
and so we have the same oblique asymptotes $y=\pm x$.
Notice also that $x=0$ gives the
minimum height $y$, and that $y$ increases in size as $x$ does.
The graph is given in Figure~\ref{HypGraph2}.  (The
lower half of the parabola would be given
by $y=-\sqrt{x^2+4}$.)
\begin{figure}
\begin{center}
\begin{pspicture}(-5,-1)(5,5)
\psset{xunit=.75cm,yunit=.75cm}
\psaxes{<->}(0,0)(-6,-2)(6,6)
\psplot{-6}{6}{x dup mul 4 add sqrt}
\psline[linestyle=dashed](-6,6)(0,0)(6,6)
\end{pspicture}
\end{center}
\caption{Partial graph of $f(x)=\sqrt{x^2+4}$, with  }
\label{HypGraph2}\end{figure}
\eex

\newpage

\subsection{Geometry of Functions}
\subsection{Piecewise Defined Functions}
\subsection{Implicit Functions}
\subsection{Physical Quantities as Functions}
\subsection{``Linear'' Functions}

\newpage
\section{Increasing and Decreasing Functions}
\subsection{Monotonic Functions and Their Graphs}
\subsection{Monotonic Functions and Inequalities}
\newpage
\section{Trigonometric Functions}

Trigonometry is nominally the study of triangles,
though the subject has developed so significantly beyond its
primitive origins that we do not do justice to it by
defining trigonometry so simplistically.  In this section our main goal
is to develop the trigonometric functions,
which are a level of abstraction from triangles.
We will go
ahead and trace these functions back to a kind of
generalized triangle, strategically placed, since the
path is reasonably short
but again it is the functions themselves which
are our goal.\footnote{
%%%%%%%  FOOTNOTE
For reasons which will be apparent later in this section,
many trigonometry textbooks refer to the trigonometric
functions as {\it circular functions}.  We will not here,
since we will find ample motivation for these functions
while referring to generalized triangles, albeit
strategically positioned relative to a circle.
%%%%%%%  END FOOTNOTE
}

Trigonometric functions play a very important role in
calculus, often appearing  in problems which seem at first glance
to have nothing to do with trigonometry.
Calculus in turn does much to expand our analyses of
trigonometric functions (as it does for other functions).

Nearly everything
fundamentally trigonometric we need in this text is
explained in this section, though we are reminded that even many
universities have an entire semester course to deal
with trigonometry in its own right.\footnotemark
%%%%%%%%FOOTNOTE
\footnotetext{These are considered remedial courses, but their
high demand indicates a need for better understanding of
trigonometry among high school graduates.}
%%%%%%%%END FOOTNOTE
 Hence we
subdivide our treatment into several subsections, each
with its own exercises.  Even the student well versed
in the usual trigonometry can benefit from the presentation
and exercises here, since our perspective is calculus-motivated
and thus can complement previously acquired intuition.
Still, this section duly studied provides a reasonably solid
foundation in the ideas of trigonometry for the novice.

\subsection{Angles and Classical Geometry}

Our modern concept of angle is more general than the classical
geometric definition, which stated that an angle was the union
of two rays, or ``half-lines,'' emanating from the same point.\footnotemark
\footnotetext{Note that the classical definition of angle
implies that any angle will be contained in a plane, since the
rays are subsets of intersecting lines.  Recall that if two
lines intersect at one point, they are contained in exactly
one plane.  If they intersect at more than one point, they must
be the same line, and are contained in infinitely many planes.
If they do not intersect there are two cases:  they are
parallel and therefore contained in the same plane; or they
are {\it skew} and not jointly contained in any plane.}
A concept of measure was then attached to these purely geometric
objects, and historically these measures were assumed to
be within the closed interval $[0,180^\circ]$, i.e.,
between zero and 180 {\it degrees}, zero\footnotemark\
 meaning the two
rays are actually the same ray, and $180^\circ$ meaning
the rays are in opposite directions, forming a line.
The classical approach allowed for limited
``angle addition'' of properly adjacent angles in a plane
 as shown in the first two illustrations of
Figure~\ref{ClassicalAngleAddition},
but classical angle addition
 awkward if the sum of the two angle measures is greater than
 $180^\circ$ as in the third.  Also in the second illustration
of that figure, the angle measures $\alpha$ and $\beta$ do
sum to $180^\circ$, in which case we call the two angles a
{\it linear pair}, or {\it supplementary angles}.  In the
third illustration the angles with measures $\alpha$ and $\beta$
sum to greater than $180^\circ$, which is not allowed for the
measure of the angle formed by these and we must instead subtract
that sum from $360^\circ$, showing how some care must
be taken when combining angles in the classical setting.
\begin{figure}
\begin{center}
\begin{pspicture}(0,0)(12,4)
%%%%%%%%%%%%%%%  FIRST FIGURE
\psline{->}(1.5,1.5)(3.1903701,1.0470667)%-15^\circ
\psline{->}(1.5,1.5)(3.0155445,2.375)%30^\circ
\psline{->}(1.5,1.5)(1.1961157,3.2234136)%100^\circ
\psarc[linewidth=.01cm]{->}(1.5,1.5){.5}{-15}{30}
\psarc[linewidth=0.01cm]{->}(1.5,1.5){.7}{30}{100}
\psarc{->}(1.5,1.5){1.3}{-15}{100}
\rput(2.25,1.6){$\alpha$}
\rput(2.1,2.35){$\beta$}
\rput(2.7,2.7){$\gamma$}
\rput(2,0){$\alpha+\beta=\gamma$}
%%%%%%%%%%%%%%%  SECOND FIGURE
\psline{->}(6,1.5)(7.7433407,1.3474775)%-5^\circ
\psline{->}(6,1.5)(6.5985353,3.1444621)%70^\circ
\psline{->}(6,1.5)(4.2566593,1.6525225)%175^\circ
\psarc[linewidth=.01cm]{->}(6,1.5){.5}{-5}{70}
\psarc[linewidth=.01cm]{->}(6,1.5){.7}{70}{175}
\psarc{->}(6,1.5){1.3}{-5}{175}
\rput(6.7,1.7){$\alpha$}
\rput(5.5,2.2){$\beta$}
\rput(6,3.1){$\gamma$}
\rput(6,0){$\alpha+\beta=180^\circ=\gamma$}
%%%%%%%%%%%%%%  THIRD FIGURE
\psline{->}(10,2)(11.340578,0.87512168)%-40^\circ
\psline{->}(10,2)(10.152523,3.7433407)%85^\circ
\psline{->}(10,2)(9.125,0.48445554)%240^\circ
\psarc[linewidth=.01cm]{->}(10,2){.5}{-40}{85}
\psarc[linewidth=.01cm]{->}(10,2){.7}{85}{240}
\psarc{->}(10,2){1.3}{240}{320}
\rput(10.7,2.3){$\alpha$}
\rput(9,2.3){$\beta$}
\rput(10,.5){$\gamma$}
\rput(10,0){$360^\circ-(\alpha+\beta)=\gamma$}
\end{pspicture}
\end{center}
\caption{Since classical geometry only allows for angle
measures within $[0,180^\circ]$, angle addition requires
the sum to be at most $180^\circ$.
This is the case for the first two figures, but not the third.
}
\label{ClassicalAngleAddition}\end{figure}
\footnotetext{%
%%%%%%%%%%%%%Footnote
Note that a degree is a unit of measure, and as such
treatable as a multiplying factor.  Thus $0^\circ=0$,
and we do not have to include the degree sign.  Similarly
zero feet is the same as zero meters, and both are just zero.}
%%%%%%%%%%%%%%End Footnote

Still, classical geometry has much to offer, and
we adopt much of the vocabulary from that field.  For instance,
any angle measuring inside of $(0,90^\circ)$ is called {\it acute},
while angles with measures in $(90^\circ,180^\circ)$ are
called {\it obtuse}.  A $90^\circ$ angle is called a
{\it right} angle, while an angle measuring $180^\circ$ in this
setting is just a line.\footnote{%
%%%%%%%%FOOTNOTE
For technical reasons classical geometry often does not even
allow for $180^\circ$ angles, particularly since it is impossible
to determine the {\it interior} of such an angle unambiguously.
This is the set of points contained on line segments joining
the two rays, excluding the points actually on the rays.
Some texts also disallow $0^\circ$ angles, which have
interior $\emptyset$.
%%%%%%%%END FOOTNOTE
}
Also useful are some results on parallel and intersecting
lines.  For parallel lines, we are in particular interested
in three criteria which are equivalent to the lines being
parallel.  We will call them the $F$, $Z$ and $U$ criteria.
Suppose for the moment that we have two distinct lines,
$l_1$ and $l_2$, contained in a single plane, and a  line $m$ which
intersects both  lines in one point each.
Figure~\ref{FZU} shows the three parallel criteria.
\begin{figure}
\begin{center}
\begin{pspicture}(0,.5)(12,5)
\psline{<->}(1,3)(3.5,3)%l_2
  \rput(3.5,3.2){$l_2$}
\psline{<->}(1,4)(3.5,4)%l_1
  \rput(3.5,4.2){$l_1$}
\psline{<->}(1.625,2)(2,5)%m
  \rput(1.3,2.1){$m$}
\psarc{->}(1.75,3){.3}{262.87498}{360}
  \rput(2.1,2.6){$\beta$}
\psarc{->}(1.875,4){.3}{262.87498}{360}
  \rput(2.225,3.6){$\alpha$}
\rput[Bl](.5,1){{\bf a. }$F$ criterion:}
\rput[Bl](0.5,.5){\hphantom{{\bf a. }}$l_1\parallel l_2\iff \alpha=\beta$}

\psline{<->}(4.5,4.5)(7.5,4.5)%l_1
  \rput(7.5,4.7){$l_1$}
\psline{<->}(4.5,2.5)(7.5,2.5)%l_2
  \rput(7.5,2.7){$l_2$}
\psline{<->}(5,2)(7,5)%m
  \rput(5.3,2.){$m$}
\psarc{->}(6.6666666,4.5){.5}{180}{236.30993}
  \rput(6,4.2){$\alpha$}
\psarc{->}(5.3333333,2.5){.5}{0}{56.309932}
  \rput(6,2.8){$\beta$}
\rput[Bl](4.5,1){{\bf b. }$Z$ criterion:}
\rput[Bl](4.5,.5){\hphantom{{\bf a. }}$l_1\parallel l_2\iff \alpha=\beta$}

\psline{<->}(9,2)(10,4.5)%l_1
  \rput(10,4.7){$l_1$}
\psline{<->}(10.5,2)(11.5,4.5)%l_2
  \rput(11.5,4.7){$l_2$}
\psline{<->}(8.5,2.5)(12,2.5)%m
  \rput(12,2.7){$m$}
\psarc{->}(9.2,2.5){.3}{0}{68.198591}
  \rput(9.7,2.7){$\alpha$}
\psarc{->}(10.7,2.5){.3}{68.198591}{180}
  \rput(10.2,2.7){$\beta$}
\rput[Bl](8.5,1){{\bf c. }$U$ criterion:}
\rput[Bl](8.5,.5){\hphantom{{\bf c. }}$l_1\parallel l_2\iff%
         \alpha+\beta=180^\circ$}
\end{pspicture}
\end{center}
\caption{Three criteria for $l_1\parallel l_2$.}
\label{FZU}
\end{figure}
If the lines $l_1$ and $l_2$ are parallel, then the line $m$
is called a {\it transversal}.
The angles $\alpha$ and $\beta$ which appear in the $F$ criterion
are called {\it corresponding angles}, and those in the
$Z$ criterion are called {\it alternating interior angles}.\footnotemark
\footnotetext{In fact,
the $U$-criterion is, more or less, the statement of Euclid's
Parallel Postulate, which said (roughly) that if in the
third illustration of Figure~\ref{FZU}
$\alpha+\beta<180^\circ$, then $l_1$ and $l_2$ meet
in the region which would be above $m$,
while if $\alpha+\beta>180^\circ$ they meet below,
and if $\alpha+\beta=180^\circ$ they never meet.
From it the $F$ and $Z$ criteria follow.}
There are other equivalent criteria one can come up with.
One useful device which helps to logically connect these is
the idea of {\it vertical angles},
which are nonadjacent angles
formed when two lines meet in a single point.
In such a case, adjacent angle are supplementary, and
that proves the nonadjacent (vertical) angles are pairwise congruent.
See Figure~\ref{VerticalAngles}.
\begin{figure}
\begin{center}
\begin{pspicture}(0,0)(7,3)
\psline{<->}(0,0)(7,3)
\psline{<->}(0,3)(7,0)
\psarc{->}(3.5,1.5){.5}{-23.198591}{23.198591}
  \rput(4.3,1.5){$\alpha$}
\psarc{->}(3.5,1.5){.4}{23.198591}{156.80141}
  \rput(3.5,2.1){$\beta$}
\psarc{->}(3.5,1.5){.5}{156.80141}{203.19859}
  \rput(2.7,1.5){$\gamma$}
\psarc{->}(3.5,1.5){.4}{203.19859}{336.80141}
  \rput(3.5,.9){$\delta$}
\end{pspicture}
\end{center}
\caption{Vertical angles formed by intersecting lines.
Here $\alpha$ and $\gamma$ are vertical angles, as
are $\beta$ and $\delta$.  Vertical angles have the same
measure.  This follows quickly from the facts that
adjacent angles form supplementary pairs.  Thus
$\alpha+\beta=180^\circ$, $\beta+\gamma=180^\circ$
(and therefore $\alpha=\gamma$), while
$\gamma+\delta=180^\circ$ (and with what we know of
$\beta$ and $\gamma$, therefore $\beta=\delta$).}
\label{VerticalAngles}
\end{figure}

As a consequence of the $F$, $Z$ and $U$ criterion,
there is a simple classical proof that the measures of the interior
angles of a triangle sum to $180^\circ$.
The proof is in Figure~\ref{FirstProofAboutTriangleAglesSum}.
\begin{figure}
\begin{center}
\begin{pspicture}(0,0)(10,4)
\psline[linestyle=dashed]{<->}(.5,0)(2.5,4)
\psline[linestyle=dashed]{<->}(0,1)(7,1)
\psline[linestyle=dashed]{<->}(4.5,0)(6.5,4)
\psline(1,1)(5,1)(2,3)(1,1)
\psarc{->}(1,1){.4}{0}{63.434949}
  \rput(1.6,1.3){$\alpha$}
\psarc{->}(5,1){.4}{0}{63.434949}
  \rput(5.6,1.3){$\alpha$}
\psarc{->}(2,3){.5}{243.43495}{326.30993}
  \rput(2.1,2.2){$\gamma$}
\psarc{->}(5,1){.5}{63.434949}{146.30993}
  \rput(4.8,1.75){$\gamma$}
\psarc{->}(5,1){.7}{146.30993}{180}
  \rput(4.1,1.25){$\beta$}

  \rput(7,1.2){$m$}
  \rput(2.7,4){$l_1$}
  \rput(6.7,4){$l_2$}
\rput[Bl](8,2){$\alpha+\beta+\gamma=180^\circ$}
\end{pspicture}
\end{center}
\caption{Classical proof that the sum of the measures of
the interior angles
of a triangle is $180^\circ$.
The line $l_2$ is constructed to be parallel to $l_1$,
so we can label two more angles formed by
the triangle sides forming $\beta$ and the line $l_2$.
Above, the two angles with measure labeled to be $\alpha$
are the same measure by the
$F$ criterion, while the two labeled to have measure $\gamma$ are the
same measure by the $Z$ criterion.  Where the three angles are
adjacent it is obvious by angle addition that
$\alpha+\gamma+\beta=180^\circ$.}
\label{FirstProofAboutTriangleAglesSum}
\end{figure}

In particular, if we have a right triangle then
$90^\circ$ of the $180^\circ$ are accounted for,
and the two non-right angles' measures sum to the
remaining $90^\circ$.
Two angles with positive measure whose measures
sum to $90^\circ$ are called {\it complementary angles}.

\subsection{Modern Angles and Measures}
For our purposes we will use the following definition
of angle:

\begin{definition}
An {\rm\bf angle} a pair of rays emanating from
a single point called the {\rm\bf vertex}, one ray called the
{\rm\bf initial ray} pointing in the {\rm\bf initial direction},
the other called the {\rm\bf terminal ray} pointing in
the {\rm\bf terminal direction}, and a rotation
in the plane of the rays about the vertex,
and of a proper {\rm\bf measure} to rotate the initial ray
to the position of the terminal ray.

If the measure is in {\rm\bf degrees} for instance,
a complete rotation
counterclockwise has measure $360^\circ$, a complete
rotation clockwise has measure $-360^\circ$,
two complete rotations counterclockwise will have measure
$2\cdot360^\circ=720^\circ$, etc., and any other multiple
(including fractional multiples) of a whole
rotation will have measure which is that multiple of $360^\circ$
if counterclockwise, and of $-360^\circ$ if clockwise.
\end{definition}

In short, an angle is the {\it two rays}
 as in the classical sense---except
we distinguish which is initial and which is terminal---and
a {\it rotation} carrying one ray to the other.
Thus an angle in the modern sense includes more information
than the classical.
Angles which appear the same
classically can be very different in the modern sense.
For instance, switching initial and terminal rays would not
change the classical angle but would change the modern
angle.  Also, even if these
are fixed, two classically equivalent angles
can differ in how the initial direction was rotated to
the terminal direction: the same rays can be used for
angles with measures $90^\circ$, $90^\circ+360^\circ=450^\circ$,
$90^\circ+2\cdot360^\circ=810^\circ$,
$-270^\circ$, and $-270^\circ-360^\circ=-630^\circ$, etc.,
will look like the same angles classically, but here we will
treat them as distinct.

There are numerous advantages to this approach.
For one immediate advantage, we note that
the angle addition is now much more general, for
a rotation of $790^\circ$ followed by a rotation of
$-100^\circ$ in the same plane
results simply in a net rotation of $690^\circ$.
Also, in many physical problems the modern approach is called
for.  For instance, a tire on a car can (relative to the
vertex on the axle) appear to be in its original position,
but it is useful to know whether or not the tire
actually rotated, and how much, in the meantime.
For another example, consider a coiled spring that is wound
through an angle.  The number of rotations of the spring,
and not just its final position, is crucial information.
Figure~\ref{ModernAngleFigure} illustrates some of these
points (compare to Figure~\ref{ClassicalAngleAddition}).
Most importantly for our purposes here, our approach gives rise
to the crucially important trigonometric functions and
all the structure embedded within.

\begin{figure}
\begin{center}
\begin{pspicture}(0,0)(12,4)
%%%%%%%%%%%%%%  FIRST FIGURE
\parametricplot[plotstyle=curve]%
{0}{1080}{t cos t 1080 div mul 1 add  t sin t 1080 div mul 1.5 add }
\psline{->}(2.,1.5)(3.0,1.5)
%%%%%%%%%%%%%%  SECOND FIGURE
\psline{->}(5,1.5)(7,1.5)
\psline{->}(5,1.5)(5,3.5)
\psarc{->}(5,1.5){.8}{0}{90}
\rput(6,2.5){$90^\circ$}
\psarc{<-}(5,1.5){1}{-270}{0}
\rput(4,2.5){$-270^\circ$}
\psline[linestyle=dashed]{<->}(1,3)(1,1.5)(3,1.5)
%%%%%%%%%%%%%%  THIRD FIGURE
\psline{->}(10,2)(11.340578,0.87512168)%-40^\circ
\psline{->}(10,2)(10.152523,3.7433407)%85^\circ
\psline{->}(10,2)(9.125,0.48445554)%240^\circ
\psarc[linewidth=.01cm]{->}(10,2){.5}{-40}{85}
\psarc[linewidth=.01cm]{->}(10,2){.7}{85}{240}
\psarc{->}(10,2){1.3}{-40}{240}
\rput(10.7,2.3){$\alpha$}
\rput(9.2,2.3){$\beta$}
\rput(8.4,2){$\gamma$}
\rput(10,0){$\alpha+\beta=\gamma$}
\end{pspicture}
\end{center}
\caption{The modern definition of angles allows for
any real-valued measure (as opposed to just $[0,180^\circ]$
for the classical approach).
Many physical applications benefit from the extended definition,
such as the description of the state of a coiled spring as
in the first figure.  The extra information tells us how
we rotated from the initial direction to the terminal direction;
for instance there are two distinct angles shown in the second
illustration (though in classical geometry they are the same).
Also angle addition is simplified, as in the last figure.}
\label{ModernAngleFigure}\end{figure}

At this point a couple of brief notes on language and notation are
in order.  First, we will usually use lower-case
Greek letters such as $\theta$, $\alpha$, $\beta$, $\gamma$ and so on
for the angle measures.   Second, for convenience
we will often not distinguish between the angle and its measure,
since the position of the angle is usually clear from the
context. So rather than writing phrases like, ``the angle in
such-and-such position which has measure $\theta$,'' we
are likely to just write, ``the angle $\theta$.''
This is perhaps a bit of an abuse of the language to a classical
geometer---since we are identifying an angle by its
measure, technically two distinct concepts---but it
is a common practice and will be useful here.\footnote{%
%%%%%%%%%%%FOOTNOTE
This is somewhat in the spirit of {\it vectors}
which we will encounter later in the text.
Vectors are displacements in the plane or in space which
have length and direction, often illustrated using
arrows of said length and direction, but
we do not distinguish between two vectors with the
same length and direction which originate at
two different points.  What is important is the
net displacement represented by the vector, not
where the displacement began.  Similarly we can
consider $\theta$ to be a rotational displacement, and
attach meaning as to vertex and initial ray only when required
by the context.
%%%%%%%%%%%END FOOTNOTE
}

In fact it is useful to do away with the two fixed rays
entirely and speak of {\it angular displacements}.
These are analogs of {\it linear displacements}, also
known as {\it translations}.  In this context we consider
a direction in the plane, which we can still signify
by a ray or an arrow, for instance.  For example the origin of the arrow
can signify a vehicle's position, while the direction in which
the arrow points indicates
the direction the vehicle is facing.  A linear
translation would move the arrow is such a way that
the direction is unchanged, while an angular displacement
would change the actual direction.  The two types of displacements
are illustrated in Figure~\ref{LinearAndAngularDisplacements}.
\begin{figure}
\begin{center}
\begin{pspicture}(-1,-2)(3,3)
\psline{<->}(-1,0)(3,0)
\psline{<->}(0,-1)(0,3)
\psline{*->}(1,1)(2,3)
  \rput{63.435}(1.3,2){start}
\psline[linestyle=dashed]{->}(1,1)(2,.2)
\rput(1,-1.5){{\bf{a.}} Linear Displacement}
\psline[linestyle=dashed]{->}(2,3)(3,2.2)
\psline{*->}(2,.2)(3,2.2)
  \rput{63.435}(2.3,1.2){finish}
\end{pspicture}
\qquad\qquad\qquad
\begin{pspicture}(-1,-2)(3,3)
\psline{<->}(-1,0)(3,0)
\psline{<->}(0,-1)(0,3)
\psline{*->}(1,1)(2,3)
\psline{*->}(1,1)(-1.15987580881,.421263021278)
  \rput{63.435}(1.3,2){start}
\psarc{->}(1,1){.5}{63.4349488}{195}
  \rput{195}(-.05,.52){finish}
\rput(1,-1.5){{\bf{b.}} Rotational Displacement}
\end{pspicture}
\end{center}
\caption{Linear versus rotational displacements.
Figures~\ref{LinearAndAngularDisplacements}~a
and \ref{LinearAndAngularDisplacements}~b begin
with the same arrow. A linear displacement (translation)
preserves direction, while an angular displacement
changes the direction but does not change the position
(signified by the origin of the arrow).  These are
completely independent.}
\label{LinearAndAngularDisplacements}
\end{figure}

Put another way, an angular displacement is a turning.
This provides another method of proof that the interior angles
of a triangle sum to $180^\circ$.
\begin{figure}
\begin{center}
\begin{pspicture}(1.5,0)(6,4.8)
\psset{xunit=1.5cm,yunit=1.5cm}
\psline{->}(1.43333333,1)(4,1)
\psline{->}(3,1)(1.9,3.2)
\psline{->}(2.3,2.4)(1,0.3)
\psarc{->}(3,1){.3}{0}{116.56505}
  \rput(3.2,1.3){$\theta_1$}
\psarc{->}(3,1){.3}{116.56505}{180}
  \rput(2.65,1.15){$\alpha_1$}
\psarc{->}(2.3,2.4){.3}{116.56505}{238.24052}
  \rput(1.9,2.4){$\theta_2$}
\psarc{->}(2.3,2.4){.3}{238.24052}{296.56505}
  \rput(2.3,2){$\alpha_2$}
\psarc{->}(1.43333333,1){.3}{-121.75948}{0}
  \rput(1.85,1.15){$\alpha_3$}
\psarc{->}(1.43333333,1){.3}{0}{58.24052}
  \rput(1.55,.65){$\theta_3$}
\end{pspicture}
\end{center}
\caption{Diagram for the
proof that the sum of the interior angles of a triangle
is $180^\circ$, using the fact that a path around the triangle
results in a total rotation of $\theta_1+\theta_2+\theta_3=360^\circ$.
From this it follows that $\alpha_1+\alpha_2+\alpha_3=180^\circ$
(see text).}
\label{ProofForTriangleInteriorAngleSum}
\end{figure}
Consider the diagram in Figure~\ref{ProofForTriangleInteriorAngleSum}.
Suppose a car is on a triangular track as in the figure,
with the car initially on the base leg facing towards the right.
As the car drives around the track, it first must
turn through the angle $\theta_1$, move along the
right leg, turn through the angle $\theta_2$, move along
the left leg, and turn through $\theta_3$ to come
back to its original position.  It is not hard to see that
net rotation of the
car is $360^\circ$, so $\theta_1+\theta_2+\theta_3=360^\circ$.
Furthermore, $\theta_1=180^\circ-\alpha_1$,
$\theta_2=180^\circ-\alpha_2$, and $\theta_3=180^\circ-\alpha_3$.
Putting all this together gives us
\begin{alignat*}{2}
&&\underbrace{(180^\circ-\alpha_1)}_{\theta_1}+
\underbrace{(180^\circ-\alpha_2)}_{\theta_2}+
\underbrace{(180^\circ-\alpha_3)}_{\theta_3}&=360^\circ\\
&\iff\qquad&3\cdot180^\circ-(\alpha_1+\alpha_2+\alpha_3)&=2\cdot180^\circ\\
&\iff&1\cdot180^\circ-(\alpha_1+\alpha_2+\alpha_3)&=0\\
&\iff&180^\circ&=\alpha_1+\alpha_2+\alpha_3,\qquad\text{q.e.d.}
\end{alignat*}

Though angles can exist anywhere in space, there is
much to be learned from studying angles in
{\it standard position}, meaning that the following three
conditions are all met:
\begin{enumerate}
\item the angle is contained inside of $\Re^2$;
\item the vertex is at the origin; and
\item the initial ray is the nonnegative $x$-axis.
\end{enumerate}
By fixing the initial side, we assure that the position
of the terminal side is completely determined by the
measure of the angle.  Some common angles are
illustrated in Figure~\ref{AnglesInStandardPosition}.

\begin{figure}
\begin{center}
\begin{pspicture}(-3,-3)(3,3)
\psset{xunit=.66666666cm, yunit=.66666666cm}
\psaxes[linewidth=1.5pt]{<->}(0,0)(-4,-4)(4,4)
  \rput(4.4,.25){$0$}
  \rput(4.4,-.3){$360^\circ$}
\psline[linewidth=1.5pt]{->}(0,0)(3.4641016,2)
  \rput(3.9,2.1){$30^\circ$}
\psline[linewidth=1.5pt]{->}(0,0)(2.8284271,2.8284271)
  \rput(3.1,3.1){$45^\circ$}
\psline[linewidth=1.5pt]{->}(0,0)(2,3.4641016)
  \rput(2.2,3.8){$60^\circ$}
  \rput(0,4.35){$\hphantom{{}^\circ}90^\circ$}
\psline[linewidth=1.5pt]{->}(0,0)(-2,3.4641016)
  \rput(-2.2,3.8){$120^\circ$}
\psline[linewidth=1.5pt]{->}(0,0)(-2.8284271,2.8284271)
  \rput(-3.1,3.1){$135^\circ$}
\psline[linewidth=1.5pt]{->}(0,0)(-3.4641016,2)
  \rput(-3.9,2.1){$150^\circ$}
  \rput(-4.5,0.1){$180^\circ$}
\psline[linewidth=1.5pt]{->}(0,0)(-3.4641016,-2)
  \rput(-4,-2){$210^\circ$}
\psline[linewidth=1.5pt]{->}(0,0)(-2.8284271,-2.8284271)
  \rput(-3.1,-3.1){$225^\circ$}
\psline[linewidth=1.5pt]{->}(0,0)(-2,-3.4641016)
  \rput(-2.2,-3.8){$240^\circ$}
  \rput(0,-4.35){$270^\circ$}
\psline[linewidth=1.5pt]{->}(0,0)(2,-3.4641016)
  \rput(2.2,-3.8){$300^\circ$}
\psline[linewidth=1.5pt]{->}(0,0)(2.8284271,-2.8284271)
  \rput(3.2,-3.1){$315^\circ$}
\psline[linewidth=1.5pt]{->}(0,0)(3.4641016,-2)
  \rput(4.1,-2.1){$330^\circ$}
\end{pspicture}
\qquad\qquad
\begin{pspicture}(-3,-3)(3,3)
\psset{xunit=.66666666cm, yunit=.66666666cm}
\psaxes[linewidth=1.5pt]{<->}(0,0)(-4,-4)(4,4)
  \rput(4.4,.35){$-360^\circ$}
  \rput(4.4,-.25){$0$}
\psline[linewidth=1.5pt]{->}(0,0)(3.4641016,2)
  \rput(3.9,2.2){$-330^\circ$}
\psline[linewidth=1.5pt]{->}(0,0)(2.8284271,2.8284271)
  \rput(3.1,3.1){$-315^\circ$}
\psline[linewidth=1.5pt]{->}(0,0)(2,3.4641016)
  \rput(2.2,3.8){$-300^\circ$}
  \rput(0,4.35){$-270^\circ$}
\psline[linewidth=1.5pt]{->}(0,0)(-2,3.4641016)
  \rput(-2.2,3.8){$-240^\circ$}
\psline[linewidth=1.5pt]{->}(0,0)(-2.8284271,2.8284271)
  \rput(-3.1,3.1){$-225^\circ$}
\psline[linewidth=1.5pt]{->}(0,0)(-3.4641016,2)
  \rput(-4.1,2.1){$-210^\circ$}
  \rput(-4.7,0.1){$-180^\circ$}
\psline[linewidth=1.5pt]{->}(0,0)(-3.4641016,-2)
  \rput(-4.2,-2){$-150^\circ$}
\psline[linewidth=1.5pt]{->}(0,0)(-2.8284271,-2.8284271)
  \rput(-3.1,-3.1){$-135^\circ$}
\psline[linewidth=1.5pt]{->}(0,0)(-2,-3.4641016)
  \rput(-2.2,-3.8){$-120^\circ$}
  \rput(0,-4.35){$-90^\circ$}
\psline[linewidth=1.5pt]{->}(0,0)(2,-3.4641016)
  \rput(2.2,-3.8){$-60^\circ$}
\psline[linewidth=1.5pt]{->}(0,0)(2.8284271,-2.8284271)
  \rput(3.2,-3.1){$-45^\circ$}
\psline[linewidth=1.5pt]{->}(0,0)(3.4641016,-2)
  \rput(4.1,-2.1){$-30^\circ$}
\end{pspicture}
\end{center}
\caption{Positions of terminal rays of common positive-measure
and negative-measure angles in standard
position, meaning with vertex at the origin and
initial ray coinciding with the nonnegative $x$-axis.}
\label{AnglesInStandardPosition}
\end{figure}

A useful quantity related to angles in standard position
is the {\it reference angle}, which for a given angle
$\theta$ is the quantity $\theta_r\in[0,90^\circ]$ which
the terminal side can make with the horizontal.
For any of the angles in Figure~\ref{AnglesInStandardPosition},
the terminal ray and one of the two horizontal rays
(the nonnegative $x$-axis or the nonpositive $x$-axis,
i.e., the terminal rays for the angles $0$ or $180^\circ$)
can form a nonobtuse angle.  For instance,
\begin{alignat*}{3}
\theta&=150^\circ\qquad&&\implies&\qquad \theta_r&=30^\circ\\
\theta&=300^\circ&&\implies&\theta_r&=60^\circ\\
\theta&=-45^\circ&&\implies&\theta_r&=45^\circ.\end{alignat*}
Notice that we have implications and not equivalences.
This is because infinitely many angles will have the same
reference angle, though one angle can have only one
reference angle.  For instance,
$$\theta_r=90^\circ\iff
\theta\in\{\pm 90^\circ, \pm 270^\circ,\pm450^\circ,\pm630^\circ,\ \dots\}
      =\left\{\left.\alpha\ \vphantom{A_A^A}\right|\
                \alpha=90^\circ+N\cdot180^\circ, \ N\in\mathbb{Z}\right\}.$$
It is even more complicated for angles with reference
angles other than $0$ or  $90^\circ$.  For instance,
if $\theta_r=30^\circ$, then $\theta$ can be
of form $30^\circ+N\cdot180^\circ$, or of form
$150^\circ+N\cdot180^\circ$.  This ambiguity will continue
to occur in many contexts.  It is a source of both
flexibility for applications mathematical and physical,
and frustration if we are not careful to exhaust all
possibilities when solving problems.

\subsection{Cosine and Sine Functions}
All trigonometric functions are built upon the cosine and
sine functions.  The domains of both are
the angle measures.  We will define the cosine and sine functions
by means of ratios arising from the angles, in standard position,
and how they intersect a circle of radius $r$ (it will turn out not
to matter what value we choose, as long as $r>0$).
The simplest case is shown in Figure~\ref{FirstTrigFunctionFigure}.
\begin{figure}
\begin{center}
\begin{pspicture}(-3,-4)(3,3)
\psline{<->}(-3,0)(3,0)
\psline{<->}(0,-3)(0,3)
\psline[linewidth=1.2pt]{->}(0,0)(3,2.25)
  \rput{0}(.9,1.05){$r$}
\psarc{->}{.5}{0}{36.869898}
\rput(.7,.2){$\theta$}
\pscircle(0,0){2.25}
\psline[linewidth=1.2pt]{->}(0,0)(1.8,0)
  \rput(.9,-.3){$x$}
\psline[linewidth=1.2pt]{->}(1.8,0)(1.8,1.35)
  \rput(2,.5){$y$}
\pscircle[fillstyle=solid,fillcolor=black](1.8,1.35){2pt}
  \rput[Bl](2.1,1.1){$(x,y)=(r\cos\theta,r\sin\theta)$}
\rput(0,-3.5){$x^2+y^2=r^2$}
\end{pspicture}
\end{center}
\caption{Circle $x^2+y^2=r^2$ used to define $\cos\theta=x/r$ and
$\sin\theta=y/r$ for an angle $\theta$ in standard position.
The case in which the angle terminates in the first quadrant is
shown.  Here $x,y>0$.  The definitions of $\cos\theta$ and $\sin\theta$
are the same for other quadrants, where $x$ or $y$ are negative.
$r>0$ is the radius of the circle, which is centered at $(0,0)$.}
\label{FirstTrigFunctionFigure}
\end{figure}
There we have the angle $\theta$ terminating in the first
quadrant, where $x,y>0$, but we define the
cosine and sine functions of $\theta$, respectively
$\cos\theta$ and $\sin\theta$, the same ways regardless:
\begin{align}
\cos\theta&=x/r,\label{CosineDefinition}\\
\sin\theta&=y/r.\label{SineDefinition}
\end{align}
In Figure~\ref{FirstTrigFunctionFigure} and all similar
figures, $x$ is a horizontal {\it displacement},
meaning $x>0$ if the displacement from the origin
is to the right and $x<0$ if to the left, and
similarly $y$ is a vertical {\it displacement},
with $y>0$ if above the origin and $y<0$ if below.
However, $r$ will always be positive, since it
is a radius, i.e., a {\it distance} from the
center of the circle (i.e., the origin $(0,0)$).\footnote{%
%%%FOOTNOTE
It is meaningless to assume $r=0$ for
a number of reasons, foremost (\ref{CosineDefinition})
and (\ref{SineDefinition}) do not allow it.
Similarly $r<0$ poses problems, though there is a
context where such situations are considered, namely
in {\it polar coordinates}, which we will encounter
later in the text.  Such cases, however,
complicate trigonometry in unnecessary and rather
useless ways.}
%%%%%%%END FOOTNOTE
In other quadrants than the first, $x$ or $y$ will
be negative, but $r$ will always be positive.
Of course $r$ is also the hypotenuse of a right
triangle with legs $|x|$ and $|y|$, so
we will always have
\begin{equation}r=\sqrt{x^2+y^2}.\end{equation}

It is important to notice that $\cos\theta$ and $\sin\theta$
do not actually depend upon our choice for  $r$.
If we chose a different radius, say $R$, we would
have different horizontal and vertical displacements,
say $X$ and $Y$, but the triangles would be similar
for the same $\theta$ (draw two and see!) and so
\begin{align*}
\cos\theta&=x/r=X/R,\\ \sin\theta&=y/r=Y/R.\end{align*}
See the footnote on page~\pageref{SimilarTrianglesPage}
for a brief review of similar triangles.

One important aspect of all the trigonometric functions
can be seen with these definitions of cosine and
sine.  It is that they are {\it dimensionless},
or unitless.  For instance, if $x$ and $r$ are
both in feet, then $\cos\theta=x/r$ is in
feet/feet, so the feet cancel.  This is important
for theoretical purposes but we will not delve
as deeply into this fact as we could.%
\footnote{Actually there would be some benefit in
considering units of ``feet per feet'' (or
feet per foot, as it would read colloquially)---think
about the slope of a line---but we will leave such
considerations to the meditations of the interested reader.}
In the calculations
involving the trigonometric functions we will see
how units from other sources
are carried along, and how the trigonometric
functions do not interfere with the units.

As shown in Figure~\ref{FirstTrigFunctionFigure},
we can solve for $x$ and $y$ quickly.  Since $r>0$ we have:
\begin{alignat*}{3}
\cos\theta&=x/r\qquad&&\iff\qquad&x&=r\cos\theta,\\
\sin\theta&=y/r&&\iff&y&=r\sin\theta.\end{alignat*}
Note also that we have our first and most basic
of a long line of trigonometric identities, since
the equation of the circle, $x^2+y^2=r^2$ becomes:
\begin{alignat*}{3}
&&(r\cos\theta)^2+(r\sin\theta^2)&=r^2\\
&\iff\qquad&r^2\left[(\cos\theta)^2+(\sin\theta)^2\right]&=r^2\\
&\iff&(\cos\theta)^2+(\sin\theta)^2&=1.\end{alignat*}
At this point we will introduce some notation which is universally
accepted.  Unfortunately it has one exception, but still it
saves us some writing.
\begin{definition}For any of the six trigonometric functions,
$\sin\theta$, $\cos\theta$, $\tan\theta$, $\cot\theta$, $\sec\theta$
and $\csc\theta$, we will adopt the convention
that for $k\ne-1$,\footnotemark
$$(\sin\theta)^k=\sin^k\theta,\qquad (\cos\theta)^k=\cos^k\theta,
\qquad\text{etc.}$$
\end{definition}
\footnotetext{%%%%%%%%% FOOTNOTE
We will see later that $\sin^{-1}z$ has another meaning, from a
different notation convention, having to do with inverse functions.
In particular, $\sin^{-1}z$ is {\bf definitely not} taken to be
the same as $(\sin z)^{-1}=1/\sin z$.}
%%%%%%%% END FOOTNOTE
Our first trigonometric identity\footnotemark
%%%%%%%%  FOOTNOTE
\footnotetext{Recall that an {\it identity} is an equation
which holds true for each value of the variable which is
in both the natural domain of the function on the left
of the equal sign, and of the function on the right.
Thus $\frac1{1/x}=x$ is an identity, holding for every
$x\ne0$.  We have to be careful with domains and identities just as
we had to be careful with domains while simplifying functions.
}%%%%%%%%% END FOOTNOTE
\  then is
\begin{equation}
\cos^2\theta+\sin^2\theta=1.\label{BasicTrigIdentity}\end{equation}
As an identity, this holds for all $\theta$.
We will spend some time with other identities in future
subsections and later in the text.  Of all trigonometric
identities, (\ref{BasicTrigIdentity}) is the most basic.
We will be interested in every equivalent permutation
of this identity.  For instance, we immediately get that
\begin{align}
1-\sin^2\theta&=\cos^2\theta,\\
1-\cos^2\theta&=\sin^2\theta.\end{align}
Unfortunately we will not immediately know, say $\sin\theta$
just because we might know $\cos\theta$, since
$$\sin\theta=\pm\sqrt{1-\cos^2\theta}.$$
Without more information we do not know which case $(+/-)$
holds.
However, if for instance we know the quadrant in which
the angle terminates,
then we know if $y$ is positive or negative and since
$r>0$ in all cases, we then know if $y/r=\sin\theta$ is positive or negative
and the appropriate case of the above formula.
\bex Suppose $\theta$ is in standard position and
the terminal ray of $\theta$ passes through the point $(-3,2)$.  Find
$\cos\theta$ and $\sin\theta$.

\underline{Solution}: We can calculate these directly.  First we
will calculate
$$r=\sqrt{x^2+y^2}=\sqrt{(-3)^2+(2)^2}=\sqrt{9+4}=\sqrt{13}.$$
Next,
\begin{align*}\cos\theta&=x/r=-3/\sqrt{13},\\
\sin\theta&=y/r=2/\sqrt{13}.\end{align*}
Even though we found our answers without drawing a graph, it
is useful for care and clarity to do so, so we include
Figure~\ref{FirstTrigFunctionProblemFigure}.
\begin{figure}[h]
\begin{center}
\begin{pspicture}(-4,-1)(4,3)
\psaxes{<->}(0,0)(-4,-1)(1,3)
\pscircle[fillstyle=solid,fillcolor=black](-3,2){2pt}
  \rput(-3,2.3){$(-3,2)$}
\psline[linestyle=dashed](0,0)(-3,2)
\psarc{->}(0,0){.5}{0}{146.30993}
  \rput(.35,.65){$\theta$}
\rput[Bl](2,1.5){$\begin{array}{rcl}x&=&-3\\ y&=&2\\
                                    r&=&\sqrt{x^2+y^2}=\sqrt{13}\\
                           \cos\theta&=&x/r=-3/\sqrt{13}\\
                           \sin\theta&=&y/r=2/\sqrt{13}\end{array}$}
\psline[linewidth=1.5pt]{->}(0,0)(-3,0)
\psline[linewidth=1.5pt]{->}(-3,0)(-3,2)
  \rput{-33.690068}(-1.5,1.4){$r=\sqrt{13}$}
  \rput(-3.3,1){2}
  \rput(-2,.3){$-3$}
  \end{pspicture}
\end{center}
\caption{Figure for Example~\ref{FirstTrigFunctionProblem}.  The
angle $\theta$ shown is one of infinitely many such angles
which terminate on the ray passing through $(-3,-2)$, but they
all have the same cosine and sine.}
\label{FirstTrigFunctionProblemFigure}\end{figure}
\label{FirstTrigFunctionProblem}
\eex

It is a relatively lucky occurrence that we are given an
angle for which we know the exact cosine and sine.
(See Subsection~\ref{RightTriangleTrigSubsection}.)
Fortunately there are very inexpensive calculators which
can give us good approximations for angles which are not
too large.\footnote{%
%%%%%%%% FOOTNOTE
It is important that the calculator is in {\it degree mode},
meaning that angles input to the sine and cosine functions
are assumed to be in units of degrees.  The other common
mode is {\it radian mode}, which we will discuss later in
this section and use extensively throughout the text.}
%%%%%%%% END FOOTNOTE
  These approximations are usually eight to twelve
decimal places in accuracy.  If we have a right triangle,
with one other angle and one side known, we can find the
other sides (and other angle) easily to very good precision.
Of course we are not always given the data to high precision,
but we assume it is exact for our calculations and then
present our final answer with the same order of accuracy
at which we were given the data.

\bex Find all the other sides and the remaining angle
of a right triangle if the hypotenuse is 3.52 feet and
another angle is $32^\circ$.

\underline{Solution}: We will call the given angle $\theta$
and graph the triangle with $\theta$ in standard
position, with the hypotenuse as radius, as in
Figure~\ref{FigureForHyp+Angle=TriangleExample}.
\begin{figure}
\begin{center}
\begin{pspicture}(-1,-1)(7,3)
\psline{<->}(-1,0)(3,0)
\psline{<->}(0,-1)(0,3)
\psline[linestyle=dashed]{->}(0,0)(3,1.8746081)
\psarc{->}(0,0){.5}{0}{32}
\rput(.9,.2){$32^\circ$}
\psline[linewidth=1.5pt]{->}(2,0)(2,1.2497387)
\psline(0,0)(2,1.2497387)
\rput{32}(1,.9){3.52 ft}
\psline[linewidth=1.5pt]{->}(0,0)(2,0)
  \rput(1,-.3){$x$}
\rput(2.2,.65){$y$}
\rput[Bl](4.5,1){$x=3.52\text{ ft} \cos32^\circ$}
\rput[Bl](4.5,.5){$y=3.52\text{ ft} \sin32^\circ$}
\end{pspicture}
\end{center}
\caption{Triangle for Example~\ref{Hyp+Angle=TriangleExample}.
We can easily find $x$ and $y$ if we know the cosine and sine
of $32^\circ$, which we can find with sufficient accuracy for
this problem with
any inexpensive scientific calculator.}
\label{FigureForHyp+Angle=TriangleExample}
\end{figure}
It is best to have the desired calculations ready for the
calculator so we do not have to write down intermediate
calculations, as this is error-prone and often does not
use the full resources of the calculator.\footnote{%
%%%%%% FOOTNOTE
Many calculators have more accuracy stored than what is
displayed, so it is better not to re-enter numbers
from intermediate calculations, but to either store them
in the calculator's memory or, better yet, to have
the exact answer written in some algebraic form
that the calculator can do all the ``number-crunching''
at once.  We will practice this approach throughout the text.
%%%%%%% END FOOTNOTE
}  Now the third angle is simply $90^\circ-32^\circ=58^\circ$.
The lengths require a little more care. For this problem, we have
\begin{alignat*}{4}
\cos\theta&=\frac{x}r\qquad&&\implies\qquad&x&=r\cos\theta
          =3.52\text{ ft}\cos32^\circ&&\approx2.9851293\text{ ft}\approx
           2.99\text{ ft}.\\
\sin\theta&=\frac{y}r\qquad&&\implies\qquad&y&=r\sin\theta
          =3.52\text{ ft}\sin32^\circ&&\approx1.8653158\text{ ft}\approx
           1.87\text{ ft}.\end{alignat*}
\label{Hyp+Angle=TriangleExample}\eex

Notice that we did not bother to write down the actual values of
$\cos32^\circ\approx0.8489481$ or $\sin32^\circ\approx0.52991926$.
That is because we had our exact algebraic answers set up so that
the calculator could perform the needed calculation for $x$ all
at once, and for $y$ all at once.  It can not be stressed
too much that this is the most accurate way to compute such
things.  If we must write down an intermediate step we should
do so with as much precision as possible.  Even though we
left our answers with three significant digits (since that
was all we had with our hypotenuse length), we should
still perform the calculations with more.  If we round off the
intermediate steps, we introduce error which can compound as
we carry those values through the calculations or make
other truncations.

Some texts give guidelines for significant digits of angles,
and what that means for the output when we input those angles
into trigonometric functions.  However it is not so simple
so we will take our cues from the lengths more than the angles.
For instance, sometimes three significant digits on an angle
yields more than three in the trigonometric function, and
sometimes less.

We should also point out that, with $x$ and the hypotenuse,
we can instead find $y$ using the Pythagorean Theorem:\footnotemark
$$y=\sqrt{r^2-x^2}=
\sqrt{(3.52\text{ ft})^2-((3.52\text{ ft})\cos32^\circ)^2}
\approx1.8653158\text{ ft}\approx1.87\text{ ft}.$$
\footnotetext{%
%%%%%%%%%% FOOTNOTE
Notice that we do not use the truncated
form $x\approx2.99\text{ ft}$.
In fact, note that $\sqrt{3.52^2-2.99^2}\approx1.857498318$,
which does not round  to $1.87$.  Again, we need to avoid
rounding up or down until the final computation, assuming
all numbers were exact to start with, is finished.  In this
example there were few intermediate computations.
Often far more computations are involved, and much more
error can be introduced by rounding as we go.
%%%%%%%%% END FOOTNOTE
}

\subsection{The Other Trigonometric Functions}
There are six basic trigonometric functions.  We have already
defined $\cos\theta$ and $\sin\theta$.  The others can
be defined in terms of these.  They are the
tangent, cotangent, secant, and cosecant functions.
Before we define them we will again draw a circle
centered at the origin, along with an angle in standard
position, in Figure~\ref{CircleForTrigsAgain}.
\begin{figure}
\begin{center}
\begin{pspicture}(-3,-4)(3,3)
\psline{<->}(-3,0)(3,0)
\psline{<->}(0,-3)(0,3)
\psline[linewidth=1.2pt]{->}(0,0)(3,2.25)
  \rput{0}(.9,1.05){$r$}
\psarc{->}{.5}{0}{36.869898}
\rput(.7,.2){$\theta$}
\pscircle(0,0){2.25}
\psline[linewidth=1.2pt]{->}(0,0)(1.8,0)
  \rput(.9,-.3){$x$}
\psline[linewidth=1.2pt]{->}(1.8,0)(1.8,1.35)
  \rput(2,.5){$y$}
\pscircle[fillstyle=solid,fillcolor=black](1.8,1.35){2pt}
  \rput[Bl](2.1,1.1){$(x,y)$}
\rput(0,-3.5){$x^2+y^2=r^2$}
\end{pspicture}
\end{center}
\caption{Circle $x^2+y^2=r^2$ and an angle $\theta$ in
  standard position for defining the six trigonometric
  functions.}
\label{CircleForTrigsAgain}\end{figure}
With that figure in mind, below are the definitions
of the six trigonometric functions of $\theta$, which
need to be committed to memory:
\begin{alignat}{2}
\cos\theta&=x/r,\\
\sin\theta&=y/r,\\
\tan\theta&=\frac{\sin\theta}{\cos\theta}&&=y/x,\\
\cot\theta&=\frac{\cos\theta}{\sin\theta}&&=x/y,\\
\sec\theta&=\frac1{\cos\theta}&&=r/x,\\
\csc\theta&=\frac1{\sin\theta}&&=r/y.\end{alignat}

A few quick notes are in order.
\begin{enumerate}
\item For most students it
is perhaps best to memorize the definitions of
tangent, cotangent, secant and cosecant
in terms of cosine and sine.
In fact, most scientific calculators only have
cosine, sine and tangent keys (and their inverses
which we will discuss later), so it is customary
to use these three in most practical problems.
The pairings cosine/secant, sine/cosecant and
tangent/cotangent are often called {\it reciprocal
functions}, for reasons that should be clear.
\item Notice that each of the four new functions
is undefined for some values of $\theta$:
tangent and secant are undefined whenever $\cos\theta=0$;
cotangent and tangent are undefined whenever $\sin\theta=0$.
\item Note also that the tangent gives the slope of the terminal
ray of the angle, so it does have a clear geometric
significance. (Notice again for what rays it is undefined,
namely the vertical ones.  See why?)
\item Though the tangent has clear geometric meaning,
it and the other new functions are often more useful for the
algebraic structures of their relationships to each
other.  Two such relationships arise from the
original trigonometric identity (\ref{BasicTrigIdentity}) which was
$\cos^2\theta+\sin^2\theta=1$.  If we in turn divide
both sides of this equation by $\cos^2\theta$ and
$\sin^2\theta$, respectively, we get
\begin{align}
 1+\tan^2\theta&=\sec^2\theta,\label{Tan^2/Sec^2}\\
 \cot^2\theta+1&=\cot^2\theta.\label{Cot^2/Csc^2}\end{align}
Along with (\ref{BasicTrigIdentity}), these will be
of enormous help in our integration and other techniques,
so it is important that they become natural to call upon
when possibly useful.  For instance,
for reasons we will see later, the integrals below are much
more easily handled when rewritten as shown:
\begin{align*}
&\int\sin^3\theta\cos^2\theta\,d\theta
=\int\sin^2\theta\cos^2\theta\sin\theta\,d\theta
=\int(1-\cos^2\theta)\cos^2\theta\sin\theta\,d\theta,\\
&\int\csc^4\theta\,d\theta
  =\int\csc^2\theta\csc^2\theta\,d\theta
  =\int(\cot^2\theta+1)\csc^2\theta\,d\theta,\\
&\int\tan^2\theta\,d\theta=\int(\sec^2\theta-1)\,d\theta.
\end{align*}
In the third line we used a permutation of (\ref{Tan^2/Sec^2}).
In fact we will often use the following identities
which are equivalent to (\ref{Tan^2/Sec^2}) and
(\ref{Cot^2/Csc^2}), respectively:
\begin{align}
\sec^2\theta-1&=\tan^2\theta,\\
\csc^2\theta-1&=\cot^2\theta.\end{align}
\item It is worth memorizing (\ref{BasicTrigIdentity}),
(\ref{Tan^2/Sec^2}) and (\ref{Cot^2/Csc^2}), and
deriving the other forms when needed.  It is also
worth remembering how one gets (\ref{Tan^2/Sec^2}) and (\ref{Cot^2/Csc^2})
from the basic trigonometric identity (\ref{BasicTrigIdentity}),
$\cos^2\theta+\sin^2\theta=1$ to reinforce memory
and understanding of these others.
\end{enumerate}

Now suppose we know one trigonometric function of the
angle $\theta$,  and some more information, for example
the quadrant in which $\theta$ terminates.
Then we can derive all of the other trigonometric
functions of $\theta$.  We will discuss two methods,
one graphical and the other algebraic.  Surprisingly,
the graphical method is usually more efficient and
less error-prone.

\bex Given that $\sec\theta=5$ and $\sin\theta<0$.  Find
all six trigonometric functions of $\theta$.

  \underline{Solution 1}:
Of course we already know one of the six trigonometric functions,
since we are given $\sec\theta=5$.  We also know
$\cos\theta=1/\sec\theta=1/5$.

At this point we know that $\cos\theta=1/5>0$, which means
the $x$-value where the ray intersects a circle
$x^2+y^2=r^2$ will be positive, which puts us in the
first or fourth quadrants.  We are also given that
$\sin\theta<0$, so the $y$-value where the ray meets
the circle is negative, by itself putting us in
the third or fourth quadrants.  With the signs of
$x$ and $y$ both, we must be in the fourth quadrant
(where $x>0$ and $y<0$).  At this point we draw a simple
representative ``triangle'' based upon this information, with convenient
dimensions. Now $\sec\theta=r/x=5$, so for convenience
we will take $r=5$, $x=1$ (recall that we always
take $r>0$, since it is a {\it distance}, while
$x$ and $y$ are {\it displacements} and can be nonpositive). See
Figure~\ref{FigureForFirstFindAllTrigFunctionsExample}
\begin{figure}
\begin{center}
\begin{pspicture}(-1,-3)(2,1)
\psset{xunit=1cm,yunit=.5cm}
\psaxes[labels=none,ticks=none]{<->}(0,0)(-2,-6)(4,2)
\psline[linestyle=dashed](0,0)(1,-4.8989795)
\psline[linewidth=1.5pt]{->}(0,0)(1,0)
\psline[linewidth=1.5pt]{->}(1,0)(1,-4.8989795)
  \psarc{->}(0,0){.3}{0}{293.57818}
  \rput(-.4,.6){$\theta$}
  \rput[Bl](.5,.2){1}
  \rput[Bl](1.3,-2.4){$y=-2\sqrt6$}
  \rput(.3,-2.4){5}

\end{pspicture}\end{center}
\caption{Figure for Example~\ref{FirstFindAllTrigFunctionsExample}.
The angle was found to terminate in the fourth quadrant,
so $x>0$ and $y<0$.  Given that $\sec\theta=5$, a simple
representative ``triangle'' is drawn above using $x=1$ and
$r=5$.
The $y$ value was found using the Pythagorean Theorem
(or the equation of the circle $x^2+y^2=5^2$) and the
fact that $y<0$.
There are infinitely
more possibilities for $\theta$ (we drew $\theta\in[0,360^\circ]$),
albeit all with the same terminal ray. The diagram is not to scale.}
\label{FigureForFirstFindAllTrigFunctionsExample}
\end{figure}

In this particular triangle, we can use the Pythagorean
Theorem, noting we require that $y<0$.\footnotemark
%%%%%%%%%% FOOTNOTE
\footnotetext{Really, we are using the
equation of the circle.  However that came
from the distance formula, which  came from the Pythagorean
Theorem, which we found could still apply
to displacements as well as lengths:
$r^2=|x|^2+|y|^2=x^2+y^2$.
We will go ahead and refer to this calculation here
as the Pythagorean Theorem, even though we
are generalizing that theorem to include
cases where $x$ or $y$ can be nonpositive.}
%%%%%%% END FOOTNOTE
Thus $y=\pm\sqrt{r^2-x^2}=\pm\sqrt{5^2-1^2}=\pm\sqrt{24}=\pm2\sqrt6$.
Since we are in the fourth quadrant (alternatively,
we know $\sin\theta<0$), we know that $y<0$,
so
$$y=-2\sqrt6.$$
Now we can label the displacement represented by the missing
leg of the triangle in
Figure~\ref{FigureForFirstFindAllTrigFunctionsExample},
and read off all the trigonometric functions from
that diagram:
\begin{alignat*}{2}
\cos\theta&=1/5,\qquad\qquad\qquad&\sin\theta&=\frac{-2\sqrt6}5,\\
\tan\theta&=\frac{-2\sqrt6}{1},&\cot\theta&=\frac1{-2\sqrt6},\\
\sec\theta&=5,&\csc\theta&=\frac{5}{-2\sqrt6}.\end{alignat*}
Of course there are various ways of simplifying or rewriting these.

\underline{Solution 2}: This can also be done with a
purely algebraic process.  Since $\sec\theta=5$, we know
$\cos\theta=1/5$.  Then
$\sin\theta=\pm\sqrt{1-\cos^2\theta}=\pm\sqrt{1-1/25}=\pm\sqrt{24/25}$.
Since we are given that $\sin\theta<0$, we have
$$\sin\theta=-\sqrt{\frac{24}{25}}=-\frac{2\sqrt6}5,$$
as before.  With $\cos\theta$ and $\sin\theta$, we get all the rest.

In fact, we can get $\tan\theta$ using
$\tan\theta=\pm\sqrt{\sec^2\theta-1}=\pm\sqrt{5^2-1}=\pm\sqrt{24}$,
but then we have to notice that $\tan\theta<0$ from our
initial information, to get $\tan\theta=-\sqrt{24}=-2\sqrt6$.
Similarly, with sine we get cosecant, which then gives us
($\pm$) cotangent through the identities.
\label{FirstFindAllTrigFunctionsExample}
\eex

As a general rule we will prefer the diagramming of a representative
triangle, for its efficiency and visual usefulness.
Trigonometric analysis always requires great care to be sure,
for example, that
we are in the correct quadrant for a particular angle,
and such diagrams offer much help in keeping track of such
details.

\bex Suppose that $\tan\theta=3/4$ and $\cos\theta<0$.  Find
all six trigonometric functions.

\underline{Solution}: We will again draw the triangles.
Note that $\tan\theta>0$ requires that $x,y>0$ or $x,y<0$
(alternatively, $\cos\theta,\sin\theta>0$ or $\cos\theta,\sin\theta<0$)
so we must be in the first or third quadrants. Since
we are assuming $\cos\theta<0$, so $x<0$ which alone
puts us in the second or third quadrant, with the
sign of tangent being positive we must be in the third
quadrant.  We will draw a simple triangle with the
hypotenuse along the terminal ray of $\theta$
in the third quadrant, and with the tangent of the
angle being $3/4$.  Since $\tan\theta=y/x=3/4$ and
$x,y<0$, we will take $x=-4$ and $y=-3$.
After we calculate the hypotenuse,
$$r=\sqrt{x^2+y^2}=\sqrt{(-4)^2+(-3)^2}=\sqrt{16+9}=\sqrt{25}=5,$$
we can fill out the triangle and read off the trigonometric
functions of $\theta$.  See Figure~\ref{SecondTriangleDiagram}.
\begin{figure}
\begin{center}
\begin{pspicture}(-2.5,-2)(3,1)
\psset{xunit=.5cm,yunit=.5cm}
\psaxes[labels=none,ticks=none]{<->}(0,0)(-5,-4)(3,2)
\psline[linewidth=1.5pt]{->}(0,0)(-4,0)
  \rput(-2,.5){$-4$}
  \rput(-4.8,-1.5){$-3$}
  \rput{37}(-2.4,-1.2){$r=5$}
\psline[linewidth=1.5pt]{->}(-4,0)(-4,-3)
\psline[linestyle=dashed](0,0)(-4,-3)
  \rput[Bl](1.8,-2.5){$r=\sqrt{x^2+y^2}=5$}
\psarc{->}(0,0){.3}{0}{216.87}
  \rput(.7,.8){$\theta$}
\end{pspicture}
\end{center}
\caption{Given $\tan\theta=3/4$ and $\cos\theta<0$ we must have
$\theta$ terminating in the third quadrant.  Above is a simple
triangle with prescribed properties, for which we use
the Pythagorean Theorem to fill out
$r=\sqrt{x^2+y^2}=\sqrt{(-4)^2+(-3)^2}=5$,
from which we can then read off all six trigonometric functions
of $\theta$.  As before, we graph one possible $\theta$, but any
$\theta$ terminating in the same ray gives the same trigonometric
functions of $\theta$.}
\label{SecondTriangleDiagram}
\end{figure}
\eex

\bex Find $\cot\theta$ if $\sin\theta=5/13$.

\underline{Solution}: Since $\sin\theta$ is positive, $\theta$
terminates in a quadrant in which $y$ is positive, i.e.,
the first or second quadrant.  Thus there are two
triangles we can draw with $y=5$ and $r=13$, for instance.
Solving for $x$ we would get
$$x=\pm\sqrt{r^2-y^2}=\pm\sqrt{13^2-5^2}=\pm\sqrt{169-25}
  =\pm\sqrt{144}=\pm12.$$
The two possibilities are shown in
Figure~\ref{FigureForTwoPossibilitiesIfSine>0}.
\begin{figure}
\begin{center}
\begin{pspicture}(-5,-1)(5,2.4)
\psset{xunit=.3cm,yunit=.3cm}
\psaxes[labels=none,ticks=none]{<->}(0,0)(-16,-3)(16,8)
\psline[linewidth=1.5pt]{->}(0,0)(-12,0)
\psline[linewidth=1.5pt]{->}(-12,0)(-12,5)
\psline[linestyle=dashed](0,0)(-12,5)
  \rput(-6,-1){$x=-12$}
  \rput(-13,2.5){$5$}
  \rput{-22.61986}(-5.8,3.3){$13$}
\psline[linewidth=1.5pt]{->}(0,0)(12,0)
\psline[linewidth=1.5pt]{->}(12,0)(12,5)
\psline[linestyle=dashed](0,0)(12,5)
  \rput(6,-1){$x=12$}
  \rput(13,2.5){$5$}
  \rput{22.61986}(5.8,3.3){$13$}
\psarc{->}{1.3}{0}{22.61986}
\psarc{->}{.8}{0}{157.3801}
\end{pspicture}
\end{center}
\caption{Illustration for
Example~\ref{ExampleOfTwoPossibilitiesIfSine>0}.
Given $\sin\theta=5/13$, there are two possible terminal
rays.  Drawing the obvious triangles, we must still be
aware that $x$ can be positive or negative:
$x=\pm\sqrt{r^2-y^2}=\pm12$ for this case.
As in previous cases, only two possible angles
are actually drawn, though the terminal rays are
determined by the assumption $\sin\theta=5/13$.}
\label{FigureForTwoPossibilitiesIfSine>0}
\end{figure}
In the case $x<0$ (i.e., $\cos\theta<0$) we would get
\begin{alignat*}{3}
\cos\theta&=-12/13,\qquad& \sin\theta&=5/13, \qquad&\tan\theta&=-5/12,\\
  \cot\theta&=-12/5,& \sec\theta&=-13/12,& \csc\theta&=13/5.
\end{alignat*}
In the case $x>0$ (i.e., $\cos\theta>0$) we instead get
\begin{alignat*}{3}
\cos\theta&=12/13,\hphantom{-}\qquad
& \sin\theta&=5/13, \qquad&\tan\theta&=5/12,\hphantom{-}\\
  \cot\theta&=12/5,& \sec\theta&=13/12,\hphantom{-}& \csc\theta&=13/5.
\end{alignat*}
\label{ExampleOfTwoPossibilitiesIfSine>0}\eex

So many mistakes in trigonometry occur because
the various cases are not all taken into account.
In particular, since in ``right triangle trigonometry''
the angles are all acute, it is easy to get into the
habit of thinking only in terms of angles in the first
quadrant.  Many applications require analysis of these
other possibilities.

\subsection{Right Triangle Trigonometry\label{RightTriangleTrigSubsection}}
A very common, and very specialized, use of the trigonometric
functions has to do with {\it solving right triangles},
meaning finding all the angles and sides of a right
triangle knowing minimal information.
Since all right triangles have one right angle and two acute
angles, in standard position these acute angles would
terminate in the first quadrant, so we do not have
any negative trigonometric functions there.

If we focus attention to one of the acute angles,
say $\theta$, then we can label the three
sides of the triangle relative to $\theta$.  We
will call the sides the {\it adjacent side} (ADJ),
{\it opposite side} (OPP) and the hypotenuse (HYP).
These are listed in Figure~\ref{FigForRtTriangleTrig}.
\begin{figure}
\begin{center}
\begin{pspicture}(0,-1)(7.6,2.5)
\psline(0,0)(4,0)(4,2)(0,0)
\psline(3.7,0)(3.7,.3)(4,.3)
\psarc{->}{.9}{0}{26.5651}
\rput(1.1,.2){$\theta$}
\rput{26.5651}(2,1.3){HYP}
\rput(2,-.3){ADJ}
\rput{-90}(4.3,1){OPP}
\rput[Bl](5.5,2){$\ds{\cos\theta=\frac{\text{ADJ}}{\text{HYP}}}$}
\rput[Bl](5.5,1){$\ds{\sin\theta=\frac{\text{OPP}}{\text{HYP}}}$}
\rput[Bl](5.5,0){$\ds{\tan\theta=\frac{\text{OPP}}{\text{ADJ}}}$}
\end{pspicture}
\end{center}
\caption{Figure for defining trigonometric functions
of $\theta$ where $\theta$ is one of the acute
angles of a right triangle.}
\label{FigForRtTriangleTrig}
\end{figure}
In this context, we will then define the three most important
trigonometric functions:
\begin{align}
\cos\theta&={\text{ADJ}}/{\text{HYP}},\label{ADJ/HYP}\\
\sin\theta&={\text{OPP}}/{\text{HYP}},\label{OPP/HYP}\\
\tan\theta&={\text{OPP}}/{\text{ADJ}}.\label{OPP/ADJ}\end{align}
The other three are defined as before, in terms of sine and cosine.
If we have one side and an acute angle $\theta$, we
can fill out the rest of the triangle using the
trigonometric functions and a small amount of algebra.
We will refrain from using ADJ, OPT, and HYP
for actual applications, but employ
them only  as mnemonic devices, to help remember
the three trigonometric functions.\footnote{There is nothing
theoretically wrong
with using ADJ, OPT and HYP as quantities, and indeed these are
quite descriptive which is useful in, say, a computer program.
However they are a bit out of place in a technical report,
and may seem a bit  sophomoric to the learned observer in that
kind of setting.}  Thus the names of the variables we use
will vary, but it is useful to keep their roles
(as in Figure~\ref{FigForRtTriangleTrig} and Equations (\ref{ADJ/HYP}),
(\ref{OPP/HYP}), and (\ref{OPP/ADJ})) in mind as
we perform the right triangle analyses.

\bex
Suppose a right triangle has one acute angle measuring
$39^\circ$, and the side opposite that angle
having length 11.3~ft.  Solve the triangle.

\underline{Solution}:   We will call the angle we are
given $\alpha$, and the other angle
$\beta=90^\circ-\alpha=51^\circ$.  The given side
we will call $y$, the other side $x$ and the hypotenuse $r$.
Now $y/r=\sin\alpha$, so
$$r=\frac{y}{\sin\alpha}=\frac{11.3\text{ ft}}{\sin39^\circ}
   \approx17.955878\text{ ft}\approx17.96\text{ ft}.$$
Next, we have $y/x=\tan\alpha$, so
$$x=\frac{y}{\tan\alpha}=\frac{11.3\text{ ft}}{\tan39^\circ}
   \approx13.954338\text{ ft}\approx13.95\text{ ft}.$$
\begin{figure}
\begin{center}
\begin{pspicture}(0,-1)(8,2)
\psline(0,0)(4,0)(4,2)(0,0)
\psline(3.7,0)(3.7,.3)(4,.3)
\psarc{->}(0,0){.8}{0}{26.565}
  \rput[Bl](1,.2){$\alpha=39^\circ$}
\psarc{->}(4,2){.5}{206.565}{270}
  \rput(3.65,1.3){$\beta$}
  \rput(2,-.3){$x$}
  \rput[Bl]{270}(4.2,1.8){$y=11.3\text{ ft}$}
  \rput{26.565}(2,1.3){$r$}
  \rput[Bl](6,1.5){$r=y/\sin\alpha$}
  \rput[Bl](6,1){$x=y/\tan\alpha$}
  \rput[Bl](6,.5){$\beta=90^\circ-\alpha$}
\end{pspicture}
\end{center}
\caption{Figure for Example~\ref{FirstRTTExample}. We were
given $\alpha$ and $y$.  As always the other variables are written
in terms of the given variables and then computed.
The triangle is not drawn to scale.}
\label{FigureForFirstRTTExample}
\end{figure}

There are alternative paths.  The solution presented here
is the most efficient and accurate for the given data,
but we would not have lost any accuracy by using
$\beta=51^\circ$ for instance, because that is not
an approximation (assuming perfect accuracy in $\alpha$
for the moment). Thus we could write $y/r=\cos\beta$
for instance.  We do need to be careful to use all
possible digits for $r$ if we want to use
the computed value for $r$ to compute, say
$x=r\cos\alpha$ or $x=r\sin\beta$, and round off later.
\label{FirstRTTExample}\eex

It is worth noticing at this point that if
$\alpha$ and $\beta$ are the two acute angles
of a right triangle, then
\begin{alignat}{2}
\cos\alpha&=\sin\beta,\qquad& \sin\alpha&=\cos\beta\\
\cot\alpha&=\tan\beta,&\tan\alpha&=\cot\beta\\
\csc\alpha&=\sec\beta,&\sec\alpha&=\csc\beta.
\end{alignat}
This partially explains why we have the pairings of
{\it cofunctions} sine and cosine, tangent and cotangent,
and secant and cosecant.

Some nice applications have to do with {\it angle of
elevation or depression}. This is the angle, within
$[0,90^\circ]$, made by the horizontal and
the line of sight from one observer or observation point
to another.  The
lower observer has to look upwards at some angle
to see the upper observer, while the upper observer
has to look downward to see the lower one.  By the
$Z$ criterion the two angles, measured from
the horizontal, are the same.

\bex Suppose an observer at the street level of a building
measures the distance to the building to be $134\text{ ft}$,
and the angle of elevation to the top of the building
to be $68^\circ$.  Find the height of the building.

\underline{Solution}: The situation is diagrammed in
Figure~\ref{FigForBuildingHeight}.
\begin{figure}
\begin{center}
\begin{pspicture}(-1.5,-1)(3,3.75)
\psset{xunit=.75cm,yunit=.75cm}
\psline[linestyle=dashed](-2,5)(4,5)
\psline[linestyle=dashed](-2,0)(4,0)
\psline(0,0)(2,0)(2,5)(0,0)
\psarc{->}(0,0){.3}{0}{68.198591}
  \rput[Bl](.5,.15){$68^\circ$}
  \rput(1,-.3){134 ft}
  \rput(2.2,2.5){$h$}
\psarc{->}(2,5){.3}{180}{248.198591}
  \rput[Bl](.8,4.5){$68^\circ$}
\end{pspicture}
\end{center}
\caption{The angle of elevation from an observer
at street level to the top of the building, and the
angle of depression from an observer at the top of
the building to the street-level observer are the
same by the $Z$ criterion.  If we know the angle,
and one length, we know the whole triangle.}
\label{FigForBuildingHeight}\end{figure}
We will label the desired height $h$, and notice
immediately that $h/134\text{ ft}=\tan68^\circ$, and so
$$h=(134\text{ ft})\tan68^\circ\approx 331.66164\text{ ft}\approx332\text{ ft}.$$
\label{BuildingHeight}\eex

There are a couple of rather special right triangles
which appear often enough that they deserve some special
attention.  These are the
$30^\circ-60^\circ-90^\circ$ and the $45^\circ-45^\circ-90^\circ$
triangles (often colloquially pronounce without the degrees).
The latter triangle is {\it isosceles}, meaning that
two of the angles are the same measures, and therefore the two
sides opposite those angles are the length.
We will leave the proofs of all these for later, but for now the
ratios of side lengths are worth memorizing.
Examples showing these ratios are given in
Figure~\ref{306090Figure}.
\begin{figure}
\begin{center}
\begin{pspicture}(0,0)(8.5,4)
\psset{xunit=2cm,yunit=2cm}
\psline(0,0)(1.7320508,0)(1.7320508,1)(0,0)
  \psline(1.5320508,0)(1.5320508,.2)(1.7320508,.2)
  \psarc{->}(0,0){.7}{0}{30}
    \rput[Bl](.4,.05){$30^\circ$}
  \psarc{->}(1.7320508,1){.5}{210}{270}
    \rput[Bl](1.4,.6){$60^\circ$}
  \rput(.85,-.15){$\sqrt3$}
  \rput(1.85,.5){1}
  \rput{30}(.85,.62){2}
\psline(3,0)(4,0)(4,1)(3,0)
  \psline(3.8,0)(3.8,.2)(4,.2)
  \psarc{->}(3,0){.5}{0}{45}
  \psarc{->}(4,1){.5}{225}{270}
  \rput(3.42,.1){$45^\circ$}
  \rput(3.85,.62){$45^\circ$}
  \rput(3.5,-.15){1}
  \rput(4.12,.5){1}
  \rput{45}(3.4,.65){$\sqrt2$}
\end{pspicture}
\end{center}
\caption{Prototypes of $30^\circ-60^\circ-90^\circ$ and
$45^\circ-45^\circ-90^\circ$ right triangles showing the
ratios of the sides.  It is a very simple observation
that the Pythagorean Theorem is satisfied in both.}
\label{306090Figure}
\end{figure}
In particular we get
\begin{alignat}{3}
\sin30^\circ&=\frac12,\qquad\qquad&\cos30^\circ&=\frac{\sqrt3}2,
  \qquad\qquad
 &\tan30^\circ&=\frac1{\sqrt3},\\
\cos60^\circ&=\frac{\sqrt3}2,&\sin60^\circ&=\frac12,&\tan60^\circ&=\sqrt3,\\
\sin45^\circ&=\frac1{\sqrt2},&\cos45^\circ&=\frac1{\sqrt2},&\tan45^\circ&=1.
\end{alignat}
The other trigonometric functions follow similarly.
Some texts prefer to write $\sin45^\circ=\frac{\sqrt2}2=\cos45^\circ$, which
is the same number as $1/\sqrt2$, as we can see immediately if
we multiply our expression by $\sqrt{2}/{\sqrt{2}}$.

One observation which can help in keeping the sines and
cosines of $30^\circ$ and $60^\circ$ straight  is that
$\sqrt3>1$, and so the $\sqrt3$ is from the side opposite the
larger acute angle.\footnote{We will prove later that
the sides opposite larger angles of a triangle are longer sides.
That is, if a triangle has angles $\alpha<\beta<\gamma$,
then the sides opposite have the same ordering to their
lengths, so the side opposite $\alpha$ is the shortest and
the side opposite $\gamma$ the longest.  We will prove
this with the {\it law of sines}.}
Thus the sine of $60^\circ$ is larger than of $30^\circ$,
while the cosines follow the opposite order.

\subsection{Unit Circle}
A very useful device in trigonometry is the {\it unit circle},
which is the circle $x^2+y^2=1$.  Since this circle has
radius 1, we get $\cos\theta=x/1=x$ and $\sin\theta=y/1=y$.
Hence the point where the terminal ray of an angle $\theta$
in standard position intersects the unit circle
is given by $(x,y)=(\cos\theta,\sin\theta)$.
This is illustrated in Figure~\ref{UnitCircleFigure}.
\begin{figure}
\begin{center}
\begin{pspicture}(-2.6,-2.7)(2.6,2.2)
\psaxes[labels=none]{<->}(0,0)(-2,-2)(2,2)
\pscircle(0,0){1}
\psline{->}(0,0)(-1.2,1.6)
\psarc{->}(0,0){.5}{0}{126.8698976}
  \rput(.5,.5){$\theta$}

\pscircle[fillstyle=solid,fillcolor=black](-.6,.8){.05}
  \rput[Bl](-2.6,.8){$(\cos\theta,\sin\theta)$}
  \rput(0,-2.5){$x^2+y^2=1$}
\end{pspicture}
\end{center}
\caption{The {\it unit circle}, $x^2+y^2=1^2$, showing the point
of intersection with the terminal ray of $\theta$ being
$(x,y)=(1\cos\theta,1\sin\theta)=(\cos\theta,\sin\theta)$.
From the illustration we immediately get the earlier
identity $\cos^2\theta+\sin^2\theta=1$.}
\label{UnitCircleFigure}
\end{figure}
From the figure we can see the identity (\ref{BasicTrigIdentity})
from before even more clearly, for $x^2+y^2=1$ becomes
$$\cos^2\theta+\sin^2\theta=1.$$
The unit circle is also useful for noticing many
trigonometric functions of common angles.  For instance,
if $\theta=90^\circ$, then the ray intersects the circle
at $(0,1)$, so $\cos90^\circ=0$ and $\sin90^\circ=1$.

The unit circle is also helpful for graphing the trigonometric
functions.  For the moment we will concentrate on
the sine and cosine functions.  This first time we
graph these, we will take the horizontal axis to be
the ``$\theta$-axis'' and the vertical axis to represent
$\sin\theta$ or $\cos\theta$.  As we move around the circle
through different angles $\theta$, we can plot how the
$x=\cos\theta$, and $y=\sin\theta$ values change.
These are plotted in Figures \ref{CosineCurve} and \ref{SineCurve}.

\begin{figure}
\begin{center}
\begin{pspicture}(-6,-2)(6,2.5)
\psset{xunit=0.015cm}
\psplot[plotpoints=600]{-400}{400}{x cos}
\psaxes[Dx=90,labels=none]{<->}(0,0)(-400,-2)(400,2)
  \rput(-360,-.35){$-360^\circ$}
  \rput(-270,-.35){$-270^\circ$}
  \rput(-180,-.35){$-180^\circ$}
  \rput(-90,-.35){$-90^\circ$}
  \rput(90,-.35){$90^\circ$}
  \rput(180,-.35){$180^\circ$}
  \rput(270,-.35){$270^\circ$}
  \rput(360,-.35){$360^\circ$}
  \rput[r](-20,1){$1$}
  \rput[r](-20,-1){$-1$}
  \rput(400,.2){$\theta$}
  \rput(0,2.3){$\cos\theta$}
\end{pspicture}
\end{center}
\caption{The graph of $\cos\theta$, for two periods,
$\theta\in[-360^\circ,360^\circ]$.  Compare
the heights at the various $\theta$ with the
$x$-values on the unit circle for the same values
$\theta$.}
\label{CosineCurve}
\end{figure}

\begin{figure}
\begin{center}
\begin{pspicture}(-6,-2)(6,2.5)
\psset{xunit=0.015cm}
\psplot[plotpoints=600]{-400}{400}{x sin}
\psaxes[Dx=90,labels=none]{<->}(0,0)(-400,-2)(400,2)
  \rput(-360,-.35){$-360^\circ$}
  \rput(-270,-.35){$-270^\circ$}
  \rput(-180,-.35){$-180^\circ$}
  \rput(-90,-.35){$-90^\circ$}
  \rput(90,-.35){$90^\circ$}
  \rput(180,-.35){$180^\circ$}
  \rput(270,-.35){$270^\circ$}
  \rput(360,-.35){$360^\circ$}
  \rput[r](-20,1){$1$}
  \rput[r](-20,-1){$-1$}
  \rput(400,.2){$\theta$}
  \rput(0,2.3){$\sin\theta$}
\end{pspicture}
\end{center}
\caption{The graph of $\sin\theta$, for two periods,
$\theta\in[-360^\circ,360^\circ]$.  Compare
the heights at the various $\theta$ with the
$y$-values on the unit circle for the same values
$\theta$.}
\label{SineCurve}
\end{figure}
Note that both functions have domains $\Re$ and ranges
$[-1,1]$.
Both functions are also  {\it periodic}, with period $360^\circ$,
meaning that $f(\theta+360^\circ)=f(\theta)$ for
$f(\theta)=\cos\theta$ and $f(\theta)=\sin\theta$, and
$360^\circ$ is the smallest such positive number after
which these functions repeat.

\bhw Find all six trigonometric functions of each angle
based upon the graph of the unit circle, as in
Figure~\ref{UnitCircleFigure}.
\begin{description}
\item[a.] $\theta=0^\circ$.
\item[b.] $\theta=90^\circ$.
\item[c.] $\theta=180^\circ$.
\item[d.] $\theta=270^\circ$.
\item[e.] $\theta=360^\circ$.
\end{description}
\ehw

\subsection{Radian Measure}
Dividing one complete rotation into 360 ``degrees'' is a rather
arbitrary and artificial approach, though it has become part
of our intuition.  A better approach theoretically is
{\it radian measure}.  In short, radian measure gives the
number of radius lengths we would travel around the circle
to complete the given angular displacement.  Traveling
once around the circle would means traveling one
circumference, or $2\pi$ radii.
Thus
\begin{equation}360^\circ=2\pi(\text{radians}).
\label{Degrees-Radians}\end{equation}
As before, this is measured to be positive when traveling
counterclockwise, and negative for clockwise.

Though we have all we need to convert from degrees
to radians and back with Equation (\ref{Degrees-Radians}),
we will now give a formal definition of an angle
in the spirit of radian measure:

\begin{definition}
If a point on the initial ray of an angle is a distance
$r$ from the vertex, and is swept through the plane at
an angular displacement of $\theta$ to the corresponding
point (also $r$ from the vertex) on the terminal ray,
then that point's path will be a circular arc to
which we associate an {\it arc displacement} $s\in\Re$
which will be the arc length ($s>0$) if the angle
represents a counterclockwise rotation, and the
additive inverse of the arc length if the
rotation is counterclockwise.  Furthermore,
the angle $\theta$ will have {\it radian measure}
\begin{equation}\theta=\frac{s}r.
\label{Theta=S/R}\end{equation}
\end{definition}

So $s$ is a kind of signed arc length, and $r$ is the
radius of the arc.  There are several comments to be
made here.
\begin{enumerate}
\item Radian measure is actually ``dimensionless, ''
i.e., unitless.  For instance,
if $s$ is in feet and $r$ is in feet, then $\theta=s/r$ is
in feet/feet, with  the units canceling.\footnote{%
%%%%%%%%%  FOOTNOTE
Even if $s$ and
$r$ are not in the same units, they will still be in units of
length and ultimately there is still cancellation.
For instance, if $s=5\text{ in}$ and $r=3\text{ ft}$, then
$\ds{\frac{s}r=\frac{5\text{ in}}{3\text{ ft}}=
\frac{5\text{ in}}{3\text{ ft}}\cdot\frac{1\text{ ft}}{12\text{ in}}
=\frac{5}{36}}$,
and again all the units cancel.}
%%%%%%%%  END FOOTNOTE
As explained before, $\theta=(s/r)\text{ radians}$, or
$\theta=(s/r)\text{ signed radius lengths}$, so radians
are a useful placeholder to keep track of where
our angles appear, but are dimensionless and therefore do
not actually need to be written.  As we progress through the
text we will write ``radians'' less, and only where
clarity can be improved by its inclusion.
\item Notice that if $s=2\pi r$, then $\theta=2\pi r/r=2\pi$,
so again once around the circle, counterclockwise, gives an
angle of $2\pi$.
\item We will see later that where calculus and trigonometry
intersect, radian measure simplifies things tremendously.
This is a consequence of the fact that radian measure does
not carry artificial units, such as degrees.\footnote{
%%%%%%%% FOOTNOTE
Of course degrees are more natural from a human practical
standpoint.  It is probably simpler to visualize $25^\circ$
than to visualize $\ds{25^\circ\cdot\frac{\pi\text{ (radians)}}{360^\circ}
\approx0.21816616\text{ (radians)}}$.}
%%%%%%%% END FOOTNOTE

\end{enumerate}
\begin{figure}
\begin{center}
\begin{pspicture}(-2,-2)(2,2)
\psaxes[labels=none,ticks=none]{<->}(0,0)(-2,-2)(2,2)
\psarc[linewidth=.05cm]{->}(0,0){1.2}{0}{215}
\pscircle[fillstyle=solid,fillcolor=black](1.2,0){.05}
\psline[linestyle=dashed]{->}(0,0)(-1.6383041,-1.1471529)
  \rput{45}(-1,1){$s$}
  \rput{35}(-.6,-.23){$r$}
\psline[linewidth=.05cm](0,0)(-.98298245,-.68829172)
\psline[linewidth=.05cm](0,0)(1.2,0)
\psarc{->}(0,0){.3}{0}{215}
\rput(-0.4,0.3){$\theta$}
\end{pspicture}
\end{center}
\caption{Diagram for the definition of radian measure, which is
defined by $\ds{\theta=\frac{s}r}$.}
\label{FigForRadianMeasure}\end{figure}

Since we will be working in radian measure exclusively
in the actual calculus computations, we need to become
familiar with many of the common angles from before in this
measure.  Perhaps it is easiest to begin by remembering that
once around the circle ($360^\circ$) is $2\pi$ (radians),
so half-way around ($180^\circ$) is $\pi$.  In fact that
is the conversion we will usually quote:
\begin{equation}
180^\circ=\pi\text{ (radians)}.\label{Degrees->Radians}\end{equation}
Next we notice that one quarter-turn ($90^\circ$) would
have to be $\pi/2$, and so on.  Also useful are
\begin{alignat*}{2}
45^\circ&=45^\circ\cdot\frac{\pi}{180^\circ}&&=\pi/4,\\
30^\circ&=30^\circ\cdot\frac{\pi}{180^\circ}&&=\pi/6,\\
60^\circ&=60^\circ\cdot\frac{\pi}{180^\circ}&&=\pi/3.
\end{alignat*}
An important exercise (left for homework) is to fill out
a radian measure version of Figure~\ref{AnglesInStandardPosition}.
At first one might need assistance from (\ref{Degrees->Radians}),
but reference angle arguments work also.  For instance,
the angle $\theta=120^\circ$ has a reference angle
$\theta_r=60^\circ=\pi/3$.  We can think of $\theta$ as being
$\pi/3$ from the horizontal angle $\pi$, and given its
position relative to that horizontal angle, we can
quickly see that $\theta=\pi-\pi/3=2\pi/3$. With little
practice that is arguably much simpler than converting
with  (\ref{Degrees->Radians}).
At least the standard angles can become quite natural to
refer to in radian measure, as fractions of $\pi$.

\subsection{Other Trigonometric Identities}

\begin{align}
\sin(\alpha+\beta)&=\sin\alpha\cos\beta+\cos\alpha\sin\beta
\label{Sin(Alpha+Beta)}\\
\cos(\alpha+\beta)&=\cos\alpha\cos\beta-\sin\alpha\sin\beta
\label{Cos(Alpha+Beta)}
\end{align}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newpage
\section{Modeling With Functions}

\section{Elementary Bounds of Functions}
It is sometimes interesting to determine how large or small a function
can be, given restrictions on the independent variable.  It is not
always practical to graph the function, particularly if the function
is either complicated or not given precisely to begin with. Here
we give some techniques for determining the range in which the
function values will fall.  With  practice, they become
rather intuitive.  We begin by gathering some simple  properties
of absolute values.
\bigskip

\noindent\underline{Properties of Absolute Values}:
\begin{description}
\item a. $|x|<y \iff -y<x<y.$
\item b. $|x|>y \iff (x>y)\vee(x<-y)$.
\item c. $|xy|=|x||y|$.
\item d. $\ds{\left|\frac{x}y\right|=\frac{|x|}{|y|}}$.
\item e. $|x|^2=x^2=(-x)^2=|x^2|$.
\item f. $|x|=\sqrt{x^2}$.
\end{description}

\begin{proposition} $\forall x,y\in\Re$, $|x+y|\le|x|+|y|$.
\end{proposition}

It is not difficult to see that we get equality if $x,y$ are
the same sign, and we get some cancellation otherwise, resulting
in the strict inequality.  Here we offer a proof by contradiction.
\bigskip

\begin{proof}
Suppose it is false, i.e., that there exist $x,y\in\Re$ with
\newline $|x+y|>|x|+|y|$.  We get

\noindent
\begin{tabular}{crcll}
&$|x+y|\hphantom{{}^2}$&$>$&$|x|+|y|$&'assumption\\
$\implies$&$|x+y|^2$&$>$&$(|x|+|y|)^2$&'earlier proposition\\
$\implies$&$|x+2|^2$&$>$&$|x|^2+2|x||y|+|y|^2$&'multiplying out\\
$\implies$&$(x+y)^2$&$>$&$x^2+2|x||y|+y^2$&'property of abs.\  val.\\
$\implies$&$x^2+2xy+y^2$&$>$&$x^2+2|xy|+y^2$&'multiplying out\\
$\implies$&$2xy$&$>$&$2|xy|$&'subtracting $x^2+y^2$\\
$\implies$&$xy$&$>$&$|xy|$&'divided by 2\\
$\contrad$
\end{tabular}

\noindent We showed that the existence of such $x,y$ leads to a
contradiction, so no such $x,y$ can exist, q.e.d.
\end{proof}

\begin{definition} We call $M$ an {\em absolute bound}
of $f(x)$ if $|f(x)|\le M$.
\end{definition}

The ``absolute" refers to the absolute values.  We can
\bigskip

\bex Suppose that $|x|\le3$.  Find an absolute
bound for $f(x)=2x^2-4x-17$.

\underline{Solution}: $|x|\le 3$ implies

\begin{eqnarray*}|f(x)|&=&\left|2x^2-4x-17\right|\\
&\le&|2x^2|+|-4x|+|-17|\\
&=&2|x|^2+4|x|+17\\
&\le&2(3)^2+4(3)+17=47.\end{eqnarray*}
Conclude $|x|\le3\implies|f(x)|\le47$.
\eex

Notice that 47 is {\em an} absolute bound, but not necessarily the
best one.  It is more informative than the fact that $|f(x)|\le10,000,000$,
but an examination of the graph of $f(x)$ shows that, for
$x\in[-3,3]$, we actually get $f(x)\in[-19,13]$, and so
$|f(x)|\le19$ is the {\em best absolute bound} for $f(x)$ where
$|x|\le3$.  See Figure~\ref{absbound1}.

With differential calculus we
will have  analytical techniques which do not require us to
resort to the graph to find the best bounds.
The technique above, though relatively crude, is still
useful in many settings, and is very effective when
the goal is to find reasonable absolute bound
without delving too deeply into the details of the function.

\begin{figure}
\begin{center}
\begin{pspicture}(-2.5,-5)(2.5,5)
\psset{xunit=1.5cm}
\psset{yunit=.25cm}
\psaxes[Dy=5]{<->}(0,0)(-4,-20)(4,20)
\psplot[linewidth=1.5pt,plotstyle=curve]%
{-3}{3}{x dup mul 2 mul x 4 mul sub 17 sub}
\end{pspicture}
\end{center}
\caption{Actual graph of $y=f(x)$ where $f(x)=2x^2-4x-17$,
$x\in[-3,3]$.}\label{absbound1}
\end{figure}

\vfill\eject