Multivariable calculus
Double Integral of x^2 + y^2 Over [0,1] by [0,2]
The double integral of x squared plus y squared over the rectangle x from 0 to 1 and y from 0 to 2 equals 10/3, about 3.3333. Integrating in y first gives 2 x squared plus 8/3, and integrating that from x = 0 to x = 1 gives 2/3 plus 8/3, which is 10/3.
Numerically 3.333333, confirmed by quadrature on every build.
The inner integral treats x as a number
Freeze and integrate in . The term contains no , so it behaves exactly as the number 7 would and integrates to .
Nothing there involves any more, which is the check that the inner step is complete. Finish in .
A sum splits by linearity, but it does not factor
Linearity lets you break the integral into one piece per term, and each of those pieces does factor, because each is a function of one variable times the constant 1.
Those two constant integrals are the width and the height of the rectangle. They look like they do nothing, and skipping them is exactly how the wrong answer below appears.
The mistake: forgetting the length of the other side
The tempting wrong answer is . Each single integral sweeps only one direction, but the term still has to be summed across every from 0 to 2, which multiplies it by that length.
- : the integral times the width.
- : the integral times the width.
- The missing factor is always the constant integral, so it is the one to write down first.
A size check will not rescue you here. The integrand runs from 0 at the origin to at the far corner, so the wrong 3 and the right are both perfectly plausible totals. Test the recipe instead. Feed it , taking and : it returns , while the integral of 1 over the rectangle is its area, 2. A rule that cannot find the area of a rectangle is not a rule.
Frequently asked questions
Why is the answer not just the sum of the two single integrals?
Because each term still has to be integrated over the other variable, which multiplies it by the length of that side. becomes over this rectangle, since the side has length 2.
What is the average value on the rectangle?
Divide by the area: . The integrand equals along the circle , which does cut through the rectangle, so the average is attained inside it.