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.
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 , and 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.
Adding the three gives .
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 , where .
This check only works for integrands that are linear in every variable. A term like 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 , from computing , and and adding them. That treats each term as a single integral instead of a triple one.
Integrating over the box means summing over every point of a solid, not over a segment. The and integrations of a term with no or in it are not free: each contributes the length of that edge.
- picks up the factor from the and edges.
- picks up from the and edges.
- picks up from the and edges.
Frequently asked questions
Why is the answer not the same as the volume?
The volume is , which is what you get when the integrand is the constant . Here the integrand grows from at one corner to at the opposite corner, averaging , so the integral is times the volume.
Does swapping the box edges change the value?
No, and the reason is worth knowing. For a box with edges , and measured from the origin, the integral is the volume times , and that expression does not care which edge is which. Running from to and from to still gives . Changing an edge length is what moves the answer: stretching the edge to gives .