This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
 OBSOLETE FUNCTION APPROXIMATIONS PACKAGE SYMBOL

# NIntegrateInterpolatingFunction

As of Version 6.0, NIntegrate natively supports InterpolatingFunction objects.
 gives a numerical approximation to an integral with InterpolatingFunction objects in the integrand. gives a numerical approximation to a multidimensional integral.
• The arguments of the InterpolatingFunction objects may themselves be univariate functions of the integration variables.
• Numerically integrating a multidimensional integral using with InterpolatingFunction objects containing a large number of nodes may take significantly longer than using NIntegrate.
A trapezoidal approximation to :
Since is not smooth, NIntegrate will generate a warning message:
Using produces a slightly more accurate answer without any error messages:
In this case the integrand is simply an interpolating function, so you can use Integrate to check:
Needs["FunctionApproximations`"]
A trapezoidal approximation to :
 Out[2]=
Since is not smooth, NIntegrate will generate a warning message:
 Out[3]=
Using produces a slightly more accurate answer without any error messages:
 Out[4]=
In this case the integrand is simply an interpolating function, so you can use Integrate to check:
 Out[5]=
 Scope   (3)
threads element-wise over the first argument:
Complex-valued interpolation:
Multidimensional integrals:
The arguments of the interpolating function may themselves be univariate functions of the integration variables:
A trapezoidal approximation to Sin:
Accumulate the sampling points used by :
Plot the sampling points. The function is sampled at the x coordinates in the order of the y coordinates:
Accumulate the sampling points used by NIntegrate:
With NIntegrate, the nonsmooth behavior of near the points produces an error message and requires many recursive steps to evaluate accurately:
Increasing the order of the interpolation will produce a smoother function:
With a smoother function, fewer function evaluations are needed by NIntegrate:
If the interpolation is smooth enough, NIntegrate will require fewer function evaluations than :
Multidimensional interpolating functions with a large number of nodes may take much longer to integrate using instead of NIntegrate:
With NIntegrate, only one integral is evaluated, but the nonsmooth behavior generates many recursive steps:
Using , the integral is broken up into integrals over a smaller domain, where the integrand is smooth: