Introduction to Graphing: Worksheet
In this Worksheet,
we will see how we may use XFunctions to
create and manipulate functions This program has a large number of features that
we will not use in this course, so we will only give a brief introduction to the
basic features that we want to use right away. We will discuss more
advanced features as necessary. However, you should feel free to read the complete
documentation and experiment on your own, if you wish. In
particular, you should notice how the program supports four out of the seven
different perspectives on functions, namely as a formula, graph, black-box,
or table of values.
We will give
step-by-step instructions on using XFunctions.
Please try
to carefully follow the directions written in this section. Each
instruction will be numbered separately. As you work through the Worksheet, try
to answer the bulleted questions. As usual, you should give an honest
attempt to answer the question before looking at the solutions. Warning:
If you do want to look at the Answers before completing the Worksheet,
make sure to "right-click" on the link to open the link in a new
window; otherwise, your XFunctions window will disappear and you will lose any
work you may have done.
You should work with a partner. You should also make
sure that both of you try working with the program for
some amount of time.
- Start XFunctions by clicking
on this button:.
- Resize your browser window and position both windows so you can read these
instructions and work with XFunctions.
Do not resize the XFunctions window, or you will distort the
dimensions of the graphing window.
Notice that the XFunctions window initially shows a list of pre-defined functions on the left, a
plot in the middle, a pull-down menu at the top, and various control buttons and
boxes along the right and bottom.
- What is the name of the function that is initially being
graphed? Answer.
- What is the "plot-window" (i.e., the limits on
the horizontal and vertical axes) for this plot? Answer.
- Hit the "Zoom Out" button once. Observe
carefully what happens to the limits of the plot window. Now hit it
two more times and see if you can detect precisely how it sets the limits.
- Now hit the "Restore" button. Observe
carefully what happens to the limits of the plot window. Now hit the
"Zoom In" button once and the "Restore" button again.
- Describe precisely what happens to limits on the "plot-window" when
you hit the "Zoom In", "Zoom Out", and
"Restore" buttons? Answer.
Note: The physical dimensions of the plot window are in an approximate ratio
of 6:5; this means if you want the units on the horizontal and vertical axes to look
equal, then you need to choose the limits on the axes to be in the same ratio.
- Change the values in the "xmin" and "xmax" boxes to
-6 and 6, respectively. Notice how the sides of the absolute value
graph now look to be 45°, as they should. Click on the
"Equalize" button to have the horizontal limits to be set exactly
to a "true" picture of the graph.
- What are the eight commands listed in the top menu? Answer.
The Main Screen
The Main Screen allows you to obtain a quick graph of a single function and
examine values of that function.
- Click anywhere on the graph.
Notice how, when you click on the graph, a pair of crosshairs (which looks
like a red plus sign) appears on the graph at the same horizontal position but
on a plotted value of the function. Also, the x-value (i.e., the
horizontal coordinate) appears in the box at the bottom, with the corresponding
functional evaluation displayed directly above. Note: In this way,
XFunctions allows you to treat a function as a machine taking inputs to outputs,
without needing to pay attention to the formulas that may be involved in
evaluation.
- Click-and-drag over the graph.
Notice how the crosshairs move along the graph, directly above or below
where you are pointing (i.e., with the same x-value), and
the values at the bottom of the window change automatically, as well.
- Enter the number -3 and hit the "Set" button (or hit
the Enter key).
- What value does the program give for the absolute value of
-3? Answer.
- Select the floor function from the list on the
left. Now enter several different decimal numbers, such as -2.5, 3,
4.12, etc. in the "x =" box and record the results.
- Give a rule, in words, that describes the floor
function. Answer.
Making New Functions
Now we will move on to define our own functions. Specifically, the buttons in the lower-left of the window allow
us to define new functions either by a formula, as a graph, or as a table of
values (i.e., three of the other different
perspectives on functions). While XFunctions will allow
us to define a function either algebraically, graphically, or numerically, we will focus primarily on
the algebraic approach.
We will show how to enter three different functions: f(x)
= 3x2,
,
and:
- Click on the "New Expr." button.
This will change the window to allow you to enter the name of the function, a
formula (which may be defined by up to four cases), and the limits on the plot
window.
- If we begin with f, then you should enter
"f" in the "Name of function" box. Likewise,
enter "3*x^2" in the "y = " box. Notice how we
have to explicitly put in a "*" sign for multiplication, and how
we use "^" for powers. When you are finished, click
the "Done" button.
- Describe all the changes you observe in the "Main
Screen" window. Answer.
Now we enter g. Notice that a "sqrt"
function is already built into XFunctions in the original list of functions.
- Click on the "New Expr." button. Enter
"g" in the "Name of function" box, and "4*sqrt(-x+3)-5" in the "y = " box. Notice how we
use the pre-defined "sqrt" function to take square roots. When you are finished, click
the "Done" button.
- Click on the "Zoom Out" button to get a better view of this
function.
Once we learn some basic graphing principles, we will be able to sketch this
graph quickly by hand, even without XFunctions. XFunctions will then be
useful in helping us to learn and practice these principles.
Finally, we will enter h. This is defined
in three cases.
- Click on the "New Expr." button. Enter
"h" in the "Name of function" box. Now enter "f(x)" in the
first "y = " box, with "x<-1" in the corresponding
"provided:" box (Note: In this context, "provided" means
the same as "in case"). Notice again how we can use our
previously defined function, f, instead of
typing out the formula "3*x^2". Then, enter "2*x-1" in the
second "y = " box, with "-1<=x and x<=1" in the
corresponding "provided:" box. Notice how, instead of simply
typing -1 ≤ x ≤ 1,
we have to enter "<=" for "≤",
and how we must specify both ends of the interval separately (cf. the
discussion of interval
notation). Finally, enter "sqrt(x)" in the third "y = "
box, with "3<x" in its "provided:" box. When you are finished, click
the "Done" button.
- Use the "x =" box to calculate h(-2),
h(-1), h(0), h(1),
h(2), and h(3).
Note: This is very similar to what we did by hand in a previous
Exercise; in this way, you will be able to use XFunctions to create your
own Exercises and check your own work. Answer.
Now we will briefly look at creating functions given by a table or graph,
such as:
| x |
k(x) |
-2
-1
0
1
2 |
1
-2
-1
3
1 |
|
or |
 |
- Click on the "New Table" button. Enter
"k" in the "Name of Function" box. Now enter "-2"
and "1 " in the "Input x" and "Input y"
boxes, respectively, and hit the "Add (x, y) to
Table", or hit the "Enter" key. Notice how this point appears as the first line in the
table to the right. Now repeat the process to add the other four points. Finally, notice that XFunctions insists on trying to extend
your function definition over an entire interval, from the smallest x-value
to the largest; select the "Piecewise Linear Function" option. Finally,
set the horizontal limits on your plot to [-2, 2], with the vertical limits
as [-4, 4], and click
the "Set Axis Limits" button. When you are finished, click
the "Done" button.
- Use the "x =" box to calculate k(-2),
k(-1), k(-0.5), k(1.5),
and k(3). Notice how it actually extends
the domain of the function to include values that are not in our original
table, but not over the entire real line. Answer.
- Click on the "New Graph" button. Enter
"q" in the "Name of function" box. Set the
horizontal limits on your plot to [-2, 2], with the vertical limits as [-4,
4], and click
the "Set Axis Limits" button. Notice how the graph already
includes two points (with a "handle" on the "inner"
side) at x = -2 and 2. Double-click on the x-axis
to add new points at x = -1, 0, 1. Notice
how each new point has "handles" on both sides. For
each point you insert, click and drag the point so the graph goes through
the following points:
Note: You will need to estimate the correct vertical position, since the
axis is not completely marked. Then, click and drag on the
"handles" to try and reshape the graph to make it look like:

When you are finished, click
the "Done" button.
- Use the "x =" box to calculate q(-2),
q(-1), q(-0.5), q(1.5), and
q(3). Compare these values with those of k. Answer.
The Multigraph Utility
The last feature of XFunctions that we will discuss, and which we will use
extensively in the upcoming sections, is the Multigraph Utility. This
allows us to plot up to eight functions on the same axes for comparison
purposes.
- Select "Multigraph Utility" from the menu at the top of the
XFunctions Main Screen. Enter "floor(x)" in the "y = "
box, and hit the "Graph!" button or the "Enter" key.
- Hit the "Equalize" button to obtain a truer picture of the
"floor" function. You will notice that the dimensions of the
plot in the Multigraph Utility are in an approximate ratio of 8:5.
- Now select "No. 2" in the menu in the lower left, and enter "2*floor(x)" in the "y = "
box, and graph this.
Notice how the two different graphs appear on the same axes, but in different
colors. The corresponding color of each function is displayed to the right
of the selection menu. Note: Where the graphs overlap, only the color of
the last function will be visible.
- Compare the graphs of the two functions algebraically
(i.e., the two formulas) and geometrically. Try to relate the two
comparisons. Answer.
- Hit the "Clear All" button. Notice how it erases both
graphs.
- Select each of the two functions, in turn, and re-graph both of them.
- Select the "No. 2" function and hit the "Remove"
button. Notice how it deletes the previous function definition, as
well as the graph. Now enter "-floor(x)" in the "y = "
box, and graph this.
- Compare the graphs of y = ëxû
and y = -ëxû
algebraically and geometrically
(remember this is just mathematical notation for the two functions you have
just plotted). Try to relate the two
comparisons. Answer.
In answering these last two questions, you may have just discovered for
yourself two of the graphing principles which we will discuss in more detail in
the next section.
Go to Arithmetic and Graphing