How to use the midpoint rule for triple integrals

The midpoint rule lets us estimate a triple integral from a finite set of function values. We divide the region into small boxes and evaluate the function at the center of each one. Let’s work through the process on a unit cube.

Divide the box into equal subboxes

For a rectangular box, divide the x, y, and z intervals into m, n, and p equal pieces, respectively. Call the widths Δx, Δy, and Δz. The grid contains mnp subboxes, each with volume

ΔV=ΔxΔyΔz

Let cijk be the center of the subbox in positions i, j, and k. Evaluate f at each center, add those values, and multiply by the common subbox volume.

I=∫∫∫Bf(x,y,z)dVI≈ΔV∑i=1m∑j=1n∑k=1pf(cijk)

Split the unit cube into eight pieces

Estimate the integral of f(x,y,z)=sin(2xyz) over B=[0,1]×[0,1]×[0,1]. Divide each side in half to get 2×2×2=8 subcubes. Their common volume is

ΔV=(12)3=18

On each axis, the midpoint of the lower half is 1/4 and the midpoint of the upper half is 3/4. Choose one of those two coordinates on each axis to get a subcube center.

Eight subcube centers in two layersEach square shows four centers. The x and y coordinates take values one quarter and three quarters. The first layer has z one quarter, and the second has z three quarters.
Each dot is the center of a subcube. The two layers show all eight sample points.
Centers and sine arguments for the eight subcubes
BoxCenterSine argument
1(14,14,14)132
2(34,14,14)332
3(14,34,14)332
4(34,34,14)932
5(14,14,34)332
6(34,14,34)932
7(14,34,34)932
8(34,34,34)2732

Evaluate the function and add the contributions

At the first center, 2(1/4)(1/4)(1/4)=1/32. The other centers give the arguments shown in the table. Group the equal arguments so that each function value is counted once for every subcube that uses it.

S=sin(1/32)+3sin(3/32)+3sin(9/32)+sin(27/32)I≈18S≈0.2365

The sine values use radians. If f represents density, the estimate is the mass within the cube. The cube itself has geometric volume 1.