acalculator

What is the double integral of f?

Type f(x, y), the order such as dy dx, and the limits. Inner limits may use the outer letter, so regions between two curves work.

Your numbers

Exact value
2

The double integral of x^2 e^(x y) (dy dx) is 2.

Decimal value
2

Exact value: 2. The double integral of x^2 e^(x y) (dy dx) is 2.

How to calculate

Evaluates an iterated integral exactly where possible, checked numerically.

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.

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

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

Machine-readable copies: Markdown, JSON.

Worked examples

Each example is checked against the calculator on every build.

  1. 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 gives Exact value 2, Decimal value 2.Source: OpenStax Calculus Vol. 3 (Strang and Herman, 2016), 5.2, Ex. 5.12
  2. Function f(x, y) 3x^2 + y^2, Order dx dy, Inner lower y^2 - 3, Inner upper y + 3, Outer lower -2, Outer upper 3 gives Exact value 2375/7, Decimal value 339.285714.Source: OpenStax Calculus Vol. 3 (Strang and Herman, 2016), 5.2, Ex. 5.13

How it works

The double integral calculator evaluates the iterated integral of f over a region, in the order you type: with dy dx, the inner integral runs over y from the inner lower limit to the inner upper limit, and the outer integral runs over x from the outer lower limit to the outer upper limit:

∫ from a₂ to b₂ ( ∫ from a₁(x) to b₁(x) f(x, y) dy ) dx.

With dx dy the roles swap. The inner limits may use the outer letter; the outer limits are numbers or constant expressions (pi/2, e, sqrt(2)). A lower limit above the upper limit gives the negative of the integral the other way round, as for one variable. All limits must be finite.

Exact value. A computer algebra system (nerdamer, open source) works out the inner integral as a checked definite integral in the inner letter, with the outer letter held constant, and then the outer integral of that result. The algebra runs after you start typing, in the background. When every sin and cos of the letter being integrated has the form k·x + b, where the letter appears once, as a factor of the one term k·x, and k and b are free of it, that letter is first replaced by w = k·x, and sin(w + b), cos(w + b) are split by the angle-sum rules, which the algebra handles more often; the value does not change.

Check. The page also integrates f over the region numerically: a tanh-sinh rule in each letter, with nodes at t = −3 to 3 in steps of 1/8 (49 nodes per letter), the inner rule over the inner limits at each outer node. The exact value must agree with this to 10⁻⁸ × max(1, |value|).

When there is no exact value. If no exact form is found for an inner integral, the exact answer fails its check, or the algebra takes over 3 seconds, the page shows the numeric value alone (Decimal value, no Exact value), but only when the rule above and the same rule with steps of 1/12 agree to 10⁻¹⁰ × max(1, |value|). Otherwise it says "No verified answer". When the algebra finds that an integral does not exist (a pole inside the interval, an end where the antiderivative is infinite, or a function that is not real on part of the region), the page says so and shows no value.

What you can type

  • The order: d and a letter for each of the two variables, inner first, such as dy dx, dx dy, dr dt or dr dθ. Letters can be any lowercase letters except e (Euler’s number), and θ.
  • The function may use only the two letters of the order. pi (or π) is π and e is Euler’s number.
  • Numbers can have decimals (2.5) and powers of ten (1e-3).
  • Operations: + − * / and ^ for powers. Brackets group. Numbers and letters side by side multiply: 2x y means 2 · x · y.
  • Functions: sqrt, cbrt, ln (and log, the natural logarithm), log10, exp, abs, sin, cos, tan, sec, csc, cot, asin, acos, atan, sinh, cosh, tanh and their inverses. Angles are in radians.

How answers are written

  • Exact value: the algebra’s exact form, in the syntax you type (^ for powers, sqrt(u), π, e, a space for multiplication), shown as MathML. It is left out when its text holds a decimal point or a whole number of 9 or more digits (a number the algebra rounded). The exact form is not simplified further: an area can appear as asin(1) − asin(−1), which is π.
  • Decimal value: the value to 10 significant figures.

Assumptions

  • Angles are in radians; ln and log are the natural logarithm.
  • The region is the one the limits describe; the page does not check that it matches a picture you have in mind.
  • An answer that fails its check is not shown ("No verified answer").

Worked examples by hand

∬ x²e^(xy) dA over 0 ≤ x ≤ 2, x/2 ≤ y ≤ 1 (OpenStax Calculus Volume 3, section 5.2, Example 5.12). Inner, y from x/2 to 1: ∫ x²e^(xy) dy = x e^(xy), so the inner integral is x e^x − x e^(x²/2). Outer, x from 0 to 2: ∫ x e^x dx = (x − 1)e^x gives e² + 1, and ∫ x e^(x²/2) dx = e^(x²/2) gives e² − 1. The integral is (e² + 1) − (e² − 1) = 2.

∬ (3x² + y²) dA over −2 ≤ y ≤ 3, y² − 3 ≤ x ≤ y + 3 (Example 5.13), order dx dy. Inner, x from y² − 3 to y + 3: [x³ + xy²] gives (y + 3)³ + (y + 3)y² − (y² − 3)³ − (y² − 3)y². Expanding and integrating in y from −2 to 3 gives 2375/7 ≈ 339.2857143.

Other questions people ask

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π.