deriv1.mws

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

.2559559604

>    (f(1.5)-f(1))/(1.5-1);

.179547103

>   

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

.20609805

>    (f(.98)-f(1))/(.98-1);

.20817758

>    (f(1.005)-f(1))/(1.005-1);

.2064398

>    (f(.999)-f(1))/(.999-1);

.2068524

>    (f(1.001)-f(1))/(1.001-1);

.2067144

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

.2067834969

Now lets look at it graphically.

>    plot(f(x),x=0..3);

[Maple Plot]

>    plot([f(x),[[.5,f(.5)],[1,f(1)]]],x=0..3,style=[line,point],symbol=[point,circle],color=[red,red]);

[Maple Plot]

Lets find the equation of the line joining the two points.  

First find the slope.

>    m:=(f(1)-f(.5))/(1-.5);

m := .2559559604

Look familiar?  Now for the y-intercept.

>    b:=fsolve(f(1)=m0*1+d,d);

b := .3643945304

>    y:=x->m*x+b;

y := proc (x) options operator, arrow; m*x+b end proc

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

[Maple Plot]

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

[Maple Plot]

>    m1:=(f(.95)-f(1))/(.95-1);

m1 := .21032894

>    b1:=fsolve(f(1)=m1*1+d,d);

b1 := .4100215508

>    y1:=x->m1*x+b1;

y1 := proc (x) options operator, arrow; m1*x+b1 end proc

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

[Maple Plot]

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

m2 := .2067834969

>    b2:=fsolve(f(1)=m2*1+d,d);

b2 := .4135669939

>    y2:=m2*x+b2;

y2 := .2067834969*x+.4135669939

>    plot([f(x),[[1,f(1)]],y2(x)],x=0..3,style=[line,point,line],symbol=[point,circle,point],color=[red,red,blue]);

[Maple Plot]

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

[Maple Plot]

>    plot([f(x),y1(x),y2(x)],x=.9..1.1,color=[red,blue,black]);

[Maple Plot]

Harder to see so lets zoom in even closer.

>    plot([f(x),y1(x),y2(x)],x=.999..1.001,color=[red,blue,black]);

[Maple Plot]

Still hard to see but there appear to be only two lines because the black and the red are indistinguishable.