Level 0: Foundation
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.Measuring an area with strips and darts
To find the area of a lake on a map, you can cover it with thin strips and add up their areas, or throw darts at the map and count what fraction land in the water. Strips work brilliantly on a flat map. In very many dimensions, there are far too many strips to count, but darts still work. These are the two big ideas of numerical integration: quadrature (clever strips) and Monte Carlo (random darts).
Conjunction assessment for satellites integrates a Gaussian over a collision disc to get a probability of collision. Uncertainty quantification for entry, descent and landing averages over thousands of dispersed trajectories. Bayesian estimation integrates over posteriors. Choosing the right integration method decides whether the answer takes a millisecond or a week.
- 1. Monte Carlo integration uses…
- 2. In very high dimensions, which approach still works?
- 3. Using more, thinner strips usually makes the area estimate…
Level 1: Beginner
★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.Newton–Cotes rules
With panels of width :
- Trapezoid: , error .
- Simpson (even ): , error .
Halving cuts the trapezoid error by 4 and the Simpson error by 16.
Monte Carlo
With : . The standard error is in any dimension. Always report it.
- 1. Halving h reduces Simpson's error by about…
- 2. Monte Carlo error falls like…
- 3. The trapezoid rule is exact for…
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 40 minUndergraduate students and practising engineers.Gaussian quadrature
Choose both nodes and weights. With nodes at the roots of the Legendre polynomial , the rule is exact for polynomials of degree . For analytic integrands the error falls geometrically. Variants: Gauss–Hermite for weights (Gaussian expectations, the unscented transform’s cousin), Gauss–Laguerre and Gauss–Kronrod (adaptive error estimates, as in QUADPACK and scipy.integrate.quad).
Periodic functions
For a smooth periodic integrand over a full period, the plain trapezoid rule converges exponentially (Trefethen and Weideman, 2014). 16 points give to machine precision.
Dimension and variance reduction
A tensor-product rule with points per axis needs points: the curse of dimensionality. Ways around it:
- Monte Carlo: , dimension-free.
- Quasi-Monte Carlo (Halton, Sobol): for smooth integrands.
- Importance sampling: sample from and weight by to concentrate samples where the integrand matters.
- Control variates, antithetic and stratified sampling.
- 1. n-point Gauss–Legendre is exact up to degree…
- 2. Tensor rules in d dimensions with m points per axis need…
- 3. For a smooth periodic function over a full period, the trapezoid rule converges…
Level 3: Advanced
★★★★☆ Advanced⏱ 40 minGraduate level, with full derivations and proofs.Trapezoid error
On one panel , the linear interpolant has error . Integrate: , giving per panel. Summing panels gives . ∎
Gauss exactness
Divide a degree- polynomial by : with . Orthogonality gives . At the nodes , so the rule sees only , which it integrates exactly (being interpolatory on nodes). ∎
Importance sampling
. The variance is minimized by . For a Gaussian tail , shifting the sampler to gives weight and relative error independent of how rare the event is (Owen, 2013).
Exercise 3.1: trapezoid for x² on [0, 1] with n = 2
: . The error 0.0417 matches .
- 1. The trapezoid error per panel is…
- 2. Gauss exactness relies on…
- 3. The optimal importance density is proportional to…
Level 4: Expert
★★★★★ Expert⏱ 35 minResearchers: original papers and open problems.Dimensions and rare events
With a fixed budget of 4096 function evaluations, a tensor Gauss rule is exact to rounding in 2-D (64 points per axis). In 12-D only 2 points per axis remain and its error is 15%, while Monte Carlo stays near 3%. The second half of the exercise is a collision-type tail probability . Plain Monte Carlo with 20 000 samples sees about one hit, so its relative error is about 100%. Importance sampling centred on the threshold gets about 1%. This is the logic behind sampling-based conjunction screening and EDL Monte Carlo dispersion analyses.
Integration in AI, robotics and aerospace
- Space situational awareness: probability of collision as a 2-D integral over the encounter plane (Foster and Estes, 1992; Alfano, 2005). Monte Carlo is used for non-Gaussian cases.
- Entry, descent and landing: Monte Carlo dispersion campaigns with thousands of 6-DoF simulations, used to verify landing-ellipse requirements.
- State estimation: the unscented transform and Gauss–Hermite filters use deterministic quadrature nodes; particle filters use Monte Carlo.
- Machine learning: stochastic gradients are Monte Carlo integrals; QMC is used in Bayesian optimization and rendering.
References
- P. Davis, P. Rabinowitz (1984). Methods of Numerical Integration, 2nd ed. Academic Press.
- L. N. Trefethen, J. A. C. Weideman (2014). “The exponentially convergent trapezoidal rule.” SIAM Review, 56(3).
- L. N. Trefethen (2008). “Is Gauss quadrature better than Clenshaw–Curtis?” SIAM Review, 50(1).
- A. Owen (2013). Monte Carlo Theory, Methods and Examples. statweb.stanford.edu/~owen/mc.
- H. Niederreiter (1992). Random Number Generation and Quasi-Monte Carlo Methods. SIAM.
- J. Foster, H. Estes (1992). “A parametric analysis of orbital debris collision probability and maneuver rate for space vehicles.” NASA JSC-25898.
- S. Alfano (2005). “A numerical implementation of spherical object collision probability.” Journal of the Astronautical Sciences, 53(1).
- R. Piessens et al. (1983). QUADPACK: A Subroutine Package for Automatic Integration. Springer.