Multivariable calculus
Triple Integral of z sin x cos y over a Box
The triple integral of z sin(x) cos(y), with x and y from 0 to pi/2 and z from 0 to 2, equals 2. The integrand separates into three one variable pieces: the integral of sin(x) is 1, the integral of cos(y) is 1, and the integral of z from 0 to 2 is 2.
Numerically 2.000000, confirmed by quadrature on every build.
Separate first, then do three easy integrals
Each factor uses exactly one variable and all six limits are constants, so the triple integral is a product. Group the factors with their own limits before integrating anything.
The first factor is . The second is . The third is .
Both trigonometric factors run over a quarter period where the function is non negative, which is why each comes out to exactly .
The mistake: losing the sign on the sine integral
The antiderivative of is , and the leading minus sign gets dropped constantly. Writing turns the answer into , which cannot be right for an integrand that is non negative on the whole box.
Two habits prevent it.
- Differentiate your antiderivative back before substituting limits: the derivative of is , so the sign is right.
- Check the sign of the integrand over the region first. Here , and throughout, so the answer must be positive.
- Keep the limits in radians. A calculator left in degree mode reads the upper limit as degrees, a sliver of the quarter turn you wanted, and returns about instead of .
What changes if the box changes
Push the limit out to and the cosine factor becomes , so the whole triple integral collapses to zero. The positive part of on exactly cancels the negative part on .
That is worth noticing before doing any work, because a factor of zero makes the other two integrals irrelevant. With a separable integrand, one vanishing factor sets the whole answer to zero.
Frequently asked questions
Why is the value exactly 2 and not something with pi in it?
The appears only in the limits, and and evaluated at and give the integers and . The only non integer input cancels itself out, leaving .
Does the order dz dy dx matter here?
No. The limits are constants and the integrand factors, so all six orders give . Order matters when a limit depends on another variable, which never happens on a box.