Multivariable calculus

Triple Integral of xyz + x^2 over a Cube

Over the cube running from -1 to 1 in x, y and z, the triple integral of xyz plus x squared equals 8/3, about 2.666667. The xyz term is odd in x, so it integrates to zero over the symmetric interval, and the whole answer comes from the x squared term.

f(x,y,z)=xyz+x2f(x,y,z) = xyz + x^2
111111(xyz+x2)dzdydx=83\int_{-1}^{1} \int_{-1}^{1} \int_{-1}^{1} \left(xyz + x^2\right) \,dz\,dy\,dx = \frac{8}{3}

Numerically 2.666667, confirmed by quadrature on every build.

Use symmetry before you use calculus

The region is symmetric about every coordinate plane, so check each term for odd symmetry first. A term that changes sign when one variable flips, over an interval symmetric about zero, integrates to zero.

Replacing xx by x-x turns xyzxyz into xyz-xyz, so that term is odd in xx and contributes nothing. It is also odd in yy and in zz, so it dies three times over.

CxyzdV=(11xdx)(11ydy)(11zdz)=000=0\iiint_C xyz \,dV = \left(\int_{-1}^{1} x \,dx\right)\left(\int_{-1}^{1} y \,dy\right)\left(\int_{-1}^{1} z \,dz\right) = 0 \cdot 0 \cdot 0 = 0

The surviving term is even in xx and free of yy and zz, so it separates into one real integral times two edge lengths of 22.

Cx2dV=(11x2dx)(2)(2)=234=83\iiint_C x^2 \,dV = \left(\int_{-1}^{1} x^2 \,dx\right)(2)(2) = \frac{2}{3}\cdot 4 = \frac{8}{3}

The mistake: assuming symmetry kills everything

Having watched xyzxyz vanish, students often declare the whole integral zero. Symmetry is a term by term test, not a verdict on the integrand as a whole, and x2x^2 is even, so it survives with everything it has.

The opposite error is refusing to use symmetry at all and grinding through the iterated integral. That works, and the xyzxyz term actually dies at the first stage, since 11xyzdz=xy[z22]11=0\int_{-1}^{1} xyz \,dz = xy\left[\frac{z^2}{2}\right]_{-1}^{1} = 0. Symmetry tells you that before you write anything down, and it keeps working on regions like a ball where the antiderivatives are far less pleasant.

  • Odd in at least one variable, over a symmetric interval in that variable: the term integrates to zero.
  • Even in every variable, or free of some variables: the term survives and must be computed.
  • The test needs the interval to be symmetric about zero. Over [0,1][0, 1] the term xyzxyz contributes 18\frac{1}{8}, not 00.

Reading the answer

The cube has volume 88, so the average value of xyz+x2xyz + x^2 on it is 8/38=13\frac{8/3}{8} = \frac{1}{3}. That matches the average of x2x^2 alone on [1,1][-1, 1], which is 13\frac{1}{3}, confirming that the xyzxyz term contributed nothing to the mean.

The integrand itself does take negative values, on the octants where xyz<0xyz < 0 and x2x^2 is small. A positive total does not mean a positive integrand, only that the positive regions win.

Frequently asked questions

Does the xyz term vanish over any box?

No, only over boxes symmetric about zero in at least one variable. Over [0,1]3[0,1]^3 that term gives 18\frac{1}{8}, and over [1,1]×[0,1]×[0,1][-1,1]\times[0,1]\times[0,1] it gives 00 because the xx edge alone is symmetric.

Why is the x^2 contribution 8/3 rather than 2/3?

11x2dx=23\int_{-1}^{1} x^2 \,dx = \frac{2}{3} is only the xx stage. The yy and zz stages each multiply by the edge length 22, so the box integral is 234=83\frac{2}{3}\cdot 4 = \frac{8}{3}.