Go to CCP Homepage Go to Materials Page Go to  Precalculus Materials Go to Table of Contents
Go Back One Page Go Forward One Page

MATHCAD TUTOR

Part 4: Graphing Functions

In order to aid in the visualization of a function, you can use MathCad to create a graph. The first step in producing such an aid is to define the function.

  1. For example, let's define the function f determined by f(x) = 2x + 3. Type

      f(x) : 2x + 3

    You will see

      f(x) := 2x + 3

    Here f is the fuction name and x is the variable.

  2. Now we create a graph of f.

    • Click on the Graphing Palette on your toolbar. Then click on X-Y Plot.

    • A blank graph is inserted into the window. Drag the graph to the desired location -- which must be somewhere below the area where you defined your function.

    • Insert x in the space provided below the horizontal axis.

    • Insert f(x) in the space provided to the left of the vertical axis.

    • To adjust the limits of your graph, click somewhere above your graph. Then type:

        x:0,1;10

      This assigns a range of values to the variable x. The syntax is [beginning value for x, change in x, ending value for x]. This will appear as

        x:=0,1...10

  3. MathCad also allows you to graph other functions in the same plot.

    • To graph another function, it must first be defined. Type:

        g(x) : -2x + 6

      You will see

        g(x) := -2x + 6

    • To display the graph of g in the same plot box as the graph of f, click f(x) on the left side of the plot box. Change this to

        f(x), g(x)

    You should now see both graphs in the graph window.

  4. You can also change the colors of the graphs. The instructions given here will change the color of the graph of f.

    • Double-Click on the plot box; a window with several tabs will appear.

    • Select TRACES.  You will see a list of several traces.

    • Click on the trace 1 which will be f(x).

    • Click on the arrow beside the colors on the bottom of the window and select one.

    • Now click OK.

Go to CCP Homepage Go to Materials Page Go to  Precalculus Materials Go to Table of Contents
Go Back One Page Go Forward One Page


| CCP Home | Materials | Precalculus | Module Contents | Back | Forward  |
modules at math.duke.edu Copyright CCP and the author(s), 2001