Multivariable calculus

Triple Integral of xyz over the Unit Cube

The triple integral of xyz over the unit cube, with x, y and z each running from 0 to 1, is 1/8, or 0.125. The integrand is one function of x times one of y times one of z, and the limits are constants, so the answer is the product of three separate integrals, each equal to 1/2.

f(x,y,z)=xyzf(x,y,z) = xyz
010101xyzdzdydx=18\int_0^1 \int_0^1 \int_0^1 xyz \,dz\,dy\,dx = \frac{1}{8}

Numerically 0.125000, confirmed by quadrature on every build.

Work from the inside out

A box has constant limits in every variable, so each stage of the iterated integral is an ordinary single variable integral. Start with the innermost one, in zz, and treat xx and yy as fixed numbers.

01xyzdz=xy[z22]01=xy2\int_0^1 xyz \,dz = xy\left[\frac{z^2}{2}\right]_0^1 = \frac{xy}{2}

That result no longer mentions zz. Feed it to the middle integral in yy, holding xx fixed, then to the outer integral in xx.

01xy2dy=x4,01x4dx=18\int_0^1 \frac{xy}{2} \,dy = \frac{x}{4}, \qquad \int_0^1 \frac{x}{4} \,dx = \frac{1}{8}

Every stage must eliminate its variable completely. If a zz survives into the yy integral, a limit was substituted wrongly.

The shortcut when the integrand factors

Because xyzxyz splits into a function of xx, a function of yy and a function of zz, and because every limit is a constant, the triple integral splits into a product of three one variable integrals.

010101xyzdzdydx=(01xdx)(01ydy)(01zdz)=121212\int_0^1 \int_0^1 \int_0^1 xyz \,dz\,dy\,dx = \left(\int_0^1 x \,dx\right)\left(\int_0^1 y \,dy\right)\left(\int_0^1 z \,dz\right) = \frac{1}{2}\cdot\frac{1}{2}\cdot\frac{1}{2}

Two conditions have to hold together, and both are easy to check before you start.

  • The integrand is a product with each factor using only one variable.
  • The region is a box, so no limit mentions another variable.
  • Fail either one and the product form is wrong, even if the integrand looks separable.

The mistake: splitting a region that is not a box

The product trick gets used on regions where it does not apply. If zz runs from 00 to xyxy instead of 00 to 11, the inner integral gives x3y32\frac{x^3y^3}{2}, which still carries xx and yy, so there is no clean factor of zdz\int z \,dz to pull out.

The other slip is dropping a factor. Students compute 01zdz=12\int_0^1 z \,dz = \frac{1}{2} once, then write 12\frac{1}{2} as the answer instead of cubing it. Three integrations means three factors, and each one has to appear.

A quick sanity check catches both. On the unit cube the volume is 11, and xyzxyz stays between 00 and 11 inside, so the answer has to land between 00 and 11. It does, at 0.1250.125.

Frequently asked questions

Does the order of integration change the answer?

No. On a box with constant limits, Fubini's theorem says all six orders give the same value, so dzdydxdz\,dy\,dx and dxdydzdx\,dy\,dz both give 18\frac{1}{8}. Pick whichever order makes the inner antiderivative easiest.

What does 1/8 mean here?

The cube has volume 11, so the average value of xyzxyz on it is 1/81=18\frac{1/8}{1} = \frac{1}{8}. If xyzxyz were a density in grams per cubic unit, the same number would be the total mass of the cube.