Description
In multi-variable integration, it can be efficient to integrate different variables with different algorithms. Currently, this can be expressed as an IntegralProblem
for outer variables of integration whose integrand evaluates another IntegralProblem
for inner variables of integration. Nearly all integration algorithms are oblivious to use cases such as these, which means that the caller has to make adjustments, such as rescaling absolute error tolerances for inner integrals, by hand. For example, with hypercube domains, the reltol
can remain the same because quadrature (i.e. addition and multiplication) preserves the leading number of significant digits (in the absence of catastrophic cancellation), however the abstol
for the inner integral should be the outer tolerance divided by vol(outer_hypercube)
in order to provide the requested number of absolute digits to the outer integration routine after multiplying the outer integrand/inner integral by its outer quadrature weights.
I was thinking that IntegralProblem
could be extended to allow multiple algorithm/domain pairs that indicate which algorithm to integrate which variables of integration, while handling calling each algorithm and rescaling tolerances internally. Could this feature be in the scope of Integrals.jl
? Please advise