Double Integrals over Rectangles

In the same way as we can measure the area under a curve with a definite integral of one variable, this idea can be extended to measure the volume under a surface. To do so, we will consider a function of two variables defined on a closed rectangle

$$
R = [a, b] \times [c, d] = \{(x,y)\in\mathbb{R}\ |\ a \leq x \leq b, c\leq y \leq d \}.
$$

The main idea is to subdivide $R$ into subrectangles. Once done, we can calculate the height of the subrectangle by evaluating $f(x, y)$ with a sample point that falls in the subrectangle. There are many different methods for selecting such a point. The simplest case is if the point is in the upper right corner of the subrectangle. 

To subdivide $R$ we define $\Delta x = (b - a) / m$, and $\Delta y = (d - c) / n$. The area of each subrectangle is $\Delta A = \Delta x \Delta y$.

Definition. The double integral of $f$ over the rectangle $R$ is
$$
\iint\limits_R f(x, y)\ dA = \lim\limits_{m,\ n\rightarrow\infty} \sum\limits_{i=1}^m \sum\limits_{j=1}^n f(x_i, y_j)\ \Delta A  \tag{1} \label{double-integral}
$$
if this limit exists.

Note that if $f(x, y)$ is a positive function for all values $x, y$ within the region $R$, then we can interpret the integral as the volume under the surface
$$
V = \iint\limits_R f(x, y)\ dA.
$$

The sum in the definition $\eqref{double-integral}$,
$$
\sum\limits_{i=1}^m\sum\limits_{j=1}^n f(x_i, y_j)\ \Delta A
$$
is called a double Riemann sum and is used to approximate the value of the double integral. 

Iterated integrals

The process of where we partially differentiate a function with respect to different variables, can be reversed, which is a procedure called partial integration with respect to a variable.

Fubini's Theorem. If $f$ is continuous on the rectangle $R$, then
$$
\iint\limits_R f(x, y)\ dA = \int_a^b \int_c^d f(x, y)\ dy\ dx = \int_c^d \int_a^b f(x, y)\ dx\ dy. \label{fubini} \tag{2}
$$

Average value

We define the average value of a function $f$ of two variables on a rectangle $R$ to be
$$
f_{\text{ave}} = \dfrac{1}{A(R)} \iint\limits_R f(x, y)\ dA. \tag{3} \label{average}
$$

Example

What we have looked at so far is pretty abstract. Let's make it more concrete with an example. Suppose we want to solve the integral
$$
\int_1^4 \int_1^2\left( \dfrac{x}{y} + \dfrac{y}{x}\right)\ dy\ dx.
$$

We do this by setting $x$ as a fixed value and integrating with respect to $y$, giving
$$
\int_1^4 \left[x\log y + \dfrac{1}{2} x^{-1} y^2 \right]_{y=1}^{y=2}\ dx,
$$

plug in in the values for $y$ (omitting the algebra)

$$
\int_1^4 \left ( x \log 2 + \dfrac{3}{2} x^{-1} \right )\ dx,
$$

integrating with respect to $x$

$$
\left[ \dfrac{1}{2} x^2 \cdot \log 2 + \dfrac{3}{2} x^{-1} \right]_{x=1}^{x=2},
$$

and finally plug in the values for $x$, giving us the final answer

$$
\dfrac{15}{2}\log 2 - \dfrac{3}{2} \log 4.
$$