Volume 9, Issue 4 Articles Tricks of the Trade In and Out Trott's Corner New Products New Publications Calendar News Bulletins New Resources Classifieds Download This Issue Editorial Policy Staff and Contributors Submissions Subscriptions Advertising Back Issues Contact Information 
Tricks of the Trade
LegendreGauss QuadratureGaussian quadrature gives the best estimate of an integral by picking optimal abscissas, , at which to evaluate the function . It is optimal because the point formula is exact for polynomials of degree . LegendreGauss quadrature (see mathworld.wolfram.com/LegendreGaussQuadrature.html) is a Gaussian quadrature over the interval with weighting function , that is,
where the abscissas, , for quadrature order , satisfy , and the weights are
Define the abscissas as the roots of using Root and save them as they are computed. This is an exact expression for the roots.
Define the weights. RootReduce expresses the weights as a single Root object. Save the weights as they are computed.
Here are the and for .
Here is and for , expressed as radicals.
Abscissas and weights for higher are better left as Root objects (see "Root versus Radicals," TMJ, 9(3), 2005, pp. 535537). Note that, for fixed , each can be expressed as a particular root of a polynomial of degree . Here are the weights for .
The weights satisfy . Here we check this for .
Now consider computing the integral of a polynomial of degree , denoted .
Compute the integral of over .
As expected, an identical answer is obtained using LegendreGauss quadrature with since .


About Mathematica  Download Mathematica Player © Wolfram Media, Inc. All rights reserved. 