\section{Multiple Integrals}
\begin{frame}
\frametitle{Multiple Integrals}
Consider the double integral 
\begin{eqnarray*}
    \int \int_R f(x,y) dA,
\end{eqnarray*}
where $R = \{ (x,y) | a \leq x \leq b, c \leq y \leq d \}$.

To apply the Composite Simpson's rule, we partition $[a, b]$ and $[c,d]$ with evenly spaced mesh points $x_0, x_1, \cdots, x_n$ and $y_0, y_1, \cdots, y_m$, respectively. These subdivisions determine step sizes
\begin{eqnarray*}
    \triangle x = \frac{b-a}{n} \quad \mbox{and} \quad \triangle y = \frac{d-c}{m}.
\end{eqnarray*}
Writing the double integral as
\begin{eqnarray*}
    \int \int_R f(x,y) dA = \int_a^b \left( \int_c^d f(x,y) dy \right) dx,
\end{eqnarray*}
\end{frame}

\begin{frame}
we first use the Composite Simpson's rule to approximate
\begin{eqnarray*}
    \int_c^d f(x,y) dy,
\end{eqnarray*} 
treating $x$ as a constant. Let
\begin{eqnarray*}
    y_j = c + j \triangle y, \ \mbox{ for } j = 0, 1, \ldots, m.
\end{eqnarray*}
Then
\begin{eqnarray*}
    \int_c^d f(x,y) dy &=& \frac{\triangle y}{3} \left[ f(x, y_0) + 2 \sum_{j=1}^{m/2-1} f(x, y_{2j}) \right. \\
    && \left. + 4 \sum_{j=1}^{m/2} f(x, y_{2j-1}) + f(x, y_m) \right] \\
    && - \frac{(d-c) (\triangle y)^4}{180} \frac{\partial^4 f(x,\mu)}{\partial y^4},
\end{eqnarray*}
for some $\mu \in (c,d)$. Thus,
\end{frame}

\begin{frame}
\begin{eqnarray*}
    \int_a^b \int_c^d f(x,y) dy dx &=& \frac{\triangle y}{3} \left[ \int_a^b f(x, y_0) dx + 2 \sum_{j=1}^{m/2-1} \int_a^b f(x, y_{2j}) dx \right. \\
    && \left. + 4 \sum_{j=1}^{m/2} \int_a^b f(x, y_{2j-1}) dx + \int_a^b f(x, y_m) dx \right] \\
    && - \frac{(d-c) (\triangle y)^4}{180} \int_a^b \frac{\partial^4 f(x,\mu)}{\partial y^4} dx.
\end{eqnarray*}
Let
\begin{eqnarray*}
    x_i = a + i \triangle x, \quad \mbox{for} \quad i = 0, 1, \ldots, n.
\end{eqnarray*}
\end{frame}

\begin{frame}
Then for each $j = 0, 1, \ldots, m$, we have
\begin{eqnarray*}
    \int_a^b f(x, y_j) dx &=& \frac{\triangle x}{3} \left[ f(x_0, y_j) + 2 \sum_{i=1}^{n/2-1} f(x_{2i},y_j) \right. \\
    && \left. + 4 \sum_{i=1}^{n/2} f(x_{2i-1},y_j) + f(x_n, y_j) \right] \\
    && - \frac{(b-a) (\triangle x)^4}{180} \frac{\partial^4 f}{\partial x^4}(\zeta_j, y_j),
\end{eqnarray*}


for some $\zeta_j \in (a,b)$. The resulting approximation has the form
\begin{eqnarray*}
    \int_a^b \int_c^d f(x,y) dy dx \approx \frac{\triangle x \triangle y}{9} \left( S_1 + S_2 + S_3 + S_4 \right),
\end{eqnarray*}
where
\end{frame}

\begin{frame}
\begin{eqnarray*}
    S_1 = f(x_0,y_0) + 2 \sum_{i=1}^{n/2-1} f(x_{2i},y_0)   
            + 4 \sum_{i=1}^{n/2} f(x_{2i-1},y_0) + f(x_n, y_0), 
\end{eqnarray*}
\begin{eqnarray*}
    S_2 &=& 2 \left[ \sum_{j=1}^{m/2-1} f(x_0,y_{2j}) + 2 \sum_{j=1}^{m/2-1} \sum_{i=1}^{n/2-1} f(x_{2i},y_{2j}) \right. \\
    && \left. + 4 \sum_{j=1}^{m/2-1} \sum_{i=1}^{n/2} f(x_{2i-1},y_{2j}) + \sum_{j=1}^{m/2-1} f(x_n, y_{2j}) \right], \\
    S_3 &=& 4 \left[ \sum_{j=1}^{m/2} f(x_0,y_{2j-1}) + 2 \sum_{j=1}^{m/2} \sum_{i=1}^{n/2-1} f(x_{2i},y_{2j-1}) \right. \\
    && \left. + 4 \sum_{j=1}^{m/2} \sum_{i=1}^{n/2} f(x_{2i-1},y_{2j-1}) + \sum_{j=1}^{m/2} f(x_n, y_{2j-1}) \right],
\end{eqnarray*}
\end{frame}

\begin{frame}
\begin{eqnarray*}
    S_4 &=& f(x_0,y_m) + 2 \sum_{i=1}^{n/2-1} f(x_{2i},y_m)  \\
    &&       + 4 \sum_{i=1}^{n/2} f(x_{2i-1},y_m) + f(x_n, y_m).
\end{eqnarray*}

If $\partial^4 f / \partial x^4$ and $\partial^4 f / \partial y^4$ are continuous, then the error term $E$ has the form
\begin{eqnarray*}
    E = - \frac{(b-a)(d-c)}{180} \left[ (\triangle x)^4 \frac{\partial^4 f}{\partial x^4}(\tilde{\eta}, \tilde{\mu}) + (\triangle y)^4 \frac{\partial^4 f}{\partial y^4}(\hat{\eta}, \hat{\mu}) \right],
\end{eqnarray*} 
for some $(\tilde{\eta}, \tilde{\mu})$ and $(\hat{\eta}, \hat{\mu})$ in $R$.
\end{frame}