home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Black Box 4
/
BlackBox.cdr
/
science
/
grmat30d.arj
/
GRMAT1.HLP
< prev
next >
Wrap
Text File
|
1992-01-26
|
14KB
|
231 lines
Graphmatica OPERATORS
Operator/Function Meaning
═════════════════ ═════════════════════════════════════════════
+, -, *, / add, subtract, multiply, divide
^ exponentiation
[( )] Parentheses: may be nested to any extent, but
parser WON'T differentiate between "(" and "["
; (semicolon) Separate halves of a parametric equation
' (single quote) Make rest of the equation a comment
{ a, b } Specify domain. See below for details.
abs absolute value
acos, asin, atan arc cosine, arc sine, and arc tangent
asec, acsc, acot arc secant, arc cosecant, and arc cotangent
cos, cosh cosine and hyperbolic cosine
exp Euler's number to the specified power
int greatest integer ([x] is not supported)
ln, log natural logarithm, logarithm base 10
sec, csc, cot secant, cosecant, and cotangent ┌─────────┐
sin, sinh sine, hyperbolic sine │PgDn for │
sqr square root │more help│
tan, tanh tangent, hyperbolic tangent └─────────┘
---> NOTE that all trig functions work in RADIANS, not degrees. <---
Besides x, y, r, and t, pi [3.14...] and e [2.718...] are legal identifiers.
CALLING FUNCTIONS
The parser's ability to determine exactly what you want to pass as an
argument to a function is somewhat limited, so I suggest you make it a habit
to enclose the desired expression in parentheses. "cos x" may work fine but
"cos 2x" is interpreted as "(cos 2)*x" and "cos x^2" turns out "(cos x)^2".
Typing "cos (2x)" or "cos (x^2)" instead works perfectly.
The order of operations is the standard algebraic left to right of:
Functions
Parentheses
Exponents
Multiplication and division
Addition and subtraction
Graphmatica supports implied multiplication of variables and constants as in
"3x" or "5(2x+3)", but not of variables and other alphabetic identifiers such
as functions and built-in transcendental numbers like "xx", "xcos(x)", or
"xpi", so you must include the times sign in those cases. (Implied multi-
plication of the two variables x and y [i.e. "xy=1"] IS supported, however.)
The parser may reject some complex expressions for no apparent reason. Keep
trying! I suggest liberal use of parentheses: if you are not sure whether
something will be interpreted correctly, go back and put parentheses around
it. (One exception: do NOT enclose the entire expression on either side of the
equals sign in parentheses.) Press PgDn for more help.
GRAPHING THE EQUATION
To interrupt a graph when the computer is in the process of drawing it,
hit any key and the program will display on the bottom line the message:
"PAUSE at x=#, y=#. Press ESC to quit, any other key to restart...", where #
indicates the x and y coordinates you stopped it at. If you mistyped the
equation and want to fix it, just press ESC. Be patient! Graphmatica may need
a while to produce a quality graph on a slower machine. To speed up the
graphing, you may want to select a lower Fineness value.
THE GRAPHING LOOP
When the graph for your equation is complete, you will again be given the
"Graph?" prompt at the bottom of the screen. If you'd like to start all over
with a completely different equation, press ESC and the input field will
clear. If you'd rather modify the last equation, go right ahead; it's already
stored safe and sound in the redraw queue (see the Redraw help file). Or you
can modify any previously entered equation by using the up and down arrow keys
to scroll backwards and forwards in the redraw queue, respectively. (Clicking
the mouse on the up and down arrows to the right of the graph prompt is equiv-
alent to pressing the key.) You can also use this "scroll back" capability to
redraw a graph that is in the queue but not presently on the screen: just
press enter on the line of the equation you want. To exit the otherwise infin-
ite graphing loop, press enter or escape on a blank line or select a menu item
with the mouse or function keys. Press PgDn for help on specifying a domain.
SPECIFYING THE DOMAIN
Graphmatica allows you to specify the domain of each equation
independently. This allows you to draw only a particular part of a graph or
change the domain without using the Range or T range functions to change the
default domain. To specify a domain for an equation, type anywhere on the line
the expression
{ a, b }
where 'a' is the start of the domain and 'b' is the end. If you want the
domain to start at the default start, leave 'a' out. Then, whatever you change
the start of the default domain to, that will always be where the equations
starts graphing. To leave the end of the domain open, leave out 'b'. So if the
range on-screen is (-10,10), specifying a domain of "{ ,5}" will graph from
-10 to 5, and one of "{-4, }" will go from -4 to 10.
To graph a parametric equation, you MUST specify a domain that is closed
(i.e. one that has neither number left out).
For ease of use for polar graphs or trigonometric functions, you can type
the domain in just as you do to specify the default range of theta for polar
graphs. Briefly, this allows you to specify multiples of pi by typing '###p'
and degree measures instead of radians by typing '###d' (for full details see
the Options help file).
Press PgDn for help on polar graphs.
EXTENDED GRAPH FUNCTIONS: POLAR GRAPHS
Polar coordinates are a fundamentally different approach to representing
curves in 2-dimensional space. If you have never used polar coordinates and
want to understand them, you should read Section III in GRAPHMAT.DOC first.
To make a graph using polar coordinates, we calculate a distance to plot
out from the origin as we let theta ("t") sweep around in the positive
direction. The default domain is 0 to 2pi (the first complete circle in the
positive direction), but you can easily change these values using the
"T range" function [see Options help file]. Polar graphs are entered at the
"Graph?" prompt just like normal graphs. The only difference in what you type,
and how Graphmatica detects a polar graph, is that you must use the variables
"t" and "r" instead of "x" and "y". The restrictions are still the same: you
can have one and only one instance of the dependent variable "r" but it can be
located almost anywhere in the equation. Watch as your graph is drawn; often
the direction it is going is as important as the figure it draws. (In a
"double" equation of "r^2", first the positive and then the negative roots are
drawn; they should be drawn simultaneously but it isn't practically possible.)
The x and y coordinate ranges and the range for theta are completely
independent; in normal Cartesian graphing, Θ's value is irrelevant, and in
polar graphing, Θ controls the domain of the graph, but the x and y ranges
still control the physical screen you see. If you want to change your view of
a polar graph, use the scale or range functions just as you would normally.
Press PgDn for help on parametric graphs.
EXTENDED GRAPH FUNCTIONS: PARAMETRIC GRAPHS
(For a full explanation of parametric graphing, read Section III in
GRAPHMAT.DOC. This section just shows how to enter parametric graphs.) In
parametric graphing, the cartesian x and y coordinates are calculated based on
a third variable (the "parameter" of x and y) called 't' (not to be confused
with the 't' used to represent theta). T is allowed to increase from the start
of the domain you specify to the end. At each value, the functions x(t) and
y(t) are calculated to give an (x,y) coordinate which is drawn. Graphmatica
then connects these points to form a smooth curve -- if something you graph
looks jagged, you probably need to adjust the fineness. (See Options help)
To enter a parametric graph, you need to remember four basic parts: the
x(t) and y(t) functions, the semicolon between them (this is how Graphmatica
knows you're entering a parametric graph), and the domain for t.
semicolon y-function
x-function -> x = 2t ; y = 2t^2 {-10, 10} <- domain
You don't need to solve for x and y (5x=t is OK), but only one x and one y can
appear in the whole equation, and "double" equations like "x^2=t" are NOT
supported (if you enter them only the positive root will be found). You MUST
specify a domain for each parametric equation! Some curves (like those based
on sin and cos) work best over a {0,2pi} domain, like polar graphs. Others
match the default domain of normal graphs better. If you estimate the domain
wrong, abort the graph and edit it. Press PgDn for help on differentials.
EXTENDED GRAPH FUNCTIONS:
GRAPHING APPROXIMATIONS OF DIFFERENTIAL EQUATIONS
Graphmatica also has built-in a rudimentary feature for approximating the
solutions of first-order differential equations. [I will not provide
background material on this function because if you need to use it, you
probably know more about differential equations than I do.] To let the parser
know you want to graph a differential equation, you must include the
differential "dx" as one of your variables. If you specify an equation as
dx = f(x,t)
where f(x,t) is some combination of the variables x and t (such as "x^3 + t"
or "t * x" ) and do NOT include the domain operator "{ , }", the program will
draw a slope field for dx/dt = f(x,t).
If you do include the domain operator {a, b} , however, it will not be
interpreted as a domain but will instead indicate that you want to graph a
specific solution to the initial-value problem x(a)=b by Cauchy-Euler
approximation. This deviation from the normal notation is only valid for
differentials.
Press PgDn for help on error messages.
ERROR MESSAGES
Twelve error messages may be encountered when graphing (apart from the
messages ingrained in the library functions which I cannot control). Six of
them are fatal; the equation cannot be graphed and you must edit it. They will
cause the computer to beep so you know there is a problem. The other six apply
only to specific point(s) for which a y-value cannot be generated. They will
not appear unless you ask for them using the Warnings option and then they
appear silently.
"Found bad operation or mismatched parentheses. Press any key to retype..."
You either left out a paren somewhere, left out one or both of the
operands for a binary operation or the argument for a function, or typed
some other weird thing the parser and evaluator couldn't digest. Examine
your equation carefully and fix whatever seems to be the problem.
"Found unknown identifier. Press any key to retype equation."
Unfortunately, the evaluator isn't set up to return what caused the error,
so you'll have to look for it yourself. Check that your equation contains
only valid identifiers (x, y, pi, e, r, t, and the functions listed above)
and that you separated each of them with an operator, space, or some other
punctuation.
Press PgDn for more error messages.
ERROR MESSAGES continued
"No equals sign or more than one found. Press any key to edit equation."
To be a valid and graphable, your equation must include exactly one equals
sign ['=']. If you get this error, you either left out the '=' or
accidentally typed two or more of them.
"No 'y' variable or more than one found. Press any key to edit equation."
Although Graphmatica can isolate ONE 'y' variable and graph
some relations, it cannot graph an equation without a 'y', like "x=4". It
also cannot perform the factoring needed to isolate the variable 'y' when
it occurs more than once (i.e. "x=y^2+3y"). If you can adjust the equation
so it uses only one 'y', do so; otherwise it can't be graphed.
"Can't find the inverse of this function of y. Press a key to edit equation."
You tried to graph an equation like "int(y)=x" or "abs(y)=x" for which y
cannot be isolated by taking the inverse of the function. The functions
which cannot be isolated are "abs", "cosh", "sinh", "tanh", and "int". Try
to adjust the equation so this error does not occur.
"Parametric equation requires that you specify domain! See 'Graph' help file."
You typed in a parametric equation (or accidentally hit the semicolon) and
neglected to include a closed domain [like {1,6}]. Because the diversity
of parametric equations makes it hard to pick a default domain, you have
to include one with each parametric graph. See above for help on giving
the domain and graphing parametrics.
Press PgDn for more error messages.
WARNING ERROR MESSAGES
"Overflow at x=#.##."
Some function or operation generated a number too large to fit into an
eight-byte floating point variable. The point at x=#.## was not graphed.
"Division by zero at x=#.##."
At #.## your equation attempted division by zero so the point was skipped.
"Can't raise a negative number to a fractional power. [x=#.##]"
Due to the possibility of getting an even root of a negative number, the C
Library pow() function refuses to process any arguments like these. The
portion of your graph (if any) where the base is not negative or the power
is not fractional should be graphed perfectly. This error also occurs when
you take the square root of a negative number with the "sqr" function.
"Can't find the logarithm of a negative number. [x=#.##]"
The natural logarithm (ln) and base 10 logarithm (log) functions are
defined only on x greater than zero.
"Domain error: asin/acos functions defined only on -1≤x≤1. [x=#.##]"
The arcsine (asin) and arc cosine (acos) functions are only defined
between -1 and 1 (the range of the sin and cos functions).
──────────────End of Graphing help. Press ESC to return to menu.──────────────