151x Filetype PDF File size 0.15 MB Source: www.math.usm.edu
Jim Lambers MAT460/560 Fall Semeseter 2009-10 Lecture 32 Notes These notes correspond to Section 4.8 in the text. Multiple Integrals Double Integrals As many problems in scientific computing involve two-dimensional domains, it is essential to be able to compute integrals over such domains. Such integrals can be evaluated using the following strategies: ∙ If a two-dimensional domain Ω can be decomposed into rectangles, then the integral of a function f(x,y) over Ω can be computed by evaluating integrals of the form I(f) = ZabZcdf(x,y)dydx. Then, to evaluate I(f), one can use a Cartesian product rule, whose nodes and weights are obtained by combining one-dimensional quadrature rules that are applied to each dimension. For example, if functions of x are integrated along the line between x = a and x = b using nodes x and weights w , for i = 1,...,n, and if functions of y are integrated along the line i i between y = c and y = d using nodes y and weights z , for i = 1,...,m, then the resulting i i Cartesian product rule n m Q (f)=XXf(x,y)wz n,m i j i j i=1 j=1 has nodes (x ,y ) and corresponding weights w z for i = 1,...,n and j = 1,...,m. i j i j ∙ If the domain Ω can be described as the region between two curves y (x) and y (x) for 1 2 x∈[a,b], then we can write Z Z I(f) = f(x,y)dA Ω as an iterated integral Z Z b y2(x) I(f) = f(x,y)dydx a y (x) 1 1 which can be evaluated by applying a one-dimensional quadrature rule to compute the outer integral Z b I(f) = g(x)dx a where g(x) is evaluated by using a one-dimensional quadrature rule to compute the inner integral Z y2(x) g(x) = f(x,y)dy. y (x) 1 ∙ For various simple regions such as triangles, there exist cubature rules that are not combi- nations of one-dimensional quadrature rules. Cubature rules are more direct generalizations of quadrature rules, in that they evaluate the integrand at selected nodes and use weights determined by the geometry of the domain and the placement of the nodes. It should be noted that all of these strategies apply to certain special cases. The first algorithm capable of integrating over a general two-dimensional domain was developed by Lambers and Rice. This algorithm combines the second and third strategies described above, decomposing the domain into subdomains that are either triangles or regions between two curves. Example We will use the Composite Trapezoidal Rule with m = n = 2 to evaluate the double integral Z Z 1/2 1/2 ey−xdydx. 0 0 The Composite Trapezoidal Rule with n = 2 subintervals is Z b ℎ a+b b −a a f(x)dx ≈ 2 f(a)+2f 2 +f(b) , ℎ= n . If a = 0 and b = 1/2, then ℎ = (1/2−0)/2 = 1/4 and this simplifies to Z 1/2f(x)dx ≈ 1[f(0)+2f(1/4)+f(1/2)]. 0 8 Wefirst use this rule to evaluate the “single” integral Z01/2g(x)dx where Z 1 g(x) = ey−xdy. 0 2 This yields Z 1/2Z 1/2 y−x Z 1/2 e dydx = g(x)dx 0 0 0 ≈ 1[g(0)+2g(1/4)+g(1/2)] 8 "Z Z Z # 1 1/2 1/2 1/2 y−0 y−1/4 y−1/2 ≈ 8 0 e dy+2 0 e dy + 0 e dy . Now, to evaluate each of these integrals, we use the Composite Trapezoidal Rule in the y-direction with m = 2. If we let k denote the step size in the y-direction, we have k = (1/2−0)/2 = 1/4, and therefore we have Z 1/2Z 1/2 y−x 1 "Z 1/2 y−0 Z 1/2 y−1/4 Z 1/2 y−1/2 # 0 0 e dydx ≈ 8 0 e dy +2 0 e dy + 0 e dy 1 1 h 0−0 1/4−0 1/2−0i ≈ 8 8 e +2e +e + 1 h 0−1/4 1/4−1/4 1/2−1/4i 28 e +2e +e + 1 h 0−1/2 1/4−1/2 1/2−1/2i 8 e +2e +e 1 h 0 1/4 1/2i ≈ 64 e +2e +e + 1 h −1/4 0 1/4i 32 e +2e +e + 1 h −1/2 −1/4 0i 64 e +2e +e ≈ 3e0+ 1e−1/4+ 1 e−1/2+ 1 e1/4+ 1 e1/2 32 16 64 16 64 ≈ 0.25791494889765. The exact value, to 15 digits, is 0.255251930412762. The error is 2.66 × 10−3, which is to be expected due to the use of few subintervals, and the fact that the Composite Trapezoidal Rule is only second-order-accurate. □ ExampleWewillusetheComposite Simpson’s Rule with n = 2 and m = 4 to evaluate the double integral Z Z 1 2x 2 3 x +y dydx. 0 x In this case, the domain of integration described by the limits is not a rectangle, but a triangle defined by the lines y = x, y = 2x, and x = 1. The Composite Simpson’s Rule with n = 2 3 subintervals is Z b ℎ a+b b −a a f(x)dx ≈ 3 f(a)+4f 2 +f(b) , ℎ= n . If a = 0 and b = 1, then ℎ = (1 − 0)/2 = 1/2, and this simplifies to Z 1/2f(x)dx ≈ 1[f(0)+4f(1/2)+f(1)]. 0 6 Wefirst use this rule to evaluate the “single” integral Z 1g(x)dx 0 where Z 2x 2 3 g(x) = x +y dy. x This yields Z 1Z 2xx2 +y3dydx = Z 1g(x)dx 0 x 0 ≈ 1[g(0)+4g(1/2)+g(1)] 6 "Z Z Z # 1 0 1 1 2 2 2 3 3 2 3 ≈ 6 0 0 +y dy+4 1/2 2 +y dy+ 1 1 +y dy . The first integral will be zero, since the limits of integration are equal. To evaluate the second and third integrals, we use the Composite Simpson’s Rule in the y-direction with m = 4. If we let k denote the step size in the y-direction, we have k = (2x − x)/4 = x/4, and therefore we have k = 1/8 for the second integral and k = 1/4 for the third. This yields Z 1Z 2x 2 3 1 " Z 1 12 3 Z 2 2 3 # 0 x x +y dydx ≈ 6 4 1/2 2 +y dy+ 1 1 +y dy ( " ! ! ! 1 1 1 1 3 1 5 3 1 3 3 ≈ 6 424 4 + 2 +4 4+ 8 +2 4+ 4 + ! # " ! 1 7 3 1 1 5 3 4 + + +13 + 1+13 +4 1+ + 4 8 4 12 4 ! ! #) 3 3 7 3 2 1+ +4 1+ + 1+23 2 4 ≈ 1.03125. 4
no reviews yet
Please Login to review.