|
SOLUTIONS
|
OBSOLETE FUNCTION APPROXIMATIONS 程序包 符号
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.
更多信息更多信息
- To use
, you first need to load the Function Approximations Package using Needs["FunctionApproximations`"].
uses the function NIntegrate, but it breaks up the domain of integration into sections where the InterpolatingFunction objects are smooth.- If the integrand f does not contain any InterpolatingFunction objects,
is equivalent to NIntegrate. - The arguments of the InterpolatingFunction objects may themselves be univariate functions of the integration variables.
- If the integrand f is simply an InterpolatingFunction object, it is better to use Integrate because this gives a result that is exact for the polynomial approximation used in the InterpolatingFunction object.
- Numerically integrating a multidimensional integral using
with InterpolatingFunction objects containing a large number of nodes may take significantly longer than using NIntegrate.
has the same options as NIntegrate.
范例范例打开所有单元关闭所有单元
基本范例 (1)基本范例 (1)
| In[1]:= |
A trapezoidal approximation to
:
| In[2]:= |
| Out[2]= |
Since
is not smooth, NIntegrate will generate a warning message:
Using
produces a slightly more accurate answer without any error messages:
| In[4]:= |
| Out[4]= |
In this case the integrand is simply an interpolating function, so you can use Integrate to check:
| In[5]:= |
| Out[5]= |
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »
