[Changeset]: Add additional quadrature functions
David Bateman
adb014 at gmail.com
Sat May 10 15:27:31 CDT 2008
The paper
L.F. Shampine, "Vectorized adaptive quadrature in MATLAB", Journal of
Computational and Applied Mathematics, pp131-140, Vol 211, Issue 2, Feb 2008
describes what is contained in the Matlab quadgk function. It also gives
some details on the implementation of quadv in particular quadv's
handling of edge singularities. The information here is sufficient to
implement both of these functions.
The advantage of quadgk is that at each iteration it has a single call
to the function defining the integrand with a vector of the abscissa.
This is as opposed to quad or quadl that has multiple single abscissa
call to the integrand. Therefore, in most cases quadgk is in fact faster
than quad, even though its implemented entirely as an m-file, though
some further optimizations might be possible.
Also quadgk handles edge singularities and infinity intervals through
the use of variable substitution. So
quadgk (@(x) 1 ./ sqrt (x), 0, 1)
works fine where it'll fail with quadl currently. Adding dblquad and
triplequad is also relatively simple and included in this patch. I used
quadgk as the default quadrature for these two functions.
Changset attached
D.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch8071
Url: https://www.cae.wisc.edu/pipermail/octave-maintainers/attachments/20080510/783aa37a/attachment-0001.ksh
More information about the Octave-maintainers
mailing list