1
$\begingroup$

I'm curious to know how QUADPACK's QAG routine works. My understanding is that it begins by calculating on each subinterval the numerical quadrature with a Gaussian-Legendre rule and a nested Kronrod rule to provide estimates of the integral and the local error. Then, globally the interval with the highest error is bisected and the process is repeated. However, since Gauss-Legendre abscissae do not nest, can any of the previous function evaluations be reused at the next iteration? Or are all previous function evaluations discarded when an interval is bisected and reevaluated? If the latter is true this seems incredibly inefficient, so why would anyone choose such an adaptive quadrature scheme like that in QUADPACK over one where the function evaluations may be reused, such as Newton-Cotes or Clenshaw-Curtis?

$\endgroup$
  • 3
    $\begingroup$ You've explained the procedure correctly. It is inefficient, but it can adapt to local variation, whereas Clenshaw-Curtis is adaptive over the entire interval. $\endgroup$ – user14717 Mar 15 '19 at 1:55
  • 1
    $\begingroup$ The other reason is that Gauss-Legendre/Kronrod's error term lends itself pretty well to extrapolation methods like Wynn's epsilon-algorithm, hence the implementation in QAGE (where the E stands for extrapolation). $\endgroup$ – GertVdE Mar 15 '19 at 9:47

Your Answer

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

Browse other questions tagged or ask your own question.