Addition to the quadrature module: quadrature based on the tanh-sinh transform
I am working on a Fortran version of the quadrature method via the tanh-sinh transform as described by Bailey et al. Experimental Mathematics in Action . Its properties are:
- Accurate (although probably using more function evaluations than the current quadrature formulae)
- Capable of handling integrable singularities and infinite derivatives, as long as the function is smooth
- Easy to use and extensible to 2- and 3-dimensional functions (in principle more dimensions are possible, but that gets cumbersome and likely slow)
Would this be a suitable addition to the standard library?
I believe so, yes. Thank you.
I have attached a very first version of the module - quadrature_tanh_sinh.f90.txt
@arjenmarkus, I've found a good-looking Fortran implementation of the tanh-sinh quadrature, originally called double-exponential quadrature, made available here by Takuya Ooura from Kyoto University.
[Edit: I've found at least one paper which references the code, stating the code is both efficient and accurate]
Wikipedia also links to a page from John Cook who published a C++ implementation: "Double Exponential Integration" with source code.
[Edit: apparently the code from John Cook is not available anymore at the original website, but I've found a copy on GitHub by searching for the header file "DEIntegrator.h"].