What a double integral measures
A double integral adds up f(x, y) over a flat region. If f is positive, the answer is the volume between the surface z = f(x, y) and the region. Divide by the region's area and you get the average value of f. Use it for volumes, mass from a density, totals from a rate spread over an area, and probabilities from a joint density.
How it's calculated
By Fubini's theorem, a double integral of a continuous function over a rectangle equals an iterated integral: integrate in y with x held fixed, then integrate that result in x. For a Type I region, where x runs from a to b and y runs from g(x) to h(x), the inner limits depend on x.
Type I region: ∬ f dA = ∫ₐᵇ [ ∫ from g(x) to h(x) of f(x, y) dy ] dx
The calculator does both integrals with composite Simpson's rule, which fits parabolas through groups of three points. With step h, the weights are 1, 4, 2, 4, …, 2, 4, 1, all times h ÷ 3. It works the answer out twice, with n and with 2n subintervals in each direction. Simpson's error shrinks about 16 times when the step halves, so the error left in the finer answer is roughly |S₂ₙ − Sₙ| ÷ 15. That's the estimate shown.
Worked example
Integrate f(x, y) = 3x² − y over 0 ≤ x ≤ 2, 0 ≤ y ≤ 3.
- Inner integral, x fixed: ∫₀³ (3x² − y) dy = [3x²y − y²/2] from 0 to 3 = 9x² − 9/2.
- Outer integral: ∫₀² (9x² − 9/2) dx = [3x³ − 9x/2] from 0 to 2 = 24 − 9 = 15.
Simpson's rule is exact for polynomials up to degree 3 in each variable, so the calculator returns exactly 15 here. The region's area is 6, so the average value of f is 15 ÷ 6 = 2.5.
For a curved region, take f(x, y) = xy with x from 0 to 1 and y from x² up to x. The inner integral is x(x² − x⁴) ÷ 2, and the outer integral gives (1/4 − 1/6) ÷ 2 = 1/24 ≈ 0.04166667.
Integrals with exact answers to test against
| f(x, y) | Region | Exact value |
|---|---|---|
| 3x² − y | [0, 2] × [0, 3] | 15 |
| e^y cos x | [0, π/2] × [0, 1] | e − 1 ≈ 1.718281828 |
| sin x cos y | [0, π] × [0, π/2] | 2 |
| xy | 0 ≤ x ≤ 1, x² ≤ y ≤ x | 1/24 ≈ 0.04166667 |
| 1 | 0 ≤ x ≤ 1, x² ≤ y ≤ x | 1/6 (the area) |
Limitations
- This is a numerical answer, not a symbolic antiderivative. It's exact for low-degree polynomials and very accurate for smooth functions, but it won't give you a formula.
- Improper integrals aren't handled. If f is undefined or infinite anywhere in the region, such as 1/x with x = 0 on the edge, the calculator says so instead of guessing.
- Functions with sharp corners or rapid wiggles converge more slowly. If the error estimate is large, pick a bigger n.
- For a Type II region (y from c to d, x between two curves of y), swap the roles: rename the variables so the outer one is x.