\nopagenumbers
\magnification=1200
\baselineskip=14pt
\def \d{\displaystyle}
\def \h{\hfill}
\def \v{\vfill}
\def \title#1{\line{\h{\bf Math 151  #1}\h}}

\def \frac #1#2{{\d #1\over \d #2}}
\parindent=0pt
\font \bigbf = cmr10 scaled 1200
\def \i{\item}
\def \vs{\vskip 5pt}
\def \vss{\vskip 10pt}
\def \hs{\hskip 10pt}
\def \c{\circ}
\def \t{\theta}
\def \vc#1{ {\bf\vec#1} }
\def \q{\quad}
\def \eps{\epsilon}
\def \de{\delta}

\line{\copyright \it Copyright 1995, 1998 P. Yasskin, S. Fulling, 
E. Letzter \h}
%% This version is for use in a syllabus that returns to the
%% definition of limit well into the calculus sequence.

\vss

\line{\h  Spring 1998}
\line{\h \bigbf Maple Lab, Week 28 \h}
\vss
\line{\h \bigbf A Flask of Blood \h}
\vss
{\bf Objective:}  This lab will improve your understanding of the 
 $\eps$--$\de$ definition of a limit.
\vss

 {\bf Review of Maple's equation-solving commands:}
 Suppose you want to solve the equation ${x\over \pi} + \sin x = 
1$.
 You first enter the equation to make sure you have typed it 
properly:

$>${\tt eq := x/Pi + sin(x) = 1;}

You can then plot the left and right hand sides of the equation to 
see approximately where they intersect:

 $>${\tt plot($\{$ lhs(eq), rhs(eq) $\}$, x=-2*Pi..4*Pi);}

 You observe that there are three intersection points (solutions),
 one between 0 and 2, one between 2 and 4, and one between 4 and 6.
 To find the solutions more precisely, you might first try Maple's 
{\tt solve} command:

 $>${\tt solve(eq, x);}

 Well, it seems (in Release 4) that Maple can't solve the equation exactly.
 So, use Maple's {\tt fsolve} command to find approximate 
(numerical) solutions:

 $>${\tt fsolve(eq, x);}

 This gives only the solution between 2 and 4.
(You can recognize it as $\pi$ ---
an exact solution that {\tt solve} did produce in Release~3!)
 After {\tt fsolve} finds  one solution, it stops.
 To find others,
 you need to add a range to the {\tt fsolve} command to lead it 
to the solution you want:

 $>${\tt fsolve(eq, x=0..2); \q fsolve(eq, x=4..6);}

Now you  have all three solutions.
 \vss

{\bf Exercises:}   
\vss
{\bf 1.  The flask of blood}  
\vs
 You are working in a medical lab where they measure the volume of 
blood in a conical flask by accurately measuring the height of the 
liquid.
 A particular flask is 
 5 cm\thinspace\ in radius and 20 cm\thinspace\ high.
 You can see a picture of it by executing the following Maple plot:

 $>${\tt plot3d([r*cos(theta), r*sin(theta), 4*r], r=0..5, 
theta=0..2*Pi,
%% deliberate line break
  
  \qquad scaling=constrained, axes=normal, orientation=[30,75]);}


 The volume of a cone is given by

 $>${\tt V := 1/3 *Pi*r\^{}2*h;}

 (Execute these commands as you read along.)
 For this cone, if the blood fills up to a height $ h$, then the 
radius of the surface of the blood is

 $>${\tt r := h/4;}

 So the volume is:

 $>${\tt V;}

 Plot the volume  as a function of the height.
 \vs

Your medical supervisor says that the volume of the blood
 needs to be $V_0 = 40 \hbox{ cm}^3$.
 She asks you to find the height $h_0$ of the blood in the flask.
 So execute

 $>${\tt V0 := 40;}

 and solve the equation $V = V_0\,$.
 Save the relevant root as {\tt h0}.

 \vs

 Your supervisor now says that the volume of blood needs to be 
accurate to $\pm 1 \hbox{ cm}^3$.
 Let this ``output accuracy'' or ``tolerance'' be called~$\eps$:

 $>${\tt epsilon := 1;}

Then she asks you how accurately the height of the blood needs to 
be measured.
 This ``input accuracy'' is called~$\de$.
 You need to find $\de$ so that {\bigbf if} the height $h$ is in 
the interval $(h_0 - \de, h_0 + \de)$ {\bigbf then} the volume $V$ 
will be in the interval $(V_0 - \eps, V_0 + \eps)$.
Let's approach this problem graphically before getting into 
algebra.
First execute

 $>${\tt Vp := V0+epsilon; \q Vm := V0-epsilon;}

 Add the horizontal lines at $V_p$ and $V_m$ to your plot of $V$.
 Then click with the mouse to find the values $h_p$ and $h_m$
 where $V=V_p$ and $V=V_m$ respectively.
 (You can improve your results by restricting the domain in the 
plot to {\tt h=8..9} or even further.)
 \vs

 In your plot (with $h$ restricted to $[8,9]$)
 you can see that $V$ is contained in the interval $(V_m, V_p)$
 exactly when $h$ is contained in the interval $(h_m, h_p)$.
 ({\bf Note:}  This would not necessarily be so if the function 
 $V(h)$ were not a monotonic (either increasing or decreasing) 
function.)
Now recall that we are seeking the largest value of $\de$ such that
 $V(h)$ is in $(V_m, V_p)$ when $h$ is contained in
$(h_0 - \de, h_0 + \de)$.
 Therefore, we are trying to find the largest value of $\de$ such 
that the interval $(h_0 - \de, h_0 + \de)$ is contained in the 
interval $(h_m, h_p)$.
 Since $h_p$ and $h_m$ do not have to be equidistant from~$h_0\,$,
$\de$~must be the {\bf smaller} of $\de_p = h_p - h_0$ and
$\de_m = h_0 - h_m\,$.
\vs
 
 To get an accurate value of $\de$, use {\tt fsolve} to solve the 
equations $V = V_p$ and $V = V_m$
 (saving the results as {\tt hp} and {\tt hm}),
 then use Maple to compute
 $\de_p\,$,   $\de_m\,$, and $\de = \hbox{min}(\de_p, \de_m)$.
(Maple has a {\tt min} function that can be used here.)

 \vs
 Your supervisor now decides that the blood must be accurate to 
within $\pm 0.05 \hbox{ cm}^3$.
 Repeat your calculations for this case.
 ({\bf You don't need to retype everything}.
 Just change {\tt epsilon}
 and reexecute the commands from that point on.)
 \vs

 The fact that you can compute a satisfactory $\de$ for any $\eps$ 
is summarized in the statement that
 $$\lim_{h\to h_0} V(h)= V_0\,.$$
 This limit means:
 $$\eqalign{&\hbox{For every $\eps >0$ there is a $\de >0$ such 
that}\cr
 &\hbox{{\bigbf if} the height $h$ is in the interval
$(h_0 - \de, h_0 + \de)$ (with $h\ne h_0$)}\cr
 &\hbox{{\bigbf then} the volume $V$ will be in the interval
$(V_0 - \eps, V_0 + \eps)$.}\cr}$$

\vss\goodbreak

{\bf 2. The famous trig limit}  
 \vs

 Consider the function $\d f(x) = {\sin x \over x}\,$.

 $>${\tt f := x -> sin(x)/x;}

 The function is undefined at $x=0$.  Maple agrees:

 $>${\tt f(0);}

 However, the function does have a limit as $x$ approaches~0.
 To see this, plot the function

 $>${\tt plot(f);}

 and use  it to guess whether $\d \lim_{x\to 0} {\sin x\over x}$
 exists and, if so, what its numerical value is.
 {\bf Note:}
 As far as Maple and graphics are concerned, your guess is truly a 
guess.
 When Maple plotted the function, it simply plotted some points and 
connected the dots.
 (To see these dots, click in the plot window menu on {\sl Style} and 
{\sl Point}.)
 So there is no guarantee that between 0 and the closest dot the 
function won't become much larger or much smaller.
 Of course, you know that for this well-known function that doesn't 
happen; but a computer-generated graph is not a proof of that.
 \vs

 Check that Maple agrees with your limit by executing

 $>${\tt Limit(f(x), x=0); \q value(");}

 This limit means:
$$\eqalign{&\hbox{For every $\eps >0$ there is a $\de >0$ such 
that}\cr
 &\hbox{{\bigbf if}  $x$ is in the interval
$( - \de,  \de)$ (with $x\ne 0$)}\cr
 &\hbox{{\bigbf then} $\sin x \over x$ is guaranteed to be in the interval
$(1 - \eps, 1 + \eps)$.}\cr}$$
\vs

 Given that $\eps = 0.2$, find the largest $\de$ such that if
 $0<|x|<\de$ then $\left| {\sin x \over x} -1 \right|< \eps$.
 Again you can do this roughly by adding horizontal lines to your 
plot and using the mouse to identify the points $x_p$ and $x_m$ 
where $f(x)$ leaves the interval $(1-\eps, 1+\eps)$.
 Then use {\tt fsolve} to identify $\de$ more accurately.
(Comment on how this situation is different from the case of the flask.)
 
\bye




