To approximate the volume with 8 boxes, we have to split up the interval of integration for each variable into 2 subintervals, [0, 1] and [1, 2]. Each box will have midpoint [tex]m_{i,j,k}[/tex] that is one of all the possible 3-tuples with coordinates either 1/2 or 3/2. That is, we're sampling [tex]f(x,y,z)=\cos(xyz)[/tex] at the 8 points,
(1/2, 1/2, 1/2)
(1/2, 1/2, 3/2)
(1/2, 3/2, 1/2)
(3/2, 1/2, 1/2)
(1/2, 3/2, 3/2)
(3/2, 1/2, 3/2)
(3/2, 3/2, 1/2)
(3/2, 3/2, 3/2)
which are captured by the sequence
[tex]m_{i,j,k}=\left(\dfrac{2i-1}2,\dfrac{2j-1}2,\dfrac{2k-1}2\right)[/tex]
with each of [tex]i,j,k[/tex] being either 1 or 2.
Then the integral of [tex]f(x,y,z)[/tex] over [tex]B[/tex] is approximated by the Riemann sum,
[tex]\displaystyle\iiint_B\cos(xyz)\,\mathrm dV\approx\sum_{i=1}^2\sum_{j=1}^2\sum_{k=1}^2\cos m_{i,j,k}\left(\frac{2-0}2\right)^2[/tex]
[tex]=\displaystyle\sum_{i=1}^2\sum_{j=1}^2\sum_{k=1}^2\cos\frac{(2i-1)(2j-1)(2k-1)}8[/tex]
[tex]=\cos\dfrac18+3\cos\dfrac38+3\cos\dfrac98+\cos\dfrac{27}8\approx\boxed{4.104}[/tex]
(compare to the actual value of about 4.159)