Graphics Programs Reference
In-Depth Information
evaluate.Another advantageofGaussian quadrature is its ability to handle integrable
singularities, enabling ustoevaluate expressionssuch as
1
g ( x )
1
x 2 dx
provided that g ( x ) is awell-behaved function.
0
6.2 Newton-Cotes Formulas
f ( x )
P n- 1 ( x )
h
Figure 6.1. Polynomial approximation of f ( x ).
x
x 1
x 2
x 3
x 4
x n -1
x n
a
b
Consider the definite integral
b
f ( x ) dx
(6.1)
a
We divide the rangeofintegration ( a
,
b ) into n
1 equal intervals of length h
=
/
( b
a )
( n
1)each, as shown in Fig. 6.1, and denote the abscissas of the resulting
nodes by x 1
,
x 2
,...,
x n . Next we approximate f ( x ) byapolynomialofdegree n
1 that
intersects all the nodes. Lagrange'sform of this polynomial, Eq. (3.1a), is
n
P n 1 ( x )
=
f ( x i )
i ( x )
i
=
1
where
i ( x ) are the cardinalfunctions definedinEq. (3.1b). Therefore, an approxima-
tion to the integral in Eq. (6.1) is
f ( x i ) b
a i ( x ) dx
b
n
n
I
=
P n 1 ( x ) dx
=
=
A i f ( x i )
(6.2a)
a
i
=
1
i
=
1
where
b
a i ( x ) dx ,
A i =
i
=
1
,
2
,...,
n
(6.2b)
Equations(6.2) are the Newton-Cotes formulas .Classicalexamples of these formu-
las are the trapezoidal rule ( n
=
2), Simpson's rule ( n
=
3) and Simpson's 3
/
8 rule
( n
4). The most important of these is the trapezoidal rule. It can becombinedwith
Richardson extrapolationinto an efficient algorithm known as Romberg integration ,
which makes the other classical rules somewhat redundant.
=
Search WWH ::




Custom Search