Constructing Tangents to Functions and Calculating the Derivative

John Olive

The University of Georgia

With Geometerís Sketchpad v. 3.0 it is possible to construct the graph of almost any algebraic function using the Plot as (x, y) feature under the Graph menu and the Locus construction under the Construct menu. [Note: To obtain smoother graphs you should increase the number of samples in a locus object to 200. You can do this using the Preferences under the Display menu, and then clicking on the More button.]

To construct a graph of a function start by selecting Create Axes from the graph menu. This brings up the x-y axes. The following steps can be used to construct dynamic graphs of most functions. First you need to create a script for constructing control points that will be used for varying the coefficients of your function. Once you have your script use it to construct a control point for each coefficient needed for your particular function.

Creating the Control Point Script

  1. Start a new script from the file menu and click the record button.
  2. Place a point on the y-axis somewhere below the x-axis.
  3. Construct a line through this point perpendicular to the y-axis.
  4. Place a point on the perpendicular line and change its label to "a".
  5. Hide the perpendicular line.
  6. Construct a segment between your two points (the one on the y-axis and point a).
  7. Measure the coordinates of point a.
  8. Double click these coordinates to bring up the calculator and click once more to get the x-coordinate of point a in the calculator. Click O.K.
  9. Hide the coordinates.
  10. Stop your script recording and save the script as control_pt.gss
You can now use your script to place more control points along the y-axis. Simply select the y-axis and play your script. You will need to change the labels of each new control point and also edit the measurement for each control point (e.g. for point b, edit the measurement to read "b =" rather than "xa =".

Creating a Cubic Function

  1. Use your script to create four control points labeled a, b, c and d.
  2. Place a free point on the x-axis. Change its label to "x".
  3. Measure the coordinates of x and use the calculator to get the x-coordinate of x (see step 8 above). Edit this measure to read "x =".
  4. Using the measures of a, b, c and d, and x construct the following expression in the calculator: a.x3+b.x2+c.x+d. (You will need to press the * key between the measure of each coefficient and the measure of x.)
  5. Select the measure of x and this cubic expression IN THAT ORDER and Plot as (x, y) under the Graph menu.
  6. If you donít see the plotted point move your point x closer to the origin.
  7. Select the plotted point and the point x IN THAT ORDER and choose Locus under the Construct menu.
  8. The locus of the cubic function should appear. While it is selected, change its color using the Display menu.
Play with the control points and see how the different coefficients affect the shape of the graph of the cubic function. Constructing a Secant to a Function

In this activity we shall use our control_pt.gss script to create a control point that will be used to measure small changes in x. Call this control point dx. In the calculator create the measure of (x - dx/2) and (x + dx/2) . Using each of these measures and the measures of your four coefficients (a, b, c, and d) create the following two cubic expressions:

a. (x - dx/2)3+b. (x - dx/2)2+c. (x - dx/2)+d
a.(x + dx/2)3+b. (x + dx/2)2+c. (x + dx/2)+d
These two expressions give the value of your cubic function for (x - dx/2) and (x + dx/2) respectively. The following steps will construct these points on the graph and the secant between them.
  1. Select the measures of (x - dx/2) and a. (x - dx/2)3+b. (x - dx/2)2+c. (x - dx/2)+d IN THAT ORDER and Plot as (x, y) under the Graph menu. A point should appear on your function locus.
  2. Do the same for (x + dx/2) and a.(x + dx/2)3+b. (x + dx/2)2+c. (x + dx/2)+d. A second point should appear on your function locus.
  3. Select these two new points on the locus and construct a LINE through them.
  4. Vary the length of dx to see what happens to this secant line.
As dx becomes very small this secant line appears to become tangent to the curve representing the cubic function. With dx very small (<0.1) move your free x point along the x-axis to see how the secant line travels along the curve (see Figure 1).

Figure 1

Constructing the Derivative

Lengthen dx so that you can see the three points distinctly on the locus of the function. Select the secant line and the point between the two points defining the line. This point is f(x) for the cubic function. Construct a line parallel to the secant line through f(x). Measure the slope of this "tangent" line. As you make dx very small the secant line becomes the tangent line. If you make dx large (dx > 2.0) and move your free point x, it will be obvious that the line parallel to the secant line through f(x) is not always tangent to the cubic function.

Create the expression for the derivative of your cubic function using the calculator. This will be the following expression: 3.a.x2+2.b.x+c. Make dx very small. What do you notice about the slope of the tangent line and the value of this expression? Move x? Do these values remain the same? Do they remain equal to each other?

The value of the derivative varies with the position of x so we can plot this relationship. Select the measure of x and the expression 3.a.x2+2.b.x+c IN THAT ORDER and Plot as (x, y) from the Graph menu. If you cannot see the plotted point move the point x towards the origin. Select this new plotted point and the point x IN THAT ORDER and select Locus under the Construct menu. What shape is the graph of the derivative function?

Vary your coefficients and then write three things about the relationship between the two graphs (see Figure 2):
 
 








Figure 2 (Click here for a GSP sketch of this figure)

Investigating the Derivative of the Quadratic

Start a new sketch, create the axes and place a free point on the x-axis. Relabel this point x. Use your control_pt.gss script to create three control points, a, b and c. Follow the method you used for the cubic function to create the expression a.x2+b.x+c and construct its graph. Create a control point dx and use this to construct a secant to your quadratic function. Construct the line through f(x) parallel to your secant line. Move point x to see the "tangent" and secant lines move around your parabola. Vary dx. Make it as large as you can. Move x again. Does the "tangent" line ever appear NOT to be tangent to the curve? Go back to your cubic sketch and try the same thing. What seems to be special about the quadratic function?

Challenge: Create the expression and plot the derivative of your quadratic fí(x)=2.a.x+b. Does the value of fí(x)= slope of the secant line for any dx? Prove (algebraically) that the secant line through the points f(x-dx/2) and f(x+dx/2) will ALWAYS be parallel to the tangent at f(x) for ANY quadratic function!