rsolve.tex 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. \chapter[RSOLVE: Rational polynomial solver]%
  2. {RSOLVE: \protect\\ Rational/integer polynomial solvers}
  3. \label{RSOLVE}
  4. \typeout{[RSOLVE: Rational polynomial solver]}
  5. {\footnotesize
  6. \begin{center}
  7. Francis J. Wright \\
  8. School of Mathematical Sciences, Queen Mary and Westfield College \\
  9. University of London \\
  10. Mile End Road \\
  11. London E1 4NS, England \\[0.05in]
  12. e--mail: F.J.Wright@QMW.ac.uk
  13. \end{center}
  14. }
  15. \ttindex{RSOLVE}
  16. The exact rational zeros of a single univariate polynomial using fast
  17. modular methods can be calculated.
  18. The operator \verb|r_solve|\ttindex{R\_SOLVE} computes
  19. all rational zeros and the operator \verb|i_solve|
  20. \ttindex{I\_SOLVE} computes only
  21. integer zeros in a way that is slightly more efficient than extracting
  22. them from the rational zeros.
  23. The first argument is either a univariate polynomial expression or
  24. equation with integer, rational or rounded coefficients. Symbolic
  25. coefficients are not allowed. The argument is simplified to a
  26. quotient of integer polynomials and the denominator is silently
  27. ignored.
  28. Subsequent arguments are optional. If the polynomial variable is to
  29. be specified then it must be the first optional argument. However,
  30. since the variable in a non-constant univariate polynomial can be
  31. deduced from the polynomial it is unnecessary to specify it
  32. separately, except in the degenerate case that the first argument
  33. simplifies to either 0 or $0 = 0$. In this case the result is
  34. returned by \verb|i_solve| in terms of the operator \verb|arbint| and
  35. by \verb|r_solve| in terms of the (new) analogous operator
  36. \verb|arbrat|. The operator \verb|i_solve| will generally run
  37. slightly faster than \verb|r_solve|.
  38. The (rational or integer) zeros of the first argument are returned as
  39. a list and the default output format is the same as that used by
  40. \verb|solve|. Each distinct zero is returned in the form of an
  41. equation with the variable on the left and the multiplicities of the
  42. zeros are assigned to the variable \verb|root_multiplicities| as a
  43. list. However, if the switch {\ttfamily multiplicities} is turned on then
  44. each zero is explicitly included in the solution list the appropriate
  45. number of times (and \verb|root_multiplicities| has no value).
  46. \begin{sloppypar}
  47. Optional keyword arguments acting as local switches allow other output
  48. formats. They have the following meanings:
  49. \begin{description}
  50. \item[{\ttfamily separate}:] assign the multiplicity list to the global
  51. variable \verb|root_multiplicities| (the default);
  52. \item[{\ttfamily expand} or {\ttfamily multiplicities}:] expand the solution
  53. list to include multiple zeros multiple times (the default if the
  54. {\ttfamily multiplicities} switch is on);
  55. \item[{\ttfamily together}:] return each solution as a list whose second
  56. element is the multiplicity;
  57. \item[{\ttfamily nomul}:] do not compute multiplicities (thereby saving
  58. some time);
  59. \item[{\ttfamily noeqs}:] do not return univariate zeros as equations but
  60. just as values.
  61. \end{description}
  62. \end{sloppypar}
  63. \section{Examples}
  64. \begin{verbatim}
  65. r_solve((9x^2 - 16)*(x^2 - 9), x);
  66. \end{verbatim}
  67. \[
  68. \left\{x=\frac{-4}{3},x=3,x=-3,x=\frac{4}{3}\right\}
  69. \]
  70. \begin{verbatim}
  71. i_solve((9x^2 - 16)*(x^2 - 9), x);
  72. \end{verbatim}
  73. \[
  74. \{x=3,x=-3\}
  75. \]