Next: , Previous: , Up: Sample Applications   [Contents][Index]


28.2 ratint

The ratint application demonstrates CALIB being used to perform a very “traditional” computer algebra task — indefinite integration of rational functions of a single variable. (Integration of functions in Z[x] / Z[x].) It reads a sequence of expressions from stdin that must have the following format:

		integrate (expr, var);

The expr must be a rational function over the single variable var. It displays the original problem together with its solution. (It also checks the correctness of the solution by differentiating it and comparing it with the original integrand — printing a stern warning if they do not match.)

ratint accepts the following command line arguments:

-lFactor arguments of generated log() terms.
-pFactor polynomial part of solution.
-rFactor generated rational function term.
-tEnable some tracing.

ratint solves this problem using the following classic computer algebra techniques:

  1. Partial-fraction decomposition over the square-free factorization of the denominator.
  2. Hermite reduction of integrands whose denominators are not square-free.
  3. Trager’s method for integrating R/S (R and S are primitive, square-free, relatively prime polynomials with deg(R) < deg(S)). Trager’s method splits the factors of S in an "optimal" way that does not introduce any algebraic number constant multipliers on the generated log() terms.
  4. A traditional method for finding atan() terms (possibly involving square-roots of integers).

It does not yet attempt to split factors Si of denominator S having the form a*x^(2k) + b*x^k + c into separate partial-fractions, as these could contain square-roots of integers and be subject to additional algebraic decomposition which this simple machinery is not prepared to handle. (It does not even attempt this when k=1, although this special case generates final log() terms containing square-roots of integers having no further need of algebraic processing. Extending ratint to handle this k=1 case is left as an interesting exercise for those wishing to experiment further with CALIB.)


Next: , Previous: , Up: Sample Applications   [Contents][Index]