Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Choosing a multidimensional integration method

Scientific question

Which method produces evidence that matches the scientific structure, not just a number? Start with geometry, smoothness, effective dimension, uncertainty requirements, and the derivative you need.

Geometric picture

Tensor rules fill every coordinate combination. Cubature partitions physical space. Sparse grids navigate a level lattice. Randomized QMC spreads replicated digital nets across the whole domain.

Derivation

A useful first comparison is the work model:

Ntensornd,NRQMC=R2m,N_{\mathrm{tensor}}\sim n^d, \qquad N_{\mathrm{RQMC}}=R2^m,

while adaptive cubature and sparse grids have problem-dependent work

Nadaptive=N(ϵabs,ϵrel,d,f,capacities).N_{\mathrm{adaptive}} =N(\epsilon_{\mathrm{abs}},\epsilon_{\mathrm{rel}}, d,f,\text{capacities}).

No method removes dependence on the integrand class.

Computational cost

Scientific structureFirst method to tryMain cost warning
Smooth, low dimension, polynomial momentTensorProduct(n^d)
Localized smooth structureAdaptiveCubatureregional growth
Mixed smoothness or low effective dimensionSmolyakindex and node growth
Unknown anisotropyAdaptiveSmolyakfrontier capacity
Moderate or high dimension, deterministic estimateSobolno error estimate
Randomized uncertainty requiredScrambledSobolreplicate cost
Sequential randomized stoppingAdaptiveScrambledSobolvalid bounds required

What the estimator means

Fixed rules may have no runtime estimator. Adaptive evidence is formula disagreement, not a universal error bound. Randomized intervals describe replicate uncertainty under a declared randomization.

JAX and differentiation

All methods support first-order replay. Prefer fixed formulas when stable, repeatable derivatives matter more than adaptive work. Always pass live parameters through args.

Quantities and units

Use raw normalized coordinates when that is the clearest model. Use Hyperrectangle.from_axes when heterogeneous physical units materially improve auditability. Quantity mode is optional and alpha.

Worked astrophysical example

For a four-dimensional stellar population moment, start with a tensor rule if the integrand is a low-degree separable polynomial. Move to a sparse grid for smooth nonseparable corrections, or randomized QMC when selection effects add many coordinates.

I=p(M,Z,t,D)S(M,Z,t,D)g(M,Z,t,D)dMdZdtdD.I=\int p(M,Z,t,D)\,S(M,Z,t,D)\,g(M,Z,t,D)\,dM\,dZ\,dt\,dD.

Failure modes

Audit recipe

Write down why the geometry fits, what smoothness you expect, which estimator you will trust, the stopping capacities, derivative mode, units, independent truth check, and the fallback method.

Warranted claim

Jaxstro now spans four complementary finite-hyperrectangle strategies. Method choice remains a scientific modeling decision, and Phase C geometries are outside this guide.