The algorithm above is to approximate an integral over a region that is not a rectangular one. It is straightforward to apply the algorithm to a special case, i.e., a rectangular region, by setting c(x) and d(x) equal to constants c and d, respectively (i.e., I = ∫ab∫cd f(x, y) dydx).
Example: ∫1.42.0∫1.01.5 ln(x + 2y) dydx ≈ 0.42955。
沒有留言:
張貼留言