Multivariable calculus

Triple Integral of x + y + z over a Box

The triple integral of x + y + z over the box where x runs 0 to 1, y runs 0 to 2 and z runs 0 to 3 equals 18. Linearity splits the sum into three integrals contributing 3, 6 and 9. The box has volume 6, so the average value of x + y + z on it is 3.

f(x,y,z)=x+y+zf(x,y,z) = x + y + z
010203(x+y+z)dzdydx=18\int_0^1 \int_0^2 \int_0^3 (x + y + z) \,dz\,dy\,dx = 18

Numerically 18.000000, confirmed by quadrature on every build.

Split the sum, then restore the missing lengths

An integral of a sum is the sum of the integrals, so handle xx, yy and zz one term at a time. The point that decides the answer is that each term still gets integrated over all three variables, so the two idle directions contribute their lengths as plain factors.

BxdV=(01xdx)(2)(3)=126=3\iiint_B x \,dV = \left(\int_0^1 x \,dx\right)(2)(3) = \frac{1}{2}\cdot 6 = 3
BydV=(1)(02ydy)(3)=23=6,BzdV=(1)(2)(03zdz)=292=9\iiint_B y \,dV = (1)\left(\int_0^2 y \,dy\right)(3) = 2 \cdot 3 = 6, \qquad \iiint_B z \,dV = (1)(2)\left(\int_0^3 z \,dz\right) = 2 \cdot \frac{9}{2} = 9

Adding the three gives 3+6+9=183 + 6 + 9 = 18.

The centre point check

The integrand is linear, so its average over the box is exactly its value at the centre. The centre of this box is (12,1,32)\left(\tfrac{1}{2}, 1, \tfrac{3}{2}\right), where x+y+z=3x + y + z = 3.

B(x+y+z)dV=3volume=3(1)(2)(3)=18\iiint_B (x + y + z) \,dV = 3 \cdot \text{volume} = 3 \cdot (1)(2)(3) = 18

This check only works for integrands that are linear in every variable. A term like x2x^2 is curved, so its average over an interval sits above the value at the midpoint and the shortcut fails.

The mistake: forgetting the other two directions

The common wrong answer is 12+2+92=7\frac{1}{2} + 2 + \frac{9}{2} = 7, from computing 01xdx\int_0^1 x \,dx, 02ydy\int_0^2 y \,dy and 03zdz\int_0^3 z \,dz and adding them. That treats each term as a single integral instead of a triple one.

Integrating xx over the box means summing xx over every point of a solid, not over a segment. The yy and zz integrations of a term with no yy or zz in it are not free: each contributes the length of that edge.

  • BxdV\iiint_B x \,dV picks up the factor (2)(3)=6(2)(3) = 6 from the yy and zz edges.
  • BydV\iiint_B y \,dV picks up (1)(3)=3(1)(3) = 3 from the xx and zz edges.
  • BzdV\iiint_B z \,dV picks up (1)(2)=2(1)(2) = 2 from the xx and yy edges.

Frequently asked questions

Why is the answer not the same as the volume?

The volume is B1dV=6\iiint_B 1 \,dV = 6, which is what you get when the integrand is the constant 11. Here the integrand grows from 00 at one corner to 66 at the opposite corner, averaging 33, so the integral is 33 times the volume.

Does swapping the box edges change the value?

No, and the reason is worth knowing. For a box with edges aa, bb and cc measured from the origin, the integral is the volume times a+b+c2\frac{a + b + c}{2}, and that expression does not care which edge is which. Running xx from 00 to 33 and zz from 00 to 11 still gives 1818. Changing an edge length is what moves the answer: stretching the zz edge to 66 gives 121+2+62=5412 \cdot \frac{1 + 2 + 6}{2} = 54.