Multivariable calculus

Double Integral of xy Over [0,2] by [0,3]

The double integral of xy over the rectangle x from 0 to 2 and y from 0 to 3 equals 9. The integrand is a function of x times a function of y and every limit is a constant, so the double integral splits into a product of two single integrals: 2 times 4.5, which is 9.

f(x,y)=xyf(x,y) = xy
0203xydydx=9\int_{0}^{2}\int_{0}^{3} xy\,dy\,dx = 9

Numerically 9.000000, confirmed by quadrature on every build.

Work from the inside out

Over a rectangle the double integral becomes an iterated integral, and you evaluate the inner one first. In 0203xydydx\int_{0}^{2}\int_{0}^{3} xy\,dy\,dx the inner integral is in yy, so xx is frozen and rides along as a constant multiplier.

03xydy=x[y22]03=9x2\int_{0}^{3} xy\,dy = x\left[\frac{y^2}{2}\right]_{0}^{3} = \frac{9x}{2}

The inner answer contains no yy at all. That is the signal the first integration is finished: a surviving yy means you forgot to substitute a limit. Now integrate what is left.

029x2dx=[9x24]02=9\int_{0}^{2} \frac{9x}{2}\,dx = \left[\frac{9x^2}{4}\right]_{0}^{2} = 9

The other order gives the same 9, since 02xydx=2y\int_{0}^{2} xy\,dx = 2y and 032ydy=9\int_{0}^{3} 2y\,dy = 9. Fubini's theorem guarantees that for any continuous integrand on a rectangle.

The separable shortcut, and when you are allowed to use it

Here xyxy is one factor per variable, and every limit is a number rather than a function. Those two conditions together let the double integral break into a product of single integrals.

0203xydydx=(02xdx)(03ydy)=(2)(92)=9\int_{0}^{2}\int_{0}^{3} xy\,dy\,dx = \left(\int_{0}^{2} x\,dx\right)\left(\int_{0}^{3} y\,dy\right) = (2)\left(\frac{9}{2}\right) = 9
  • The integrand must be a product g(x)h(y)g(x)h(y). A sum such as x+yx + y does not qualify.
  • Every limit must be constant. Over a triangle where yy runs from 00 to xx, the split is invalid.
  • Both conditions fail more often than they hold, so check them before reaching for the shortcut.

The mistake: matching limits to the wrong differential

The usual wrong first line pairs the limits 00 and 22 with dydy. The differential names the variable, and the limits closest to the integrand belong to the differential closest to it: dydy travels with 00 to 33, and dxdx with 00 to 22 on the outside.

On this particular integrand the swap hides itself. Swapping gives (03xdx)(02ydy)=(92)(2)=9\left(\int_{0}^{3} x\,dx\right)\left(\int_{0}^{2} y\,dy\right) = \left(\frac{9}{2}\right)(2) = 9, the right answer by accident, so the habit survives to a problem where it does damage.

Change the integrand to x2yx^2 y over the same rectangle and the damage shows: the correct value is 8392=12\frac{8}{3}\cdot\frac{9}{2} = 12, while the swapped limits give 92=189 \cdot 2 = 18.

  • Write the limits next to their own integral sign before you compute anything.
  • After the inner integral, check that the inner variable is gone.
  • If the inner variable survives, you substituted only the upper limit, or you used the outer pair by mistake.

Frequently asked questions

Does the order of integration change the answer?

Not the answer, no: Fubini's theorem covers any continuous integrand over a rectangle with constant limits, and xyxy qualifies. The order still matters in two other ways. One order can be far less work, as it is for xexyx e^{xy}, and over a region that is not a rectangle the two orders need different limits even though they land on the same number.

What does the number 9 measure?

The volume between the surface z=xyz = xy and the rectangle in the xyxy plane, because xy0xy \ge 0 everywhere on this rectangle. If part of the rectangle sat where xy<0xy < 0, that part would count negatively instead.