Guides / Integrals

Double integrals: inner limits from the region, switching the order, and r dr dθ in polar

A double integral adds up f(x, y) over a region of the plane: a volume under a surface, a total mass, or a probability when f is a joint density. You compute it as two ordinary integrals, one inside the other, and almost all the thinking goes into the limits. The mistakes come from swapping the limits without looking at the region again, from leaving out the r in polar coordinates, and from squaring an integral without giving the second copy its own variable.

Short answer

Sketch the region, then describe it: the outer variable between two numbers, the inner variable between two curves that may depend on the outer one, as in ∫ab ∫g(x)h(x) f dy dx. Do the inner integral first, treating the outer variable as a constant. To switch the order, describe the same region the other way, from the picture, not by trading symbols. In polar coordinates, dA = r dr dθ: the extra r is not optional.

Why it works

Cut the region into thin strips parallel to the y-axis. For a fixed x, the inner integral ∫ f(x, y) dy adds up f along the strip from where it enters the region to where it leaves, and those two points depend on x, which is why the inner limits can be curves in x. The outer integral then adds the strips from the leftmost x to the rightmost, and those are fixed numbers. Switching the order cuts the same region into horizontal strips instead, so the limits have to be read off the picture again.

In polar coordinates the small pieces are not squares. A piece between radii r and r + dr and angles θ and θ + dθ is nearly a rectangle with sides dr and r dθ, since an arc of angle dθ at radius r has length r dθ. So its area is r dr dθ: pieces far from the center are bigger, and the r accounts for that.

Example 1: a rectangle

Evaluate ∫01 ∫02 (x2 + y) dx dy.

  1. ∫02 (x2 + y) dx = 83 + 2yThe inner integral is in x, with y held constant: [x³/3 + xy] from 0 to 2.
  2. ∫01 (83 + 2y) dy = 83 + 1 = 113The outer integral in y. On a rectangle all four limits are numbers, and the other order gives the same 11/3.

Example 2: a region between two curves, in both orders

Integrate f(x, y) = x over the region between y = x2 and y = x.

  1. x2 = x ⇒ x = 0, 1The curves cross at (0, 0) and (1, 1). Between them, y = x is on top, since x ≥ x² on [0, 1].
  2. ∫01 ∫x²x x dy dx = ∫01 (x2 − x3) dxVertical strips: for each x, y runs from the lower curve to the upper one, and the inner integral is x(x − x²).
  3. 13 − 14 = 112The outer integral.
  4. ∫01 ∫y√y x dx dy = ∫01 y − y22 dyHorizontal strips: solve each curve for x. A strip at height y starts on y = x (so x = y) and ends on y = x² (so x = √y).
  5. 12(12 − 13) = 112Both orders agree, as they must: they describe the same region.

Example 3: switching the order to make the integral possible

Evaluate ∫04 ∫√x2 cos(y3) dy dx.

  1. ∫ cos(y3) dy has no elementary antiderivativeSo the inner integral can't be done as written. Change the order.
  2. 0 ≤ x ≤ 4, √x ≤ y ≤ 2 ⇔ 0 ≤ y ≤ 2, 0 ≤ x ≤ y2Sketch it: the region lies above the curve y = √x and below the line y = 2. At height y it runs from the y-axis to the curve, where x = y².
  3. ∫02 ∫0y² cos(y3) dx dy = ∫02 y2 cos(y3) dyThe inner integrand doesn't involve x, so the inner integral is the strip length y² times cos(y³).
  4. 13 sin(y3) |02 = sin 83 ≈ 0.3298u = y³ and du = 3y² dy. The y² that came out of the inner integral is exactly the factor the substitution needs.

Example 4: polar coordinates and the Gaussian integral

Integrate x2 + y2 over the disk of radius 2, then integrate e−(x² + y²) over the whole plane and use it to find ∫ e−x² dx.

  1. ∫02π ∫02 r2 · r dr dθ = 2π · 244 = 8πx² + y² = r², the disk is 0 ≤ r ≤ 2 and 0 ≤ θ ≤ 2π, and dA = r dr dθ.
  2. ∫02π ∫0∞ e−r² r dr dθ = 2π · 12 = πHere the r is what makes the integral possible: e−r² r has antiderivative −½e−r².
  3. I2 = ∫ e−x² dx · ∫ e−y² dy = ∬ e−(x² + y²) dA = πWrite the square of I = ∫ e−x² dx (over the whole line) as a product of two copies with different variables, which is one integral over the plane.
  4. I = √π ≈ 1.7725I is positive, so take the positive root. This is where the √(2π) in the normal density comes from.

Common mistakes, and the exact line they happen on

1. Swapping the limits without redrawing the region

The region from Example 2.

  1. ∫01 ∫x²x x dy dx = 112Right so far.
  2. = ∫01 ∫y²y x dx dy = 115This is the mistake. Renaming x to y in the inner limits describes a different region, the one between x = y² and x = y. The region has to be described again from the picture: at height y, x runs from y to √y, which gives 1/12 again.

2. Dropping the r in r dr dθ

The disk from Example 4.

  1. x2 + y2 = r2, 0 ≤ r ≤ 2, 0 ≤ θ ≤ 2πRight so far.
  2. ∫02π ∫02 r2 dr dθ = 16π3This is the mistake. dA is r dr dθ, not dr dθ. Without the r, the integral treats a piece near the center as if it were as big as one near the edge. The answer is 8π. A quick check with f = 1: over a disk of radius R, ∫∫ r dr dθ gives πR², the area, while ∫∫ dr dθ gives 2πR, which is a length, not an area.

3. Squaring an integral with one variable

The Gaussian integral from Example 4.

  1. I = ∫ e−x² dxRight so far.
  2. I2 = ∫ (e−x²)2 dx = ∫ e−2x² dx = √(π/2) ≈ 1.2533This is the mistake. The square of an integral is not the integral of the square. A product of two integrals needs two independent variables, ∫ e−x² dx · ∫ e−y² dy, which is a double integral over the plane, and equals π ≈ 3.1416.

Practice

  1. Evaluate ∫03 ∫01 (2x + y2) dy dx.

    Show answer

    The inner integral is 2x + 13, and ∫03 (2x + 13) dx = 9 + 1 = 10.

  2. Use a double integral of 1 to find the area between y = x2 and y = 2x.

    Show answer

    They cross at x = 0 and x = 2, so the area is ∫02 ∫x²2x dy dx = ∫02 (2x − x2) dx = 43.

  3. Evaluate ∫01 ∫y1 ex² dx dy by switching the order.

    Show answer

    The region is 0 ≤ x ≤ 1, 0 ≤ y ≤ x, so the integral is ∫01 x ex² dx = e − 12 ≈ 0.859.

  4. Integrate x over the quarter disk x2 + y2 ≤ 9, x ≥ 0, y ≥ 0.

    Show answer

    ∫0π/2 ∫03 (r cos θ) r dr dθ = 9 · 1 = 9: the r-integral is 27/3 = 9 and the θ-integral of cos θ is 1.

  5. X and Y have joint density f(x, y) = x + y on the unit square. Find P(X < ½ and Y < ½).

    Show answer

    ∫0½ ∫0½ (x + y) dx dy = 116 + 116 = 18. (Over the whole square it integrates to 1, so it is a density.)