Introduction
The
slope of the tangent to the graph of y = f(x) at x = a can be approximated
as follows:

Consider the secant line through the points (a, f(a)) and (a+h,
f(a+h)) for a certain value of h.

Its slope is
.

When h approaches 0, the point (a+h, f(a+h)) gets closer to the
point (a, f(a)). The secant line becomes the tangent to the graph
of y = f(x0 at x = a. Therefore, the slope of the secant approaches
the slope of the tangent.
This
applet illustrates this concept. It allows the user to enter a function,
to select the points (a, f(a)) and (a+h, f(a+h)), to change h so that
the point (a+h, f(a+h)) gets closer to the point (a, f(a)).
Features
There
are six areas on the applet the user can interact with.
Viewing
Window Parameters.
In
this area, the user specifies the range for the x and yvalues. The
default is that x and y are between 10 and 10. Any number as well as
any expression resulting in a number can be used here. For example,
when trigonometric functions are studied, the user may prefer to use
multiples of pi such as 2*pi or 4*pi.
If
"use yrange" is checked (the default), then both the x and yrange
values are used. If it is unchecked, the applet will only use the xrange
values and compute the corresponding range for the yvalues.
The
RESET ZOOM button is used to reset the x and y ranges to their default
values.
Tangent
line information
In
this area, the user specifies the function to use and the xcoordinate
of the point where the tangent will be drawn. Once these are specified,
the corresponding ycoordinate of the point as well as the slope of
the tangent will be displayed.
Secant
Line Information
In
this area, the user specifies the value of h for the second point defining
the secant. Once this is done, the coordinates a+h and f(a+h) will be
displayed as well as the slope of the secant. The user can also use
the left and right buttons to move this second point as well as the
left and right arrow keys. As this happens, all the fields in this area
will be updated accordingly and the secant line will be redrawn.
Control
Buttons
The
PLOT button is used to plot the function after it has been entered.
The
CLEAR ALL button erases all the areas. The applet will look as if you
had just started it.
Plot
Area
This
areas displays the graph, the various points chosen, the tangent and
secant lines. The only interaction with this area is via the mouse.
The user can click near the graph to select the first point defining
the tangent, and the second point defining the secant. The user can
also draw a virtual box by clicking on one of its corner and dragging
the mouse to the other corner. The graph will be zoomed into this box,
the fields in the Viewing Window Parameters area will be updated accordingly.
Message
Area
There
is no interaction with this area. It is used to display hints on what
the user should do next as well as error messages if the wrong operation
is performed. Always look at what is displayed in this area.
User
Actions
The
user can do the following:

Enter any function.

Pick the point (a, f(a)) where the tangent will be drawn by either
clicking on the graph, or specifying the value of a.

Pick the second point (a+h, f(a+h)) by either clicking on the graph
or specifying the value of h.

Change the point (a+h, f(a+h)) by either clicking in another location,
specifying a new value for h, or using the buttons or the arrow
keys to move left or right . If h is chosen to be smaller and smaller,
the user will be able to observe that the secant line becomes the
tangent line and that the slope of the secant approaches the slope
of the tangent.

Zoom in an area by clicking in one corner of a virtual box, and
dragging the mouse to the opposite corner of that box. This allows
the user better control on the increment in h, if the second point
defining the secant is moved using the left and right buttons. The
point will always move by one pixel. However, the value one pixel
represents depends on the zoom level.
How
to Use the Applet
Use
the applet as follows:

If necessary, change the values in the Viewing Window Parameters
area, though the default values should be fine in many cases.

Enter a function. Nothing can happen unless a function has been
entered. Use the same syntax as in the PlotSolve or the Java Math
Pad applets.

Next, specify the point where the tangent will be drawn.

Specify the second point for the secant line.

Change the second point defining the secant line. In doing so, the
user can verify that as h approaches 0, the secant becomes the tangent.
This also allows the user to evaluate the expression
as h approaches 0