NIntegrate
NIntegrate[
f
,
{
x
,
xmin
,
xmax
}
]
gives a numerical approximation to the integral
.
Multidimensional integrals can be specified, as in
Integrate
.
NIntegrate
tests for singularities at the end points of the integration range.
NIntegrate[
f
,
{
x
,
,
,
...
,
}
]
tests for singularities at each of the intermediate points
. If there are no singularities, the result is equivalent to an integral from
to
. You can use complex numbers
to specify an integration contour in the complex plane.
See also:
Integrate
,
ND
,
SolveODE
.
Examples
Using InstantCalculators
Here are the InstantCalculators for the
NIntegrate
function. Enter the parameters for your calculation and click
Calculate
to see the result.
In[1]:=
Out[1]=
In[2]:=
Out[2]=
In[3]:=
Out[3]=
Entering Commands Directly
You can paste a template for this command via the Text Input button on the
NIntegrate
Function Controller.
Functions that cannot be integrated using algebraic routines can nonetheless be integrated numerically.
In[4]:=
Out[4]=
There are some functions that will give
NIntegrate
trouble.
In[5]:=
Out[5]=
Another way to solve the problem is to make
NIntegrate
break the integration region into several pieces, with a small piece that explicitly covers the neighborhood of the peak.
In[6]:=
Out[6]=