Examples of the derivative at a point.
Examples 1 and 2, p. 52-53
> | f:=V->evalf((3*V/(4*Pi))^(1/3)): |
We can find the average rate of change of this function near V=1 by taking some difference quotients.
> | (f(.5)-f(1))/(.5-1); |
> | (f(1.5)-f(1))/(1.5-1); |
> |
How are we to interpret these numbers? What are their units?
We expect the instantaneous rate of change to be somewhere in between these numbers.
> | (f(1.01)-f(1))/(1.01-1); |
> | (f(.98)-f(1))/(.98-1); |
> | (f(1.005)-f(1))/(1.005-1); |
> | (f(.999)-f(1))/(.999-1); |
> | (f(1.001)-f(1))/(1.001-1); |
From these calculations we guess that the instantaneous rate of change is about .207.
To get the exact value, we must calculate a limit.
> | limit((f(x)-f(1))/(x-1),x=1); |
Now lets look at it graphically.
> | plot(f(x),x=0..3); |
> | plot([f(x),[[.5,f(.5)],[1,f(1)]]],x=0..3,style=[line,point],symbol=[point,circle],color=[red,red]); |
Lets find the equation of the line joining the two points.
First find the slope.
> | m:=(f(1)-f(.5))/(1-.5); |
Look familiar? Now for the y-intercept.
> | b:=fsolve(f(1)=m0*1+d,d); |
> | y:=x->m*x+b; |
> | plot([f(x),[[.5,f(.5)],[1,f(1)]],y(x)],x=0..3,style=[line,point,line],symbol=[point,circle,point],color=[red,red,blue]); |
The blue line is called a secant line to the graph of f(x).
Its slope is the average rate of change of f with respect to x between the two x-values.
Notice how it gives a reasonable approximation to the curve between those x-values.
Lets look now at another secant line.
> | plot([f(x),[[.95,f(.95)],[1,f(1)]]],x=0..3,style=[line,point],symbol=[point,circle],color=[red,red]); |
> | m1:=(f(.95)-f(1))/(.95-1); |
> | b1:=fsolve(f(1)=m1*1+d,d); |
> | y1:=x->m1*x+b1; |
> | plot([f(x),[[.95,f(.95)],[1,f(1)]],y1(x)],x=0..3,style=[line,point,line],symbol=[point,circle,point],color=[red,red,blue]); |
Again this secant line is a very good approximation to the curve for x-values in between .95 and 1. What if we use the instantaneous rate of change?
> | m2:=limit((f(x)-f(1))/(x-1),x=1); |
> | b2:=fsolve(f(1)=m2*1+d,d); |
> | y2:=m2*x+b2; |
> | plot([f(x),[[1,f(1)]],y2(x)],x=0..3,style=[line,point,line],symbol=[point,circle,point],color=[red,red,blue]); |
This line is called the tangent line to the graph of f(x) at x=1 and it is the best linear approximation to f(x) near x=1. To see that this is really true, lets look at the other secant lines.
> | plot([f(x),y(x),y2(x)],x=.9..1.1,color=[red,blue,black]); |
> | plot([f(x),y1(x),y2(x)],x=.9..1.1,color=[red,blue,black]); |
Harder to see so lets zoom in even closer.
> | plot([f(x),y1(x),y2(x)],x=.999..1.001,color=[red,blue,black]); |
Still hard to see but there appear to be only two lines because the black and the red are indistinguishable.