<s>
Adaptive	B-Algorithm
quadrature	I-Algorithm
is	O
a	O
numerical	B-Algorithm
integration	I-Algorithm
method	O
in	O
which	O
the	O
integral	O
of	O
a	O
function	O
is	O
approximated	O
using	O
static	O
quadrature	B-Algorithm
rules	I-Algorithm
on	O
adaptively	O
refined	O
subintervals	O
of	O
the	O
region	O
of	O
integration	O
.	O
</s>
<s>
If	O
the	O
estimated	O
error	O
is	O
larger	O
than	O
the	O
required	O
tolerance	O
(	O
line	O
4	O
)	O
,	O
the	O
interval	O
is	O
subdivided	O
(	O
line	O
5	O
)	O
and	O
the	O
quadrature	B-Algorithm
is	O
applied	O
on	O
both	O
halves	O
separately	O
(	O
line	O
6	O
)	O
.	O
</s>
<s>
In	O
the	O
simplest	O
case	O
,	O
Newton	B-Algorithm
–	I-Algorithm
Cotes	I-Algorithm
formulas	I-Algorithm
of	O
even	O
degree	O
are	O
used	O
,	O
where	O
the	O
nodes	O
are	O
evenly	O
spaced	O
in	O
the	O
interval	O
:	O
</s>
<s>
Or	O
,	O
when	O
Fejér	B-Algorithm
quadrature	I-Algorithm
is	O
used	O
,	O
</s>
<s>
Other	O
quadrature	B-Algorithm
rules	I-Algorithm
,	O
such	O
as	O
Gaussian	B-Algorithm
quadrature	I-Algorithm
or	O
Gauss-Kronrod	B-Algorithm
quadrature	I-Algorithm
,	O
may	O
also	O
be	O
used	O
.	O
</s>
<s>
An	O
algorithm	O
may	O
elect	O
to	O
use	O
different	O
quadrature	B-Algorithm
methods	O
on	O
different	O
subintervals	O
,	O
for	O
example	O
using	O
a	O
high-order	O
method	O
only	O
where	O
the	O
integrand	O
is	O
smooth	O
.	O
</s>
<s>
Some	O
quadrature	B-Algorithm
algorithms	O
generate	O
a	O
sequence	O
of	O
results	O
which	O
should	O
approach	O
the	O
correct	O
value	O
.	O
</s>
<s>
Otherwise	O
one	O
can	O
use	O
a	O
"	O
null	O
rule	O
"	O
which	O
has	O
the	O
form	O
of	O
the	O
above	O
quadrature	B-Algorithm
rule	O
,	O
but	O
whose	O
value	O
would	O
be	O
zero	O
for	O
a	O
simple	O
integrand	O
(	O
for	O
example	O
,	O
if	O
the	O
integrand	O
were	O
a	O
polynomial	O
of	O
the	O
appropriate	O
degree	O
)	O
.	O
</s>
<s>
"	O
Local	O
"	O
adaptive	B-Algorithm
quadrature	I-Algorithm
makes	O
the	O
acceptable	O
error	O
for	O
a	O
given	O
interval	O
proportional	O
to	O
the	O
length	O
of	O
that	O
interval	O
.	O
</s>
<s>
This	O
would	O
be	O
"	O
global	O
"	O
adaptive	B-Algorithm
quadrature	I-Algorithm
.	O
</s>
<s>
Global	O
adaptive	B-Algorithm
quadrature	I-Algorithm
can	O
be	O
more	O
efficient	O
(	O
using	O
fewer	O
evaluations	O
of	O
the	O
integrand	O
)	O
but	O
is	O
generally	O
more	O
complex	O
to	O
program	O
and	O
may	O
require	O
more	O
working	O
space	O
to	O
record	O
information	O
on	O
the	O
current	O
set	O
of	O
intervals	O
.	O
</s>
