Graphics Programs Reference
In-Depth Information
Numerical Integration
6
Compute a
f ( x ) dx , where f ( x ) is a given function
6.1
Introduction
Numerical integration, also known as quadrature , is intrinsicallyamuch more accu-
rate procedurethan numerical differentiation. Quadrature approximates the definite
integral
b
f ( x ) dx
a
by the sum
n
I
=
A i f ( x i )
i
=
1
where the nodal abscissas x i and weights A i depend on the particular rule used for the
quadrature.All rules of quadrature are derived frompolynomial interpolation of the
integrand. Therefore, theywork best if f ( x )can be approximatedbyapolynomial.
Methodsofnumerical integration can be dividedinto two groups: Newton-Cotes
formulas and Gaussian quadrature. Newton-Cotes formulas arecharacterizedby
equally spacedabscissas, and include well-known methodssuch as the trapezoidal
rule and Simpson's rule. Theyare most useful if f ( x )has already been computedat
equal intervals, or can becomputedatlow cost.Since Newton-Cotes formulas are
based on local interpolation, theyrequireonlyapiecewise fittoapolynomial.
In Gaussian quadrature the locationsoftheabscissas are chosen to yield the best
possible accuracy. Because Gaussian quadrature requires fewer evaluations of the
integrand for a given level of precision, it is popular in cases where f ( x ) isexpensiveto
200
 
Search WWH ::




Custom Search