Multivariable calculus

Double Integral of x^2 sin y Over a Rectangle

The double integral of x^2 sin(y) over the rectangle 0 <= x <= 1, 0 <= y <= pi equals 2/3. The integrand is a function of x times a function of y and the region is a rectangle, so the double integral factors into (1/3) times 2.

f(x,y)=x2sinyf(x,y) = x^2 \sin y
Rx2sinydA=23\iint_R x^2 \sin y\,dA = \frac{2}{3}

Numerically 0.666667, confirmed by quadrature on every build.

Split the product, but only because the region is a rectangle

When the integrand factors as g(x)h(y)g(x)h(y) and all four limits are constants, the double integral is the product of two ordinary integrals.

Rx2sinydA=(01x2dx)(0πsinydy)=132=23\iint_R x^2 \sin y\,dA = \left(\int_0^1 x^2\,dx\right)\left(\int_0^{\pi} \sin y\,dy\right) = \frac{1}{3}\cdot 2 = \frac{2}{3}

The reason is mechanical rather than magical. Do the inner integral in yy with xx held fixed: x2x^2 is then a constant and slides straight out of the integral.

0πx2sinydy=x2[cosy]y=0y=π=x2(1+1)=2x2\int_0^{\pi} x^2 \sin y\,dy = x^2\left[-\cos y\right]_{y=0}^{y=\pi} = x^2\left(1 + 1\right) = 2x^2
012x2dx=[2x33]01=23\int_0^1 2x^2\,dx = \left[\frac{2x^3}{3}\right]_0^1 = \frac{2}{3}

The mistake: splitting when the region is not a rectangle

The factoring trick fails the moment a limit contains the other variable. Over the triangle 0yx0 \le y \le x, 0x10 \le x \le 1, the same integrand gives an inner result that no longer separates.

0xx2sinydy=x2(1cosx)\int_0^{x} x^2 \sin y\,dy = x^2\left(1 - \cos x\right)

The xx from the limit has leaked into what was supposed to be the yy half of the product. There is no way to rewrite this as one xx integral times one yy integral.

  • Rectangle and a product integrand: split.
  • Rectangle but the integrand does not factor, for example sin(x+y)\sin(x+y): do not split, integrate inside out.
  • Limits that contain a variable: never split, however tempting the integrand looks.

A second slip in the same family is losing the sign in sinydy=cosy\int \sin y\,dy = -\cos y. Over [0,π][0,\pi] the evaluation is (1)(1)=2-(-1) - (-1) = 2, not 00, and a 00 here would wrongly kill the whole answer.

What the number means

The rectangle has area π\pi, so the average height of the surface over it is 2/3π0.2122\frac{2/3}{\pi} \approx 0.2122.

That is small for a good reason: x2x^2 spends most of [0,1][0,1] well below 11, averaging 13\frac13, while siny\sin y averages 2π0.6366\frac{2}{\pi} \approx 0.6366 over [0,π][0,\pi]. The product of those averages is exactly the average of the product here, which is another way of saying the integral separated.

Sign check: both factors are non-negative on this rectangle, so a positive answer was the only possibility.

Frequently asked questions

Can I always separate a double integral into two single integrals?

Only when the region is a rectangle with constant limits and the integrand is a product g(x)h(y)g(x)h(y). Both conditions matter. This integrand separates on a rectangle, but the very same x2sinyx^2 \sin y over a triangle does not.

Does the answer change if I integrate in x first?

No, it is still 23\frac23. The inner integral is 01x2sinydx=siny3\int_0^1 x^2 \sin y\,dx = \frac{\sin y}{3}, and then 0πsiny3dy=23\int_0^{\pi} \frac{\sin y}{3}\,dy = \frac{2}{3}.