                   Help text for the Algebra Editor

Copyright (c) 1994 John Henckel
Permission to use, copy, modify, distribute and sell this software
and its documentation for any purpose is hereby granted without fee,
provided that the above copyright notice appear in all copies.
----------------------------------------------------------------------------
First let me introduce myself.  I'm John Henckel (henckel@vnet.ibm.com).
Currently, I work for IBM in Rochester, Minnesota as a computer programmer.
I like to write fun DOS programs as a hobby, and this is one of them.

This program is a tool for solving algebra problems.  You may ask yourself,
why do I need a computer to help me do that?  Well, it might not make sense
for small problems, but if you have a rather large problem with several
equations and the result is a fourth-degree polynomial that doesn't fit on
one page of notebook paper, then Alged can help.  Alged is cannot solve the
problem for you; you need to think.  But it can relieve the tedium of working
with large formulas, and it has rewrite rules to help simplify as you go.

You can look at the file alged.doc for a brief tutorial.
----------------------------------------------------------------------------
Input Instructions:

The Alged screen has a menu at the top and a work area at the bottom.  You
manipulate the formulas in the work area by clicking on parts of them and
then clicking on the menu.  You click the left mouse button in the work area
to select the current expression or the PICK.  The pick is highlighted.  You
click the right mouse button in the work area to select the KEY expression.
The key is copied to the bottom of the screen.  Notice that it is legal to
click on the key, so the pick may be a subset of the key.
If your computer does not have a mouse, (or you just don't like to use it)
you can use the [pageup], [pagedown] and [end] keys to select the pick.
These keys descend the binary tree stored in memory.  You can copy the pick
to the key by pressing '.' or you can type the key by pressing 'k'.

Some of the operations on the menu only use the pick, and some use both the
pick and the key.  Unless otherwise specified, the menu descriptions below
apply to the pick only.
----------------------------------------------------------------------------
Menu Description:

Simplify [space] simplify expression.  It sorts it, combines common terms,
calculates numbers, and rewrites it in canonical form.

Distribute [d] distribute multiplication over add and subtract, and
distribute exponents over multiplication and division.

Calculate [c,v] calculate all numbers.  e.g. 3*2 => 6.  If you click on this
menu item with the right mouse button (or press 'v'), it will find the prime
factorization of integers.  (This is limited by the ?d user option).

Integer [i] convert real numbers to integers if possible. e.g. 1.5 => 3/2
This algorithm has two strategies.  First, it looks for repeating patterns
in the fractional part of the number.  At least two repeating digits must
be significant.  If that fails, it searches for a number, d, such that d*x is
an integer.  The user parameters ?e and ?d are used here.

Associate [a] rotates the elements of an associative group.

Comm-Deno [m] This is a TOGGLE to create a common denominator or to
distribute division over add and subtract.

CharMode [g] toggle ascii 7-bit or 8-bit.  This is useful if you use
print-screen.

Poly-Coef [p] collect the coefficients of a polynomial.  The pick must be a
polynomial (not an equation) and the key must be the expression use as the
base of the polynomial.
e.g. pick is a*x + b*x + c, key is x ==> result is c + (a + b)*x

Prev [up] scroll back

Next [down] scroll forward, at the end the list will wrap to the beginning.

Left [left] scroll Left

Center [home] horizontally center the formulas (this is default).

Right [right] scroll right

Poly-Div [\] polynomial division.  The pick must be a division (not an
equation) and the numerator must be a polynomial with degree greater
than or equal to the denominator.  The key must be the base variable.
e.g. pick is (x^2 - y^2)/(x - y) and key is x. ==> result is x + y.

FactQuad [q] factor a 2nd degree polynomial using the quadratic equation.
The pick must be a 2nd degree polynomial (not an equation)  The key must
be the base variable.
e.g. pick is (x^2 - y^2) and key is x. ==> result is (x + y)(x - y).

FactPoly [f] factor a polynomial using rational roots.
The pick must be a polynomial (not an equation).  The key must be the
base variable.  e.g. pick is (x^3 - y^3) and key is x. ==> result
is (x - y)(x^2 + x*y + y^2).

Substitute [u] performs substitution using the key over the pick.  The
key must be an equation.  e.g. pick is a*x + b, key is x = y - 1 ==>
result is a*(y - 1) + b.  NOTE, the LHS of key can be an expression,
but you may need to change the association on the pick in order for
the substitute to work.

^N Expand [n] expand integer exponents.  e.g. x^3 ==> x*x*x

ExpJoin [j] join exponents of common base.  This is the opposite of
distribute for exponents.

EqualKey [=] Change the key to an equation using the pick.  Neither pick
nor key can be an equation prior to this operation.  e.g. pick is
x + y, key is z ==> result key is z = x + y

Add-key [+] add the key to the pick.  If pick is an equation then key
is added to both sides.  If key is an equation then the corresponding
sides are added to the pick.  If neither is an equation then the key
is both added and subtracted.  e.g. pick is x, key is y ==> result is
x + y - y.

Sub-key [-] subtract the key from the pick.  See notes on add-key.

Mult-key [*] multiply the pick by the key.  See notes on add-key.

Div-key [/] divide the pick by the key.  See notes on add-key.

Exp-key [e] raise the pick to the key power.  See notes on add-key.

DeleteTop [del] delete the expression at the top of the screen.

EnterKey [k] prompt to typein a new key.  You must type the key using
postfix notation and press F6 Enter when you are done.  The expression
cannot have parentheses and the tokens must be separated with blanks.
e.g. to type in x^2 + y^2 = r^2 you would type the following...
x 2 ^ y 2 ^ + r 2 ^ = (press F6 and Enter)

InsertKey [Ins] copies the key to the expression list.

EraseAll [Alt-e] delete all expressions from the work area (except the key).

Load [l] load more expressions from a file.  Note: the previous expression
list is not erased.

Save [s] save the expression list to a file.  The key is not saved.

Write [w] write the expression list to a file using INFIX notation.  This
cannot be loaded again into alged.

------------------------------------------------------------------------------
Comments On Other Things

If you enjoy Alged or have any suggestions, please send me an email.
I do not want you to send me any money, but I like to get mail.

When you run alged from the command line you can specify one or more filenames
for it to load.  Alged always tries to load the file ALGED.1ST first.  I
suggest that you put the user option flags in this file, but you can put
formulas there as well.  See alged.1st for a list of all the user options.
Alged uses the current video mode, so before starting alged you can set it,
for example, by typing MODE co80,43.

The display algorithm used by alged is not perfect, for instance the following
expression
               1       2
              ────    y
                2  + ────
               x      b

the horizontal bars should be lined up.  You can make them line up by setting
user option ?y to 0, but this causes other things to be ugly.

When you click on an expression with the mouse, it is mostly obvious.  The
exception is exponentials.  To click on an exponential, point just above the
top right corner of the base.  e.g. in
                                            2
                                     (x + y)

point just above the ')' and click.

You will notice at the top left of the menu are Simplify and Distribute.
These operations are very useful for reducing a large complicated expression.
After a PolyDiv, for instance, I usually hit Distribute and Simplify
alternately until nothing changes.

This program does not support unary minus operator, thus to say -x, you must
say -1*x.  It does not support roots, so to say sqrt(x) you must say x^0.5.

All numeric values are stored as IEEE 4-byte floats (double).  This allows
the exponent to be -307 to +307 and the base has 16 significant digits.
Alged only displays 15 digits, because the last one is sometimes garbage.
This leads to a situation where sometimes numbers that look like integers
really are not.  For instance, you might see 1*x and when you Simplify it
doesn't change to x.  To fix this, press Integer, and the garbage digits are
thrown out.  A word of caution:  if you have a problem with very small numbers,
like 1.23e-10, then you should not use Integer or else significant digits are
removed.  The following special values are recognized...
      pi = 3.14159265358979292
      e =  2.71828182845904509

Alged supports functions with up to 5 arguments.  When you type a function in
postfix notation, you must give it's arity and you must put an @ in front of
the function name.  For instance, the expression f(x,sin(x),y) in postfix is

                     x x 1 @sin y 3 @f

The following function names are recognized: sin, cos, tan, acos, asin, atan,
cosh, sinh, tanh, ln (base e), log (base 10), abs.  All of these functions
take one argument.  If the argument is numeric, the result is computed.
The trigonometric functions are in radians.

The special variable "i" is recognized to be the square root of negative one.
Thus, i*i is simplified to -1.  Also i^7.3 becomes -1*i^1.3.  Imaginary
numbers are not computed in functions, e.g. sin(3*i).

Both Simplify and Calculate will compute numerical results.  However, the
difference is that Simplify will not attempt an operation on whole numbers
that may produce a non-whole number.  For example, 4^0.5 is not reduced by
Simplify, but it is by Calculate.

Some of the Poly operations will not work unless the expression is first
completely distributed and simplified.

You should practice using Associate and PolyCoef.  These operations are
useful for many things.  Associate will rearrange add/sub or mul/div or =,
whichever is currently selected.

The FactrPoly operation can be very slow.  On a 486DX-33 to factor a 4th
degree polynomial may take 15 seconds.  In general, I must admit that I made
no effort at all to make alged efficient.  It was already hard enough.

One final note on reliability.  This program was thrown together as a hobby
and it is not reliable.  You should check your answers by reversing the
operation if possible.  You should save your work often.  When I ran this
program in an OS/2 2.1 dosbox, several times it hung the system.  I had to
turn off the power of the PC.  So be careful, especially on very large
operations like FactrPoly.

"Give to everyone who asks you, and if anyone takes what belongs to you, do
not demand it back.  Do to others as you would have them do to you... love
your enemies, do good to them, and lend to them without expecting to get
anything back.  Then your reward will be great, and you will be sons of the
Most High, because he is kind to the ungrateful and wicked."  Luke 6.30ff

             End of help text.  Press any key to return.