Mathematical Object Forms
In MathScript, each atomic mathematical object has a name and a type. An object name is an alphanumeric sequence, possibly containing
underscores, beginning with a letter, and containing no more than 32 characters). These
objects may be:
- combined to produce new objects
The results of combination are non-atomic
objects. These are called Mathematical
Object Forms . For example, sin²+cos²
is a form of type function.
It can be graphed in the same way that sin, or cos can. Thus graph
sin^2+cos^2 would cause the graph of the constant function 1 to be drawn.
If x is a variable,
then the form sin(x) is a form of type expression.
This is not of function type, so graph sin(x) would not work.
- presented in the Display Objects
Vectors may be displayed in Data Window columns, or combined and transformed in those columns as vectors. Or they may be
plotted in 2 or 3 dimensional graphics windows.
- read from text fields
The functions: text,
textlist,
and textstring
bring forms into programs from Text
Fields. The text
function reads the field named in its argument for a mathematical
object form. Thus the text must in fact be
a meaningful form (and not the Gettysburg Address). Usually a program sets a variable
to the result, and works with that. For example,
make u text("input"), or u := text("input") sets the variable u to whatever form appears in the field "input".
If a program wanted to build a function of x using a form of type expression
in the variable x that appeared in the field "input" (for example, sin(x^2)+3*x), it might contain the lines
...
let u be text("input");
let f(x) be value u;
...
- transformed in mathematically meaningful ways
For example: equations may be solved, expressions may be differentiated, curves may have coordinate transformations applied to
them, and so on.
- compared with one another
Often the comparison is visual, sometimes geometric or algebraic. The richest
possibilities of course combine these modes of comparison.
- manipulated by programs
This last is very important. Interactive exploration is powerful, but
limited. Often iterative or recursive procedures are needed. For example, they are
used in illustrating limits or Fourier Series, or in developing the contours of
a strange attractor.