Multivariable calculus
Double Integral of x + y Over the Unit Triangle
The double integral of x + y over the triangle bounded by x = 0, y = 0 and x + y = 1 equals 1/3. The inner integral in y collapses to (1 - x^2)/2, and integrating that from 0 to 1 gives 1/3. By symmetry, x and y each contribute 1/6.
Numerically 0.333333, confirmed by quadrature on every build.
Set up the slices, then push through the algebra
The slanted edge is . Solving for the top of a vertical slice gives , so for in the slice runs from up to .
Expand before integrating, because the terms cancel in a way that is easy to miss.
The mistake: reading (1-x)^2 as 1 - x^2
Almost every wrong answer on this problem comes from the squared binomial. , and the middle term is not optional. Dropping it leaves the inner value and a final answer of instead of .
You cannot catch this at the endpoints, since both versions happen to agree at and . Test the middle instead. At the slice is , so the inner integral is computable by hand.
The correct formula gives . The faulty one gives . One interior test point separates them.
- Expand in full, every time.
- Test the inner result at an interior value, not only at the ends.
- The inner result must vanish at , where the slice has zero length.
A symmetry check worth knowing
Swapping and maps this triangle onto itself, so and have to be equal. Each is , and they must add to the answer.
The triangle has area , so the average value of on it is . That agrees with the centroid, which sits at , and .
Frequently asked questions
Why is the average not 1/2, the midpoint of the values 0 and 1?
Because those values are not spread evenly over the triangle. The level set is a segment of length inside the region, so larger values of occupy more area. Weighting by that length gives .
Can I do this integral in the order dx dy?
Yes, and by symmetry the setup is the mirror image: , which again gives . Neither order is harder here, because the region and the integrand are both symmetric in and .