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.

更多信息更多信息

范例范例打开所有单元关闭所有单元

基本范例  (1)基本范例  (1)

In[1]:=
Click for copyable input

A trapezoidal approximation to :

In[2]:=
Click for copyable input
Out[2]=

Since is not smooth, NIntegrate will generate a warning message:

In[3]:=
Click for copyable input
Out[3]=

Using produces a slightly more accurate answer without any error messages:

In[4]:=
Click for copyable input
Out[4]=

In this case the integrand is simply an interpolating function, so you can use Integrate to check:

In[5]:=
Click for copyable input
Out[5]=