Last time | Next time |
Last time we derived the following mask, based on using analogues of the right- and left-rectangle methods for bivariate functions.
What would be the weight on each depth if we used all four possible methods, and then averaged them?
1 | 2 | 2 | 2 | 2 | 2 | 1 |
2 | 4 | 4 | 4 | 4 | 4 | 2 |
2 | 4 | 4 | 4 | 4 | 4 | 2 |
2 | 4 | 4 | 4 | 4 | 4 | 2 |
1 | 2 | 2 | 2 | 2 | 2 | 1 |
Actually I haven't averaged yet: this is the sum of the four methods, but it allows us to see the relative weights better (no fractions). For your calculation of "volume", you'd divide these weights by 4. We see that interior points will get "full value" (=1), whereas the border points are weighted only half an interior point (although the corners get only a fourth the weight). Hopefully these values make intuitive sense to you.
We'll see that we get the same thing by using even quadratic functions on the grid. This is the simple generalization of the trapezoidal rule provided by Mathematica's InterpolationOrder->1 rule.
Take a look at your second worksheet. [Reminder: the functions $z_1$ and $z_2$ should be functions of $y$.]
By the way, that interpolating function is a minimal surface: among all surfaces fitting the four points, it has minimal curvature (soap bubbles form minimal surfaces).
One author (and mathematician) had this to say about generalizing univariate methods beyond two dimensions:
"In more than two dimensions, generalizations of quadrature rules are not practical, since the number of function evaluations needed to attain sufficient accuracy grows very rapidly as the number of dimensions increases. An alternative is the Monte Carlo method, which samples the integrand at $n$ randomly selected points and attempts to compute the mean value of the integrand on the entire domain. The method converges rather slowly but its convergence rate depends only on $n$, not the number of dimensions."
But that author was evidently not thinking about the need to do integrals on discrete data, not generated by a function. That's a little different issue, because we can't refine the mesh by taking more function values -- it is what it is (the Popeye rule).
What do you think of a method called the "Monte Carlo" method?! Sounds a little risky?:)
We'll do some examples from section 15.2, then see how to do integrals on more general regions.
It's no big deal to turn a general region into such regions -- the question is whether you need to.
The essential point is this: we're really trying to do is parameterize the boundaries in a sensible way, and, if we can, then we can go back to Fubini's theorem and do twice as much work as we did when we did univariate integrals.
Take a look at Figure 18, p. 1018. We can break it down into a pair of these types of regions, and move ahead....
Examples (15.3):