REDUCE

7.8 INT Operator

int is an operator in REDUCE for indefinite or definite integration.

7.8.1 Indefinite integration

Indefinite integration is performed using a combination of the Risch-Norman algorithm and pattern matching [NM77Har79ND79]. It is used with the syntax:

int(\(\langle \)exprn:algebraic\(\rangle \),\(\langle \)var:kernel\(\rangle \)) : algebraic.

This will return correctly the indefinite integral for expressions comprising polynomials, log functions, exponential functions and tan and atan. The arbitrary constant is not represented. If the integral cannot be done in closed terms, it returns a formal integral for the answer in one of two ways:

1.
It returns the input, int(…,…) unchanged.
2.
It returns an expression involving ints of some other functions (sometimes more complicated than the original one, unfortunately).

Rational functions can be integrated when the denominator is factorizable by the program. In addition it will attempt to integrate expressions involving error functions, dilogarithms and other trigonometric expressions. In these cases it might not always succeed in finding the solution, even if one exists.

Examples:

        int(log(x),x) ->  x*(log(x) - 1),
        int(e^x,x)    ->  e**x.

The program checks that the second argument is a variable and gives an error if it is not.

7.8.2 Definite Integration

If int is used with the syntax

   INT(EXPRN:algebraic,VAR:kernel,
        LOWER:algebraic,UPPER:algebraic):algebraic.

The definite integral of exprn with respect to var is calculated between the limits lower and upper. This is calculated by several methods that are tried one after the other: pattern matching, by first finding the indefinite integral and then substituting the limits into this, by contour integration for some types integrands with polynomial denominator, or by transforming the integrand into one or two Meijer G-functions. For details, see the documentation on the DENT package described in section D.11 .

7.8.3 Options

The switch trint when on will trace the operation of the algorithm. It produces a great deal of output in a somewhat illegible form, and is not of much interest to the general user. It is normally off.

The switch trintsubst when on will trace the heuristic attempts to solve the integral by substitution. It is normally off.

The switch trdefint when on will trace the operation of the definite integration algorithm.

If the switch failhard is on the algorithm will terminate with an error if the integral cannot be done in closed terms, rather than return a formal integration form. failhard is normally off.

The switch nolnr suppresses the use of the linear properties of integration in cases when the integral cannot be found in closed terms. It is normally off.

The switch nointsubst disables the heuristic attempts to solve the integral by substitution. It is normally off.

7.8.4 Advanced Use

If a function appears in the integrand that is not one of the functions exp, Erf, tan, atan, log, dilog then the algorithm will make an attempt to integrate the argument if it can, differentiate it and reach a known function. However the answer cannot be guaranteed in this case. If a function is known to be algebraically independent of this set it can be flagged transcendental by

        flag(’(trilog),’transcendental);

in which case this function will be added to the permitted field descriptors for a genuine decision procedure. If this is done the user is responsible for the mathematical correctness of his actions.

The standard version does not deal with algebraic extensions. Thus integration of expressions involving square roots and other like things can lead to trouble. The extension package ALGINT will analytically integrate a wide range of expressions involving square roots where the answer exists in that class of functions. It is an implementation of the work described by J.H. Davenport [Dav81].

The extension package is loaded automatically when the switch algint is turned on. One enters an expression for integration, as with the regular integrator, for example:

        int(sqrt(x+sqrt(x**2+1))/x,x);

If one later wishes to integrate expressions without using the facilities of this package, the switch algint should be turned off.

The switches supported by the standard integrator (e.g., trint) are also supported by this package. In addition, the switch tra, if on, will give further tracing information about the specific functioning of the algebraic integrator.


Hosted by Download REDUCE Powered by MathJax