<s>
In	O
analysis	B-General_Concept
,	O
numerical	B-Algorithm
integration	I-Algorithm
comprises	O
a	O
broad	O
family	O
of	O
algorithms	O
for	O
calculating	O
the	O
numerical	O
value	O
of	O
a	O
definite	B-Algorithm
integral	I-Algorithm
,	O
and	O
by	O
extension	O
,	O
the	O
term	O
is	O
also	O
sometimes	O
used	O
to	O
describe	O
the	O
numerical	B-Algorithm
solution	I-Algorithm
of	I-Algorithm
differential	I-Algorithm
equations	I-Algorithm
.	O
</s>
<s>
This	O
article	O
focuses	O
on	O
calculation	O
of	O
definite	B-Algorithm
integrals	I-Algorithm
.	O
</s>
<s>
The	O
term	O
numerical	B-Algorithm
quadrature	I-Algorithm
(	O
often	O
abbreviated	O
to	O
quadrature	O
)	O
is	O
more	O
or	O
less	O
a	O
synonym	O
for	O
numerical	B-Algorithm
integration	I-Algorithm
,	O
especially	O
as	O
applied	O
to	O
one-dimensional	O
integrals	B-Algorithm
.	O
</s>
<s>
Some	O
authors	O
refer	O
to	O
numerical	B-Algorithm
integration	I-Algorithm
over	O
more	O
than	O
one	O
dimension	O
as	O
cubature	B-Algorithm
;	O
others	O
take	O
quadrature	O
to	O
include	O
higher-dimensional	O
integration	O
.	O
</s>
<s>
There	O
are	O
several	O
reasons	O
for	O
carrying	O
out	O
numerical	B-Algorithm
integration	I-Algorithm
,	O
as	O
opposed	O
to	O
analytical	O
integration	O
by	O
finding	O
the	O
antiderivative	B-Algorithm
:	O
</s>
<s>
Some	O
embedded	B-Architecture
systems	I-Architecture
and	O
other	O
computer	O
applications	O
may	O
need	O
numerical	B-Algorithm
integration	I-Algorithm
for	O
this	O
reason	O
.	O
</s>
<s>
A	O
formula	O
for	O
the	O
integrand	O
may	O
be	O
known	O
,	O
but	O
it	O
may	O
be	O
difficult	O
or	O
impossible	O
to	O
find	O
an	O
antiderivative	B-Algorithm
that	O
is	O
an	O
elementary	O
function	O
.	O
</s>
<s>
An	O
example	O
of	O
such	O
an	O
integrand	O
is	O
f(x )	O
=	O
exp( −x2	O
)	O
,	O
the	O
antiderivative	B-Algorithm
of	O
which	O
(	O
the	O
error	O
function	O
,	O
times	O
a	O
constant	O
)	O
cannot	O
be	O
written	O
in	O
elementary	O
form	O
.	O
</s>
<s>
It	O
may	O
be	O
possible	O
to	O
find	O
an	O
antiderivative	B-Algorithm
symbolically	O
,	O
but	O
it	O
may	O
be	O
easier	O
to	O
compute	O
a	O
numerical	B-General_Concept
approximation	I-General_Concept
than	O
to	O
compute	O
the	O
antiderivative	B-Algorithm
.	O
</s>
<s>
That	O
may	O
be	O
the	O
case	O
if	O
the	O
antiderivative	B-Algorithm
is	O
given	O
as	O
an	O
infinite	O
series	O
or	O
product	O
,	O
or	O
if	O
its	O
evaluation	O
requires	O
a	O
special	O
function	O
that	O
is	O
not	O
available	O
.	O
</s>
<s>
The	O
term	O
"	O
numerical	B-Algorithm
integration	I-Algorithm
"	O
first	O
appears	O
in	O
1915	O
in	O
the	O
publication	O
A	O
Course	O
in	O
Interpolation	B-Algorithm
and	O
Numeric	B-Algorithm
Integration	I-Algorithm
for	O
the	O
Mathematical	O
Laboratory	O
by	O
David	O
Gibb	O
.	O
</s>
<s>
Quadrature	O
problems	O
have	O
served	O
as	O
one	O
of	O
the	O
main	O
sources	O
of	O
mathematical	O
analysis	B-General_Concept
.	O
</s>
<s>
The	O
ancient	O
Babylonians	O
used	O
the	O
trapezoidal	B-Algorithm
rule	I-Algorithm
to	O
integrate	O
the	O
motion	O
of	O
Jupiter	O
along	O
the	O
ecliptic	O
.	O
</s>
<s>
The	O
quadratures	O
of	O
a	O
sphere	O
surface	O
and	O
a	O
parabola	O
segment	O
done	O
by	O
Archimedes	B-Device
became	O
the	O
highest	O
achievement	O
of	O
the	O
antique	O
analysis	B-General_Concept
.	O
</s>
<s>
For	O
the	O
proof	O
of	O
the	O
results	O
Archimedes	B-Device
used	O
the	O
Method	O
of	O
exhaustion	O
of	O
Eudoxus	O
.	O
</s>
<s>
John	O
Wallis	O
algebrised	O
this	O
method	O
:	O
he	O
wrote	O
in	O
his	O
Arithmetica	O
Infinitorum	O
(	O
1656	O
)	O
series	O
that	O
we	O
now	O
call	O
the	O
definite	B-Algorithm
integral	I-Algorithm
,	O
and	O
he	O
calculated	O
their	O
values	O
.	O
</s>
<s>
With	O
the	O
invention	O
of	O
integral	B-Algorithm
calculus	I-Algorithm
came	O
a	O
universal	O
method	O
for	O
area	O
calculation	O
.	O
</s>
<s>
In	O
response	O
,	O
the	O
term	O
quadrature	O
has	O
become	O
traditional	O
,	O
and	O
instead	O
the	O
modern	O
phrase	O
"	O
computation	O
of	O
a	O
univariate	O
definite	B-Algorithm
integral	I-Algorithm
"	O
is	O
more	O
common	O
.	O
</s>
<s>
Numerical	B-Algorithm
integration	I-Algorithm
methods	O
can	O
generally	O
be	O
described	O
as	O
combining	O
evaluations	O
of	O
the	O
integrand	O
to	O
get	O
an	O
approximation	O
to	O
the	O
integral	O
.	O
</s>
<s>
The	O
integrand	O
is	O
evaluated	O
at	O
a	O
finite	O
set	O
of	O
points	O
called	O
integration	B-Algorithm
points	I-Algorithm
and	O
a	O
weighted	O
sum	O
of	O
these	O
values	O
is	O
used	O
to	O
approximate	O
the	O
integral	O
.	O
</s>
<s>
The	O
integration	B-Algorithm
points	I-Algorithm
and	O
weights	O
depend	O
on	O
the	O
specific	O
method	O
used	O
and	O
the	O
accuracy	O
required	O
from	O
the	O
approximation	O
.	O
</s>
<s>
An	O
important	O
part	O
of	O
the	O
analysis	B-General_Concept
of	O
any	O
numerical	B-Algorithm
integration	I-Algorithm
method	O
is	O
to	O
study	O
the	O
behavior	O
of	O
the	O
approximation	O
error	O
as	O
a	O
function	O
of	O
the	O
number	O
of	O
integrand	O
evaluations	O
.	O
</s>
<s>
Reducing	O
the	O
number	O
of	O
evaluations	O
of	O
the	O
integrand	O
reduces	O
the	O
number	O
of	O
arithmetic	O
operations	O
involved	O
,	O
and	O
therefore	O
reduces	O
the	O
total	O
round-off	B-Algorithm
error	I-Algorithm
.	O
</s>
<s>
A	O
'	O
brute	O
force	O
 '	O
kind	O
of	O
numerical	B-Algorithm
integration	I-Algorithm
can	O
be	O
done	O
,	O
if	O
the	O
integrand	O
is	O
reasonably	O
well-behaved	O
(	O
i.e.	O
</s>
<s>
piecewise	B-Algorithm
continuous	I-Algorithm
and	O
of	O
bounded	O
variation	O
)	O
,	O
by	O
evaluating	O
the	O
integrand	O
with	O
very	O
small	O
increments	O
.	O
</s>
<s>
A	O
large	O
class	O
of	O
quadrature	B-Algorithm
rules	I-Algorithm
can	O
be	O
derived	O
by	O
constructing	O
interpolating	B-Algorithm
functions	O
that	O
are	O
easy	O
to	O
integrate	O
.	O
</s>
<s>
Typically	O
these	O
interpolating	B-Algorithm
functions	O
are	O
polynomials	O
.	O
</s>
<s>
The	O
simplest	O
method	O
of	O
this	O
type	O
is	O
to	O
let	O
the	O
interpolating	B-Algorithm
function	O
be	O
a	O
constant	O
function	O
(	O
a	O
polynomial	O
of	O
degree	O
zero	O
)	O
that	O
passes	O
through	O
the	O
point	O
.	O
</s>
<s>
The	O
interpolating	B-Algorithm
function	O
may	O
be	O
a	O
straight	O
line	O
(	O
an	O
affine	B-Algorithm
function	I-Algorithm
,	O
i.e.	O
</s>
<s>
Interpolation	B-Algorithm
with	O
polynomials	O
evaluated	O
at	O
equally	O
spaced	O
points	O
in	O
yields	O
the	O
Newton	B-Algorithm
–	I-Algorithm
Cotes	I-Algorithm
formulas	I-Algorithm
,	O
of	O
which	O
the	O
rectangle	O
rule	O
and	O
the	O
trapezoidal	B-Algorithm
rule	I-Algorithm
are	O
examples	O
.	O
</s>
<s>
Simpson	B-Algorithm
's	I-Algorithm
rule	I-Algorithm
,	O
which	O
is	O
based	O
on	O
a	O
polynomial	O
of	O
order	O
2	O
,	O
is	O
also	O
a	O
Newton	B-Algorithm
–	I-Algorithm
Cotes	I-Algorithm
formula	I-Algorithm
.	O
</s>
<s>
Quadrature	B-Algorithm
rules	I-Algorithm
with	O
equally	O
spaced	O
points	O
have	O
the	O
very	O
convenient	O
property	O
of	O
nesting	O
.	O
</s>
<s>
If	O
we	O
allow	O
the	O
intervals	O
between	O
interpolation	B-Algorithm
points	O
to	O
vary	O
,	O
we	O
find	O
another	O
group	O
of	O
quadrature	B-Algorithm
formulas	I-Algorithm
,	O
such	O
as	O
the	O
Gaussian	B-Algorithm
quadrature	I-Algorithm
formulas	I-Algorithm
.	O
</s>
<s>
A	O
Gaussian	B-Algorithm
quadrature	I-Algorithm
rule	O
is	O
typically	O
more	O
accurate	O
than	O
a	O
Newton	B-Algorithm
–	I-Algorithm
Cotes	I-Algorithm
rule	O
that	O
uses	O
the	O
same	O
number	O
of	O
function	O
evaluations	O
,	O
if	O
the	O
integrand	O
is	O
smooth	O
(	O
i.e.	O
,	O
if	O
it	O
is	O
sufficiently	O
differentiable	O
)	O
.	O
</s>
<s>
Other	O
quadrature	O
methods	O
with	O
varying	O
intervals	O
include	O
Clenshaw	B-Algorithm
–	I-Algorithm
Curtis	I-Algorithm
quadrature	I-Algorithm
(	O
also	O
called	O
Fejér	B-Algorithm
quadrature	I-Algorithm
)	O
methods	O
,	O
which	O
do	O
nest	O
.	O
</s>
<s>
Gaussian	B-Algorithm
quadrature	I-Algorithm
rules	O
do	O
not	O
nest	O
,	O
but	O
the	O
related	O
Gauss	B-Algorithm
–	I-Algorithm
Kronrod	I-Algorithm
quadrature	I-Algorithm
formulas	I-Algorithm
do	O
.	O
</s>
<s>
If	O
f(x )	O
does	O
not	O
have	O
many	O
derivatives	O
at	O
all	O
points	O
,	O
or	O
if	O
the	O
derivatives	O
become	O
large	O
,	O
then	O
Gaussian	B-Algorithm
quadrature	I-Algorithm
is	O
often	O
insufficient	O
.	O
</s>
<s>
This	O
type	O
of	O
error	O
analysis	B-General_Concept
is	O
usually	O
called	O
"	O
a	O
posteriori	O
"	O
since	O
we	O
compute	O
the	O
error	O
after	O
having	O
computed	O
the	O
approximation	O
.	O
</s>
<s>
The	O
accuracy	O
of	O
a	O
quadrature	O
rule	O
of	O
the	O
Newton	B-Algorithm
–	I-Algorithm
Cotes	I-Algorithm
type	O
is	O
generally	O
a	O
function	O
of	O
the	O
number	O
of	O
evaluation	O
points	O
.	O
</s>
<s>
This	O
can	O
be	O
answered	O
by	O
extrapolating	O
the	O
result	O
from	O
two	O
or	O
more	O
nonzero	O
step	O
sizes	O
,	O
using	O
series	B-Algorithm
acceleration	I-Algorithm
methods	O
such	O
as	O
Richardson	B-Algorithm
extrapolation	I-Algorithm
.	O
</s>
<s>
Extrapolation	O
methods	O
are	O
described	O
in	O
more	O
detail	O
by	O
Stoer	O
and	O
Bulirsch	O
(	O
Section	O
3.4	O
)	O
and	O
are	O
implemented	O
in	O
many	O
of	O
the	O
routines	O
in	O
the	O
QUADPACK	B-Algorithm
library	O
.	O
</s>
<s>
Using	O
more	O
derivatives	O
,	O
and	O
by	O
tweaking	O
the	O
quadrature	O
,	O
we	O
can	O
do	O
a	O
similar	O
error	O
analysis	B-General_Concept
using	O
a	O
Taylor	O
series	O
(	O
using	O
a	O
partial	O
sum	O
with	O
remainder	O
term	O
)	O
for	O
f	O
.	O
This	O
error	O
analysis	B-General_Concept
gives	O
a	O
strict	O
upper	O
bound	O
on	O
the	O
error	O
,	O
if	O
the	O
derivatives	O
of	O
f	O
are	O
available	O
.	O
</s>
<s>
This	O
integration	O
method	O
can	O
be	O
combined	O
with	O
interval	B-Algorithm
arithmetic	I-Algorithm
to	O
produce	O
computer	B-Algorithm
proofs	I-Algorithm
and	O
verified	O
calculations	O
.	O
</s>
<s>
Several	O
methods	O
exist	O
for	O
approximate	B-Algorithm
integration	I-Algorithm
over	O
unbounded	O
intervals	O
.	O
</s>
<s>
The	O
standard	O
technique	O
involves	O
specially	O
derived	O
quadrature	B-Algorithm
rules	I-Algorithm
,	O
such	O
as	O
Gauss-Hermite	B-Algorithm
quadrature	I-Algorithm
for	O
integrals	B-Algorithm
on	O
the	O
whole	O
real	O
line	O
and	O
Gauss-Laguerre	B-Algorithm
quadrature	I-Algorithm
for	O
integrals	B-Algorithm
on	O
the	O
positive	O
reals	O
.	O
</s>
<s>
The	O
quadrature	B-Algorithm
rules	I-Algorithm
discussed	O
so	O
far	O
are	O
all	O
designed	O
to	O
compute	O
one-dimensional	O
integrals	B-Algorithm
.	O
</s>
<s>
To	O
compute	O
integrals	B-Algorithm
in	O
multiple	O
dimensions	O
,	O
one	O
approach	O
is	O
to	O
phrase	O
the	O
multiple	O
integral	O
as	O
repeated	O
one-dimensional	O
integrals	B-Algorithm
by	O
applying	O
Fubini	O
's	O
theorem	O
(	O
the	O
tensor	O
product	O
rule	O
)	O
.	O
</s>
<s>
Three	O
methods	O
are	O
known	O
to	O
overcome	O
this	O
so-called	O
curse	B-Algorithm
of	I-Algorithm
dimensionality	I-Algorithm
.	O
</s>
<s>
A	O
great	O
many	O
additional	O
techniques	O
for	O
forming	O
multidimensional	O
cubature	B-Algorithm
integration	O
rules	O
for	O
a	O
variety	O
of	O
weighting	O
functions	O
are	O
given	O
in	O
the	O
monograph	O
by	O
Stroud	O
.	O
</s>
<s>
Monte	B-Algorithm
Carlo	I-Algorithm
methods	I-Algorithm
and	O
quasi-Monte	B-Algorithm
Carlo	I-Algorithm
methods	I-Algorithm
are	O
easy	O
to	O
apply	O
to	O
multi-dimensional	O
integrals	B-Algorithm
.	O
</s>
<s>
A	O
large	O
class	O
of	O
useful	O
Monte	B-Algorithm
Carlo	I-Algorithm
methods	I-Algorithm
are	O
the	O
so-called	O
Markov	B-General_Concept
chain	I-General_Concept
Monte	I-General_Concept
Carlo	I-General_Concept
algorithms	O
,	O
which	O
include	O
the	O
Metropolis	B-Algorithm
–	I-Algorithm
Hastings	I-Algorithm
algorithm	I-Algorithm
and	O
Gibbs	B-Algorithm
sampling	I-Algorithm
.	O
</s>
<s>
Sparse	B-Algorithm
grids	I-Algorithm
were	O
originally	O
developed	O
by	O
Smolyak	O
for	O
the	O
quadrature	O
of	O
high-dimensional	O
functions	O
.	O
</s>
<s>
However	O
,	O
whereas	O
the	O
tensor	O
product	O
rule	O
guarantees	O
that	O
the	O
weights	O
of	O
all	O
of	O
the	O
cubature	B-Algorithm
points	O
will	O
be	O
positive	O
if	O
the	O
weights	O
of	O
the	O
quadrature	O
points	O
were	O
positive	O
,	O
Smolyak	O
's	O
rule	O
does	O
not	O
guarantee	O
that	O
the	O
weights	O
will	O
all	O
be	O
positive	O
.	O
</s>
<s>
Bayesian	B-General_Concept
quadrature	I-General_Concept
is	O
a	O
statistical	O
approach	O
to	O
the	O
numerical	O
problem	O
of	O
computing	O
integrals	B-Algorithm
and	O
falls	O
under	O
the	O
field	O
of	O
probabilistic	O
numerics	O
.	O
</s>
<s>
It	O
can	O
provide	O
a	O
full	O
handling	O
of	O
the	O
uncertainty	O
over	O
the	O
solution	O
of	O
the	O
integral	O
expressed	O
as	O
a	O
Gaussian	B-General_Concept
process	I-General_Concept
posterior	O
variance	O
.	O
</s>
<s>
Methods	O
developed	O
for	O
ordinary	O
differential	O
equations	O
,	O
such	O
as	O
Runge	B-Algorithm
–	I-Algorithm
Kutta	I-Algorithm
methods	I-Algorithm
,	O
can	O
be	O
applied	O
to	O
the	O
restated	O
problem	O
and	O
thus	O
be	O
used	O
to	O
evaluate	O
the	O
integral	O
.	O
</s>
<s>
For	O
instance	O
,	O
the	O
standard	O
fourth-order	O
Runge	B-Algorithm
–	I-Algorithm
Kutta	I-Algorithm
method	I-Algorithm
applied	O
to	O
the	O
differential	O
equation	O
yields	O
Simpson	B-Algorithm
's	I-Algorithm
rule	I-Algorithm
from	O
above	O
.	O
</s>
<s>
The	O
problem	O
of	O
evaluating	O
integrals	B-Algorithm
is	O
thus	O
best	O
studied	O
in	O
its	O
own	O
right	O
.	O
</s>
