home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 3 / PDCD_3.iso / education / numeric / !Numeric / !Help < prev    next >
Text File  |  1995-04-12  |  10KB  |  256 lines

  1. --------------------------------------------------------------------------
  2.                 !Numeric (v1.03)  --  © Graham Hick, 1995
  3. --------------------------------------------------------------------------
  4.  
  5. === 1. Introduction ======================================================
  6.  
  7. This program is a combination of my previous programs !Integrate (v1.03)
  8. and !Diff (v1.01), which, as you might expect, allow you to calculate
  9. integrals of functions on bounded intervals, and also derivatives of
  10. functions, at a point. It also contains modules for solution of equations
  11. (Newton-Raphson method) and summation of series.
  12.  
  13. To use the program, click Menu on the icon-bar icon, and select the part
  14. of the program you want to use. Type the function and relevant value(s)
  15. into the boxes, and then click on the "Calculate" button (or press Enter
  16. when in the last writable icon) to do the calculation. All answers are
  17. given to 5 significant figures.
  18.  
  19.  
  20. === 2. Expression syntax =================================================
  21.  
  22. Because the program uses BASICs EVAL function, the function and values
  23. must be in a form that BASIC can understand, e.g.
  24.  
  25.                   3*x rather than 3x
  26.             1/(cos x) rather than sec x
  27.             (sin x)^2 rather than sin²x
  28.  
  29. Upper or lower case can be used throughout. The constants 'Pi' and 'e' can
  30. be used in the function or values - just type 'pi' or 'e' respectively.
  31. Also, factorials can be calculated, by typing 'FNfact(n)' for n!. 
  32.  
  33.  
  34. === 3. Notes on calculation ==============================================
  35.  
  36. 3.1 Integration
  37.  
  38.     Numerical integration is performed using "Simpson's Rule". The number
  39.     of strips used is given in the options window (see later). Remember
  40.     that if you want something sensible to happen, make sure your function
  41.     is integrable. If you try and integrate 1/x from -1 to 1, you're
  42.     asking for trouble. Trapping this kind of thing is inherently very
  43.     difficult in a numerical system, since it's not possible to sample
  44.     every point in the domain. If some sort of singularity happens, the
  45.     program may or may not find it, depending on exactly where the sample
  46.     points fall. Try integrating 1/x from -1 to 1.001, and you should see
  47.     what I mean.
  48.  
  49. 3.2 Differentiation
  50.  
  51.     The derivative at a point is found by calculating the slope of closer
  52.     and closer interpolation lines. It is now pretty robust, and
  53.     pathological things like the perennial favourite sin(1/x) should
  54.     always be handled correctly. If "--" is given as the answer, the
  55.     derivative doesn't exist - for example f'(0) where f(x) = abs(x).
  56.  
  57. 3.3 Summation
  58.  
  59.     The sum is calulated how you might expect - by adding up all the
  60.     terms. You can put "inf" as the upper limit, to calculate an infinite
  61.     sum. As with differentiation, if "-" is given as the answer, the sum
  62.     does not converge. Note the factorial function described in section 1.
  63.  
  64. 3.4 Solution
  65.  
  66.     Given an initial "guess" the iterative Newton-Raphson method is one of
  67.     the best ways of finding a solution to an equation of the form
  68.     f(x) = 0. For instance, to find the cube root of 7, give f(x) as
  69.     x^3 - 7. Note that only real solutions are found - and you don't
  70.     always get an answer when f(x) > 0 around the expected root (for
  71.     example, try f(x) = x^2).
  72.  
  73.  
  74. === 4. Options ===========================================================
  75.  
  76. The Options window allows you to customize some of the features of the
  77. program:
  78.  
  79. 4.1 Initial Windows
  80.  
  81.     Firstly, the windows to be opened on startup can be selected in the
  82.     top section of the window.
  83.  
  84. 4.2 Accuracy settings
  85.  
  86.     More usefully, perhaps, you can set various threshold values used in
  87.     various bits of the program:
  88.  
  89.     4.2.1 "Snap to zero" exponent
  90.  
  91.         This number represents the smallest number not to be pulled to
  92.         zero. Because of the way floating point works, you sometimes find
  93.         (although not so much with BASIC64) that an expected answer of
  94.         zero will actually come out as something like 1.27E-9, which you
  95.         don't want. The default value of this parameter is -8, meaning
  96.         that anything with absolute value less than 1E-8 will be shown as
  97.         zero.
  98.  
  99.     4.2.2 Integration strips
  100.  
  101.         The number of strips to use when applying Simpson's Rule to find
  102.         an integral. The default is 100.
  103.  
  104.     4.2.3 Derivative convergence exponent
  105.  
  106.         When calculating a derivative, the program stops when two
  107.         successive approximations come within a certain distance of each
  108.         other. The default value is 1E-10 - i.e. exponent -10.
  109.  
  110.     4.2.4 Summation convergence exponent
  111.  
  112.         Similarly, this is the distance that two successive approximations
  113.         must come within, in order for an infinite sum calculation to
  114.         stop. The default is -7.
  115.  
  116.     4.2.5 Solution convergence exponent
  117.  
  118.         Finally, the same thing for the Newton-Raphson calculation. The
  119.         default is -8.
  120.  
  121. 4.3 Saving or ignoring the changes
  122.  
  123.     Press the Cancel button to close the window and forget any changes
  124.     made to the settings since it was opened. Press the Close button to
  125.     update the settings, and press Save to also save them to disc (so they
  126.     will be loaded next time).
  127.  
  128.  
  129. === 5. Misc program notes ================================================
  130.  
  131. 5.1 3D templates
  132.  
  133.     This release only contains 3D-style templates, so it only works
  134.     completely right in RISC OS 3.10 or later. It should, however, still
  135.     work OK in RISC OS 2, but the writable icons may look too big. I'm
  136.     sorry about this, but I found developing two sets of virtually
  137.     identical templates too much of a pain. If you don't like this, then
  138.     please tell me!
  139.  
  140. 5.2 Hi-res sprites
  141.  
  142.     If you are in a high-res mode (i.e. 1:1 pixel aspect ratio) when the
  143.     program starts, it will load high-resolution versions of the sprites
  144.     which it uses. As I can't use all screen modes (I only have a VGA
  145.     monitor) and I haven't tested it with third-party screen modes (such
  146.     as those provided by whizzy graphics cards) I can't guarantee that
  147.     this works with your set-up. If it doesn't, then please let me know,
  148.     and tell me what screen mode(s) you are using, so I can figure
  149.     something out.
  150.  
  151. 5.3 BASIC64
  152.  
  153.     If the operating system version is >= 3, Numeric will attempt to use
  154.     BASIC64, which should be in the System: path. This gives far higher
  155.     accuracy than the usual BASIC.
  156.  
  157.  
  158. === 6. Version history ===================================================
  159.  
  160. 1.00 (Date unknown)
  161.  
  162.   * First release version, with Integrate and Diff integrated (sorry...)
  163.     into one package.
  164.  
  165. 1.01 (15 Apr 1994)
  166.  
  167.   * Added Newton-Raphson solver, and summation.
  168.   * Changed window layouts slightly.
  169.   * Wrote better(?) documentation.
  170.   * Added 3D templates and new sprites.
  171.  
  172. 1.02 (21 Sep 1994)
  173.  
  174.   * Revised the templates (thanks to Colin Turnbull for some helpful(?)
  175.     comments on this!).
  176.   * Nicer icon-bar menu.
  177.   * Fixed cursor up/down bugs.
  178.  
  179. 1.03 (12 Apr 1994)
  180.  
  181.   * New app icon.
  182.   * Added options window and file.
  183.   * Added interactive help support.
  184.   * Changed to BASIC64.
  185.   * Improved differentiation routine.
  186.   * Added infinite series capability.
  187.   * Improved the error handlers.
  188.   * Expanded and reformatted this help file.
  189.  
  190.  
  191. === 7. Future changes ====================================================
  192.  
  193.   * I'd like to be able to do integration over unbounded intervals. This
  194.     should be possible, by testing for convergence with repeated
  195.     approximations.
  196.  
  197.   * Do a pre-parser, to take into account mathematical notation (as
  198.     opposed to BASIC's more limited format). Alternatively I may abandon
  199.     EVAL altogether, and write a completely new parser (It's a bit of a
  200.     kludge at the moment, as you might notice...). But then again, I might
  201.     not bother...
  202.  
  203.  
  204. === 8. Copyright? ========================================================
  205.  
  206. This program is "Freeware". As far as I am concerned, this means that you
  207. can distribute it to anyone and everyone, PROVIDING that all files within
  208. the !Numeric directory are included in their original form, and you don't
  209. make any profit from distribution.
  210.  
  211. If you feel that you could do better, please send your improve