7.2: Integration of Bivariate Functions
- Page ID
- 55663
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)
( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\id}{\mathrm{id}}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\kernel}{\mathrm{null}\,}\)
\( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\)
\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\)
\( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)
\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)
\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)
\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vectorC}[1]{\textbf{#1}} \)
\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)
\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)
\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)Having interpolated bivariate functions, we now consider integration of bivariate functions. We wish to approximate \[I=\iint_{D} f(x, y) d x d y .\] Following the approach used to integrate univariate functions, we replace the function \(f\) by its interpolant and integrate the interpolant exactly.
(a) integral
(b) error
Figure 7.7: Midpoint rule.
We triangulate the domain \(D\) as shown in Figure \(2.15\) for constructing interpolants. Then, we approximate the integral as the sum of the contributions from the triangles, \(\left\{R_{i}\right\}_{i=1}^{N}\), i.e. \[I=\sum_{i=1}^{N} \iint_{R_{i}} f(x, y) d x d y \approx \sum_{i=1}^{N} \iint_{R_{i}}(\mathcal{I} f)(x, y) d x d y \equiv I_{h}\] We now consider two examples of integration rules.
Example 7.2.1 midpoint rule
The first rule is the midpoint rule based on the piecewise-constant, midpoint interpolant. Recall, the interpolant over \(R_{i}\) is defined by the function value at its centroid, \[(\mathcal{I} f)(\boldsymbol{x})=f\left(\tilde{\boldsymbol{x}}_{i}\right)=f\left(\boldsymbol{x}_{i}^{c}\right), \quad \forall \boldsymbol{x} \in R^{n}\] where the centroid is given by averaging the vertex coordinates, \[\tilde{\boldsymbol{x}}_{i}=\boldsymbol{x}_{i}^{c}=\frac{1}{3} \sum_{i=1}^{3} \boldsymbol{x}_{i}\] The integral is approximated by \[I_{h}=\sum_{i=1}^{N} \iint_{R_{i}}(\mathcal{I} f)(x, y) d x d y=\sum_{i=1}^{N} \iint_{R_{i}} f\left(\tilde{x}_{i}, \tilde{y}_{i}\right) d x d y=\sum_{i=1}^{N} A_{i} f\left(\tilde{x}_{i}, \tilde{y}_{i}\right)\] where we have used the fact \[\iint_{R_{i}} d x d y=A_{i}\] with \(A_{i}\) denoting the area of triangle \(R_{i}\). The integration process is shown pictorially in Figure \(7.7(\mathrm{a})\). Note that this is a generalization of the midpoint rule to two dimensions.
The error in the integration is bounded by \[e \leq C h^{2}\left\|\nabla^{2} f\right\|_{F}\]
(a) integral
(b) error
Figure 7.8: Trapezoidal rule.
Thus, the integration rule is second-order accurate. An example of error convergence is shown Figure 7.7(b), where the triangles are uniformly divided to produce a better approximation of the integral. The convergence plot confirms the second-order convergence of the scheme.
Similar to the midpoint rule in one dimension, the midpoint rule on a triangle also belongs in the family of Gauss quadratures. The quadrature points and weights are chosen optimally to achieve as high-order convergence as possible.
Example 7.2.2 trapezoidal rule
The trapezoidal-integration rule is based on the piecewise-linear interpolant. Because the integral of a linear function defined on a triangular patch is equal to the average of the function values at its vertices times the area of the triangle, the integral simplifies to \[I_{h}=\sum_{i=1}^{N}\left[\frac{1}{3} A_{i} \sum_{m=1}^{3} f\left(\bar{x}_{i}^{m}\right)\right]\] where \(\left\{\overline{\boldsymbol{x}}_{i}^{1}, \overline{\boldsymbol{x}}_{i}^{2}, \overline{\boldsymbol{x}}_{i}^{3}\right\}\) are the vertices of the triangle \(R_{i}\). The integration process is graphically shown in Figure 7.8(a).
The error in the integration is bounded by \[e \leq C h^{2}\left\|\nabla^{2} f\right\|_{F}\] The integration rule is second-order accurate, as confirmed by the convergence plot shown in Figure \(7.8(\mathrm{~b})\).
The integration rules extend to higher dimensions in principle by using interpolation rules for higher dimensions. However, the number of integration points increases as \((1 / h)^{d}\), where \(d\) is the physical dimension. The number of points increases exponentially in \(d\), and this is called the curse of dimensionality. An alternative is to use a integration process based on random numbers, which is discussed in the next unit.