
i 
I 
i 
i 
I 
I 
i 
I 
_j 
270  NUMERICAL INTEGRATION 
5~3 
Gaussian 
Quadrature 
The composite  trapezoidal  and  Simpson  rules  are  based  on  using  a  low-order 
polynomial approximation of the integrand 
f(x) 
on  subintervals  of decreasing 
size. 
In 
this  section, 
we 
investigate  a  class  of  methods  that  use  polynomial 
approximations of 
f(x) 
of increasing degree.  The resulting integration formulas 
are extremely accurately in most cases,  and  they should be considered seriously 
by anyone faced  with many integrals to evaluate. 
For 
greater generality, 
we 
will 
consider formulas 
n  b 
I,(!)= 
L 
wj_,f(xj,,) 
= j 
w(x)f(x) 
dx 
=I(/) 
j=1 
a 
(5.3.1) 
The weight function 
w(x) 
is 
assumed to be nonnegative and integrable on [a, b], 
and it  is  to  also  satisfy  the hypotheses  (4.3.8)  and (4.3.9)  of Section  4.3.  The 
nodes  { 
xj.,} 
and weights  { wj,,}  are  to be chosen  so  that 
/,(/) 
equals  I 
(f) 
exactly for polynomials 
f(x) 
of 
as 
large a degree as possible. 
It 
is 
hoped that this 
will  result in  a formula 
/,(/) 
that 
is 
nearly exact for  integrands 
f(x) 
that are 
well  approximable by polynomials.  In Section 5.2,  the Newton-Cotes formulas 
have an increasing degree of precision as 
n increased, but nonetheless they do not 
converge for many well-behaved integrands. The difficulty with the Newton-Cotes 
formulas  is 
that  the  nodes 
{xi.,} 
must  be  evenly  spaced. 
By 
omitting  this 
restriction,  we 
will 
be  able to  obtain new  formulas 
/,(/) 
that converge for  all 
f E 
C[a, 
b]. 
To 
obtain some intuition for the determination of 
/,(/), 
consider the special 
case 
1  n 
J 
J(x) 
dx = L 
wJ(x) 
-1 
j=l 
(5.3.2) 
where 
w(x) 
= 1 and  the explicit  dependence of { 
wi} 
and {xi} on  n  has been 
dropped. 
The 
weights  { 
wi} 
and nodes  {xi}  are 
to 
be determined  to  make  the 
error 
(5.3.3) 
equal zero for as high a degree polynomial 
f(x) 
as 
possible. To derive equations 
for  the nodes and weights, 
we 
first  note that 
Thus 
E,(f) 
=  0 for every polynomial of degree 
:s: 
m  if and only if 
i=O,l, 
... 
,m 
(5.3.5)