stdlib icon indicating copy to clipboard operation
stdlib copied to clipboard

Addition to the quadrature module: quadrature based on the tanh-sinh transform

Open arjenmarkus opened this issue 4 years ago • 3 comments

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?

arjenmarkus avatar Dec 31 '21 14:12 arjenmarkus

I believe so, yes. Thank you.

jvdp1 avatar Dec 31 '21 16:12 jvdp1

I have attached a very first version of the module - quadrature_tanh_sinh.f90.txt

arjenmarkus avatar Jan 02 '22 14:01 arjenmarkus

@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"].

ivan-pi avatar Jan 19 '22 23:01 ivan-pi