Names:

The Derivative at a Point

Tom Linton, http://www.central.edu/homepages/lintont

Math 192, Moravian College, Spring 1999

The actual Maple worksheet for this HTML document.

Execute this command to load several plotting packages:

> map(with,{plots,plottools}):

Introduction:

We've seen average rates of change, [Maple Math]of functions f(x) from x = a to x = b in several settings. Typically, these quantities are more meaningful than just the net changes f(b) - f(a), as the length of time it takes to obtain a change is normally very important. Gaining $5 over a ten year period is not a bad thing, but $5 in a minute is much better. Todays lab will investigate the notion of instantaneous rate of change, or the rate of change at a fixed instant in time, like t = 3 or x = -2. This might represent your speed at exactly 12 noon, or the rate of increase in sales that one would experience by spending exactly $20000 on advertising. The twist here is that the time period over which we wish to measure a change in f(x) has length zero, so we can't divide a change in f(x) by a change in x, or we'd get a meaningless expression: [Maple Math][Maple Math]= ? To overcome this difficulty, we'll rely on two things we've already studied, average rates of change (over smaller and smaller time periods) and linear functions (because they have the same "rate of change" everywhere, namely their slope). These notions will guide us to develop a meaningful way to define the instantaneous rate of change of any function, at any instance (or point).

Here is the Maple definition of a linear function f(x) = 2x + 0.5 with slope 2. I've used decimal numbers to indicate that decimal outputs are preferred.

> f := x -> 2.0*x + .5;

[Maple Math]

And a plot:

> plot(f(x), x = -3 .. 3, title=`Slope of 2`);

[Maple Plot]

It should be clear that the graph above is increasing at the same rate everywhere, so there should be no difference between average rates of change and instantaneous rates of change. All rates of change are the same for this graph, namely up two y units for each x unit we go over. Here is one (randomly selected) average rate of change for this function.

> (f(5)-f(2)) / (5 -2);

[Maple Math]

That average rate of change is just the slope.

Change the points (x = 5 and x = 2) to 3 other random pairs of values and check the average rate of change of f(x) over your new intervals.

>

>

>

Any function g(x), at any point [x, g(x)], which is increasing at the same rate as the line above, should be said to have an instantaneous rate of change equal to 2 (at that point). In a similar fashion, lines with slope 1, 4, -2 and -3.6 (and any other value for that matter) could be our template examples of what it means to have an instantaneous rate of change equal to 1, 4, -2 or -3.6. When a function's graph (at a certain point) is rising or falling at the same rate as a line, the function and line have the same instantaneous rate of change at that point. Unfortunately, most functions don't look like lines, or do they?

It turns out that most nice functions actually do look like lines, so long as you zoom in close enough. Take a look at

g(x) = 2(x + 0.5)^2,

near x = 0. It has plenty of bend to it in this view:

> plot(2*(x+0.5)^2,x= -1 .. 1 );

[Maple Plot]

Edit the plot command above, so that it plots x over smaller and smaller intervals centered at x = 0 (change the x = -1 .. 1 to things like x = -0.1 .. 0.1) until the graph looks like a line.

The plot below shows both f(x) (in red) and g(x) = 2*(x + 0.5)^2 (in blue) on the range x = -1 .. 1. Notice how the function and line seem to be going up at the same rate (a rate of 2) at x = 0.

Change the plot range to your "up-close" values above where g(x) looked like a line. What do you see?

> plot([f(x),2*(x+0.5)^2],
x=-1 ..1,
color=[red,blue]);

[Maple Plot]

>

Your last plot above should show you the line that looks most like g(x) = 2(x + 0.5)^2 near x = 0. The line is called the tangent line to g(x) at x = 0, and the tangent line's slope is defined to be the instantaneous rate of change of g(x) at x = 0.

Below is an animation which shows a function in blue, and a moving point with the tangent line (in red) to the function, at the moving point. The slope of the tangent line appears as text, and its numeric value is plotted as a red diamond. Click on the plot below to enclose it in an anchored frame. Your toolbar icons should change into the animation buttons. Click the play button (it looks like a right pointing triangle) to view the animation, then click on the single frame button (it looks like an arrow hitting a wall) and step through the animation frame by frame to see the individual tangent lines, their slopes, and their numeric values. It's important to understand how a tangent line "just touches" a graph at a given point. We'll be calculating slopes by drawing in tangent lines in the future, so you'll need to know how to draw in the tangent line to f(x) at x = a, and this movie shows you several examples of how the tangent line looks on a graph of f(x)!

The plot below first defines a function f(x) and the value "slope" (currently set to zero), and then displays a plot of the function f(x), a line through [1, f(1)] with that given slope, and a "point" at [1, f(1)].

By repeatedly guessing a new value for slope, produce a plot of f(x) and what appears to be the tangent line to f(x) at x = 1.

> f:=x->-1*(x-1)*(x+3)*(x+1)*(x-5)+40:

slope:=0:

plot([f(x), slope*(x-1)+f(1), [[1,f(1)]] ],
x=-2..2,style=[line,line,point],
color=[blue,red,black],symbol=BOX);

[Maple Plot]

Consider what we did above to make the first function g(x) look like a line:

we simply zoomed in near x = 0 and the graph (on its own) looked like a line (by luck it looked like the line f(x) = 2x + 0.5 ).

If g(x) looks like its tangent line "up close", then "up-close average rates of change" of g(x) ought to be close to average rates of change of the tangent line (i.e. the slope of the tangent line). After all, one could hardly tell the difference between g(x) and f(x) on your up close plot. Thus, so long as we calculate average rates of change using two points very close to x = 0, we should get values close to the slope of the tangent line at x = 0.

This suggests that we might estimate the instantaneous rate of change of f(x) at x = a, by using average rates of change,

[Maple Math]

for values of b very close to a. We saw above that the instantaneous rate of change of g(x) at x = 0 was 2 (the slope of the tangent line at x = 0). Here is a definition of that function g(x), and one "up close" average rate of change of g(x) near x = 0.

> g := x -> 2*(x + 0.5)^2;

[Maple Math]

> (g(.1)-g(0.)) / (.1 -0.);

[Maple Math]

That's close to 2, but not all that close.

Calculate 4 more average rates of change by picking the point b (I used b = 0.1) closer and closer to zero. Make sure at least one of your values for b is close to zero and negative. Are your "up close" average rates of change close to 2?

>

>

>

>

Consider f(x) = 100*(1.17^x) and lets try to estimate the instantaneous rate at which f(x) is growing at x = 2. First define f as a function:

> f := x -> 100*(1.17^x);

[Maple Math]

Then estimate, via "up close" average rates of change, the slope of the tangent line:

> (f(2.003)-f(2))/(2.003-2);
(f(1.99996)-f(2))/(1.99996-2);
(f(2)-f(2.000007))/(2-2.000007);

[Maple Math]

[Maple Math]

[Maple Math]

That suggests that the slope of the tangent line at x = 2 is close to 21.49. Furthermore, the point [2, f(2)] is on the tangent line, therefore, the formula for the tangent line to f(x) at x = 2 should be 21.49*(x - 2) + f(2). Here is a plot showing both f(x) and its estimated tangent line at x = 2.

> plot([f(x), 21.49*(x-2)+f(2)],
x=-2..6,color=[blue,red],
title=`Tangent line at x = 2`);

[Maple Plot]

If we zoom in near x = 2, we should see that f(x) looks just like the tangent line; so close that we cannot even tell the difference!

> plot([f(x), 21.49*(x-2)+f(2)],
x= 2-.01 .. 2 + .01,color=[blue,red],title=`Up Close`);

[Maple Plot]

Make similar "far away" and "up close" plots of f(x) = (12 + 5*x^2) / (2 + x^3) and its tangent line at x = 3.

>

>

>

Since instantaneous rates of change are just slopes of tangent lines, we can use what we know about the slopes of lines to list some properties of instantaneous rates of change. For example, a line with a positive slope is increasing, therefore, if f(x) is increasing at x = 3 (so its tangent line at x = 3 will be increasing also), then the instantaneous rate of change of f(x) at x = 3 will be positive. Bigger instantaneous rates of change correspond to steeper slopes of tangent lines, or "the steeper the slope, the larger the instantaneous rate of change".

If a function is decreasing at a point, its tangent line there will have a negative slope, and so its instantaneous rate of change will be negative. Steeper downhill sections of f(x) will have more negative instantaneous rates of change than less steep downhill sections.

Here is a plot of a function f(x) and several labeled points:

[Maple Plot]

>

At which of the labeled points is the instantaneous rate of change positive?

At which of the labeled points is the instantaneous rate of change negative?

Note, a horizontal line has a slope of zero.

At which of the labeled points is the instantaneous rate of change zero?

Is the instantaneous rate of change of f(x) larger at A or C?

What about C or E (which is larger)?

Derivatives

The instantaneous rate of change of f(x) at x = a is so important that it has a special name. It's known as the derivative of f(x) at x = a, and is denoted by f '(a) (pronounced "f prime of a", or "the derivative of f of x at x equals a"). f '(2) is the instantaneous rate of change of f(x) at x = 2, it is also the slope of the tangent line to f(x) at x = 2, and it gives a measure of how fast f(x) is increasing or decreasing, right at the point x = 2.

When we estimate derivatives from numeric data (tables), we use average rates of change (also called difference quotients, change in f over change in x, both changes being differences), selecting the 2 points x = a and x = b, as close to the location where we wish to know the derivative as possible. To estimate f '(5), we might use a = 4.9 and b = 5.1, but normally we have little control over the values to use, since we only have a table of values (if x = 4.9 is not in our table, we can't use it). Because of this, and the fact that "centered estimates" are almost always better than uncentered ones, to estimate f '(c) from a table, we pick one point to the left of x = c (so it is less than c) and one point to the right (so this one is larger than c).

The plot below is a sequence of pictures. Click on the plot to move to the next frame. You'll want your browser (Netscape for best results) in full-screen display mode for this to look correct. The plots may wiggle around some the first loop through the sequence. Each frame shows f(x) (blue), its tangent line at x = 1 (red) and another line (plum) whose slope (just look at the slope of these extra lines, not their locations) is equal to an average rate of change of f(x). One line comes from using x = 1 and a point to the left of x = 1, one uses x = 1 and a point to the right, and one uses centered values, a point to the left and a point to the right (so x = 1 is not used).

Here is the function definition first.

f:=x->4*sin(x+.2):

>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Which line (left, right or center) looks closest to being parallel to the red tangent line? (parallel lines have the same slopes.)

This is all we'd see in a table:

> Digits:=3:
evalm([[`x`,`f(x)`],[.8,f(.8)],[1.,f(1.)],[1.2,f(1.2)]]);
Digits:=10:

[Maple Math]

The left slope is (f(1) - f(0.8)) / (1 - 0.8) which is:

> (3.73-3.36)/.2;

[Maple Math]

That gives an estimate of 1.85 for f '(1) (which is decent, but not as good as we can do).

The right slope is (f(1.2)-f(1)) / (1.2 - 1), while the centered slope is (f(1.2) - f(0.8)) / (1.2 - 0.8).

Calculate numeric values for the right and centered slopes from the table.

>

>

Here is one way (admittedly quite odd looking) to get Maple to calculate the exact value of f '(1), D stands for derivative.

> D(f)(1.);

[Maple Math]

Which estimate (left, right or centered) was the best?

>

Hopefully, you will be able to do most of the homework problems from sections 2.1 and 2.2 in the text, using what you've learned here, and by reading the sections!