REDUCE

17.4 Integrals

For the numerical evaluation of univariate integrals over a finite interval the following strategy is used:

1.
If the function has an antiderivative in close form which is bounded in the integration interval, this is used.
2.
Otherwise a Chebyshev approximation is computed, starting with order 20, eventually up to order 80. If that is recognized as sufficiently convergent it is used for computing the integral by directly integrating the coefficient sequence.
3.
If none of these methods is successful, an adaptive multilevel quadrature algorithm is used.

For multivariate integrals only the adaptive quadrature is used. This algorithm tolerates isolated singularities. The value \(iterations\) here limits the number of local interval intersection levels. \(Accuracy\) is a measure for the relative total discretization error (comparison of order 1 and order 2 approximations).

Syntax:

num_int

\((exp,var_1=(l_1 .. u_1)[,var_2=(l_2 .. u_2)\ldots ]\)

      

\([,accuracy=a][,iterations=i])\)

where \(exp\) is the function to be integrated,

\(var_1, var_2 , \ldots \) are the integration variables,

\(l_1, l_2 , \ldots \) are the lower bounds,

\(u_1, u_2 , \ldots \) are the upper bounds.

Result is the value of the integral.

Example:

    num_int(sin x,x=(0 .. pi));

    2.0


Hosted by Download REDUCE Powered by MathJax