GraphingCalculator 3.5;
Window 76 16 838 840;
PaneDivider 328;
Slider -4 1;
SliderSteps 99;
SliderControlValue 20;
SliderVariable h;
2D.BottomLeft -0.515625 -6.5;
Expr y=e^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=(e^[a+h]-e^[a])/h;
Text "where m is the slope of the secant line between the two points:";
Color 4;
Expr vector(a,e^[a]);
Text "and";
Color 4;
Expr vector(a+h,e^[a+h]);
Text "The secant line between the above two points is the red graph which goes through (a, exp(a)) with slope m:";
Color 2;
Expr y=e^[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 random 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.)
";