<s>
In	O
numerical	B-General_Concept
analysis	I-General_Concept
,	O
a	O
quadrature	O
rule	O
is	O
an	O
approximation	O
of	O
the	O
definite	O
integral	O
of	O
a	O
function	O
,	O
usually	O
stated	O
as	O
a	O
weighted	B-Algorithm
sum	I-Algorithm
of	O
function	O
values	O
at	O
specified	O
points	O
within	O
the	O
domain	O
of	O
integration	O
.	O
</s>
<s>
(	O
See	O
numerical	B-Algorithm
integration	I-Algorithm
for	O
more	O
on	O
quadrature	B-Algorithm
rules	I-Algorithm
.	O
)	O
</s>
<s>
An	O
-point	O
Gaussian	B-Algorithm
quadrature	I-Algorithm
rule	O
,	O
named	O
after	O
Carl	O
Friedrich	O
Gauss	O
,	O
is	O
a	O
quadrature	O
rule	O
constructed	O
to	O
yield	O
an	O
exact	O
result	O
for	O
polynomials	O
of	O
degree	O
or	O
less	O
by	O
a	O
suitable	O
choice	O
of	O
the	O
nodes	O
and	O
weights	O
for	O
.	O
</s>
<s>
where	O
is	O
well-approximated	O
by	O
a	O
low-degree	O
polynomial	O
,	O
then	O
alternative	O
nodes	O
and	O
weights	O
will	O
usually	O
give	O
more	O
accurate	O
quadrature	B-Algorithm
rules	I-Algorithm
.	O
</s>
<s>
These	O
are	O
known	O
as	O
Gauss-Jacobi	B-Algorithm
quadrature	I-Algorithm
rules	O
,	O
i.e.	O
,	O
</s>
<s>
Common	O
weights	O
include	O
(	O
Chebyshev	B-Algorithm
–	I-Algorithm
Gauss	I-Algorithm
)	O
and	O
.	O
</s>
<s>
One	O
may	O
also	O
want	O
to	O
integrate	O
over	O
semi-infinite	O
(	O
Gauss-Laguerre	B-Algorithm
quadrature	I-Algorithm
)	O
and	O
infinite	O
intervals	O
(	O
Gauss	B-Algorithm
–	I-Algorithm
Hermite	I-Algorithm
quadrature	I-Algorithm
)	O
.	O
</s>
<s>
It	O
can	O
be	O
shown	O
(	O
see	O
Press	O
,	O
et	O
al.	O
,	O
or	O
Stoer	O
and	O
Bulirsch	O
)	O
that	O
the	O
quadrature	O
nodes	O
are	O
the	O
roots	O
of	O
a	O
polynomial	O
belonging	O
to	O
a	O
class	O
of	O
orthogonal	O
polynomials	O
(	O
the	O
class	O
orthogonal	O
with	O
respect	O
to	O
a	O
weighted	B-Algorithm
inner-product	O
)	O
.	O
</s>
<s>
This	O
is	O
a	O
key	O
observation	O
for	O
computing	O
Gauss	B-Algorithm
quadrature	I-Algorithm
nodes	O
and	O
weights	O
.	O
</s>
<s>
Some	O
low-order	O
quadrature	B-Algorithm
rules	I-Algorithm
are	O
tabulated	O
below	O
(	O
over	O
interval	O
,	O
see	O
the	O
section	O
below	O
for	O
other	O
intervals	O
)	O
.	O
</s>
<s>
An	O
integral	O
over	O
must	O
be	O
changed	O
into	O
an	O
integral	O
over	O
before	O
applying	O
the	O
Gaussian	B-Algorithm
quadrature	I-Algorithm
rule	O
.	O
</s>
<s>
Applying	O
the	O
point	O
Gaussian	B-Algorithm
quadrature	I-Algorithm
rule	O
then	O
results	O
in	O
the	O
following	O
approximation	O
:	O
</s>
<s>
The	O
integration	O
problem	O
can	O
be	O
expressed	O
in	O
a	O
slightly	O
more	O
general	O
way	O
by	O
introducing	O
a	O
positive	O
weight	B-Algorithm
function	I-Algorithm
into	O
the	O
integrand	O
,	O
and	O
allowing	O
an	O
interval	O
other	O
than	O
.	O
</s>
<s>
where	O
,	O
the	O
weight	O
associated	O
with	O
the	O
node	O
,	O
is	O
defined	O
to	O
equal	O
the	O
weighted	B-Algorithm
integral	O
of	O
(	O
see	O
below	O
for	O
other	O
formulas	O
for	O
the	O
weights	O
)	O
.	O
</s>
<s>
This	O
proves	O
that	O
for	O
any	O
polynomial	O
of	O
degree	O
or	O
less	O
,	O
its	O
integral	O
is	O
given	O
exactly	O
by	O
the	O
Gaussian	B-Algorithm
quadrature	I-Algorithm
sum	O
.	O
</s>
<s>
since	O
the	O
weight	B-Algorithm
function	I-Algorithm
is	O
always	O
non-negative	O
.	O
</s>
<s>
Since	O
the	O
degree	O
of	O
is	O
less	O
than	O
,	O
the	O
Gaussian	B-Algorithm
quadrature	I-Algorithm
formula	O
involving	O
the	O
weights	O
and	O
nodes	O
obtained	O
from	O
applies	O
.	O
</s>
<s>
There	O
are	O
many	O
algorithms	O
for	O
computing	O
the	O
nodes	O
and	O
weights	O
of	O
Gaussian	B-Algorithm
quadrature	I-Algorithm
rules	O
.	O
</s>
<s>
However	O
,	O
if	O
the	O
scalar	O
product	O
satisfies	O
(	O
which	O
is	O
the	O
case	O
for	O
Gaussian	B-Algorithm
quadrature	I-Algorithm
)	O
,	O
the	O
recurrence	O
relation	O
reduces	O
to	O
a	O
three-term	O
recurrence	O
relation	O
:	O
For	O
is	O
a	O
polynomial	O
of	O
degree	O
less	O
than	O
or	O
equal	O
to	O
.	O
</s>
<s>
The	O
zeros	O
of	O
the	O
polynomials	O
up	O
to	O
degree	O
,	O
which	O
are	O
used	O
as	O
nodes	O
for	O
the	O
Gaussian	B-Algorithm
quadrature	I-Algorithm
can	O
be	O
found	O
by	O
computing	O
the	O
eigenvalues	O
of	O
this	O
tridiagonal	B-Algorithm
matrix	I-Algorithm
.	O
</s>
<s>
and	O
are	O
similar	B-Algorithm
matrices	I-Algorithm
and	O
therefore	O
have	O
the	O
same	O
eigenvalues	O
(	O
the	O
nodes	O
)	O
.	O
</s>
<s>
The	O
error	O
of	O
a	O
Gaussian	B-Algorithm
quadrature	I-Algorithm
rule	O
can	O
be	O
stated	O
as	O
follows	O
.	O
</s>
<s>
Another	O
approach	O
is	O
to	O
use	O
two	O
Gaussian	B-Algorithm
quadrature	I-Algorithm
rules	O
of	O
different	O
orders	O
,	O
and	O
to	O
estimate	O
the	O
error	O
as	O
the	O
difference	O
between	O
the	O
two	O
results	O
.	O
</s>
<s>
For	O
this	O
purpose	O
,	O
Gauss	O
–	O
Kronrod	O
quadrature	B-Algorithm
rules	I-Algorithm
can	O
be	O
useful	O
.	O
</s>
<s>
Gauss	O
–	O
Kronrod	O
rules	O
are	O
extensions	O
of	O
Gauss	B-Algorithm
quadrature	I-Algorithm
rules	O
generated	O
by	O
adding	O
points	O
to	O
an	O
-point	O
rule	O
in	O
such	O
a	O
way	O
that	O
the	O
resulting	O
rule	O
is	O
of	O
order	O
.	O
</s>
<s>
The	O
difference	O
between	O
a	O
Gauss	B-Algorithm
quadrature	I-Algorithm
rule	O
and	O
its	O
Kronrod	O
extension	O
is	O
often	O
used	O
as	O
an	O
estimate	O
of	O
the	O
approximation	O
error	O
.	O
</s>
<s>
It	O
is	O
similar	O
to	O
Gaussian	B-Algorithm
quadrature	I-Algorithm
with	O
the	O
following	O
differences	O
:	O
</s>
<s>
The	O
integration	B-Algorithm
points	I-Algorithm
include	O
the	O
end	O
points	O
of	O
the	O
integration	O
interval	O
.	O
</s>
<s>
It	O
is	O
accurate	O
for	O
polynomials	O
up	O
to	O
degree	O
,	O
where	O
is	O
the	O
number	O
of	O
integration	B-Algorithm
points	I-Algorithm
.	O
</s>
<s>
An	O
adaptive	O
variant	O
of	O
this	O
algorithm	O
with	O
2	O
interior	O
nodes	O
is	O
found	O
in	O
GNU	B-Language
Octave	I-Language
and	O
MATLAB	B-Language
as	O
quadl	O
and	O
integrate	O
.	O
</s>
