Mathematical expressions and functions are graphed using a computer
implemented method that automatically determines an appropriate graph
range. One implementation of the method begins with determining an
initial variable seed range. A number of points within this seed range
are randomly selected. The method determines whether the selected points
correspond to the mathematical expression (i.e., whether they produce
valid results when the expression is evaluated at each point). When the
selected points produce valid results, the points can be used to generate
and display a graph of the mathematical expression on a user display
device, with a graph range based on the seed range. If not, the variable
seed range can be expanded until a predetermined number of the selected
points correspond to the mathematical expression, so that a graph of the
mathematical expression can be generated and displayed.