home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 25 / CD_ASCQ_25_1095.iso / dos / educ / alged30 / alged.hlp < prev    next >
Text File  |  1995-08-02  |  20KB  |  392 lines

  1.                    Help text for the Algebra Editor
  2.  
  3. Copyright (c) 1994,1995 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 and
  7. that both that copyright notice and this permission notice appear
  8. in supporting documentation.  All programs contained herein are provided
  9. to you "as is".  The implied warranties of merchantability and fitness 
  10. for a particular purpose are expressly disclaimed.
  11. ----------------------------------------------------------------------------
  12.  
  13. My name is John Henckel (internet:  henckel@vnet.ibm.com).  I am a computer
  14. hobbyist;  I like to write computer programs to amuse myself, and this is one
  15. of them.  I also recommend my 2D collision simulator "Impact" found in
  16. SimTel/msdos/simulatn.  Thanks to my family for letting me work on this.
  17. Thanks to my manager at IBM in Rochester, Minnesota for permitting me to 
  18. offer this program for free to the public.
  19.  
  20. I have found that there are two kinds of software: games and tools.
  21. A game is a program that sets the objective for you, but a tool lets you
  22. set your own objective.  Both kinds can be fun to play with, but eventually
  23. you get burned out on a game, because it makes you think in some narrow
  24. artificial domain.  A tool, however, helps you explore and develop your
  25. own thoughts and enables your creativity.  I hope Alged is a good tool that
  26. is fun for you to use.
  27.  
  28. Alged is a program for solving algebra problems.  There are other programs
  29. that can do symbolic formula manipulations, such as MathCad and Mathematica.
  30. The advantages of Alged are that it is
  31.     * Free!  The source code is also free!
  32.     * Light weight (it runs on a PC/XT with 256K of memory)
  33.     * Easy to use, ideal for education
  34.     * Fast and flexible 2D and 3D graphics
  35.     * Can be customized and translated to other languages
  36. Of course, there are limitations.  Alged is by no means a "commercial grade"
  37. product (though I've seen worse!)  Alged does not handle matrices, series,
  38. integrals, derivatives, or transcendental transformations.  Imaginary numbers
  39. are supported only with the five basic operators (add, subt, mult, div, exp).
  40. Alged is a tool for symbolic math, so I have purposely avoided the "number
  41. crunching" algorithms.
  42.  
  43. You can look at the file alged.doc for a brief tutorial.
  44. ----------------------------------------------------------------------------
  45. Input Instructions:
  46.  
  47. The Alged screen has a menu at the top and a work area at the bottom.  At the
  48. lower left is the time of day and the percentage of heap memory used.  (When
  49. the heap reaches 100% Alged will exit.)  You manipulate the formulas in the
  50. work area by clicking on parts of them and then clicking on the menu.  You
  51. click the left mouse button in the work area to select the current expression
  52. or the PICK.  The pick is highlighted.  You click the right mouse button in
  53. the work area to select the KEY expression.  The key is copied to the bottom
  54. of the screen.  Notice that it is legal to click on the key, so the pick may
  55. be a subset of the key.  To scroll the work area, you can click on the border.
  56.  
  57. If your computer does not have a mouse, (or you just don't like to use it)
  58. you can use the [pageup], [pagedown] and [end] keys to select the pick.
  59. These keys descend the binary tree stored in memory.  You can copy the pick to
  60. the key by pressing '.'.  You can type the key by pressing 'k'.  You can copy
  61. the key to the work area by pressing [Insert].  You can delete the key by
  62. pressing [Enter].  To scroll the work area, you can use the arrow keys.
  63.  
  64. Some of the operations on the menu only use the pick, and some use both the
  65. pick and the key.  Unless otherwise specified, the menu descriptions below
  66. apply to the pick only.
  67. ----------------------------------------------------------------------------
  68. Menu Description:
  69.  
  70. Simplify [space] simplify expression.  It sorts it, combines common terms,
  71. calculates numbers, and rewrites it in canonical form.
  72.  
  73. Distribute [d] distribute multiplication over add and subtract, and distribute
  74. exponents over multiplication and division.
  75.  
  76.   Note: Another similar function is DistChild which is assigned to the 'D' 
  77.   (press shift and 'd').  The DistChild function is different in two ways.
  78.     1. DistChild does a top-down distribution.  For example, 
  79.            (x*(a + b))^2  --->  (x^2)*(a + b)^2    using DistChild
  80.            (x*(a + b))^2  --->  (x*a + x*b)^2      using Distribute
  81.     2. DistChild does not distribute the top level factors in an expression
  82.        or equation.  You can use DistChild to simplify the result of a 
  83.        factorization, like FactPoly or FactQuad.
  84.  
  85. Calculate [c] calculate all numbers.  e.g. 3*2 => 6.
  86.  
  87. PrimeFact [v] find the prime factorization of integers.  (This is limited by
  88. the ?d user option).
  89.  
  90. Integer [i] convert real numbers to integers if possible. e.g. 1.5 => 3/2
  91. This algorithm has two strategies.  First, it looks for repeating patterns
  92. in the fractional part of the number.  At least two repeating digits must
  93. be significant.  If that fails, it searches for an integer, d, such that d*x
  94. is an integer.  The user parameters ?e and ?d are used here.
  95.  
  96. Associate [a] rotates the elements of an associative group.
  97.  
  98. Comm-Deno [m] This is a TOGGLE to create a common denominator or to distribute
  99. division over add and subtract.
  100.  
  101. CharMode [8] toggle ascii 7-bit or 8-bit.  This is useful if you use
  102. print-screen.
  103.  
  104. Poly-Coef [p] collect the coefficients of a polynomial.  The pick must be a
  105. polynomial (not an equation) and the key must be the expression use as the
  106. base of the polynomial.
  107. e.g. pick is a*x + b*x + c, key is x ==> result is c + (a + b)*x
  108.  
  109. Center [home] horizontally center the formulas (this is default).
  110.  
  111. Poly-Div [\] polynomial division.  The pick must be a division (not an
  112. equation) and the numerator must be a polynomial with degree greater
  113. than or equal to the denominator.  The key must be the base variable.
  114. e.g. pick is (x^2 - y^2)/(x - y) and key is x. ==> result is x + y.
  115.  
  116. FactQuad [q] factor a 2nd degree polynomial using the quadratic equation.
  117. The pick must be a 2nd degree polynomial (not an equation)  The key must
  118. be the base variable.
  119. e.g. pick is (x^2 - y^2) and key is x. ==> result is (x + y)(x - y).
  120.  
  121. FactCubic [3] factor a 3rd degree polynomial using the cubic equation.
  122. The pick must be a 3rd degree polynomial (not an equation)  The key must
  123. be the base variable.  e.g. pick is (x^3 - y^3) and key is x. ==> result
  124. (after integer and several calculate and simplify) is
  125.          (x - y)*(x + (0.5 - 0.86i)*y)*(x + (0.5 + 0.86i)*y).
  126.  
  127.   Note:  This function isn't working very well.  Sometimes it gives the
  128.   wrong answer, and sometimes it uses up all memory.  The problem appears to
  129.   be with non-singular roots.  Only use it as a last resort.
  130.  
  131. FactPoly [f] factor a polynomial using rational roots.  The pick must be a
  132. polynomial (not an equation).  The key must be the base variable.  e.g.  pick
  133. is (x^4 - y^4) and key is x.  ==> result is (x - y)(x + y)(x^2 + y^2).
  134.  
  135. Substitute [u] performs substitution using the key over the pick.  The key
  136. must be an equation.  e.g.  pick is a*x + b, key is x = y - 1 ==> result
  137. is a*(y - 1) + b.
  138.  
  139.   Notes: the LHS of key can be an expression, but you may need to change
  140.   the association on the pick in order for the substitute to work.  You
  141.   can use this with EqualKey: to replace the pick with the key, press =u.
  142.  
  143. ^N Expand [n] expand integer exponents.  e.g. x^3 ==> x*x*x
  144.  
  145. ExpJoin [j] join exponents of common base.  This is the opposite of
  146. distribute for exponents.
  147.  
  148. EqualKey [=] Change the key to an equation using the pick.  Neither pick
  149. nor key can be an equation prior to this operation.  e.g. pick is
  150. x + y, key is z ==> result key is x + y = z
  151.  
  152.   Note: you can use = and u to replace the pick with the key.
  153.  
  154. Add-key [+] add the key to the pick.  If pick is an equation then key is added
  155. to both sides.  If key is an equation then the corresponding sides are added
  156. to the pick.  If neither is an equation then the key is both added and
  157. subtracted.  e.g.  pick is x, key is y ==> result is x + y - y.
  158.  
  159. Sub-key [-] subtract the key from the pick.  See notes on add-key.
  160.  
  161. Mult-key [*] multiply the pick by the key.  See notes on add-key.
  162.  
  163. Div-key [/] divide the pick by the key.  See notes on add-key.
  164.  
  165. Exp-key [e] raise the pick to the key power.  See notes on add-key.
  166.  
  167. DeleteTop [del] delete the expression at the top of the screen.
  168.  
  169. EnterKey [k] prompt to type in a new key.  You must type the key and press
  170. F6 Enter when you are done.  (The F6 key should produce a ^Z, but if it
  171. doesn't work, then you can press ctrl-z.)  You can use either infix or
  172. postfix, depending on the ?f user option.
  173.  
  174.   Infix example z = (x^2 + y^2)^.5.
  175.  
  176.   Postfix example z x 2 ^ y 2 ^ + .5 ^ =.  You cannot use parentheses and
  177.   the tokens must be separated with blanks.
  178.  
  179.   Note:  You can use EnterKey to type anything that could appear in a data
  180.   file.  This includes visible comments (") and user options like ?m 41.
  181.   (Exception: you cannot change bgi drivers with ?g, but you can change the
  182.   mode or palette.  The ?f option does not take effect until end-of-file.)
  183.   Use the InsertKey command to add the new key to the expression list.
  184.  
  185. InsertKey [Ins] copies the key to the expression list.
  186.  
  187. EraseAll [Alt-e] delete all expressions from the work area (except the key).
  188.  
  189. DebugMode [Alt-d] dump the pick node tree for debugging purposes.
  190.  
  191. Load [l] load more expressions from a file.  Note: the previous expression
  192. list is not erased.
  193.  
  194. Save [s] save the expression list to a file.  The key is not saved.
  195.  
  196. Write [w] write the expression list in postfix notation.  This function is
  197. not very useful unless you like postfix.  I just left it in because it was
  198. in alged version 2.1.
  199.  
  200. EquRight ']' move the right operand from the left side of an equation to the
  201. right side.  e.g. pick is x + y = 3, result is x = 3 - y.
  202.  
  203. EquLeft '[' move the left operand from the left side of an equation to the
  204. right side.  e.g. pick is x + y = 3, result is y = x + 3.
  205.  
  206. Graph [g] switch to graph mode and plot the function.  To use graphics you
  207. need a CGA, EGA, VGA, or hercules video adapter, and you need you have the
  208. corresponding bgi file (like EGAVGA.BGI) in the current directory.  Alged
  209. can autodetect these four modes.  If you have another bgi file you want to
  210. use, then specify it with the ?g user option.
  211.  
  212. ------------------------------------------------------------------------------
  213. Graphics Mode Controls
  214.  
  215. The first graphics mode is 2-dimensional (x-y function plot).  Press 'g' to
  216. toggle between 2D and 3D (x-y-z) modes.  To leave graphics mode press Esc.
  217.  
  218. Both 2D and 3D plot the pick on the y axis (vertical).  In 2D mode, if the
  219. key is specified, it is plotted on the x axis (horizontal).  Otherwise, the
  220. first variable found in the pick is used for the x axis.  In 3D mode, the
  221. first two variables found in the pick are used for the x and z (depth) axes.
  222.  
  223. Warning!  A common mistake is to accidentally leave a formula in the KEY and
  224. the 2D plot is all messed up.  Solution: clear the key (press ENTER) before
  225. using graph mode.
  226.  
  227.     KEY           What is Does
  228.     ------        -------------
  229.     esc           leave graphics
  230.     'g'           toggle 2D and 3D mode
  231.     home          more points (smoother)
  232.     end           fewer points
  233.     pgup pgdn     scale y axis
  234.     'a'           toggle polar coordinates
  235.     'd'           reset default options
  236.     '1'...'9'     add step to one of the variables
  237.     'q'...'o'     subtract step from one of the variables
  238.     '0' 'p'       change step
  239.     arrows        move viewport
  240.     ins,del       zoom in, out
  241.     ------        ----- additional 3D functions -----
  242.     enter         toggle mode
  243.     arrows        camera location around origin      \_ normal mode
  244.     ins,del       camera distance to origin          /
  245.     arrows        rotate camera x,y                  \
  246.     pgup,dn       rotate camera z                     > camera mode
  247.     ins,del       move camera forward                /
  248.     ctrl-arrows   move function grid
  249.     ctrl-ins,del  size function grid
  250.     ctrl-pgup,dn  size z axis function grid
  251.     'c'           contour color function
  252.  
  253. The first part of the list is for both 2D and 3D.  The second part of the list
  254. is for 3D only.  The 3D functions use the keypad in two different modes.  Use
  255. the Enter key to change the mode of the keypad.
  256.  
  257. The number keys and the top row of letters (q,w,e,r,t,y,u,i,o,p) are use to
  258. adjust the rest of the variables found in the function.  For instance, when
  259. you plot a^2+b*c, the "a" variable is used as the x axis (in 3D mode, b is the
  260. z axis).  If you want to see how it looks with different values of c you can
  261. change it by pressing '2' to increase and 'w' to decrease.  In 2D mode, you
  262. could use '1' and 'q' to adjust b.  In 3D mode, '1' and 'q' do nothing.  The
  263. "step" or amount of adjustment is changed with '0' and 'p'.
  264.  
  265. In polar coordinates mode, the x axis becomes the angle (theta) and the y axis
  266. becomes the radius.  In 2D the domain of x still depends on the viewport size.
  267. In 3D, the first independent variable determines the angle of latitude
  268. [-pi/2, pi/2] and the second independent variable determines the angle of
  269. longitude [-pi, pi].  For a 3D example, pick=2 is a sphere of radius 2, and
  270. cos(x) is a donut (with no hole).
  271.  
  272. Known bugs:  when you get too close to a 3D plot then the clipping of the
  273. edges can cause some distortion.  If the function is behind the camera then it
  274. will cause messy lines to appear.  You cannot customize the keys for graphics
  275. controls unless you edit the source code.  Sorry, so many features, so little
  276. time.
  277.  
  278. If your graph gets all messed up and you can't fix it, try pressing 'd'.
  279. ------------------------------------------------------------------------------
  280. Comments On Other Things
  281.  
  282. If you enjoy Alged or have any suggestions, please send me an email.
  283. I do not want you to send me any money, but I like to get mail.
  284.  
  285. When you run alged from the command line you can specify one or more filenames
  286. for it to load.  Alged always tries to load the file ALGED.1ST first.  I
  287. suggest that you put the user option flags in this file, but you can put
  288. formulas there as well.  See alged.1st for a list of all the user options.
  289. Alged uses the current video mode, so before starting alged you can set it,
  290. for example, by typing MODE co80,43 (you may need ANSI.SYS for this command.)
  291.  
  292. The display algorithm used by alged is not perfect, for instance the following
  293. expression
  294.                1       2
  295.               ────    y
  296.                 2  + ────
  297.                x      b
  298.  
  299. the horizontal bars should be lined up.  You can make them line up by setting
  300. user option ?y to 0, but this causes other things to be ugly.
  301.  
  302. When you click on an expression with the mouse, it is mostly obvious.  The
  303. exception is exponentials.  To click on an exponential, point just above the
  304. top right corner of the base.  e.g. in
  305.                                             2
  306.                                      (x + y)
  307.  
  308. point just above the ')' and click.
  309.  
  310. You will notice at the top left of the menu are Simplify and Distribute.
  311. These operations are very useful for reducing a large complicated expression.
  312. After a PolyDiv, for instance, I usually hit Distribute and Simplify
  313. alternately until nothing changes.
  314.  
  315. This program does not support unary minus operator, thus to say -x, you must
  316. say -1*x.  It does not support roots, so to say sqrt(x) you must say x^0.5.
  317.  
  318. All numeric values are stored as IEEE 8-byte floats (double).  This allows
  319. the exponent to be -307 to +307 and the base has 16 significant digits.
  320. Alged only displays 15 digits, because the last one is sometimes garbage.
  321. This leads to a situation where sometimes numbers that look like integers
  322. really are not.  For instance, you might see 1*x and when you Simplify it
  323. doesn't change to x.  To fix this, press Integer, and the garbage digits are
  324. thrown out.  A word of caution:  if your problem uses very small numbers,
  325. like 1.23e-10, then you should not use Integer or else significant digits are
  326. removed.  The following special symbols are recognized...
  327.       pi = 3.14159265358979292
  328.       e =  2.71828182845904509
  329.  
  330. Alged allows any function with up to 5 arguments.  However, only the following
  331. functions are recognized in calculations and graphs.
  332.     With one argument: sin, cos, tan, acos, asin, atan, cosh, sinh,
  333.                        tanh, ln (base e), log (base 10), abs, rand, sign.
  334.     With two arguments: min, max, r, mod, atan2.
  335. The trigonometric functions are in radians.  The function r(x,y) uses the
  336. hypot function in C which is equal to (x^2 + y^2)^0.5 which is the hypotenuse.
  337. The atan2(y,x) is the angle (in radians, -pi to pi) of the line connecting
  338. (x,y) to the origin.
  339.  
  340. Variable names can be up to 24 characters.  However, function names can only
  341. be 7 characters.  This is because function parm pointers use part of the name
  342. memory.
  343.  
  344. The special variable "i" is recognized to be the square root of negative one.
  345. Thus, i*i is simplified to -1.  Also i^7.3 becomes -1*i^1.3.
  346. Imaginary numbers are supported in exponentials, (1+2i)^3 is evaluated to
  347. 2.24^3*(cos(1.11*3) + i*sin(1.11*3)) which is -11-2i.  I used the convention
  348. in which -pi<theta<=pi.  Imaginary numbers are not computed in functions
  349. like sin(3*i).
  350.  
  351. Both Simplify and Calculate will compute numerical results.  However, the
  352. difference is that Simplify will not attempt an operation on whole numbers
  353. that may produce a non-whole number.  For example, 4^0.5 is not reduced by
  354. Simplify, but it is by Calculate.
  355.  
  356. Some of the Poly operations will not work unless the expression is first
  357. completely distributed and simplified.
  358.  
  359. You should practice using Associate and PolyCoef.  These operations are
  360. useful for many things.  Associate will rearrange add/sub or mul/div or =,
  361. whichever is currently selected.
  362.  
  363. The FactrPoly operation can be very slow.  On a 486DX-33 to factor a 4th
  364. degree polynomial may take 15 seconds.  In general, I must admit that I made
  365. no effort at all to make Alged efficient.  It was already hard enough.
  366.  
  367. Customizing:
  368.  
  369. The Alged menu and other program text is stored in the ALGED.MNU file.  You
  370. can customize this file using a text editor.  You can change the size and
  371. layout of the menu, the hotkeys, or any of the text.  You can translate this
  372. file into another language (e.g. Italian).  If you do, send it to me so that
  373. I can distribute it!  When Alged starts, it loads ALGEDxyz.MNU from the
  374. current directory, where xyz is the language option specified with ?l.
  375. If ?l is not specified in ALGED.1ST or any of the data files, then the
  376. ALGED.MNU is loaded.
  377.  
  378. Final Notes:
  379.  
  380. One final note on reliability.  This program was thrown together as a hobby
  381. and it is not reliable.  You should check your answers by reversing the
  382. operation if possible.  You should save your work often.  When I developed
  383. this program, several times it hung the system.  I had to turn off the power
  384. of the PC.  So be careful, especially on very large operations like FactrPoly.
  385.  
  386. "This is what the Lord says: 'Let not the wise man boast of his wisdom or the
  387. strong man boast of his strength or the rich man boast of his riches, but let
  388. him who boasts boast about this: that he understands and know me, that I am
  389. the Lord, who exercises kindness, justice and righteousness on earth, for in
  390. these I delight,' declares the Lord."   Jeremiah 9.23-24
  391.  
  392.              End of help text.  Press any key to return.