Numerical multiple integration
How trapezoid, Simpson and Gauss-Legendre extend to double integrals through product rules and changes of variables.
From one integral to two
On a rectangle R=[a,b]×[c,d], a double integral can be seen as an outer integral of inner integrals. That lets us apply a one-dimensional rule in y and then another in x.
Double trapezoid
If h=(b-a)/n and k=(d-c)/m, applying trapezoid in both directions gives product weights: corners weigh 1, edges 2 and interiors 4, all multiplied by hk/4.
| Node type | Weight alpha_i beta_j |
|---|---|
| Esquina / Izkina / Corner | 1 |
| Borde no esquina / Ertza ez izkina / Edge not corner | 2 |
| Interior / Barrukoa / Interior | 4 |
Double Gauss-Legendre
For Gauss-Legendre, each variable is transformed to [-1,1]. On a rectangle, the factor in front of the sum is the product of both Jacobians.