-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathch01.tex
More file actions
729 lines (621 loc) · 39.7 KB
/
ch01.tex
File metadata and controls
729 lines (621 loc) · 39.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
%%chapter%% 01
\chapter{Rates of Change}\label{ch:rates-of-change}
\section{Change in discrete steps}
Toward the end of the eighteenth century, a German elementary school teacher
decided to keep his pupils busy by assigning them a long, boring arithmetic
problem: to add up all the numbers
from one to a hundred.\footnote{I'm giving my own retelling of a hoary legend. We don't really know the exact problem, just that it was
supposed to have been something of this flavor.}
% http://www.americanscientist.org/issues/pub/gausss-day-of-reckoning#
The children set to work on their slates, and the teacher
lit his pipe, confident of a long break. But almost immediately, a boy named
Carl Friedrich Gauss brought up his answer: 5,050.\label{gauss-story}\index{Gauss, Carl Friedrich}
%
\smallfig{gauss-square}{Adding the numbers from 1 to 7.}
%
\smallfig[h]{gauss-solution}{A trick for finding the sum.}
Figure \figref{gauss-square} suggests one way of solving this type of problem.
The filled-in columns of the graph represent the numbers from 1 to 7, and
adding them up means finding the area of the shaded region. Roughly half the
square is shaded in, so if we want only an approximate solution, we can
simply calculate $7^2/2=24.5$.
But, as suggested in figure \figref{gauss-solution}, it's not much more work to
get an exact result. There are seven sawteeth sticking out out above the diagonal,
with a total area of $7/2$, so the total shaded area is $(7^2+7)/2=28$.
In general, the sum of the first $n$ numbers will be $(n^2+n)/2$, which explains
Gauss's result: $(100^2+100)/2=5,050$.
%
\smallfig{gauss}{Carl Friedrich Gauss (1777-1855), a long time after graduating
from elementary school.}\index{Gauss, Carl Friedrich!portrait}
%
\subsection{Two sides of the same coin}
Problems like this come up frequently. Imagine that each household in a certain
small town sends a total of one ton of garbage to the dump every year. Over
time, the garbage accumulates in the dump, taking up more and more space.
Let's label the years as $n=1,$ 2, $3,\ldots$, and let the
function\footnote{Recall that when $x$ is a function, the notation $x(n)$ means
the output of the function when the input is $n$. It doesn't represent
multiplication of a number $x$ by a number $n$.}
$x(n)$ represent the amount of garbage that has accumulated by the end
of year $n$.
If the population is constant, say 13 households, then
garbage accumulates at a constant rate, and we have $x(n)=13n$.
But maybe the town's population is growing. If the population starts out
as 1 household in year 1, and then grows to 2 in year 2, and so on, then
we have the same kind of problem that the young Gauss solved. After 100
years, the accumulated amount of garbage will be 5,050 tons. The pile of
refuse grows more quickly every year; the rate of change of $x$ is not
constant. Tabulating the examples we've done so far, we have this:
\noindent\begin{tabular}{p{23mm}p{23mm}}
\emph{rate of change} & \emph{accumulated result} \\
13 & $13n$ \\
$n$ & $(n^2+n)/2$
\end{tabular}
%\newcommand{\xdot}{\dot{x}}
The rate of change of the function $x$ can be notated as $\xdot$.
Given the function $\xdot$, we can always determine the function $x$
for any value of $n$ by doing a running sum.
Likewise, if we know
$x$, we can determine $\xdot$ by subtraction. In the example
where $x=13n$, we can find $\xdot=x(n)-x(n-1)=13n-13(n-1)=13$.
Or if we knew that the accumulated amount of garbage was given by
$(n^2+n)/2$, we could calculate the town's population like
this:
\begin{align*}
& \frac{n^2+n}{2} - \frac{(n-1)^2+(n-1)}{2}\\
&= \frac{n^2+n-\left(n^2-2n+1+n-1\right)}{2} \\
&= n
\end{align*}
%%graph%% slope-interpretation func=(x**2+x)/2 format=eps xlo=0 xhi=7 ylo=0 yhi=30 with=points x=n y=x samples=8 ytic_spacing=10 ; func=4*x-6 with=lines
\smallfig[h]{slope-interpretation}{$\xdot$ is the slope of $x$.}
The graphical interpretation of this is shown in figure
\figref{slope-interpretation}: on a graph of $x=(n^2+n)/2$, the slope of the line connecting two successive points is the value of the function $\xdot$.
In other words, the functions $x$ and $\xdot$ are like different
sides of the same coin. If you know one, you can find the other
--- with two caveats.
First, we've been assuming implicitly
that the function $x$ starts out at $x(0)=0$. That might not be
true in general. For instance, if we're adding water to a reservoir
over a certain period of time, the reservoir probably didn't start
out completely empty. Thus, if we know $\xdot$, we can't
find out everything about $x$ without some further information:
the starting value of $x$. If someone tells you $\xdot=13$,
you can't conclude $x=13n$, but only $x=13n+c$, where $c$ is
some constant. There's no such ambiguity if you're going the
opposite way, from $x$ to $\xdot$. Even if $x(0)\ne 0$, we
still have $\xdot=13n+c-[13(n-1)+c]=13$.
Second, it may be difficult, or even impossible, to find
a \emph{formula} for the answer when we want to determine
the running sum $x$ given a formula for the rate of change
$\xdot$. Gauss had a flash of insight that led him to
the result $(n^2+n)/2$, but in general we might only be
able to use a computer spreadsheet to calculate a number
for the running sum, rather than an
equation that would be valid for all values of $n$.
%
\subsection{Some guesses}
%
Even though we lack Gauss's genius, we can recognize
certain patterns. One pattern is that if $\xdot$ is
a function that gets bigger and bigger, it seems like
$x$ will be a function that grows even faster than $\xdot$.
In the example of $\xdot=n$ and $x=(n^2+n)/2$, consider
what happens for a large value of $n$, like 100. At this value of $n$,
$\xdot=100$, which is pretty big, but even without pawing around for
a calculator, we know that $x$ is going to turn out really \emph{really} big. Since $n$ is
large, $n^2$ is quite a bit bigger than $n$, so roughly speaking,
we can approximate $x\approx n^2/2=5,000$. 100 may be a big number,
but 5,000 is a lot bigger. Continuing in this way, for $n=1000$ we
have $\xdot=1000$, but $x\approx 500,000$ --- now $x$ has far
outstripped $\xdot$. This can be a fun game to play with a calculator:
look at which functions grow the fastest. For instance, your calculator
might have an $x^2$ button, an $e^x$ button, and a button for $x!$ (the
factorial function,\index{factorial} defined
as $x!=1\cdot 2\cdot\ldots\cdot x$, e.g., $4!=1 \cdot 2 \cdot 3 \cdot 4=24$). You'll find
that $50^2$ is pretty big, but $e^{50}$ is incomparably greater, and $50!$
is so big that it causes an error.
All the $x$ and $\xdot$ functions we've
seen so far have been polynomials. If $x$ is a polynomial,
then of course we can find a polynomial for $\xdot$ as well,
because if $x$ is a polynomial, then $x(n)-x(n-1)$ will be one too.
It also looks like every polynomial we could choose
for $\xdot$ might also correspond to an $x$ that's a polynomial.
And not only that, but it looks as though there's a pattern in the
power of $n$. Suppose $x$ is a polynomial, and the highest power of $n$ it contains is
a certain number --- the ``order'' of the polynomial. Then $\xdot$ is a polynomial
of that order minus one. Again, it's fairly easy to prove this going one
way, passing from $x$ to $\xdot$, but more difficult to prove the opposite
relationship: that if $\xdot$ is a polynomial of a certain order, then
$x$ must be a polynomial with an order that's greater by one.
We'd imagine, then, that the running sum of $\xdot=n^2$ would
be a polynomial of order 3. If we calculate
$x(100)=1^2+2^2+\ldots+100^2$ on a computer spreadsheet, we
get 338,350, which looks suspiciously close to $1,000,000/3$.
It looks like $x(n)=n^3/3+\ldots$, where
the dots represent terms involving lower powers of $n$
such as $n^2$. The fact that the coefficient of the $n^3$ term
is $1/3$ is proved in problem \ref{hw:sum-of-squares-coeff} on p.~\pageref{hw:sum-of-squares-coeff}.\label{claim-sum-of-squares-coeff}
%interp as slope, figure showing x, x', area->, slope<-
%self-check: visualize for x=13n, x'=13
\smallfig{pyramid}{A pyramid with a volume of $1^2+2^2+3^2$.}
\begin{eg}
Figure \figref{pyramid} shows a pyramid consisting of a single cubical block on top,
supported by a $2\times 2$ layer, supported in turn by a $3\times 3$ layer. The total
volume is $1^2+2^2+3^2$, in units of the volume of a single block.
Generalizing to the sum $x(n)=1^2+2^2+\ldots+n^2$, and applying the result
of the preceding paragraph, we find that the volume of such a pyramid is approximately
$(1/3)Ah$, where $A=n^2$ is the area of the base and $h=n$ is the height.
When $n$ is very large, we can get as good an approximation as we like to
a smooth-sided pyramid, and the error incurred in $x(n)\approx (1/3)n^3+\ldots$ by omitting the lower-order
terms $\ldots$ can be made as small as desired.
We therefore conclude that the volume is \emph{exactly} $(1/3)Ah$ for a smooth-sided
pyramid with these proportions.
This is a special case of a theorem first proved by Euclid (propositions
XII-6 and XII-7) two thousand years before calculus was invented.
\end{eg}
\section{Continuous change}
\smallfig{newton}{Isaac Newton (1643-1727)}\index{Newton, Isaac}
%
Did you notice that I sneaked something past you in the example
of water filling up a reservoir? The $x$ and $\xdot$ functions I've
been using as examples have all been functions defined on the integers,
so they represent change that happens in discrete steps, but the flow
of water into a reservoir is smooth and continuous. Or is it? Water is
made out of molecules, after all. It's just that water molecules are so small that
we don't notice them as individuals. Figure \figref{nearly-continuous} shows
a graph that is discrete, but almost appears continuous because the scale has
been chosen so that the points blend together visually.
%%graph%% nearly-continuous func=(x**2+x)/2 format=eps xlo=0 xhi=30 ylo=0 yhi=500 with=points x=n y=x samples=31 ytic_spacing=100 xtic_spacing=10
\smallfig[h]{nearly-continuous}{On this scale, the graph of $(n^2+n)/2$ appears almost continuous.}
The physicist Isaac Newton started
thinking along these lines in the 1660's, and figured out ways of analyzing
$x$ and $\xdot$ functions that were truly continuous. The notation $\xdot$
is due to him (and he only used it for continuous functions). Because he was
dealing with the continuous \emph{flow} of change, he called his new set of mathematical
techniques the method of \emph{fluxions}, but nowadays it's known as the calculus.
%%graph%% tangent-line func=x**2/2 format=eps xlo=0 xhi=2 ylo=0 yhi=2 with=lines x=t y=x samples=300 ytic_spacing=1 ; func=x-.5 with=lines
\smallfig{tangent-line}{The function $x(t)=t^2/2$, and its tangent line at the point $(1,1/2)$.}
Newton was a physicist, and he needed to invent the calculus as part of his study
of how objects move. If an object is moving in one dimension, we can specify its
position with a variable $x$, and $x$ will then be a function of time, $t$.
The rate of change of its position, $\xdot$, is its speed, or velocity.
Earlier experiments by Galileo\index{Galileo}
had established that when a ball rolled down
a slope, its position was proportional to $t^2$, so Newton inferred that
a graph like figure \figref{tangent-line} would be typical for any object
moving under the influence of a constant force. (It could be $7t^2$, or
$t^2/42$, or anything else proportional to $t^2$, depending on the force
acting on the object and the object's mass.)
Because the functions are continuous, not discrete, we can no longer define
the relationship between $x$ and $\xdot$ by saying $x$ is a running sum of
$\xdot$'s, or that $\xdot$ is the difference between two successive $x$'s.
But we already found a geometrical relationship between the two functions
in the discrete case, and that can serve as our definition for the continuous
case: $x$ is the area under the graph of $\xdot$, or, if you like,
$\xdot$ is the slope of the graph of $x$. For now
we'll concentrate on the slope idea.
%%graph%% not-a-tangent-line func=x**2/2 format=eps xlo=0 xhi=2 ylo=0 yhi=2 with=lines x=t y=x samples=300 ytic_spacing=1 ; func=1.75*x-1.25 with=lines
\smallfig[t]{not-a-tangent-line}{This line isn't a tangent line: it crosses the graph.}%
This definition is still a little vague, because we haven't defined what we mean
by the ``slope'' of a curving graph. For a discrete graph like figure \figref{slope-interpretation},
we could define it as the slope of the line drawn between neighboring points. Visually,
it's clear that the continuous version of this is something like the line drawn
in figure \figref{tangent-line}. This is referred to as the tangent line.
We still need to convert this intuitive idea of a tangent line into a formal
definition. In a typical example like figure \figref{tangent-line}, the tangent\index{tangent line!informal definition}
line can be defined as the line that touches the graph at a certain point,
but, unlike the line in figure \figref{not-a-tangent-line}, doesn't cut across
the graph at that point.\footnote{In the case where the original
graph is itself a line, the tangent line simply coincides with the graph, and this also satisfies
the definition, because the tangent line doesn't cut across the graph; it lies on top of it.
There is one other exceptional case, called a point of inflection, which we won't worry about
right now. For a more complicated definition that correctly handles all the cases, see
page \pageref{detour:def-tangent}.} By measuring with a ruler on figure
\figref{tangent-line}, we find that the slope is very close to 1, so evidently
$\xdot(1)=1$.
To prove this, we construct the function representing the line: $\ell(t)=t-1/2$.
We want to prove that this line doesn't cross the graph of $x(t)=t^2/2$. The difference between the
two functions, $x-\ell$, is the polynomial $t^2/2-t+1/2$, and this polynomial will be zero for any
value of $t$ where the line touches or crosses the curve. We can use the quadratic formula
to find these points, and the result is that there is only one of them, which is $t=1$.
Since $x-\ell$ is positive for at least some points to the left and right of $t=1$, and
it only equals zero at $t=1$, it must never be negative, which means that the line
always lies below the curve, never crossing it.
\subsection{A derivative}\label{scaling}\index{derivative!definition using tangent line}
That proves that $\xdot(1)=1$, but it was a lot of work, and we don't want to do
that much work to evaluate $\xdot$ at every value of $t$. There's a way to
avoid all that, and find a formula for $\xdot$. Compare figures \figref{tangent-line}
and \figref{scaling}. They're both graphs of the same function, and they both look the same.
What's different? The only difference is the scales: in figure \figref{scaling}, the $t$ axis
has been shrunk by a factor of 2, and the $x$ axis by a factor of 4. The graph looks the same,
because doubling $t$ quadruples $t^2/2$. The tangent line here is the tangent line at $t=2$,
not $t=1$, and although it looks like the same line as the one in figure \figref{tangent-line},
it isn't, because the scales are different. The line in figure \figref{tangent-line} had a slope
of $\text{rise}/\text{run}=1/1=1$, but this one's slope is $4/2=2$. That means $\xdot(2)=2$.
In general, this scaling argument shows that $\xdot(t)=t$ for any $t$.
%%graph%% scaling func=x**2/2 format=eps xlo=0 xhi=4 ylo=0 yhi=8 with=lines x=t y=x samples=300 ytic_spacing=1 ; func=2*x-2 with=lines
\smallfig{scaling}{The function $t^2/2$ again. How is this different from figure \figref{tangent-line}?}
This is called \emph{differentiating}: finding a formula for the function $\xdot$, given a formula
for the function $x$. The term comes from the idea that for a discrete function, the slope is
the difference between two successive values of the function. The function $\xdot$ is referred to as
the \emph{derivative} of the function $x$, and the art of differentiating is differential
calculus.\index{calculus!differential}
The opposite process, computing a formula for $x$ when given $\xdot$, is called integrating,\index{integral}
and makes up the field of integral calculus;\index{calculus!integral}
this terminology is based on the idea that computing
a running sum is like putting together (integrating) many little pieces.
Note the similarity between this result for continuous functions,
\begin{equation*}
x=t^2/2 \qquad \xdot=t\eqquad,
\end{equation*}
and our earlier result for discrete ones,
\begin{equation*}
x=(n^2+n)/2 \qquad \xdot=n\eqquad.
\end{equation*}
The similarity is no coincidence. A continuous function is just a smoothed-out version of
a discrete one. For instance, the continuous version of the staircase function shown in figure
\figref{gauss-solution} on page \pageref{fig:gauss-solution} would simply be a triangle
without the saw teeth sticking out; the area of those ugly sawteeth is what's represented
by the $n/2$ term in the discrete result $x=(n^2+n)/2$, which is the only thing that makes
it different from the continuous result $x=t^2/2$.
\subsection{Properties of the derivative}\index{derivative!properties of}
It follows immediately from the definition of the derivative that multiplying a function by
a constant multiplies its derivative by the same constant, so for example since we know
that the derivative of $t^2/2$ is $t$, we can immediately tell that the derivative of
$t^2$ is $2t$, and the derivative of $t^2/17$ is $2t/17$.
Also, if we add two functions, their derivatives add. To give a good example of this, we
need to have another function that we can differentiate, one that isn't just some multiple
of $t^2$. An easy one is $t$: the derivative of $t$ is 1, since the graph
of $x=t$ is a line with a slope of 1, and the tangent line lies right on top of the
original line.
\begin{eg}\label{eg:diff-quadratic}
The derivative of $5t^2+2t$ is the derivative of $5t^2$ plus the derivative of
$2t$, since derivatives add. The derivative of $5t^2$ is 5 times the derivative
of $t^2$, and the derivative of $2t$ is 2 times the derivative of $t$, so
putting everything together, we find that the derivative of $5t^2+2t$
is $(5)(2t)+(2)(1)=10t+2$.
\end{eg}
The derivative of a constant is zero, since a constant function's graph is a
horizontal line, with a slope of zero. We now know enough to differentiate any second-order
polynomial.\index{derivative!of a second-order polynomial}
\begin{eg}\label{pest}
\egquestion An insect pest from the United States is inadvertently released in
a village in rural China. The pests spread outward at a rate of $s$ kilometers
per year, forming a widening circle of contagion. Find the number of square
kilometers per year that become newly infested. Check that the units of the result
make sense. Interpret the result.
\eganswer Let $t$ be the time, in years, since the pest was introduced.
The radius of the circle is $r=st$, and its area is $a=\pi r^2=\pi(st)^2$.
To make this look like a polynomial, we have to rewrite it as
$a=(\pi s^2)t^2$. The derivative is
\begin{align*}
\dot{a} &= (\pi s^2)(2t) \\
\dot{a} &= (2\pi s^2) t
\end{align*}
The units of $s$ are km/year, so squaring it gives $\zu{km}^2/\zu{year}^2$.
The 2 and the $\pi$ are unitless, and multiplying by $t$ gives units
of $\zu{km}^2/\zu{year}$, which is what we expect for $\dot{a}$, since
it represents the number of square kilometers per year that become infested.
Interpreting the result, we notice a couple of things. First, the rate
of infestation isn't constant; it's proportional to $t$, so people might not
pay so much attention at first, but later on the effort required to combat the
problem will grow more and more quickly. Second, we notice that the
result is proportional to $s^2$. This suggests that anything that could be
done to reduce $s$ would be very helpful. For instance, a measure that cut
$s$ in half would reduce $\dot{a}$ by a factor of four.
\end{eg}
\subsection{Higher-order polynomials}\index{derivative!of a polynomial}
So far, we have the following results for polynomials up to order 2:
\begin{tabular}{ll}
\emph{function} & \emph{derivative} \\
1 & 0 \\
$t$ & 1 \\
$t^2$ & $2t$
\end{tabular}
Interpreting 1 as $t^0$, we detect what seems to be a general
rule, which is that the derivative of $t^k$ is $kt^{k-1}$. The proof is straightforward
but not very illuminating if carried out with the methods developed in this chapter,
so I've relegated it to page \pageref{detour:polynomial-proof}. It can be proved
much more easily using the methods of chapter 2.
\begin{eg}
\egquestion If $x=2t^7-4t+1$, find $\xdot$.
\eganswer This is similar to example \ref{eg:diff-quadratic}, the only difference being
that we can now handle higher powers of $t$. The derivative of $t^7$ is $7t^6$, so
we have
\begin{align*}
\xdot &= (2)(7t^6)+(-4)(1)+0 \\
&= 14t^6-4
\end{align*}
\end{eg}
\begin{eg}\label{eg:der-one-over-x-approx}
\egquestion Calculate $3^{-1}$ and $3.01^{-1}$. Does this seem consistent with a conjecture
that the rule for differentiating $t^k$ holds for $k<0$?
\eganswer We have $3^{-1}\approx 0.33333$ and $3.01^{-1}\approx 0.332223$,
the difference being $-1.1\times 10^{-3}$. This suggests that the graph of $x=1/t$ has
a tangent line at $t=3$ with a slope of about
\begin{equation*}
\frac{-1.1\times 10^{-3}}{0.01} = -0.11\eqquad.
\end{equation*}
If the rule for differentiating $t^k$ were to hold, then we would have
$\dot{x}=-t^{-2}$, and evaluating this at $x=3$ would give $-1/9$, which is
indeed about $-0.11$. Yes, the rule does appear to hold for negative $k$,
although this numerical check does not constitute a proof. A proof is given
in example \ref{eg:derivative-of-one-over-x} on p.~\pageref{eg:derivative-of-one-over-x}.
\end{eg}
\subsection{The second derivative}\index{derivative!second}
I described how Galileo and Newton found that an object subject to
an external force, starting from rest, would have a velocity $\xdot$ that was
proportional to $t$, and a position $x$ that varied like $t^2$. The proportionality
constant for the velocity is called the acceleration, $a$, so that
$\xdot=at$ and $x=at^2/2$. For example, a sports car accelerating from
a stop sign would have a large acceleration, and its velocity $at$ at a given
time would therefore be a large number. The acceleration can be thought of
as the derivative of the derivative of $x$, written $\Ddot{x}$, with two
dots. In our example, $\Ddot{x}=a$. In general, the acceleration doesn't need
to be constant. For example, the sports car will eventually have to stop
accelerating, perhaps because the backward force of air friction becomes as
great as the force pushing it forward. The total force acting on the car would
then be zero, and the car would continue in motion at a constant speed.
\begin{eg}
Suppose the pilot of a blimp has just turned on the motor that runs its propeller, and
the propeller is spinning up. The resulting force on the blimp is therefore increasing
steadily, and let's say that this causes the blimp to have an acceleration
$\Ddot{x}=3t$, which increases steadily with time. We want to find the blimp's
velocity and position as functions of time.
For the velocity, we need a polynomial
whose derivative is $3t$. We know that the derivative of $t^2$ is $2t$, so we need
to use a function that's bigger by a factor of $3/2$: $\xdot=(3/2)t^2$. In fact,
we could add any constant to this, and make it $\xdot=(3/2)t^2+14$, for example,
where the 14 would represent the blimp's initial velocity. But since the blimp has
been sitting dead in the air until the motor started working, we can assume
the initial velocity was zero. Remember, any time you're working backwards
like this to find a function whose derivative is some other function (integrating,
in other words), there is the possibility of adding on a constant like this.
Finally, for the position, we need something whose derivative is $(3/2)t^2$.
The derivative of $t^3$ would be $3t^2$, so we need something half as big
as this: $x=t^3/2$.
\end{eg}
%%graph%% curvature func=x**2 format=eps xlo=-2 xhi=2 ylo=-1 yhi=8 with=lines x=t y=x samples=300 ytic_spacing=1 ; func=7*x**2 ; func=2*x
\smallfig{curvature}{The functions $2t$, $t^2$ and $7t^2$.}
%
The second derivative can be interpreted as a measure of the curvature of the graph,
as shown in figure \figref{curvature}. The graph of the function $x=2t$ is a line,
with no curvature. Its first derivative is 2, and its second derivative is zero.
The function $t^2$ has a second derivative of $2$, and the more tightly curved
function $7t^2$ has a bigger second derivative, $14$.
%%graph%% concavity func=x**2 format=eps xlo=-2 xhi=2 ylo=-1 yhi=4 with=lines x=t y=x samples=300 ytic_spacing=1 ; func=3-x**2
\smallfig{concavity}{The functions $t^2$ and $3-t^2$.}
Positive and negative signs of the second derivative indicate concavity.\index{concavity}
In figure \figref{concavity},
the function $t^2$ is like a cup with its mouth pointing up. We say that it's ``concave up,'' and this
corresponds to its positive second derivative. The function $3-t^2$, with a second derivative less than
zero, is concave down. Another way of saying it is that if you're driving along a road shaped like $t^2$,
going in the direction of increasing $t$, then your steering wheel is turned to the left, whereas on
a road shaped like $3-t^2$ it's turned to the right.
%%graph%% inflection func=x**3 format=eps xlo=-2 xhi=2 ylo=-8 yhi=8 with=lines x=t y=x samples=300 ytic_spacing=2
\smallfig{inflection}{The functions $t^3$ has an inflection point at $t=0$.}
Figure \figref{inflection} shows a third possibility. The function $t^3$ has a derivative $3t^2$
and a second derivative $6t$, which equals
zero at $t=0$. This is called a point of inflection. The concavity of the graph is down on the left side, up on the right.
The inflection point is where it switches from one concavity to the other. In the alternative description in
terms of the steering wheel, the inflection point is where your steering wheel is crossing from left to right.\index{inflection point}\label{inflection}
\section{Applications}
\subsection{Maxima and minima}\index{maximum of a function}\index{minimum of a function}
When a function goes up and then smoothly turns around and comes back down again,
it has zero slope at the top. A place where $\xdot=0$, then, could represent
a place where $x$ was at a maximum. On the other hand, it could be concave up,
in which case we'd have a minimum. The term extremum refers to either a maximum or a minimum.\index{extremum of a function}
\begin{eg}
\egquestion Fred receives a mysterious e-mail tip telling him that his investment in a certain stock will
have a value given by $x=-2t^4+(6.4577\times10^{10})t$, where $t\ge 2005$ is the year. Should he sell at some point? If so, when?
\eganswer If the value reaches a maximum at some time, then the derivative should be zero then. Taking the
derivative and setting it equal to zero, we have
\begin{align*}
0 &= -8t^3+6.4577\times10^{10}\\
t &= \left(\frac{6.4577\times10^{10}}{8}\right)^{1/3} \\
t &= \pm 2006.0\eqquad.
\end{align*}
Obviously the solution at $t=-2006.0$ is bogus, since the stock market didn't exist four thousand years ago, and
the tip only claimed the function would be valid for $t\ge 2005$.
Should Fred sell on New Year's eve of 2006?
But this could be a maximum, a minimum, or an inflection point. Fred definitely does \emph{not} want to
sell at $t=2006$ if it's a minimum! To check which of the three possibilities hold, Fred takes the
second derivative:
\begin{align*}
\Ddot{x} &= -24t^2\eqquad.
\end{align*}
Plugging in $t=2006.0$, we find that the second derivative is negative at that time, so it is indeed a
maximum.
\end{eg}
Implicit in this whole discussion was the assumption that the maximum or minimum occurred where the function was
smooth. There are some other possibilities.
In figure \figref{endpoint-min}, the function's minimum occurs at an end-point of its domain.
%
%%graph%% endpoint-min func=sqrt(x) format=eps xlo=-1 xhi=2 ylo=-.1 yhi=1.5 with=lines x=t y=x samples=300 ytic_spacing=1
\smallfig{endpoint-min}{The function $x=\sqrt t$ has a minimum at $t=0$, which is not a place where $\xdot=0$. This
point is the edge of the function's domain.}
%
%%graph%% kink-min func=abs(x) format=eps xlo=-1 xhi=1 ylo=0 yhi=2 with=lines x=t y=x samples=300 ytic_spacing=1
\smallfig{kink-min}{The function $x=|t|$ has a minimum at $t=0$, which is not a place where $\xdot=0$. This
is a point where the function isn't differentiable.}
Another possibility is that the function can have a minimum or maximum at some point where its derivative
isn't well defined. Figure \figref{kink-min} shows such a situation. There is a kink in the function at $t=0$,
so a wide variety of lines could be placed through the graph there, all with different slopes and all staying
on one side of the graph. There is no uniquely defined tangent line, so the derivative is undefined.\index{derivative!undefined}
\begin{eg}
\egquestion Rancher Rick has a length of cyclone fence $L$ with which to enclose a rectangular pasture.
Show that he can enclose the greatest possible area by forming a square with sides of length $L/4$.
\eganswer If the width and length of the rectangle are $t$ and $u$, and Rick is going to use up
all his fencing material, then the perimeter of the rectangle, $2t+2u$, equals $L$, so for a given
width, $t$, the length is $u=L/2-t$. The area is $a=tu=t(L/2-t)$. The function only means anything realistic
for $0\le t\le L/2$, since for values of $t$ outside this region either the width or the height of the
rectangle would be negative. The function $a(t)$ could therefore have a maximum either at a place
where $\dot{a}=0$, or at the endpoints of the function's domain. We can eliminate the latter possibility,
because the area is zero at the endpoints.
To evaluate the derivative, we first need to reexpress $a$ as a polynomial:
\begin{equation*}
a=-t^2+\frac{L}{2}t\eqquad.
\end{equation*}
The derivative is
\begin{equation*}
\dot{a}=-2t+\frac{L}{2}\eqquad.
\end{equation*}
Setting this equal to zero, we find $t=L/4$, as claimed. This is a maximum, not a minimum or an
inflection point, because the second derivative is the constant $\ddot{a}=-2$, which is negative
for all $t$, including $t=L/4$.
\end{eg}
\subsection{Propagation of errors}\index{propagation of errors}\index{errors!propagation of}
The Women's National Basketball Association says that balls used in its games should have
a radius of 11.6 cm, with an allowable range of error of plus or minus 0.1 cm (one millimeter).
How accurately can we determine the ball's volume?
\fig{basketball}{How accurately can we determine the ball's volume?}
The equation for the volume of a sphere gives $V=(4/3)\pi r^3=6538\ \zu{cm}^3$ (about six and
a half liters). We have a function $V(r)$, and we want to know how much of an effect will be
produced on the function's output $V$ if its input $r$ is changed by a certain small amount.
Since the amount by which $r$ can be changed is small compared to $r$, it's reasonable to
take the tangent line as an approximation to the actual graph. The slope of the tangent line
is the derivative of $V$, which is $4\pi r^2$. (This is the ball's surface area.)
Setting $(\text{slope})=(\text{rise})/(\text{run})$
and solving for the rise, which represents the change in $V$, we find that it could be off by
as much as $(4\pi r^2)(0.1\ \zu{cm})=170\ \zu{cm}^3$. The volume of the ball can therefore
be expressed as $6500\pm 170\ \zu{cm}^3$, where the original figure of 6538 has been rounded off
to the nearest hundred in order to avoid creating the impression that the 3 and the 8 actually
mean anything --- they clearly don't, since the possible error is out in the hundreds' place.
This calculation is an example of a very common situation that occurs in the sciences, and even
in everyday life, in which we base a calculation on a number that has some range of uncertainty
in it, causing a corresponding range of uncertainty in the final result. This is called
propagation of errors. The idea is that the derivative expresses how sensitive the function's
output is to its input.
The example of the basketball could also have been handled without calculus, simply by recalculating the volume
using a radius that was raised from 11.6 to 11.7 cm, and finding the difference between the two volumes.
Understanding it in terms of calculus, however, gives us a different way of getting at the same
ideas, and often allows us to understand more deeply what's going on. For example, we noticed in passing that
the derivative of the volume was simply the surface area of the ball, which provides a nice geometric
visualization. We can imagine inflating the ball so that its radius is increased by a millimeter. The amount of
added volume equals the surface area of the ball multiplied by one millimeter, just as the amount of volume
added to the world's oceans by global warming equals the oceans' surface area multiplied by the added depth.
For an example of an insight that we would have missed if we hadn't applied calculus,
consider how much error is incurred in the measurement of the width of a book if the ruler is
placed on the book at a slightly incorrect angle, so that it doesn't form an angle of exactly 90 degrees with
spine. The measurement has its minimum (and correct) value if the ruler is placed at exactly
90 degrees. Since the function has a minimum at this angle, its derivative is zero. That means that
we expect essentially no error in the measurement if the ruler's angle is just a tiny bit off.
This gives us the insight that it's not worth fiddling excessively over the angle in this measurement.
Other sources of error will be more important. For example, is the book a uniform rectangle? Are we using
the worn end of the ruler as its zero, rather than letting the ruler hang over both sides of the book
and subtracting the two measurements?
\begin{hwsection}
\begin{hwwithsoln}{check-twot-graph}
Graph the function $t^2$ in the neighborhood of $t=3$, draw a tangent line, and use its slope
to verify that the derivative equals $2t$ at this point.
\end{hwwithsoln}
\begin{hwwithsoln}{graph-sin-et}
Graph the function $\sin e^t$ in the neighborhood of $t=0$, draw a tangent line, and use its slope
to estimate the derivative. Answer: 0.5403023058. (You will of course not get an answer this precise
using this technique.)
\end{hwwithsoln}
\begin{hwwithsoln}{diff-monomials}
Differentiate the following functions with respect to $t$: $1,\ 7,\ t,\ 7t,\ t^2,\ 7t^2,\ t^3,\ 7t^3$.
\end{hwwithsoln}
\begin{hwwithsoln}{diff-polynomial}
Differentiate $3t^7-4t^2+6$ with respect to $t$.
\end{hwwithsoln}
\begin{hwwithsoln}{diff-symbolic-const}
Differentiate $at^2+bt+c$ with respect to $t$.\thompson
\end{hwwithsoln}
\begin{hwwithsoln}{same-deriv}
Find two different functions whose derivatives are the constant 3, and give a geometrical
interpretation.
\end{hwwithsoln}
\begin{hwwithsoln}{integ-monomial}
Find a function $x$ whose derivative is $\xdot=t^7$. In other words, integrate the given function.
\end{hwwithsoln}
\begin{hwwithsoln}{integ-monomial-const}
Find a function $x$ whose derivative is $\xdot=3t^7$. In other words, integrate the given function.
\end{hwwithsoln}
\begin{hwwithsoln}{integ-polynomial}
Find a function $x$ whose derivative is $\xdot=3t^7-4t^2+6$. In other words, integrate the given function.
\end{hwwithsoln}
\begin{hwwithsoln}{observable-universe}
Let $t$ be the time that has elapsed since the Big Bang. In that time, one would imagine that light, traveling at speed
$c$, has been able to travel a maximum distance $ct$. (In fact the distance is several times more than this, because
according to Einstein's theory of general relativity, space itself has been expanding while the ray of light was
in transit.) The portion of the universe that we can observe
would then be a sphere of radius $ct$, with volume $v=(4/3)\pi r^3=(4/3)\pi(ct)^3$. Compute the rate
$\dot{v}$ at which the volume of the
observable universe is increasing, and check that your answer has the right units,
as in example \ref{pest} on page \pageref{pest}.
\end{hwwithsoln}
\begin{hwwithsoln}{ke}
Kinetic energy is a measure of an object's quantity of motion; when you buy gasoline, the
energy you're paying for will be converted into the car's kinetic energy (actually only some of
it, since the engine isn't perfectly efficient). The kinetic energy of an object with mass
$m$ and velocity $v$ is given by $K=(1/2)mv^2$. For a car accelerating at a steady rate, with
$v=at$, find the rate $\dot{K}$ at which the engine is required to put out kinetic energy.
$\dot{K}$, with units of energy over time, is known as the \emph{power}.
Check that your answer has the right units, as in example \ref{pest} on page \pageref{pest}.
\end{hwwithsoln}
\begin{hwwithsoln}{expanding-square}
A metal square expands and contracts with temperature, the lengths of its sides varying according to the
equation $\ell=(1+\alpha T)\ell_\zu{o}$. Find the rate of change of its surface area $a$ with respect to
temperature. That is, find $\dot{a}$, where the variable with respect to which you're differentiating
is the temperature, $T$.
Check that your answer has the right units, as in example \ref{pest} on page \pageref{pest}.
\end{hwwithsoln}
\begin{hwwithsoln}{second-deriv}
Find the second derivative of $2t^3-t$.
\end{hwwithsoln}
\begin{hwwithsoln}{inflection}
Locate any points of inflection of the function $t^3+t^2$. Verify by graphing that the concavity
of the function reverses itself at this point.
\end{hwwithsoln}
\begin{hwwithsoln}{neg-power-graph}
Let's see if the rule that the derivative of $t^k$ is $kt^{k-1}$ also works for $k<0$.
Use a graph to test one particular case, choosing one particular negative value of $k$, and one
particular value of $t$. If it works, what does that tell you about the rule? If it
doesn't work?
\end{hwwithsoln}
\begin{hwwithsoln}{lennard-jones}
Two atoms will interact via electrical forces between
their protons and electrons. To put them at a distance $r$ from one another (measured from
nucleus to nucleus), a certain amount of energy $E$ is required, and the minimum energy
occurs when the atoms are in equilibrium, forming a molecule. Often a fairly good approximation
to the energy is the Lennard-Jones expression
\begin{equation*}
E(r) = k\left[\left(\frac{a}{r}\right)^{12}-2\left(\frac{a}{r}\right)^6\right]\eqquad,
\end{equation*}
where $k$ and $a$ are constants. Note that, as proved in chapter 2, the rule that
the derivative of $t^k$ is $kt^{k-1}$ also works for $k<0$.
Show that there is an equilibrium at $r=a$. Verify (either by graphing or by testing
the second derivative) that this is a minimum, not a maximum or a point of inflection.
\end{hwwithsoln}
\begin{hwwithsoln}{prove-n-extrema}
Prove that the total number of maxima and minima possessed by a third-order polynomial
is at most two.
\end{hwwithsoln}
\begin{hwwithsoln}{max-min-of-sum}
Functions $f$ and $g$ are defined on the whole real line, and are differentiable everywhere.
Let $s=f+g$ be their sum. In what ways, if any, are the extrema of $f$, $g$, and $s$ related?
\end{hwwithsoln}
\begin{hwwithsoln}{pyramidal-tent}
Euclid proved that the volume of a pyramid equals $(1/3)bh$, where $b$ is the area of its
base, and $h$ its height. A pyramidal tent without tent-poles is erected by blowing air
into it under pressure. The area of the base is easy to measure accurately, because the
base is nailed down, but the height fluctuates somewhat and is hard to measure accurately.
If the amount of uncertainty in the measured height is plus or minus $e_h$, find the
amount of possible error $e_V$ in the volume.
\end{hwwithsoln}
\begin{hwwithsoln}{rocket-height}
A hobbyist is going to measure the height to which her model rocket rises at the peak of
its trajectory. She plans to
take a digital photo from far away and then do trigonometry to determine the height,
given the baseline from the launchpad to the camera and the angular height of the rocket
as determined from analysis of the photo. Comment on the error incurred by the inability to
snap the photo at exactly the right moment.
\end{hwwithsoln}
\begin{hwwithsoln}{sum-of-squares-coeff}
Prove, as claimed on p.~\pageref{claim-sum-of-squares-coeff}, that
if the sum $1^2+2^2+\ldots+n^2$ is a polynomial, it must be of third
order, and the coefficient of the $n^3$ term must be $1/3$.
\end{hwwithsoln}
\end{hwsection}