home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d1xx / d164 / polyroot.lha / PolyRoot / PolyRoot.TXT < prev    next >
Text File  |  1988-11-22  |  3KB  |  114 lines

  1.  
  2.  
  3.               PolyRoot
  4.  
  5.   This program finds all roots of any
  6. polynomial with real coefficients.
  7.  
  8.   You will first be asked for the
  9. order of the polynomial, then the
  10. coefficients.  For example, for the
  11. fourth order equation:
  12.  
  13.  2.7(x^4) - .3(x^3) + 2.6(x) + 1 = 0,
  14.  
  15.     Coefficient #1 = 2.7
  16.     Coefficient #2 = -.3
  17.     Coefficient #3 = 0   (x^2 term)
  18.     Coefficient #4 = 2.6
  19.     Coefficient #5 = 1   (x^0 term)
  20.  
  21.  
  22.    After the coefficients have been
  23. entered, the program will open a
  24. status window and solve the equation.
  25.  
  26.    Typical polynomials will be
  27. solved in a few seconds. Others will
  28. take longer.
  29.  
  30.    If you need to access other tasks
  31. during this time, use the front/back
  32. menu selection.  Multi-tasking will
  33. be limited with 512k.
  34.  
  35.    When the process is complete, the
  36. roots will be displayed.  Along with
  37. the roots will be columns titled
  38. 'residuals' and 'tolerance'.
  39.  
  40.  
  41.  
  42.    Residuals were obtained by
  43. inserting the root into the original
  44. polynomial and evaluating.  A value
  45. close to zero generally indicates a
  46. good solution, but this is quite
  47. dependent on the coefficients.
  48.  
  49.    More significant is the tolerance
  50. column. This indicates the magnitude
  51. of error. For example, if a root is:
  52.  
  53.  2.7227711315D+00 + 7.1132580714D+01
  54.  
  55. with a tolerance of ± 3.117D-06, the
  56. solution is accurate to the 5th
  57. decimal place, or:
  58.  
  59.     2.72277D+00 + 7.113258D+01
  60.  
  61.  
  62.    You may send results to a disk
  63. file or printer.  If the disk file
  64. named exists, the program will 
  65. request permission to overwrite.
  66. If any roots scroll, use 'Show' to
  67. re-display them.
  68.  
  69.    The solution technique used is
  70. Bairstow's factorization method
  71. coupled with a Newtonian iteration
  72. scheme to refine roots.  Thus, the
  73. algorithm may have difficulty
  74. converging if a root exists near a
  75. point where the derivative of the
  76. polynomial is zero or infinity.
  77.  
  78.  
  79.  
  80.  
  81.  
  82.    Should this happen, a message will
  83. be displayed for each root that does
  84. not converge.  If the final results
  85. have unacceptable errors, adjust the
  86. tolerance and iteration limits.
  87. Observe how your changes affect the
  88. residual and tolerance values. 
  89.  
  90.    If there is a strong divergence,
  91. increasing the number of iterations
  92. could magnify the error.  In this
  93. case, reduce the number of iterations
  94. and/or decrease the tolerance to
  95. obtain at least a general idea of
  96. root location.
  97.  
  98.  
  99.  
  100.  
  101.  
  102.    In cases where there are no
  103. convergence problems, tolerance and
  104. iteration settings may be used to 
  105. "dial-in" the desired degree of
  106. accuracy.  These values are reset to
  107. their defaults for each new equation.
  108.  
  109.    The author may be reached at:
  110.  
  111.            Jon Giorgini
  112.        1321 Cherokee Avenue
  113.       West St. Paul, MN 55118
  114.