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 net changes in a function's value, 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, two y units for each x unit. Here is one (randomly selected) average rate of change for this function.

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

2.000000000

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 a rate like the graph above, should be said to have an instantaneous rate of change equal to 2. 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. It is also clear that 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 (use x = -h .. h and take h smaller and smaller) until the graph looks like a line.

Once your graph looks like a line, copy and paste your new zoomed in plot command below, then edit it so that both f(x) and 2*(x + 0.5)^2 are plotted (use plot( [ f(x), 2*(x + 0.5)^2], x = etc. ) on your zoomed in window. Add the option color = [red, blue] (just before the closing right parenthesis and semicolon of the old plot command) to make the line red and the function's graph blue. The two lines should overlap one another (you might only see one of them). Finally, change the plot range back to x = -1 .. 1.

>
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)! If the animation isn't playing, try hitting the "reload" button on your browser.

[Maple Plot]

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 the line f(x) = 2x + 0.5 ).

If g(x) looks like its tangent lines "up close", then average rates of change of g(x), "up close" ones anyway, ought to be close to average rates of change 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.);

2.2

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

Calculate 4 more average rates of change by picking the point (I used b = 0.1) b 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);

21.49730
21.492
21.49

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:

> 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 step through the frames one at a time. Each frame shows f(x) (blue), its tangent line at x = 1 (red) and another line whose slope is equal to an average rate of change of f(x) (just look at the slope of these extra lines, not their locations). 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 a point to the left and a point to the right (so x = 1 is the center of the two points used). The images may jump around some, until you've clicked through once.

Here is the functions definition, execute this line!

>

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;

1.850000000

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.);

1.449431018

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!

Business Math Materials Page, Tom's class schedule.