nintegrate function



On 5/23/07, Andrej Vodopivec <andrej.vodopivec at gmail.com> wrote:
>
> Currently they are the default from quadpack (epsrel=1e-8 and
> lim=200). My preference for optional arguments is nintegrate(expr,
> var, lo, hi, epsrel=1e-8, lim=200)....


In general, Maxima controls the behavior of simplifying functions through
global variables rather than extra arguments.  This is not just a historical
accident -- it is done for good reason.  The idea is that the expression
expresses just the mathematical content, not information about how to
manipulate itself.  The same expression may be used in many different
contexts.

Thus we don't have sin(x+y,trigexpand=true), but rather sin(x+y) with
trigexpand=true.  We may want to take the *same* expression and manipulate
it with various settings of the controlling flags.

This applies even in numeric integration.  For example, in a nested
integral, the outside integration may well want to evaluate the inner
integral to different precisions for different values of the outer
variable.  The user may try to evaluate an expression at different
precisions or using different iteration limits etc.

This all comes back, really, to how to integrate nintegrate into the rest of
the Maxima system.

            -s