num_int INDEX

NUM_INT _ _ _ _ _ _ _ _ _ _ _ _ operator

For the numerical evaluation of univariate integrals over a finite interval the following strategy is used: If int finds a formal antiderivative which is bounded in the integration interval, this is evaluated and the end points and the difference is returned. Otherwise a Chebyshev fit 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. 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. <a> is a measure for the relative total discretization error (comparison of order 1 and order 2 approximations).

syntax:

num_int(<exp>,<var>=(<l> .. <u>) [,<var>=(<l> .. <u>),...] [,accuracy=<a>][,iterations=<i>])

where <exp> is the function to be integrated, <var> are the integration variables, <l> are the lower bounds, <u> are the upper bounds.

Result is the value of the integral.

examples:


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

  2.0000010334