* Body temperature varies slowly and systematically by about $\pm 1$ F over the course of the day: a so-called "circadian rhythm." Suppose you wanted to measure the rate of change of body temperature at 6am. What factors would influence your choice of $h$? ANS: Precision of the thermometer. Typically, you can measure body temperature to a precision of about 0.1 F. So in choosing $h$ you would want to have a time interval over which the change in body temperature is bigger than 0.1 F.Separating the measurements by a good span of time serves to make the influence of the error smaller. ### Limits at Infinity One of the principles learned by many, perhaps most, students is that "you can't divide by zero." Yet from time to time one is forced to deal with an expression that involves division by a quantity that might be zero. In the case of derivatives, the quantity is the step $h$. The notation $h \rightarrow 0$ reminds the user to make $h$ small but to make sure $h\neq 0$. The algebraic techniques undercut this message of "small but not zero." The basic algebraic process is to manipulate the expression symbolically, treating $h$ as if it were not zero (to avoid violating the can't-divide-by-zero principle). Then, when one finally arrives at an expression that doesn't involve any division by $h$, feel free to plug in zero. With respect to derivatives, the student will soon move on to the symbolic transformations that implement differentiation and can forget all about limits. The facts that will remain are rules like $x^2 \rightarrow 2 x$ and "a derivative is a slope or tangent" (sic). But there are times when division by zero occurs. For instance, in September 1997, a crew member on a US Navy missile cruiser, the USS Yorkdown, entered a zero into a database field.[ref](http://en.wikipedia.org/wiki/USS_Yorktown_(CG-48)) Subsequently, this value was used as the denominator in a division calculation. The divide by zero produced a machine error which cascaded into the failure of a computer network on the ship. This caused the ship's propulsion to fail. The Yorktown was dead in the water for 2 hours and 45 minutes. Computer engineers have overcome the objections of third-grade teachers and recognized that division by zero is not really an error but a situation that needs to be acknowledged. The IEEE floating point standard, the arithmetic standard used on most computers today, treats division by zero as an "exception" not an error; a valid result is returned. ```{r} 1/0 ``` You can do arithmetic with ```Inf``` just as if it were a number. ```{r} 1/Inf 3 + Inf -4*Inf ``` There are indeterminate cases that are treated sensibly by the standard, signalled by a value of ```NaN``` --- "not a number". ```{r} 0*Inf Inf - Inf Inf/Inf 0/0 ``` Since such arithmetic is an element of the technical life of our students, something they can and will invoke often in their quantitative studies, perhaps a good application for limits is to explain why it makes sense to set up the rules this way. There are other times when multiplication by infinity needs to be considered. For instance, one form of "surge" function is $f(t) = A t \exp(-kt)$. In the long run, as $t$ becomes large, what will happen to this function? It is a product of two functions: $t$ increases steadily while $\exp(-kt)$ goes to zero as $t$ increases. The simple arithmetic rules are indeterminate: ```{r} t = Inf t*exp(-t) ``` A plot resolves the problem: ```{r label="surge-plot",fig.height=2,fig.width=3} plotFun( A*t*exp(-k*t)~t, t.lim=c(0,100),k=.1,A=2) ``` The function goes to zero on a time scale that's determined by $k$, not $A$. Perhaps even introduce an interactive script to allow students to vary the parameters and see which ones are important. ```{r eval=FALSE} require(manipulate) manipulate( plotFun(A*t*exp(-k*t)~t,t.lim=c(0,10^n),k=k,A=A,npts=10000), n = slider(0,5,step=.1,initial=2,label="Set t-max"), k = slider(0,.2,step=.001,initial=.1), A = slider(-100,100,step=1,initial=3) ) ``` The traditional way to show that the surge function goes to zero as $t \rightarrow \infty$ is by l'Hospital's rule. First published in 1696, the Rule seems mainly to provide a mechanism, a pseudo-application, for having students take derivatives of a variety of functions and spotting singularities, places where the input to a function would cause a violation of the no-division-by-zero rule. Whether this is a help to students or a distraction is a matter of dispute, but the textbook cases are appropriately handled by the rules for computer arithmetic and the conventions of the plotting program. #### Exercises: Functions at zero and infinity * $\lim_{x \rightarrow 1} \frac{\ln x}{x-1}$ * $\lim_{x \rightarrow 1} \frac{x^2-1}{2*x^2+1}$ * $\lim_{x \rightarrow \infty} \frac{e^x}{x^2}$ * $\lim_{x \rightarrow \infty} \frac{\ln x}{\sqrt[3]{x}}$ * $\lim_{x \rightarrow 0^+} \frac{x}{1/\ln x}$ * A counter-example from Stewart where l'Hospital's rule shouldn't be applied: $\lim_{x \right \pi^-} \frac{sin x}{1 - \cos x}$ Show that in each of these cases, the computer arithmetic results in ```NaN``` at the singularity, but the plot shows the limit reasonably. #### Summary: Teaching limits in a modeling-based way: * When introducing the derivative, $h \rightarrow 0$ means that $h$ should be small. Discuss what "small" means and how it depends on context. Two important contexts: the length scale over which the function shows visible curvature; the amount of measurement (or round-off) noise in an evaluation of the function. * The idea that division by zero is prohibited and how the computer deals with a division by zero. Quantities that make sense near zero (or near infinity) are reasonably interpreted in the limit.