GRAPHING FAMILIES OF FUNCTIONS
The free variable a
is fundamentally different because you can specify not just a single value, but a range of possible values that it can take. This allows you to graph families functions or level curves of a 3-D surface easily. For instance, y = a*cos(x)
will graph cosine curves of varying amplitudes, and x^2+y^2 = a
will draw level curves of the surface f(x,y) = x^2+y^2
.
You don't even need to know the syntax described below to use this feature, since you can enter the needed values in the Variables Panel and Graphmatica will insert them in the equation for you. If you don't specify a range for a
, Graphmatica will take the current values from the Variables Panel for the start of the range, end of the range, and amount to step by. Graphmatica starts by graphing the function with a
set to the start of its range, and then increments a
by the step value and draws another graph until a
exceeds the end of its range. (You can also specify a negative step value as long as the end of the range is less than the start.)
To type this information in on the command-line, add the domain specifier {a: start, end, step}
to your equation, replacing start
, end
, and step
with the desired values. For example, y=a*cos(x) {a: 1,6,2}
will draw graphs of y=cos x
, y=3cos x
, and y=5 cos x
.
Note: use the Inv key on the virtual keyboard to switch the semicolon key into a colon and back.
Although the program does not put any limit on the number of curves in the "family" you can graph, be aware that this feature uses memory rapidly. In any case, the screen will likely become too cluttered to be useful if more than ten or so graphs are drawn, so try to make your step rate proportionate to the size of the range.
Note that your equation may be rejected, even after drawing the graph for some values of a
, if the program detects an error that makes the equation ungraphable for another value of a
. For instance, y =(1-a)^x {a: 0,2,1}
cannot be graphed because for a=2, it does not describe a continuous function.
The other free variables b
and c
are described in Using Free Variables.
You can change the value of a free variable after you have typed in equations and Graphmatica will automatically update and redraw all of the graphs using it with the new value. See Variables Panel for details.