Next: Function Index, Previous: combdist, Up: Sample Applications [Contents][Index]
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:
-l | Factor arguments of generated log() terms. |
-p | Factor polynomial part of solution. |
-r | Factor generated rational function term. |
-t | Enable some tracing. |
ratint solves this problem using the following classic computer
algebra techniques:
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: Function Index, Previous: combdist, Up: Sample Applications [Contents][Index]