%% LyX 2.0.0 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[english]{beamer}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\usepackage{graphicx}

\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
 % this default might be overridden by plain title style
 \newcommand\makebeamertitle{\frame{\maketitle}}%
 \AtBeginDocument{
   \let\origtableofcontents=\tableofcontents
   \def\tableofcontents{\@ifnextchar[{\origtableofcontents}{\gobbletableofcontents}}
   \def\gobbletableofcontents#1{\origtableofcontents}
 }
 \long\def\lyxframe#1{\@lyxframe#1\@lyxframestop}%
 \def\@lyxframe{\@ifnextchar<{\@@lyxframe}{\@@lyxframe<*>}}%
 \def\@@lyxframe<#1>{\@ifnextchar[{\@@@lyxframe<#1>}{\@@@lyxframe<#1>[]}}
 \def\@@@lyxframe<#1>[{\@ifnextchar<{\@@@@@lyxframe<#1>[}{\@@@@lyxframe<#1>[<*>][}}
 \def\@@@@@lyxframe<#1>[#2]{\@ifnextchar[{\@@@@lyxframe<#1>[#2]}{\@@@@lyxframe<#1>[#2][]}}
 \long\def\@@@@lyxframe<#1>[#2][#3]#4\@lyxframestop#5\lyxframeend{%
   \frame<#1>[#2][#3]{\frametitle{#4}#5}}
 \def\lyxframeend{} % In case there is a superfluous frame end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.

\usepackage{appearance}\newcommand{\reals}{\mathbb R}

\makeatother

\usepackage{babel}
\begin{document}
%MODULE 1: Applications of IVT


%USER DEFINED COMMANDS
\global\long\def\ds{{\displaystyle }}
 \global\long\def\nsp{\hspace{1em}*{9pt}}
 \global\long\def\lns{\rule{0pt}{11pt} }
 \global\long\def\xp{\mbox{\Large\sl e} }


%INPUT THE INSTRUCTIONS PAGE 


%BUILD  TITLE PAGE 



\title{Applications of the Intermediate Value Theorem}


\subtitle{The {\hilite Intermediate Value Theorem} allows us to conclude
that a continuous function takes certain values on an interval. This
opens the door to a number of applications. We will explore some of
these applications in this module. }

\makebeamertitle

\lyxframeend{}\lyxframe{{Sample problems}}

\label{page:modf-problem} \begin{question} 
\begin{itemize}
\item Approximate a solution (if any) to $\ec\cos(x)=x$ to the thousandths
place. 
\item Approximate the value of $\ec\sqrt[5]{2}$ to the ten-thousandths
place. 
\end{itemize}
\end{question} %1



\lyxframeend{}\lyxframe{{SAGE worksheets}}

For this module you will need only a blank SAGE worksheet.


\lyxframeend{}\lyxframe{The Intermediate Value Theorem}

First let's recall the {\hilite Intermediate Value Theorem} (IVT).
\begin{theorem}%{}
[(Intermediate Value Theorem)]If
\begin{itemize}
\item the function $\ec f$ is continuous on the interval $\ec[a,b]$, and 
\item $\ec f(a)\neq f(b)$, 
\end{itemize}

then 
\begin{itemize}
\item for any $y$ value $\ec C$ between $\ec f(a)$ and $\ec f(b)$, 
\item there exists a value $\ec c$ such that 

\begin{itemize}
\item $\ec a<c<b$, and 
\item $\ec f(c)=C$. 
\end{itemize}
\end{itemize}
\end{theorem}%{}

\lyxframeend{}\lyxframe{{First example}}

How can we apply {\hilite IVT} to the first sample problem? \begin{question}
Approximate a solution (if any) to $\ec\cos(x)=x$ to the thousandths
place. \end{question}

\noindent %2



\pause{}

\noindent The {\hilite IVT} helps us determine that some $x$ value
has a $y$ value. This point of view is slightly different from the
one posed by the problem.


\pause{}

Thus we have to rephrase the problem to fit into the context of the
{\hilite IVT}. \emph{How?}


\pause{}

Try this: \begin{question}Approximate a solution to $\ec\cos(x)-x=0$,
if any such solution exists.\end{question}


\pause{}

\noindent Now the question is asking us not to find where two functions
are equal, but to find a value of a function $\ec f(x)=\cos(x)-x$.
This fits more easily into the {\hilite IVT} point of view.


\lyxframeend{}\lyxframe{{First example}}

To apply {\hilite IVT}, we have to make sure that all the hypotheses
are met. The first hypothesis is that the function $\ec f(x)=\cos(x)-x$
is continuous. You have learned in class that 
\begin{itemize}
\item $\ec y=\cos(x)$ is a continuous function everywhere; 
\item $\ec y=x$ is a continuous function everywhere; and 
\item sums and differences of continuous functions are continuous on the
intervals where both functions are continuous. 
\end{itemize}
\noindent Thus $\ec\cos(x)-x$ is continuous everywhere. 

\begin{center}
\emph{You must check for continuity anytime you wish use {\hilite
IVT}.}
\par\end{center}


\lyxframeend{}\lyxframe{{First example}}

Now that we've verified the continuity of the function, we can try
to see if there is any value of $\ec x$ such that $\ec\cos(x)-x=0$.

\noindent How does {\hilite IVT} help? If we can find 
\begin{itemize}
\item one value of $\ec x$ such that $\ec\cos(x)-x$ is negative, and 
\item one value of $\ec x$ such that $\ec\cos(x)-x$ is positive, then 
\end{itemize}
{\hilite IVT} assures us that some $x$ value \emph{between} those
two values has a $y$ value of zero. How?


\lyxframeend{}\lyxframe{{First example}}

An easy way to do this is to use a graph. Using SAGE, plot a graph
of $\ec f(x)=\cos(x)-x$.


\pause{}

We obtained the following graph by plotting on the interval $[-\pi,\pi]$:
\begin{figure}[h!]
 

\centering{}\includegraphics[scale=0.3]{figures/cos_x_minus_x_on_pis} 
\end{figure}


This reveals the following: 
\begin{itemize}
\item $\ec f(0)$ is positive; 
\item $\ec f(1)$ is negative. 
\end{itemize}
(You can approximate their values as $1$ and $-0.4597$.)


\pause{}

By the {\hilite IVT}, we know that for \emph{some} value $\ec c$
between $\ec a=0$ and $\ec b=1$, $\ec f(c)=0$.


\lyxframeend{}\lyxframe{First example}

\noindent Why did we need {\hilite IVT} to draw this conclusion?
\emph{Continuity.} If we did not know that the function is continuous,
we would have to worry about holes. Graphing calculators and computers
rarely, if ever, display holes in the graphs of their functions.


\lyxframeend{}\lyxframe{{First example}}

Now we know that there is \emph{some} value $\ec c$ for which $\ec\cos c-c=0$,
and thus $\ec\cos c=c$. However, the problem asked for something
more: a value of $\ec c$, \emph{accurate to the thousandths place.}
How can we use {\hilite IVT} to get this kind of accuracy? Redraw
the graph with smaller values of $\ec a$ and $\ec b$!


\lyxframeend{}\lyxframe{\noindent {First example}}
\begin{overlayarea}
{\textwidth}{6in}
\begin{onlyenv}%{}
<1>

\noindent Look at the previous graph again. 
\begin{figure}[h!]
 

\centering{}\includegraphics[scale=0.3]{figures/cos_x_minus_x_on_pis} 
\end{figure}



\noindent It looks as if the root lies between $0.6$ and $0.8$.
Let's plot $\ec f$ on that smaller interval and see if we get anything
different.

\end{onlyenv}%{}

\pause{}
\begin{onlyenv}%{}
<2>

\noindent {It looks as if the root lies between $0.6$ and $0.8$.
Let's plot $f$ on that smaller interval and see if we get anything
different.} We have 
\begin{figure}[h!]
 

\centering{}\includegraphics[scale=0.3]{figures/cos_x_minus_x_on_6_8} 
\end{figure}



\noindent We're getting closer! Now try it on the interval $\ec[0.71,0.75]$.

\end{onlyenv}%{}

\pause{}
\begin{onlyenv}%{}
<3>

\noindent {Now try it on the interval $[0.71,0.75]$.} We have 
\begin{figure}[h!]
 

\centering{}\includegraphics[scale=0.3]{figures/cos_x_minus_x_on_71_75} 
\end{figure}



\noindent We can see now that the curve intersects the axis between
$0.735$ and $0.74$.

\end{onlyenv}%{}
\end{overlayarea}

\lyxframeend{}\lyxframe{{First example}}

Repeat this process of narrowing the graph until you have an estimate
that is accurate to the thousandths place.


\pause{}

How will you know when you're done? When the curve intersects the
graph between two values of $x$ that have the same digits up to the
thousandths place. The author, for example, obtained this graph:

\vspace{-2ex}
\begin{figure}[h!]
\centering{}\includegraphics[scale=0.3]{figures/cos_x_minus_x_on_739_740} 
\end{figure}


\vspace{-4ex}
\ldots{}using the commands

{\ttcolor\texttt{f = cos(x)-x }

\texttt{fplot = plot(f,0.739,0.740)}

\texttt{fplot.show()}}

and concluded that the root is approximately $0.739$.


\lyxframeend{}\lyxframe{\noindent {The method of bisection}}

\noindent We can formalize the method shown in the previous example
as follows. \begin{method} 
\begin{itemize}
\item Let $\ec(a,b)$ be an interval and $\ec f$ a function such that $\ec f(a)$
and $\ec f(b)$ have opposite signs (one is positive, the other negative). 
\item If rounding $\ec a$ and $\ec b$ to the desired precision gives the
same number, you are done: the answer is $\ec a$. 
\item Let $\ec c=\frac{a+b}{2}$ be the midpoint of $\ec[a,b]$. 
\item If $\ec f(c)$ has the same sign as $\ec f(b)$, repeat these steps
with the interval $\ec(a,c)$. 
\item If $\ec f(c)$ has the same sign as $\ec f(a)$, repeat these steps
with the interval $\ec(c,b)$. 
\end{itemize}
\noindent \end{method} This method will find the approximate value
of any root, although it can be very slow.


\lyxframeend{}\lyxframe{{Second example}}

A similar procedure will help us approximate the fifth root of two.
This problem is a little different, inasmuch as we don't have a function
yet! To find the function, let's reason from what we want.


\lyxframeend{}\lyxframe{\noindent {Second example}}

\noindent \begin{question} Approximate the value of $\ec\sqrt[5]{2}$
to the ten-thousandths place. \end{question}


\pause{}

\noindent Another way of saying this is that we want a value of $\ec x$
such that $\ec x^{5}=2$. (Raise both sides to the fifth power.)


\pause{}

In the same manner, we want a value of $x$ such that $\ec x^{5}-2=0$.


\pause{}

This suggests the function $\ec f(x)=x^{5}-2$. Again, we have to
check that this function is continuous, and it is.


\pause{}

Use the method of bisection to approximate the solution to the equation
$\ec x^{5}-2=0$, accurate to the ten-thousandths digit. You know
that $\ec\sqrt[5]{2}$ is larger than 1 and smaller than 2, so start
with $\ec a=1$ and $\ec b=2$.


\lyxframeend{}\lyxframe{Second example}

\noindent After fourteen steps, the author estimated $\ec\sqrt[5]{2}\approx1.1487$,
with the following graph. 
\begin{figure}[h!]
 

\centering{}\includegraphics[scale=0.2]{figures/fifth_root_of_2} 
\end{figure}



\lyxframeend{}\lyxframe{{The importance of continuity}}

We cannot overemphasize the importance of continuity to the {\hilite
IVT}.

\noindent Suppose, for example, that you wanted to find a root of
the function
\[
{\ec f(x)=\frac{1}{x+1}-\frac{\lfloor{x}\rfloor}{100}-1}.
\]



\pause{}

If you merely looked at the graph, you might see this:

\begin{center}
\begin{figure}[h!]
\centering{}\includegraphics[scale=0.3]{figures/devious_discontinuity} 
\end{figure}

\par\end{center}

\begin{question}Is there a root at the origin?\end{question}


\pause{}

\noindent \emph{No, there is not.} It may look as if a root lies there,
but the function is discontinuous at $\ec x=0$ (because $\ec\lfloor x\rfloor$
is discontinuous at $\ec x=0$).

You might notice this if you zoomed in a little more.


\lyxframeend{}\lyxframe{{Conclusion} }
\begin{itemize}
\item We can use the {\hilite Intermediate Value Theorem} to approximate
solutions to equations and irrational numbers. 
\item We must remember to check whether a function is continuous before
trying to apply the theorem. 
\item The {\hilite IVT} is not always the best method to solve equations
or approximate irrational numbers. Later, you will learn \emph{Newton's
Method}, which is usually a much more efficient method. 
\end{itemize}

\lyxframeend{}
\end{document}
