Background.
Gauss-Legendre Quadrature.
We wish to find the area under the curve . What
method gives the best answer if only two function evaluations are to be
made? We have already seen that the trapezoidal rule is a method for finding
the area under the curve that uses two function evaluations at the endpoints
(-1,f[-1]), and (1,f[1]). But
if the graph of y = f[x] is concave, the error
in approximation is the entire region that lies between the curve and the line
segment joining the points. If we are permitted to use the nodes and
that
lie inside the interval [-1,1], the line
through the two points and crosses
the curve, and the area under the line more closely approximates the area under
the curve. This method is attributed to
Johann Carl Friedrich Gauss (1777-1855) and
Adrien-Marie Legendre (1752-1833).
The line through
. The
line through .
The equation of the line through the two points and is
(1) ,
and the area of the trapezoid under this line is
(2) .
Notice that the trapezoidal rule is
a special case of (2). When we choose and ,
and ,
.
The trapezoidal rule is
,
and it exact for straight lines (i.e.
).
If the abscissas and
=
, and
weights
are used, we have the Gauss-Legendre 2 point quadrature rule
,
which exact for cubic polynomials (i.e.
).
Theorem (Gauss-Legendre Quadrature). An
approximation to the integral
is obtained by sampling at
the unequally
spaced abscissas
, where the corresponding weights are
.
The abscissa's and weights for Gauss-Legendre quadrature are often expressed in
decimal form.
n=2 Rule
where
n=3 Rule
where
n=4 Rule
where
n=5 Rule
where
Remark. For ease of reading the above
list of rules has used the notation
and
instead of
and
,
respectively.
Theorem (Error for Gauss-Legendre Quadrature). The
error terms for the rules n = 2, 3, 4 and 5 can be expressed as follows:
n=2 Rule
n=3 Rule
n=4 Rule
n=5 Rule
Mathematica Subroutine (Gauss-Legendre Quadrature).
|