GraphingCalculator 3.5;
Window 45 25 807 849;
PaneDivider 298;
Slider -2 0.5;
SliderSteps 99;
SliderControlValue 0;
SliderVariable h;
2D.BottomLeft -1.734375 -4.203125;
Expr y=sec([x]);
Text "The purple graph is the function whose derivative we seek.";
Color 3;
Expr a=1;
Text "*a* is the x value where we will approximate the tangent line.
If *h* is the displacement from *a* where the secant line will be drawn, then";
Color 6;
Expr m=(sec([a+h])-sec([a]))/h;
Text "where *m* is the slope of the secant line between the two points:";
Color 4;
Expr vector(a,sec([a]));
Text "and";
Color 4;
Expr vector(a+h,sec([a+h]));
Text "The secant line between the above two points is the red graph which goes through (*a*, sec(*a*)) with slope *m*:";
Color 2;
Expr y=sec([a])+m*[x-a];
Text "
*m* approximates the derivative of the purple function at *x*=*a* when *h* is small. ";
Color 17;
Expr m;
Text "
(For some settings of the range of the parameter *h*, *h* will take the value *h*=0. The computer cannot compute 0/0 and gives some spurious value for *m*. It then plots some 'funny' line instead of the tangent line. The settings choosen here avoid that issue. If you wish to illustrate that issue, click on the symbol *h* in the slider at the bottom of the graph and change the number of steps to 100.)
";