[Changeset]: Add additional quadrature functions
John W. Eaton
jwe at bevo.che.wisc.edu
Mon May 12 22:35:58 CDT 2008
On 10-May-2008, David Bateman wrote:
| 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
I applied it.
Thanks,
jwe
More information about the Octave-maintainers
mailing list