Two ordinary integrals, one after the other
A double integral accumulates a quantity over a region of the plane rather than over an interval of the line. Slice the region into thin strips, integrate along each strip, and then integrate the strip totals across the region. That two-stage procedure is the iterated integral, and Fubini's theorem is the guarantee that it gives the same answer as the double integral it stands for.
The inner integral runs first, with the outer variable held fixed. Its limits may therefore depend on that outer variable — which is exactly how a region bounded by curves is described. The outer limits must be constants, because by the time you reach them nothing is left to depend on.
This calculator makes that structure visible. The table lists one row per slice: the value of the outer variable, the two inner limits there, and the value of the inner integral. The chart plots the last column against the first, and the double integral is the area under that curve. If your setup is wrong, the mistake almost always shows up as a strange-looking slice column long before it shows up in the final number.
What the integral means depends on the integrand. With f = 1 it is the area of the region. With f a density it is a mass. With f a height it is a volume under a surface. With f a probability density it is a probability.
Setting up the limits, which is the whole difficulty
Rectangles are the easy case. Both inner limits are constants, both outer limits are constants, and the order does not matter. If the integrand also factors as a function of x times a function of y, the double integral factors into a product of two single integrals — which is why the default example, ∬xy over a 2 by 3 rectangle, comes out as 2 × 4.5 = 9.
General regions need the boundary as a function. For the triangle under the line y = x between x = 0 and x = 1, the inner limits are 0 and x. Enter x in the inner upper limit box, and the calculator evaluates it afresh for every slice.
Swapping the order changes the limits completely. The same triangle described with x inside runs from x = y to x = 1, with y from 0 to 1. Both descriptions give 0.5, but neither set of limits is a rearrangement of the other — you have to re-read the geometry. Choosing the easier order is the main skill in this topic, and sometimes an integral that is impossible in one order is elementary in the other.
Polar coordinates suit circular regions. A disc of radius 2 is 0 ≤ r ≤ 2, 0 ≤ θ ≤ 2π — two constant limits, where the Cartesian description would need ±sqrt(4 − x²). The price is the Jacobian factor r in the area element, which this calculator inserts for you. Enter your integrand in terms of r and theta and do not write the extra r yourself.
Worked example: ∬ (x + y) over the triangle 0 ≤ y ≤ x, 0 ≤ x ≤ 1
Inner integral first, holding x fixed and integrating in y from 0 to x:
- An antiderivative in y is
xy + y²/2. - At the upper limit
y = x:x·x + x²/2 = x² + x²/2 = 1.5x². - At the lower limit
y = 0: zero. - So the inner integral is
1.5x², and that is the slice value the table reports at each x.
Outer integral second, integrating the slice values from x = 0 to x = 1:
∫ from 0 to 1 of 1.5x² dx = [0.5x³]from 0 to 1= 0.5.
The region's area is ∫ from 0 to 1 of (x − 0) dx = 0.5, so the mean value of x + y over the triangle is 0.5/0.5 = 1. That is a satisfying check: the centroid of this triangle is at (2/3, 1/3), where x + y = 1, and for a linear integrand the mean value equals the integrand at the centroid.
Now the same region in the other order. With x inside, the strip at height y runs from x = y to x = 1, and y runs from 0 to 1. The inner integral is [x²/2 + xy] from y to 1, which is 0.5 + y − y²/2 − y² = 0.5 + y − 1.5y². Integrating that from 0 to 1 gives 0.5 + 0.5 − 0.5 = 0.5. Same answer, entirely different intermediate expressions.
And a polar check. A disc of radius 2 with integrand 1 gives ∫ from 0 to 2π ∫ from 0 to 2 of r dr dθ = ∫ from 0 to 2π of 2 dθ = 4π = 12.5663706, which is πr² with r = 2, as it must be.
How to read the outputs
The area is a free consistency check. It is computed by the same machinery with an integrand of 1, so if the area does not match the region you had in mind, your limits are wrong and the main value is wrong too. Checking it takes one glance and catches most setup errors.
The mean value is the integral divided by the area. It answers the question the raw integral does not: is this a large accumulation because the integrand is large, or because the region is large? For a density it is the average density; for a height it is the average height of the surface.
The middle-slice value tells you whether the inner integral is behaving. If it is blank while the outer integral returns something, the region has a slice where the integrand is undefined, and the outer quadrature stepped around it rather than through it.
The error estimate compares two runs. Nested adaptive quadrature is harder to control than the one-dimensional kind, because the inner integral is itself an approximation and the outer routine sees its noise. Rerunning at a looser tolerance and comparing gives an honest read on how many digits survived.
A zero area with a zero integral is not a failure. If the two inner limits coincide, the region is degenerate and both are correctly zero, which is one of the test vectors on this page.
Standard double integrals with exact values
| Integrand | Region | Exact value | Decimal |
|---|---|---|---|
1 | 0 ≤ x ≤ 1, 0 ≤ y ≤ 1 | 1 | 1.0000000 |
x·y | 0 ≤ x ≤ 2, 0 ≤ y ≤ 3 | 9 | 9.0000000 |
x²·y | 0 ≤ x ≤ 2, 0 ≤ y ≤ 3 | 12 | 12.000000 |
x + y | 0 ≤ x ≤ 1, 0 ≤ y ≤ x | 1/2 | 0.5000000 |
x·y | 0 ≤ x ≤ 1, 0 ≤ y ≤ x | 1/8 | 0.1250000 |
1 (polar) | 0 ≤ r ≤ 2, 0 ≤ θ ≤ 2π | 4π | 12.566371 |
r (polar) | 0 ≤ r ≤ 1, 0 ≤ θ ≤ 2π | 2π/3 | 2.0943951 |
e^(−r²) (polar) | 0 ≤ r ≤ 3, 0 ≤ θ ≤ 2π | π(1 − e⁻⁹) | 3.1412050 |
The last row is the finite-radius version of the Gaussian integral. Letting the radius grow gives π, and taking its square root is the classic derivation of the normalising constant of the normal distribution.
Where double integrals go wrong
- Putting a variable in the outer limits. The outer limits must be constants. If your setup needs the outer limit to depend on something, you have the order the wrong way round.
- Forgetting the r in polar coordinates. The area element is
r dr dθ, notdr dθ. Omitting it makes the area of a disc come out as2πRinstead ofπR². This calculator supplies the factor, so do not enter it a second time. - Swapping the order without redrawing the region. New order, new limits. The limits for dy dx are almost never the same expressions with the letters exchanged.
- Using the wrong boundary as the upper limit. If the lower limit exceeds the upper one on some slices, those slices contribute negatively and the total is wrong. Check the two inner-limit columns in the table.
- Integrating across a singularity. Nested quadrature will return a number for a divergent integral if the singularity falls between sample points. Check the error estimate and the slice column.
- Assuming a rectangular region factors. The integral splits into a product only when the integrand itself factors as g(x)·h(y).
x + yover a rectangle does not factor, even though the region does.
Where this fits among the multivariable tools
Triple integrals are the same idea with one more layer. Integrate over the innermost variable, then the middle one, then the outermost, with limits that may depend on the variables still to come. Everything about setting up limits transfers directly.
Changing variables generalises the polar factor. The r in r dr dθ is the determinant of the Jacobian matrix of the polar transformation. Any substitution in two dimensions carries the absolute value of its Jacobian determinant, which the Jacobian calculator computes for an arbitrary map.
The integrand often comes from a derivative. Surface area, flux and moment integrals all build their integrands from partial derivatives, which the partial derivative calculator supplies, and from the gradient, available in the gradient vector calculator.
The vector calculus theorems turn double integrals into line integrals and vice versa. Green's theorem relates a double integral of a combination of partial derivatives over a region to a line integral around its boundary, and the divergence theorem does the analogous thing in three dimensions; the divergence calculator and the curl calculator compute the operators those theorems use.
For one-dimensional problems, use the definite integral calculator, which is the same adaptive quadrature applied once rather than twice.
