# What is the double integral of f?

Evaluates an iterated integral exactly where possible, checked numerically.

- Page: https://www.acalculator.org/math/double-integral-calculator
- JSON spec: https://www.acalculator.org/math/double-integral-calculator.json
- Version: 92160d54a5e3

## Default answer

Example with the default inputs (Function f(x, y) x^2 e^(x y), Order dy dx, Inner lower x/2, Inner upper 1, Outer lower 0, Outer upper 2): The double integral of x^2 e^(x y) (dy dx) is 2.

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| f | Function f(x, y) | The integrand. |
| order | Order | dy dx: inner in y, outer in x. |
| a1 | Inner lower | The inner lower limit. |
| b1 | Inner upper | The inner upper limit. |
| a2 | Outer lower | The outer lower limit. |
| b2 | Outer upper | The outer upper limit. |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| exact | Exact value | The integral, exact. |
| value | Decimal value | The integral to 10 significant figures. |

## Method

Iterated CAS definite integrals, checked against tanh-sinh cubature.

## Assumptions

- Finite limits; radians. An answer that fails its check is not shown.

## Worked examples

1. f = x^2 e^(x y), order = dy dx, a1 = x/2, b1 = 1, a2 = 0, b2 = 2 gives exact = 2, value = 2. Source: OpenStax Calculus Vol. 3 (Strang and Herman, 2016), 5.2, Ex. 5.12.
2. f = 3x^2 + y^2, order = dx dy, a1 = y^2 - 3, b1 = y + 3, a2 = -2, b2 = 3 gives exact = 2375/7, value = 339.285714. Source: OpenStax Calculus Vol. 3 (Strang and Herman, 2016), 5.2, Ex. 5.13.

## FAQ

### What is a double integral?

A double integral adds up f(x, y) over a region of the plane. When f is positive, it is the volume under the surface z = f(x, y) and above the region. With f = 1 it is the area of the region. By Fubini’s theorem it can be worked out as an iterated integral: integrate in one letter with the other held constant, then integrate the result in the other letter.

### How do I enter a region between two curves?

Choose the order so that the inner letter runs between the two curves. For the region between y = x/2 and y = 1 with 0 ≤ x ≤ 2, type the order dy dx, the inner limits x/2 and 1, and the outer limits 0 and 2. The inner limits may use the outer letter; the outer limits must be numbers or constants such as pi/2.

### Does the order of integration matter?

For the same region, dy dx and dx dy give the same value, but the limits change, and one order can be much easier. The integral of e^(x²) has no elementary antiderivative in x, so over the triangle 0 ≤ y ≤ x ≤ 1 the order dx dy has no exact form, while dy dx gives (e − 1)/2. If one order gives only a decimal, try the other.

### How is the answer checked?

The exact value comes from a computer algebra system, one integral at a time. The page then works out the whole double integral a second way, numerically, with a tanh-sinh rule in each letter, and the two must agree to 1 part in 100 million. If they do not, or if no exact form is found, the page shows only the numeric value, and only when two runs of the numeric rule with different step sizes agree.

### Why do I see only a decimal?

The computer algebra system found no exact antiderivative for one of the integrals, its answer failed the check, or it took over 3 seconds. The decimal is then the numeric value, to 10 significant figures, and it is shown only when two runs of the numeric rule agree to 1 part in 10 billion.

### Can I use polar coordinates?

Yes. Type the order with your letters, such as dr dθ (or dr dt), and put the extra factor r from the Jacobian into the function yourself: the area of a disk of radius 2 is r with dr dt, r from 0 to 2 and t from 0 to 2pi, which gives 4π.

## Sources

- OpenStax, Calculus Volume 3, section 5.1 Double Integrals over Rectangular Regions: https://openstax.org/books/calculus-volume-3/pages/5-1-double-integrals-over-rectangular-regions
- OpenStax, Calculus Volume 3, section 5.2 Double Integrals over General Regions: https://openstax.org/books/calculus-volume-3/pages/5-2-double-integrals-over-general-regions
