computing integrals and want to approximate the integral by midpoint rule following the ideas for the double integralwe split this integral into one-dimensional integralszf xyd xyz/dz zd xd xy/dy zb zd zf zb xyz/dzdydx /dx for each of these one-dimensional integrals we apply the midpoint rulezf xyz/dz xyd zd ny xy/dy xd zb zd zf xyj / zb xyz/dzdydx xyzk /kd nx /dx zk hz khz yj hy hy nx xi / where starting with the formula for previous formulas gives rb rd rf xi hx ihx xyz/dzdydx and inserting the two zb zd zf xyzdzdydx hx hy hz nz nx kd hx ihx hy hy hz khz ( note that we may apply the ideas under direct derivation at the end of sect to arrive at ( directlydivide the domain into nx ny nz cells of volumes hx hy hz approximate by constantevaluated at the midpoint xi yj zk /in each celland sum the cell integrals hx hy hz xi yj zk