# Fubini's Theorem and Evaluating Double Integrals over Rectangles

We have just looked at Iterated Integrals over rectangles. You might now wonder how iterated integrals relate to double integrals that we looked are earlier. Fubini's Theorem gives us a relationship between double integrals and these iterated integrals.

Theorem 1 (Fubini's Theorem): Let $z = f(x, y)$ be a two variable real-valued function. If $f$ is continuous on the rectangle $R = [a, b] \times [c, d]$ then the double integral over $R$ can be computed as an iterated integrals and $\iint_{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$. |

Fubini's Theorem is critically important as it gives us a method to evaluate double integrals over rectangles without having to use the definition of a double integral directly.

Now the following corollary will give us another method for evaluating double integrals over a rectangle $R = [a, b] \times [c, d]$ provided that $f$ can be written as a product of a function in terms of $x$ and a function in terms of $y$.

Corollary 1: Let $z = f(x, y)$ be a two variable real-valued function. If $f(x, y) = g(x) h(y)$ and $f$ and $R = [a, b] \times [c, d]$ then $\iint_R f(x, y) \: dA = \iint_R g(x) h(y) \: dA = \left [ \int_a^b g(x) \: dx \right ] \left [ \int_c^d h(y) \: dy \right ]$. |

Before we look at some examples of solving some double integrals, we should again be reminded of the following techniques of integration in single variable calculus that we might find useful:

- Integration by Parts $\int u \: dv = uv - \int v \: du$.

It is also important to note that when evaluating iterated integrals, we can choose whether we want to integrate with respect to $x$ or $y$ first respectively as we saw on the Evaluating Iterated Integrals Over Rectangles page. It is always important to acknowledge that partial integrating with respect to a certain variable first may be easier than the other variable.

Now let's look at some examples of evaluating double integrals over rectangles.

## Example 1

**Evaluate $\iint_R xy + y^2 \: dA$ where $R = [0, 1] \times [1, 2]$.**

By Fubini's Theorem we have that:

(1)Now let's evaluate the inner integral $\int_1^2 xy + y^2 \: dy$ first while holding $x$ as fixed:

(2)And so we have that:

(3)## Example 2

**Evaluate $\iint_R e^x \cos y \: dA$ where $R = [0, 1] \times \left [ \frac{\pi}{2} , \pi \right ]$.**

Note that $f(x, y) = e^x \cos y$ can be written as the product of a function of $x$ and a function of $y$ if we let $g(x) = e^x$ and $h(y) = \cos y$ (then $f(x, y) = g(x) h(y)$). Therefore applying Corollary 1 and we get that:

(4)