For an $n$ point Gaussian quadrature, one can show that it has degree of precision $2n - 1$ meaning it will exactly integrate polynomials of that degree or lower. Is it always true that a quadrature with a higher degree of precision will give better results for the integration of a non-polynomial function?


The answer to "is it always true" is always "no", especially in numerical methods. The issue is in how closely the integrand resembles a polynomial function. If the integrand is analytic in a large neighborhood of the interval of integration, then Gaussian quadrature converges extremely fast. But for integrals like $\int_{-1}^1\sqrt{1-x^4}\,dx$ or worse yet, $\int_{-1}^1 1/\sqrt{1-x^4}\,dx$, where the behavior is markedly non-polynomial, high degree of the method does not pay off. One is better off using a lower degree method on smaller subintervals. This is same story as with Legendre polynomial vs. polynomial splines.

For a technical treatment, see Is Gauss Quadrature Better than Clenshaw-Curtis? by Lloyd N. Trefethen.

We compare the convergence behavior of Gauss quadrature with that of its younger brother, Clenshaw–Curtis. Seven-line MATLAB codes are presented that implement both methods, and experiments show that the supposed factor-of-$2$ advantage of Gauss quadrature is rarely realized.

For an example where Gaussian quadrature loses to the left endpoint rule, see this post.

  • $\begingroup$ Excellent links! If highly non-polynomial behaving functions are integrated better by a method with a lower degree of precision, would this imply that for some weird function one could actually do better than a given Gaussian quadrature by using a Gaussian quadrature with fewer points? $\endgroup$ – Sam Manzer Jul 9 '14 at 18:50
  • 1
    $\begingroup$ @SamManzer Sure, but my example will not be very insightful. Take any weird function on $[-1,1]$ such that $f(0)=\frac12 \int_{-1}^1 f$. Then the one-point quadrature method, which amounts to $2f(0)$, gives the precise result, while other methods will have some error. $\endgroup$ – user147263 Jul 9 '14 at 18:53
  • $\begingroup$ So the rationalization for higher degrees of precision being better for lots of non-polynomial functions most of the time is something like the Weierstrass approximation theorem guaranteeing the existence of a very accurate polynomial approximation the integrand over the integration interval and if you have high enough degree of precision you will accurately integrate that (probably very high degree) polynomial? $\endgroup$ – Sam Manzer Jul 9 '14 at 18:59
  • 1
    $\begingroup$ @SamManzer The rationale for preferring one method over another is that it works better in practice. Theorems are nice to have in a book, but they are not what actually drives the choice of a method. Simpson's method does work better than trapezoidal most of the time, and 7-point Gaussian works better than Simpson most of the time. But the payoff for going much higher than that turns out to not justify the effort. See this for an example of a practical choice of degree that is actually used. $\endgroup$ – user147263 Jul 9 '14 at 19:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.