home *** CD-ROM | disk | FTP | other *** search
/ Troubleshooting Netware Systems / CSTRIAL0196.BIN / attach / pcc / v08n03 / math.exe / ALGED21.ZIP / ALGED.HLP < prev    next >
Text File  |  1995-01-26  |  12KB  |  240 lines

  1.                    Help text for the Algebra Editor
  2.  
  3. Copyright (c) 1994 John Henckel
  4. Permission to use, copy, modify, distribute and sell this software
  5. and its documentation for any purpose is hereby granted without fee,
  6. provided that the above copyright notice appear in all copies.
  7. ----------------------------------------------------------------------------
  8. First let me introduce myself.  I'm John Henckel (henckel@vnet.ibm.com).
  9. Currently, I work for IBM in Rochester, Minnesota as a computer programmer.
  10. I like to write fun DOS programs as a hobby, and this is one of them.
  11.  
  12. This program is a tool for solving algebra problems.  You may ask yourself,
  13. why do I need a computer to help me do that?  Well, it might not make sense
  14. for small problems, but if you have a rather large problem with several
  15. equations and the result is a fourth-degree polynomial that doesn't fit on
  16. one page of notebook paper, then Alged can help.  Alged is cannot solve the
  17. problem for you; you need to think.  But it can relieve the tedium of working
  18. with large formulas, and it has rewrite rules to help simplify as you go.
  19.  
  20. You can look at the file alged.doc for a brief tutorial.
  21. ----------------------------------------------------------------------------
  22. Input Instructions:
  23.  
  24. The Alged screen has a menu at the top and a work area at the bottom.  You
  25. manipulate the formulas in the work area by clicking on parts of them and
  26. then clicking on the menu.  You click the left mouse button in the work area
  27. to select the current expression or the PICK.  The pick is highlighted.  You
  28. click the right mouse button in the work area to select the KEY expression.
  29. The key is copied to the bottom of the screen.  Notice that it is legal to
  30. click on the key, so the pick may be a subset of the key.
  31. If your computer does not have a mouse, (or you just don't like to use it)
  32. you can use the [pageup], [pagedown] and [end] keys to select the pick.
  33. These keys descend the binary tree stored in memory.  You can copy the pick
  34. to the key by pressing '.' or you can type the key by pressing 'k'.
  35.  
  36. Some of the operations on the menu only use the pick, and some use both the
  37. pick and the key.  Unless otherwise specified, the menu descriptions below
  38. apply to the pick only.
  39. ----------------------------------------------------------------------------
  40. Menu Description:
  41.  
  42. Simplify [space] simplify expression.  It sorts it, combines common terms,
  43. calculates numbers, and rewrites it in canonical form.
  44.  
  45. Distribute [d] distribute multiplication over add and subtract, and
  46. distribute exponents over multiplication and division.
  47.  
  48. Calculate [c,v] calculate all numbers.  e.g. 3*2 => 6.  If you click on this
  49. menu item with the right mouse button (or press 'v'), it will find the prime
  50. factorization of integers.  (This is limited by the ?d user option).
  51.  
  52. Integer [i] convert real numbers to integers if possible. e.g. 1.5 => 3/2
  53. This algorithm has two strategies.  First, it looks for repeating patterns
  54. in the fractional part of the number.  At least two repeating digits must
  55. be significant.  If that fails, it searches for a number, d, such that d*x is
  56. an integer.  The user parameters ?e and ?d are used here.
  57.  
  58. Associate [a] rotates the elements of an associative group.
  59.  
  60. Comm-Deno [m] This is a TOGGLE to create a common denominator or to
  61. distribute division over add and subtract.
  62.  
  63. CharMode [g] toggle ascii 7-bit or 8-bit.  This is useful if you use
  64. print-screen.
  65.  
  66. Poly-Coef [p] collect the coefficients of a polynomial.  The pick must be a
  67. polynomial (not an equation) and the key must be the expression use as the
  68. base of the polynomial.
  69. e.g. pick is a*x + b*x + c, key is x ==> result is c + (a + b)*x
  70.  
  71. Prev [up] scroll back
  72.  
  73. Next [down] scroll forward, at the end the list will wrap to the beginning.
  74.  
  75. Left [left] scroll Left
  76.  
  77. Center [home] horizontally center the formulas (this is default).
  78.  
  79. Right [right] scroll right
  80.  
  81. Poly-Div [\] polynomial division.  The pick must be a division (not an
  82. equation) and the numerator must be a polynomial with degree greater
  83. than or equal to the denominator.  The key must be the base variable.
  84. e.g. pick is (x^2 - y^2)/(x - y) and key is x. ==> result is x + y.
  85.  
  86. FactQuad [q] factor a 2nd degree polynomial using the quadratic equation.
  87. The pick must be a 2nd degree polynomial (not an equation)  The key must
  88. be the base variable.
  89. e.g. pick is (x^2 - y^2) and key is x. ==> result is (x + y)(x - y).
  90.  
  91. FactPoly [f] factor a polynomial using rational roots.
  92. The pick must be a polynomial (not an equation).  The key must be the
  93. base variable.  e.g. pick is (x^3 - y^3) and key is x. ==> result
  94. is (x - y)(x^2 + x*y + y^2).
  95.  
  96. Substitute [u] performs substitution using the key over the pick.  The
  97. key must be an equation.  e.g. pick is a*x + b, key is x = y - 1 ==>
  98. result is a*(y - 1) + b.  NOTE, the LHS of key can be an expression,
  99. but you may need to change the association on the pick in order for
  100. the substitute to work.
  101.  
  102. ^N Expand [n] expand integer exponents.  e.g. x^3 ==> x*x*x
  103.  
  104. ExpJoin [j] join exponents of common base.  This is the opposite of
  105. distribute for exponents.
  106.  
  107. EqualKey [=] Change the key to an equation using the pick.  Neither pick
  108. nor key can be an equation prior to this operation.  e.g. pick is
  109. x + y, key is z ==> result key is z = x + y
  110.  
  111. Add-key [+] add the key to the pick.  If pick is an equation then key
  112. is added to both sides.  If key is an equation then the corresponding
  113. sides are added to the pick.  If neither is an equation then the key
  114. is both added and subtracted.  e.g. pick is x, key is y ==> result is
  115. x + y - y.
  116.  
  117. Sub-key [-] subtract the key from the pick.  See notes on add-key.
  118.  
  119. Mult-key [*] multiply the pick by the key.  See notes on add-key.
  120.  
  121. Div-key [/] divide the pick by the key.  See notes on add-key.
  122.  
  123. Exp-key [e] raise the pick to the key power.  See notes on add-key.
  124.  
  125. DeleteTop [del] delete the expression at the top of the screen.
  126.  
  127. EnterKey [k] prompt to typein a new key.  You must type the key using
  128. postfix notation and press F6 Enter when you are done.  The expression
  129. cannot have parentheses and the tokens must be separated with blanks.
  130. e.g. to type in x^2 + y^2 = r^2 you would type the following...
  131. x 2 ^ y 2 ^ + r 2 ^ = (press F6 and Enter)
  132.  
  133. InsertKey [Ins] copies the key to the expression list.
  134.  
  135. EraseAll [Alt-e] delete all expressions from the work area (except the key).
  136.  
  137. Load [l] load more expressions from a file.  Note: the previous expression
  138. list is not erased.
  139.  
  140. Save [s] save the expression list to a file.  The key is not saved.
  141.  
  142. Write [w] write the expression list to a file using INFIX notation.  This
  143. cannot be loaded again into alged.
  144.  
  145. ------------------------------------------------------------------------------
  146. Comments On Other Things
  147.  
  148. If you enjoy Alged or have any suggestions, please send me an email.
  149. I do not want you to send me any money, but I like to get mail.
  150.  
  151. When you run alged from the command line you can specify one or more filenames
  152. for it to load.  Alged always tries to load the file ALGED.1ST first.  I
  153. suggest that you put the user option flags in this file, but you can put
  154. formulas there as well.  See alged.1st for a list of all the user options.
  155. Alged uses the current video mode, so before starting alged you can set it,
  156. for example, by typing MODE co80,43.
  157.  
  158. The display algorithm used by alged is not perfect, for instance the following
  159. expression
  160.                1       2
  161.               ────    y
  162.                 2  + ────
  163.                x      b
  164.  
  165. the horizontal bars should be lined up.  You can make them line up by setting
  166. user option ?y to 0, but this causes other things to be ugly.
  167.  
  168. When you click on an expression with the mouse, it is mostly obvious.  The
  169. exception is exponentials.  To click on an exponential, point just above the
  170. top right corner of the base.  e.g. in
  171.                                             2
  172.                                      (x + y)
  173.  
  174. point just above the ')' and click.
  175.  
  176. You will notice at the top left of the menu are Simplify and Distribute.
  177. These operations are very useful for reducing a large complicated expression.
  178. After a PolyDiv, for instance, I usually hit Distribute and Simplify
  179. alternately until nothing changes.
  180.  
  181. This program does not support unary minus operator, thus to say -x, you must
  182. say -1*x.  It does not support roots, so to say sqrt(x) you must say x^0.5.
  183.  
  184. All numeric values are stored as IEEE 4-byte floats (double).  This allows
  185. the exponent to be -307 to +307 and the base has 16 significant digits.
  186. Alged only displays 15 digits, because the last one is sometimes garbage.
  187. This leads to a situation where sometimes numbers that look like integers
  188. really are not.  For instance, you might see 1*x and when you Simplify it
  189. doesn't change to x.  To fix this, press Integer, and the garbage digits are
  190. thrown out.  A word of caution:  if you have a problem with very small numbers,
  191. like 1.23e-10, then you should not use Integer or else significant digits are
  192. removed.  The following special values are recognized...
  193.       pi = 3.14159265358979292
  194.       e =  2.71828182845904509
  195.  
  196. Alged supports functions with up to 5 arguments.  When you type a function in
  197. postfix notation, you must give it's arity and you must put an @ in front of
  198. the function name.  For instance, the expression f(x,sin(x),y) in postfix is
  199.  
  200.                      x x 1 @sin y 3 @f
  201.  
  202. The following function names are recognized: sin, cos, tan, acos, asin, atan,
  203. cosh, sinh, tanh, ln (base e), log (base 10), abs.  All of these functions
  204. take one argument.  If the argument is numeric, the result is computed.
  205. The trigonometric functions are in radians.
  206.  
  207. The special variable "i" is recognized to be the square root of negative one.
  208. Thus, i*i is simplified to -1.  Also i^7.3 becomes -1*i^1.3.  Imaginary
  209. numbers are not computed in functions, e.g. sin(3*i).
  210.  
  211. Both Simplify and Calculate will compute numerical results.  However, the
  212. difference is that Simplify will not attempt an operation on whole numbers
  213. that may produce a non-whole number.  For example, 4^0.5 is not reduced by
  214. Simplify, but it is by Calculate.
  215.  
  216. Some of the Poly operations will not work unless the expression is first
  217. completely distributed and simplified.
  218.  
  219. You should practice using Associate and PolyCoef.  These operations are
  220. useful for many things.  Associate will rearrange add/sub or mul/div or =,
  221. whichever is currently selected.
  222.  
  223. The FactrPoly operation can be very slow.  On a 486DX-33 to factor a 4th
  224. degree polynomial may take 15 seconds.  In general, I must admit that I made
  225. no effort at all to make alged efficient.  It was already hard enough.
  226.  
  227. One final note on reliability.  This program was thrown together as a hobby
  228. and it is not reliable.  You should check your answers by reversing the
  229. operation if possible.  You should save your work often.  When I ran this
  230. program in an OS/2 2.1 dosbox, several times it hung the system.  I had to
  231. turn off the power of the PC.  So be careful, especially on very large
  232. operations like FactrPoly.
  233.  
  234. "Give to everyone who asks you, and if anyone takes what belongs to you, do
  235. not demand it back.  Do to others as you would have them do to you... love
  236. your enemies, do good to them, and lend to them without expecting to get
  237. anything back.  Then your reward will be great, and you will be sons of the
  238. Most High, because he is kind to the ungrateful and wicked."  Luke 6.30ff
  239.  
  240.              End of help text.  Press any key to return.