\documentclass[11pt]{article}
\usepackage{latexsym,amsmath,epic,eepic,comment}

\usepackage{math131}

\newcommand{\prob}[1]{\paragraph{Question #1}}

%% \newcommand{\vp}{\vphantom{\bigg|}}

\begin{document}
\begin{center}
\textbf{Holy Cross College, Fall Semester, 2003} \\
\textbf{Math 131, Lab \#2, Wednesday, October 8} \\
Professor Hwang \\
\end{center}

\subsection*{Purpose} 

We have seen that the derivative of a function and linear
approximations are closely related: The graph of a differentiable
function looks like the tangent line on sufficiently small scales. In
this lab, you will investigate this principle graphically for specific
functions and intervals, by having Maple plot functions over intervals
of the form $[a-h,a+h]$ or $[a,a+h]$ for different choices of $a$~and
$h$. As you make $h$~smaller, you should see the graphs become ``more
and more linear''. However, you will also see that at intermediate
scales there can be complicated behavior, and that mathematical
behavior can be difficult to see graphically.

\subsection*{Approximate Linearity}

The first lines of the worksheet define constants $a=0.5$~and $h=0.1$,
and the function $f(x)=x^2$. The next line plots~$f$ on the interval
$[a-h,a+h]$. 

\prob{1.} Use Maple to plot~$f$ on the specified interval. Re-plot,
using $h=0.05$; $h=0.01$; and $h=0.001$. What is the slope of the
graph in your plots? Does this agree with what you expect from your
knowledge of the derivative? Explain.

\soln You should find that the slope of the graph is roughly~1; this
agrees with expectations, since $f'(x)=2x$, so the slope of the graph
at~$0.5$ is $f'(0.5)=1$.

\sep

\prob{2.} Set $h=0.000001$ (five zeroes) and plot. Repeat for
$h=0.0000001$ (six zeroes). Are these plots nearly linear? Explain.

\soln The plots are not nearly linear; at $h=10^{-6}$, round-off error
starts to become apparent, and the graph is squiggly. At $h=10^{-7}$,
the graph is a stair-step; you're seeing pieces of horizontal line at
values the Pentium can produce, which are so far spaced at this scale
that the gaps are visible.

\sep

Define the constants as $a=1$, $h=0.1$, and define the function
$f(x)=x^3$. 

\prob{3.} Use Maple to plot~$f$ on the interval $[a-h,a+h]$. Re-plot,
using $h=0.01$. Use the axis labels to estimate the slope of the line
you see. What answer do you expect?

\soln The height of the graph is about $0.06$, while the width
is~$0.2$. The slope is therefore about~3. This is expected, since
$f'(x)=3x^2$, so at $x=1$ the tangent line has slope $f'(1)=3$.

\sep

Now that you have a feel for routine functions, let's take a look at
some less obvious examples. 

\prob{4.} Define $a=0$, $h=0.001$, and $f(x)=x^x$, and plot~$f$ on the
interval $[a,a+h]$. (Note the asymmetry.) About how steep is the graph
(on the average) over the interval $[0,h]$? Make~$h$ one-tenth as
large, re-plot, and re-estimate the average slope. Continue until
numerical errors are visible. Tabulate your results below. What do you
think $\lim\limits_{x\to0^+}f'(x)$ is equal to?

\soln Approximate values are tabulated; your answers may differ
slightly. 
\[
\begin{array}{|c||c|c|c|c|c|c|}
\hline
\vp h & 10^{-3} & 10^{-4} & 10^{-5} & 10^{-6} & 10^{-7} & 10^{-8} \\
\hline
\vp \Delta f/\Delta x & -8 & -10 & -12 & -14 & -16 & -18 \\
\hline
\end{array}
\]

The main feature is that zooming in by a factor of~10 causes the slope
to decrease by about~2; this suggests that the actual slope (or, the
limiting slope as the point of tangency approaches~0 from the right)
is~$-\infty$, but that the divergence is extremely slow.

\sep

Define $a=0$, $h=0.01$, and $f(x)=x^2\sin(1/x)$.

\prob{5.} Plot this~$f$ over the interval $[-h,h]$. Make a guess as to
the value of~$f'(0)$.

\soln The graph is very nearly flat near~0, suggesting $f'(0)=0$.

\sep

\prob{6.} Set $a=0.01$ and $h=0.005$; plot~$f$ over the interval
$[a-h,a+h]$. Does~$f$ look approximately linear at this scale? If not,
what does the graph of~$f$ resemble? Try making~$h$ smaller to ``zoom
in''. 

\soln The graph is roughly sinusoidal at the original scale. Zooming
in further gives a linear graph.

\sep

\prob{7.} Set $a=0.001$ and $h=0.00005$; note that this $a$~is ten
times closer to the origin than in the previous question, but~$h$ is
100~times smaller. Again, plot~$f$ over the interval
$[a-h,a+h]$. Does~$f$ look approximately linear at this scale? If not,
what does the graph of~$f$ resemble?

\soln Again, the graph is roughly sinusoidal at the given scale.

\sep

\prob{8.} On the basis of this evidence, does $\lim\limits_{x\to0}
f'(x)$ exist? Explain.

\soln The slopes of lines tangent to a sinusoidal curve vary from
about~1 to about~$-1$; because the graph looks sinusoidal at certain
scales, the tangent lines' slopes oscillate infinitely many times on
an interval just to the right (or left) of~$0$. Consequently, the
tangent lines do not have a limiting slope at $x\to0$, so
$\lim\limits_{x\to0}f'(x)$ does not exist.

\end{document}