Introduction | Selecting Equations | Solving Equations |
At the Mathomatic prompt, you can enter:
Mathomatic has about 30 different commands. They are described below, mostly in alphabetical order. If the command is longer than 4 letters, you only need to type in the first 4 letters for Mathomatic to recognize the command. The command is not executed until you press the Enter key. Most commands operate on the current equation by default.
Many commands have an "equation number range" argument. An equation number range may be a single equation number, a range of equation numbers separated by a dash ("-"), or the word "all", which specifies all equations. If omitted, the operation is performed on the current equation.
If Mathomatic is executed with an argument on the command line,
that argument is expected to be the name of a text file.
The text file is automatically read in
and executed as if you typed the text of the file
in at the Mathomatic prompts.
Selecting Equations
Syntax: #equation-number-to-select[[:] new-equation]
To change the current equation number,
type a pound sign ("#") followed by the number of the
equation you wish to select.
If the number is followed by a space and a new equation,
the equation at the number is replaced with the new equation
and the new equation is automatically factored with the
"factor" command.
To enter an equation without factoring it,
append a colon (":") to the equation number.
Solving Equations
Syntax: variable-to-solve-for
Mathomatic can solve the current equation for any single variable or for zero.
To solve for a variable, just type the variable in at the prompt. Mathomatic will proceed to manipulate the current equation until all of the solutions for the specified variable are determined. If successful, the solutions are stored in the current equation and displayed. Cubic and quintic equation solving is not supported. Quartic equations (fourth degree polynomials) can be solved if they are bi-quadratic (only degree four and degree two terms).
To solve for zero, type in "0" at the prompt. A solve operation for zero will always be successful.
When Mathomatic solves an equation, it tries to convert complex fractions into simple fractions.
If Mathomatic fails to solve a single variable equation,
you can now attempt a numeric solve using the
"graph" command!
To numerically solve a single variable equation,
first solve the equation for zero and then execute the
"graph" command.
Zoom in on the points where Y=0 (where the graph of the equation
intersects the horizontal X axis, which are called the X-intercepts)
to find the numerical solutions to your equation.
Calculate
Syntax: calculate [equation-number]
This command prompts you for the values of each variable in the Right Hand Side of the current or specified equation. It then simplifies the result and automatically substitutes "sign" variables with all possible values, displaying each solution as it does so. If all variables are supplied with constant values, then each solution will be a constant, otherwise the result will contain the variables you didn't enter the values for. The equation is not modified by this command.
This command should be used to temporarily plug in values
and expand confusing "sign" variables in a solved equation.
It is also automatically invoked when you type in a numeric expression,
without any variables, at the Mathomatic prompt.
No need to get out your calculator when you are using Mathomatic!
Clear
Syntax: clear [equation-number-range]
This command clears equation spaces so that they can be reused. The specified equations are deleted from memory.
The argument may be the equation number to delete,
a range of equation numbers to delete, or "all"
to delete all equations. As with other commands,
the default equation is the current equation.
Compare
Syntax: compare equation-number ["with" equation-number]
This command compares two equations for equality. If only one argument is supplied, the comparison is between the current equation and the specified equation. The comparison will be faster and more accurate if both equations are previously solved for the same variable.
If this command says the equations are identical, then the equations are definitely identical. If this command says the equations may differ, then the equations might be identical if one of the equations is too hard for Mathomatic to simplify completely.
This command first compares the Right Hand Sides of both equations,
if they are solved for a variable.
If they are not equal, it solves both equations for zero,
so it can compare the whole equations.
Copy
Syntax: copy [equation-number-range]
This command simply duplicates the specified or current equation(s)
and displays them.
Debug
Syntax: debug [level-number]
This command sets the debug level number.
If the level number is 2,
Mathomatic will show you how it solves equations.
Level 4 debugs the "simplify"
command and its polynomial routines.
Levels 5 and 6 show all intermediate expressions.
The initial debug level is 0, for no debugging.
Derivative
Syntax: derivative [variable or "all"]
This command computes the derivative of a function with respect to the specified variable, using the Right Hand Side of the current equation as the function. The current equation should first be solved for a normal variable. If successful, the derivative is placed in the next available equation space, displayed, and becomes the current equation. The original equation is not modified.
Specifying "all" computes the derivative with respect to all normal
variables. It is equivalent to adding together the derivatives with
respect to each variable.
Divide
Syntax: divide [variable]
This command is for doing and experimenting with polynomial and numerical division and Greatest Common Divisors. Mathomatic has a symbolic polynomial division routine which this command calls without any other processing, unless just numbers are entered.
This command prompts for the dividend (the main polynomial) and the divisor (what you want to divide the main polynomial by). The quotient and remainder are displayed. Then the GCD (Greatest Common Divisor) is displayed. If just numbers were entered, the LCM (Least Common Multiple) is also displayed. The LCM is the same as the Lowest Common Denominator, if both entered numbers are denominators.
A variable may be specified on the command line as the base variable of the two polynomials, but it is usually not necessary because Mathomatic automatically selects a base variable.
The Greatest Common Divisor of "a" and "b" is defined as the greatest
number or polynomial that evenly divides both "a" and "b".
The Euclidean algorithm is used
by Mathomatic to arrive at the GCD for both
numbers and polynomials.
Edit
Syntax: edit [file name]
Under MS-DOS, this command will execute the editor specified in the file "amedit.bat" on all loaded equations or on an existing Mathomatic input file. When you are not running Mathomatic, use a text editor to edit "amedit.bat" to change the editor for Mathomatic to your favorite editor.
Under Unix, this command invokes the editor specified in the "EDITOR" environment variable.
Just type "edit" at the Mathomatic prompt to edit all equations
stored in the equation spaces.
When you are done editing Mathomatic equations and commands,
save and exit the editor to have them automatically read in by
Mathomatic.
If Mathomatic gets an error reading in its new input,
observe where the error is and continue, to
automatically re-enter the editor.
Eliminate
Syntax: eliminate variables ["using" equation-number]
This command is used to combine simultaneous equations. It will replace all occurrences of the specified variables in the current equation with solved equations, essentially eliminating the specified variables from the current equation. If you are eliminating only one variable, the equation to solve can be specified using the "using" argument. If the "using" equation number is not specified, Mathomatic will search backwards, starting at the current equation minus one, for the first equation that contains the specified variable.
The equation to solve is solved for the specified variable, then the Right Hand Side is inserted at every occurrence of the specified variable in the current equation. This effectively eliminates the specified variable from the current equation, resulting in one less unknown.
There is an advantage to eliminating multiple variables in
one command: each equation will be used only once.
If the same equation is solved and substituted into the current
equation more than once,
it will cancel out.
Factor
Syntax: factor [equation-number-range] [variables]
This command does some basic simplification and trivially factors any variables it can, unless variables are specified, in which case only those variables are factored out.
For example, with the following equation:
a = (b*c)+(b*d)
variable "b" factors out and the result of this command is:
a = b*(c+d)
This command usually cannot factor polynomials.
To factor polynomials,
use the "simplify" command.
Graph
Syntax: graph [equation-number]
This command is only available in the MS-DOS version of Mathomatic.
This command displays a 2 dimensional graph of the current or specified equation. Since it is a 2D graph, it can only graph functions of a single variable. The equation must be a solved equation and may contain any number of "sign" variables (which usually make a more interesting graph). The variable to the left of the equals sign is represented by the Y axis (vertical) and the variable to the right of the equals sign is represented by the X axis (horizontal).
The X-intercepts, where Y equals 0, are displayed on the right hand side of the screen.
In asymptote viewing mode (enabled with the "a" key), the asymptotes are displayed as blue lines on the graph and the asymptote equations are displayed on the right hand side of the screen. An asymptote in Mathomatic is a straight line which approximates the graphed function as its X or Y value approaches positive or negative infinity. The asymptotes are numerically approximated as the graph program starts up.
This command executes the program "graph.exe" and requires EGA or VGA and MS-DOS version 3.0 or higher. "graph.exe" must be in the current directory or in the executable search path, to function.
Once you are in the graph program, you can:
Syntax: group ["factor"] [equation-number-range]
This command groups divisors together and displays equations in fraction format. It makes equations with divides in it more readable. For example, "a/b/c" will convert to "a/(b*c)", and then be displayed as:
a ----- (b*c)
Non-integer constants are converted to reduced fractions, if they are exactly equal to a fraction and it would improve readability.
The "factor" option causes all integers, less than or equal to
14 digits long,
to be factored into their prime factors,
including the numerator and denominator of fractions.
Help
Syntax: help [command-name or "equations" or "all" or "geometry"]
This command is provided as a quick reference.
If the argument is a command name,
a short description and syntax of that command is displayed.
The command name may be abbreviated.
If the argument is "equations",
equation help is displayed.
If the argument is "all",
a short description and syntax of all commands is displayed.
If the argument is "geometry",
some commonly used geometric formulas will be displayed.
Imaginary
Syntax: imaginary [equation-number]
This command copies the imaginary part of a complex equation to the next available equation space. If the equation is not complex, it will tell you and abort. A complex equation is an equation that contains both imaginary and real parts. To copy the real part, see the "real" command.
The equation to be separated should first be solved and simplified. If you want to exclude the "i#" constant from the result, type the following command after the "imaginary" command:
replace i# with 1
Syntax: integrate variable ["trapezoidal"]
This is a numerical integrate command and it will not generally compute the exact symbolic integral except for the simplest of equations. When this command is invoked with a variable specified on the command line, it will prompt you for the lower and upper limits to perform numerical definite integration on the current equation with respect to the specified variable.
The result of the definite integration is an approximation that is usually accurate to 3 digits or better. This command uses Simpson's rule to do the approximation. If "trapezoidal" is specified on the command line, the trapezoidal method is used instead, which is usually less accurate than Simpson's rule. The way the trapezoidal method works is the interval from the lower limit to the upper limit is divided by 100 to produce 100 trapezoids. Then the area of each trapezoid is added together to produce the result. This means that the accuracy usually decreases as the interval increases. Simpson's rule uses the same method, except parabolas are used, instead of trapezoids.
If the integration fails, chances of success are greater if you reduce the number of variables involved in the integration.
If there are any singularities between the bounds of integration,
the computed result will be wrong.
List
Syntax: list [equation-number-range]
This command displays the current equation in single line format, if typed with no arguments. It is typically used with the argument "all" to display all stored equations.
To display equations in fraction format,
see the "group" command.
Pause
Syntax: pause
This command waits for the user the press the Enter key.
It is useful in text files that are read in to Mathomatic.
Print
Syntax: print ["factor"] equation-number-range [">"file-name]
This command outputs equations to the printer, or a file, in fraction format. This command will work with any printer that can print ASCII text.
The "factor" option causes all integers in the specified equation(s) to be factored into their prime factors, before they are printed.
This command works by calling the
"group" command with output redirected
to the printer or the specified file name.
Quit
Syntax: quit
Type in this command to exit
Mathomatic.
All equations are discarded.
To save your equations, see the
"save" command.
Read
Syntax: read file-name
This command reads in a text file as if you typed the text of the file in at the prompts. The text file should contain Mathomatic equations and commands. "read" commands may be nested.
Equations saved with the "save" command are restored using this "read" command.
This command is automatically executed
when you start up Mathomatic with
file names on the command line.
Real
Syntax: real [equation-number]
This command copies the real part of a complex equation to the next available equation space. If the equation is not complex, it will tell you and abort. A complex equation is an equation that contains both imaginary and real parts. To copy the imaginary part, see the "imaginary" command.
The equation should be solved and simplified
before this command is executed.
There will be no imaginary numbers in the result.
Remark
Syntax: remark [comment]
This command does nothing.
You can put comments in your
Mathomatic text files using this command.
You can also put comments after Mathomatic input by preceding
them with a semicolon (";").
Everything on the line after the semicolon is ignored.
Replace
Syntax: replace ["temp"] [variable ["with" expression]]
By default, this command prompts you for a replacement expression for each variable in the current equation. If an empty line is entered for a variable, the variable remains unchanged. The result is placed in the current equation and displayed. If "temp" is included on the command line, no equations are modified and the simplified result is displayed.
This command is very useful for renaming or substituting variables in an equation. It is smart enough to do variable interchange.
If a variable is specified on the command line,
you will be prompted for that variable only and
all other variables will be left unchanged.
Save
Syntax: save file-name
This command saves all equations in the specified text file.
If the file exists, Mathomatic will ask you if you want
to overwrite it.
The saved equations can be reloaded at a later time
by using the "read" command.
You can edit the saved equations with your favorite ASCII text editor.
Sensitivity
Syntax: sensitivity variables
This command computes the exact sensitivity equation for the specified variable or variables in the current equation. The current equation must first be solved for a single variable. The sensitivity equation is placed in the next available equation space. The original equation is not modified.
The sensitivity equation will show you
what percent the output variable value changes
when the input variable changes a certain percent.
It does NOT show you the maximum change
within an interval, instead it shows you the
exact change at a certain percent.
Simplify
Syntax: simplify ["symbolic" or "quick"] [equation-number-range]
This command completely simplifies the current or specified equations.
Use this command whenever you think an equation is not completely simplified or if you don't like the way an equation is factored.
The "symbolic" option indicates ((a^n)^m) should always be reduced to (a^(n*m)). This removes any absolute value operations ((a^2)^.5 = a^(2*.5) = a^1 = a).
The "quick" option skips expanding expressions raised to the power of 2 or higher, like ((x+1)^99). Expressions like this won't fit in memory during expansion, causing the "simplify" command to abort. And this option suppresses moving imaginary numbers from the denominator to the numerator, in a complex fraction.
This command applies some simple algebraic transformations and then tries to do polynomial division, smart (heuristic) division, and factor polynomials with repeated or symbolic factors, to simplify equations completely.
Smart division is like polynomial division,
but it tries every term in the dividend,
instead of just the terms raised to the highest power,
to make the expression smaller.
Tally
Syntax: tally
This command does nothing more than prompt for a value, add it to a running
total, simplify, display the running total, and repeat.
No equations are modified.
It is very useful for adding and subtracting many numbers.
Enter an empty line to end.
Taylor
Syntax: taylor variable
This command computes the Taylor series expansion of the current
equation with respect to the variable specified on the command line.
The expansion is performed on the expression to the right of the equals
sign only.
It prompts you for the "point" of expansion, which is usually a variable,
but may be a constant or expression. Then it prompts you for the order
of the series, which is an integer indicating how many derivatives to
take in the expansion. The result is placed in the next available
equation space, displayed, and becomes the current equation. The result
is not simplified so you usually need to use the
"simplify" command
after this command.
Unfactor
Syntax: unfactor [equation-number-range]
This command unfactors the current equation if typed with no arguments. The argument specifies which equations to unfactor.
Unfactoring is also known as "expanding" or "multiplying out". To illustrate what unfactoring does, suppose you have the following equations:
a = b*(c+d) z = (x+y)^2
If you unfactor the above equations, you will get:
a = (b*c)+(b*d) z = (x^2)+(2*x*y)+(y^2)
Copyright © 2000 George Gesslein II