Center Home -> Content Areas Home -> Math Home -> Project Activities -> Sketchpad Activities ->

How to Create the Tangent Line Tool

Activity Description Activity Guide Resources

 

What are Tools?

Custom Tools are generalized recordings of sketches. It is sometimes convenient to record the steps of particular sketches (e.g., tangent lines to curves) that you have made for subsequent playback. For example, when a future sketch requires a constructed tangent line, you can just use your custom tool rather than reconstructing one. Sketchpad can generate a custom tool of a construction while you are sketching it. You can use custom tools repeatedly to generate figures, or portions of figures, while sketching. Individual custom tools can be used as foundations for larger sketches, leading to potentially more complex constructions.

 

Part 1: Setting up the Sketch

  1. Open a new sketch. Show the grid. Plot the function f(x) = x2 and change its line width to thick.

    How open a new sketch and show the grid:

    • Under File select New Sketch.
    • Under Graph select Show Grid.


    How to plot a function:

    • Under Graph select Plot New Function.
    • Enter the function in the New Function window that appears; e.g., type x^2 for f(x) = x2. Click <OK>.

    How to change the features of a curve:

    • Select the curve.
    • Under Display select either Line Width or Line Color.

  2. Plot a draggable point on the x-axis. Make sure the point is confined to the x-axis. Label this point P.

    How to plot a draggable point confined to a line:

    • Select the line (x-axis) and be sure that only this line is selected. (If necessary, click on an open area in the sketch to deselect all selected objects.)
    • Under Construct select Point On Object (or Point On Axis).
    • Check to be sure the new point is confined to the line.

    How to label an object:

    • Right click on the object to be labeled and select Label Object... (or in this case, Label Point...).
    • Change the object's label in the window that appears.
    • Be sure that "Show Label" is selected. Click <OK>

  3. Plot the point P' with coordinates (xP, f(xP)) according to the instructions in the gray box below.

    How to plot P':

    Note: Because of the idiosyncracies of The Geometer's Sketchpad 4.0, the ordinate of P' is not as precise if it is simply constructed as a point on the curve. To ensure that the ordinate of P' is as precise as needed for this activity, it should be constructed by using the abscissa of P as described below.

    In your sketch, be sure a function has been graphed and a point P has been plotted on the x-axis.

    • First, display the abscissa of P':
      a. Select point P. (Be sure that only point P is selected. If necessary, click on an open area in the sketch to deselect all selected objects.) 
      b. Display abscissa of P by clicking on Measure then Abscissa(x).  This value
            is also the abscissa of P'.

    • Second, display the ordinate of P':
      a.  Again select point P.
      b.  Click on Measure in the menu bar, then Calculate....
      c.  Enter the function into the calculator by clicking on the algebraic form of the
           function shown in the sketch.  Enter the abscissa of P' by clicking on its value
          displayed in the sketch. 
      d.  Click <OK>.  The ordinate of P' will appear on the sketch.

    • Third, plot P':
      a.  Be sure the ordinate of P' has been deselected.  To deselect it,
           click on it.
      b.  Select the abscissa of P' first, then the ordinate of P'. 
           Under Graph select Plot as (x,y).
      c. Label it P'.

  4. Display f '(x). Evaluate f '(xP). Plot the tangent line using a variation of point-slope form for the equation of a line; i.e. enter the function f '(xP)*(x - xP) + f(xP) where f '(xP) is the slope of the line and (xP, f(xP)) is the point through which the line passes.

    How to display f '(x):

    • Select f(x). (Be sure that only f(x) is selected. If necessary, click on an open area in the sketch to deselect all selected objects.)
    • Under Graph select Derivative.

    How to evaluate a function:

    • Under Measure select Calculate. A calculator will appear.
    • Click on the algebraic form of the function shown in the sketch to enter it into the calculator window (in this case, f '(x) ).
    • Click on the value for which the function is to be evaluated (in this case, xP).
      Click <OK>.

    How to plot the tangent line (or other function):

    • Under Graph select Plot New Function.
    • To enter the function in the New Function window that appears, click on the variables shown in the sketch as appropriate rather than typing in specific values. (Enter only the right side of the function equation. Do not use an equal sign.) Click <OK>.

  5. For the activity Tangent Lines and Derivatives, you will need to display the slope of the tangent line without using derivative notation. This can be done by using the Slope feature of The Geometer's Sketchpad. Unfortunately the Slope feature is only available for lines constructed from two points, and the tangent line was constructed from a slope and a point. To solve this dilemma, construct another point B on the tangent line, hide the tangent line, then construct a new line through B and P'. The line BP' will be the new tangent line constructed from two points. Use the Slope feature to display its slope. Change the new tangent line's color to green, its line width to thick, and its label to "tangent line".

    How to plot a point on an object: (Follow the instructions above: "How to plot a draggable point confined to a line.")

    How to hide an object:

    • Select the object or objects to be hidden.
    • Under Display select Hide Object (in this case, Hide Function Plot).

    How to construct a line:

    • Select two points through which the line will be plotted.
    • Under Construct select Line.

    How to use the Slope feature:

    • Select the line. (Be sure that only the line is selected.)
    • Under Measure select Slope.

    How to label an object: see previous instructions.

    How to change the features of a curve: see previous instructions.

Part 2: Recording the Sketch to Create a Tool
  1. Use your construction of the tangent line to create a custom tool which, given the algebraic form of any function f(x), will construct the tangent line to f(x) through P'. The tool should plot the function f(x), P, P', and the tangent line. It should also display the value of the slope of the tangent line.

    How to Create a Custom Tool:

    • Create a sketch of an example of the construction you want the tool to produce. You may use any Sketchpad tools or menus to create this exemplar.
    • From your sketch, select both the given objects (in this activity, the algebraic form of the function and the point P) and the desired resulting objects you’d like the tool to produce(in this activity, the function plot, xP, f(xP), P', the tangent line, and the slope of the tangent line). The order in which you select the givens determines the order in which you’ll match the givens when using the tool.
    • Click and hold on the Custom Tools icon (double arrow icon) in the tool bar until a menu appears. Choose Create New Tool. You may name the tool in the dialog box that appears. Click <OK>. Your tool is added to the Custom Tools menu, and is ready to use.

  2. Program the tool to use the constant label "tangent line" for the tangent line every time the tool is played. Also, program the tool so that no matter what label the tool chooses to use for the point on the x-axis we labeled P, the tool will automatically label the corresponding point (xP, f(xP)) with a prime, e.g., P'. This is called a variable label. For example, if the tool chooses to use the label A for the point on the x-axis, then the corresponding point(xA, f(xA)) should automatically be labeled A'.

    How to program a constant label:

    • Click and hold on the Custom Tools icon (double arrow icon) in the toolbox until the menu appears. Select Show Script View. The script shows the given objects and each step you took as you constructed the sketch.
    • Double-click the step in the script which creates the object you want to have a constant label. On window that appears, enter the desired label and be sure that Use Label in Sketches is selected.

    How to program a variable label for this sketch:

    • Click and hold on the Custom Tools icon (double arrow icon) in the toolbox until the menu appears. Select Show Script View. The script shows the given objects and each step you took as you constructed the sketch.
    • Double-click the step in the script which creates the object you want to have a variable label. A window will appear. On window that appears, enter the following: ={3}'
      Note: Inside the curly braces is the line number of the step which defines the given object on which the variable name is based. For example, ignoring the line numbers used by The Geometer's Sketchpad, point P is defined on the third line of the script in the Tangent Line Tool. The apostrophe adds a " ' " directly after the label; i.e., the prime in P'.
    • Before clicking <OK>, be sure Use Label in Sketches is selected.

  3. Save your sketch, then test your tool on a new sketch.

    To test your new Tangent Line Tool:

    • Open a new sketch, show the grid, and plot a function such as f(x) = x2.
    • Click and hold on the Custom Tools icon (double arrow icon) in the Toolbox until the menu appears. To ensure that your tool is selected for use, be sure it is check-marked in the menu.
    • Click on the algebraic form of the function shown in the sketch. As you move the cursor, a point will appear next to the cursor. Position this point on the x-axis. (Note: When the point intersects the x-axis, the x-axis will change color.) Click the mouse button to put the point in place.
    • Click on the arrow tool to stop the tool from repeating.

  4. So that your tool is available for use in the Custom Tools menu every time The Geometer's Sketchpad is opened on your computer, save the sketch containing the tool in the Tools Folder in the Sketchpad Folder on your C drive.

Back to Project Activities | Back to Math Homepage

Send questions or comments here.
Last modified on March 2, 2004