Skip to main content

Section 1.3 Iterated Integrals

Subsection 1.3.1 Analyzing the Sums in the Riemann Integral

I want to be able to calculate the multivariable Riemann integral.

\begin{equation*} \int_{I} f(x_1, x_2, \ldots, x_n) dV = \lim_{k \rightarrow \infty} \sum_{l=0}^{k^n} f(x_l^*) \Delta V \end{equation*}

The original Riemann integral was already a very difficult definition to actually work with. This multivariable version is even worse, since I haven't specified how to actually do the sum over all \(k^n\) subintervals. This is where I want to start: with a better understanding of this sum. However, working to this understanding in full generality or \(\RR^n\) at the start is very unwieldy, so I'll start with a function \(f(x,y)\) defined on an interval in \(\RR^2\text{.}\) As noted before, In \(\RR^2\text{,}\) I will write \(\Delta A\) and \(dA\) instead of \(\Delta V\) and \(dV\text{,}\) since the pieces of an interval in\(\RR^2\) are rectangles and have area, not volume.

Consider an interval in \(\RR^n\text{:}\) \(I = [a_1,b_1] \times [a_2,b_2]\text{.}\) If I divide the two single-variable intervals into \(k\) pieces, I can choose \(x_{i_1}^* \in [a_1,b_1]\) and \(y_{i_2}^* \in [a_2,b_2]\text{.}\) With these choices, the point \((x_{i_1}^*, y_{i_2}^*)\) is a point in one of the subintervals of \(I\text{.}\) As both the indices \(i_1\) and \(i_2\) count from \(1\) to \(k\text{.}\) I want to count the two sums independently, so all count to \(k_1\) in \(x\) and to \(k_2\) in \(y\text{.}\) This might mean that I have more rectancles in a row than in a column, or vice-versa, but that's fine; the rectangles are still subintervals making up the whole interval. The sum can now be written as a double sum over these two indices. The limit also needs to take both upper bounds to infinity.

\begin{equation*} \int_{I} f(x,y) dA = \lim_{k_1 \rightarrow \infty} \lim_{k_2 \rightarrow \infty} \sum_{i_1=1}^{k_1} \sum_{i_2=1}^{k_2} f(x_{i_1}^*,y_{i_2}^*) \Delta A \end{equation*}

Instead of writing \(\Delta A\) for the area of a subintervals, I could write this as the product of the height and width of this rectangle. The width, \(\Delta x\text{,}\) is \(\frac{b_1-a_1}{k_1}\text{,}\) the length of the subdivision in the \(x\) variable. The height, \(\Delta y\text{,}\) is likewise \(\frac{b_2-a_2}{k_2}\text{.}\)

\begin{equation*} \int_{I} f(x,y) dA = \lim_{k \rightarrow \infty} \sum_{i_1=1}^{k_1} \sum_{i_2=1}^{k_2} f(x_{i_1}^*,y_{i_2}^*) \Delta x \Delta y \end{equation*}

Now, let me group this using some brackets, moving some terms in and out of sums (recall than anything that doesn't involve the index of a particular sum and be moved out from the sum.

\begin{equation*} \int_{I} f(x,y) dA = \lim_{k_1 \rightarrow \infty} \sum_{i_1=1}^{k_1} \left[ \lim_{k_2 \rightarrow \infty} \sum_{i_2=1}^{k_2} f(x_{i_1}^*,y_{i_2}^*) \Delta y \right] \Delta x \end{equation*}

Now the term inside the brackets is just a single-variable Riemann integral. As far as the sum inside the brackets is concerns, \(x\) and \(x_{i_1}^*\) are constants. The sum only changes the \(y\) coordinates. I can treat this as a single variable integral in the variable \(y\text{.}\)

\begin{equation*} \int_{I} f(x,y) dA = \lim_{k_1 \rightarrow \infty} \sum_{i_1}^{k_1} \left[ \int_c^d f(x_{i_1}^*,y) dy \right] \Delta x \end{equation*}

Now I can consider the outside sum and, again, this is just a single-variable Riemann integral. It treats the variable \(y\) as constant and integrate in \(x\text{.}\) Let me write this as an integral as well.

\begin{equation*} \int_{I} f(x,y) dA = \int_a^b \left[ \int_c^d f(x,y) dy \right] dx \end{equation*}

This is called an iterated integral and it will be the calculation techinque for definite integrals. Every definite integral of a multivariable function on an interval can be treated as a iterated single-variable integral in each variable independently.

In an iterated integral, I must always from the inside out: the infinitesimal piece \(dx\) or \(dy\) that is closest to the function acts first. Its bounds are written on the right, closest to the function. That integral is a single-variable integration, pretending that the other variables are constant, as was the case with partial derivatives. Then, once the firstintegration is finished, I proceed outward to the next integral.

Iterated integrals also work in higher dimensions: I just iterate through the variables. In \(\RR^3\text{,}\) over the interval \(I = [a_1,b_1] \times [a_2,b_2] \times [a_3,b_3]\) with three iterations, this is the setup.

\begin{equation*} \int_{I} f(x,y,z) dV = \int_{a_1}^{b_1} \left[ \int_{a_2}^{b_2} \left[ \int_{a_3}^{b_3} f(x,y,z) dz \right] dy \right] dx \end{equation*}

Notice that the bounds of integration always match with the correct infinitesimal piece, working from the inside out. I won't write the full version in \(\RR^n\text{,}\) but it works same way. It has \(n\) iterated pieces.

Subsection 1.3.2 Fubini's Theorem

You might ask, at this point, what happens if I change the order? I have to choose an order for these iterated integrals. Fubini's Theorem tells me that I am able to choose the order. This is the counterpart to Clairaut's Theorem for partial derivative, which told me that I could change the order of iterated partial derivatives.

Subsection 1.3.3 Examples

I'm going to work through a few examples to demonstrate the process. I should mention on caution as the start: like with partial derivatives, I need to carefully keep track of which variable I'm working with at any time. It's easy to confuse the variable of integration and substitue for the wrong variables when you get to evaluating bounds.

Consider the interval \(I = [0,1] \times[3,6]\) and the function \(f(x,y) = e^x + e^y\text{.}\) I'm going to do an iterated integral to solve this, with the \(y\) variable inside and the \(x\) variable outside. That means I'll integrate in \(y\text{,}\) like a normal single variable integral, and then evaluate on the bounds for \(y\text{.}\) Then the \(y\) variable will be entirely gone and I will proceed with the single-variable definite integral in \(x\text{.}\) In this example, I've carefully labelled the bound to remind myself which variable to replace. This isn't standard notation, but a nice reminder for the first example.

\begin{align*} \int_I f dA \amp = \int_0^1 \int_3^6 (e^x + e^y) dy dx\\ \amp = \int_0^1 \int_3^6 e^x dy dx + \int_0^1 \int_3^6 e^y dy dx\\ \amp = \int_0^1 y e^x \bigg|_{y=3}^{y=6} dx + \int_0^1 e^y \bigg|_{y=3}^{y=6} dx\\ \amp = \int_0^1 3e^x dx + \int_0^1 (e^6-e^3) dx\\ \amp = 3e^x \bigg|_{x=0}^{x=1} + x(e^6-e^3) \bigg|_{x=0}^{x=1}\\ \amp = 3e - 3 + e^6 - e^3 \end{align*}

Consider the interval \(I = [-1,1] \times [-2,2]\) and the function \(f(x,y) = x^2y^3\text{.}\) I'll do an iterated integral calculation with the \(x\) variable inside and the \(y\) variable outside.

\begin{align*} \int_I f(x,y) dA \amp = \int_{-2}^2 \int_{-1}^1 x^2 y^3 dx dy\\ \amp = \int_{-2}^2 \left. \frac{x^3y^3}{3} \right|_{-1}^1 dy\\ \amp = \int_{-2}^2 \left( \frac{y^3}{3} + \frac{y^3}{3} \right) dy = \int_{-2}^2 \frac{2y^3}{3} dy\\ \amp = \left. \frac{y^4}{6} \right|_{-2}^{2} = \frac{16}{6} - \frac{16}{6} = 0 \end{align*}

Just to check, I could change the order of the iterated integral and do the \(y\) variable inside and the \(x\) variable outside.

\begin{align*} \int_I f(x,y) dA \amp = \int_{-1}^1 \int_{-2}^2 x^2 y^3 dy dx\\ \amp = \int_{-1}^1 \left. \frac{x^2y^4}{4} \right|_{-2}^2 dx\\ \amp = \int_{-1}^1 (2x^2 - 2x^2) dx = \int_{-1}^1 0 dx = 0 \end{align*}

I recover the same result, as Fubini's theorem told me to expect.

In the second example, the second half involved a much easier calculation. This is often true: the choice of order of variables can lead to a much easier calculation. Fubini's theorem lets me chose any order, so I will try to chose the order that has the easiest calculations. Of course, the right choice isn't always obvious before starting he calculations.

Consider the function \(f(x,y) = \sin (x+y)\) on the interval \(I = [0, \pi] \times \left[0, \frac{\pi}{2} \right]\text{.}\) I do an interated integral calculation with \(x\) inside and \(y\) outside.

\begin{align*} \int_I f(x,y) dx dy \amp = \int_0^{\frac{\pi}{2}} \int_0^{\pi} \sin (x+y) dx dy\\ \amp = \int_0^{\frac{\pi}{2}} (-\cos (x+y)) \bigg|_0^{\pi} dy\\ \amp = \int_0^{\frac{\pi}{2}} (\cos y - \cos (y+\pi)) dy = \int_0^{\frac{\pi}{2}} 2 \cos y dy\\ \amp = 2 \sin y \bigg|_0^{\frac{\pi}{2}} = 2-0 = 2 \end{align*}

Subsection 1.3.4 Improper Integrals

An function defined on a closed interval has to include values on the boundary of the interval. Assuming the function is piecewise continuous (as if the habit in this course), this means that the function cannot diverge to infinity near the edge of the interval. However, an function which is only defined on an open interval can have any kind of behaviour near the boundaries, including diverging to infinity. I would like to be able to handle this kind of integral as well

In single variable calculus, we used improper integrals to deal with functions with problematic behaviour near the boundary of an interval. Thankfully, this translates nicely to iterated integrals. If a function diverges to infinity near the edge of an interval, then at least one piece of the iterated integral (and perhaps more than one piece) will be a single-variable improper integral. We approach these as we did in single variable integration: with limits approaching the problematic endpoint(s).

Consider a function \(f: (0,1] \times (0,1] \rightarrow \RR\) that diverged to infinity when \(x \rightarrow 0\text{.}\) Here is the iterated integral.

\begin{equation*} \int_I f(x,y) dA = \int_0^1 \int_0^1 f(x,y) dy dx \end{equation*}

Since the problems happen at the edge of the \(x\) interval, the resulting improper integral uses a limit for the \(x\) part of the iterated integral.

\begin{equation*} \int_I f(x,y) dA = \lim_{a \rightarrow 0^+} \int_a^1 \int_0^1 f(x,y) dy dx \end{equation*}

If, instead, the function diverged to infinity as \(y \rightarrow 0\text{,}\) then the limit would be in the \(y\) part of the iterated integral.

\begin{equation*} \int_I f(x,y) dA = \int_0^1 \left[ \lim_{a \rightarrow 0^+} \int_a^1 f(x,y) dy \right] dx \end{equation*}

Improper integrals also allow us to consider infinite domains of integral. For example, if I want to integrate over all of \(\RR^2\text{,}\) I set it us as follows.

\begin{equation*} \int_{\RR^2} f(x,y) dA = \lim_{a \rightarrow \infty} \lim_{b \rightarrow \infty} \int_{[-a,a]\times[-b,b]} f(x,y) dA \end{equation*}

Then I can write this as in iterated integral where both pieces are improper integrals.

\begin{equation*} \int_{\RR^2} f(x,y) dA = \lim_{a \rightarrow \infty} \int_{-a}^a \left[ \lim_{b \rightarrow \infty} \int_{-b}^b f(x,y) dy \right] dx \end{equation*}

Consider the function \(f(x,y) = \frac{1}{\sqrt{(x^2 + y^2)^3}}\) on the interval \(I = (0,1] \times (0,1]\text{.}\) As I approach \((0,0)\text{,}\) on the corner of the interval, the function is diverges to infinity. I set this up as an interated integral and, when necessary, I use a limit for the single-variable improper integral.

\begin{align*} \int_I f(x,y) dA \amp = \int_0^1 \int_0^1 \frac{1}{\sqrt{(x^2 + y^2)^3}} dx dy\\ \amp = \int_0^1 \left. \frac{x}{y^2 \sqrt{x^2 + y^2}} \right|_0^1 dy\\ \amp = \int_0^1 \frac{1}{y^2 \sqrt{1 + y^2}} dy\\ \amp = \lim_{a \rightarrow 0^+} \int_a^1 \frac{1}{y^2 \sqrt{1 + y^2}} dy\\ \amp = \lim_{a \rightarrow 0^+} \left. \frac{-\sqrt{1+y^2}}{y} \right|_a^1 = \frac{-\sqrt{2}}{1} + \lim_{a \rightarrow 0^+} \frac{\sqrt{1+a^2}}{a} = \infty \end{align*}

This integral diverges; the volume under the curve grows to infinity as the domain includes more and more of the interval approaching the point \((0,0)\text{.}\) Improper integrals, of course, can diverge.

Subsection 1.3.5 Separable Integrals

I didn't explicitly do an example of this type, but it is useful to mention that a particular class of integrable functions have a very nice integration property.

Definition 1.3.6.

If an integrable function on \(I = [a,b] \times [c,d]\) has the form \(f(x,y) = g(x) h(y)\) for some single variable functions \(g\) and \(h\text{,}\) then it is called separable. (This use of the term ‘separable’ matches with the use of the term for separable differential equations; a differential equation

\begin{equation*} \frac{dy}{dx} = f(x,y) \end{equation*}
is a separable equation if and onl if \(f(x,y)\) is a separable function in the sens od this definition.)

Separable functions have nice behaviour for interated integrals. If \(f(x,y) = g(x)h(y)\) is a separable function, then its integral separates entirely into two single variable integrals.

\begin{align*} \int_I f(x,y) dy dx \amp = \int_a^b \int_c^d g(x) h(y) dy dx\\ \amp = \int_a^b g(x) \left[ \int_c^d h(y) dy \right] dx\\ \amp = \left[ \int_c^d h(y) dy \right] \left[ \int_a^b g(x) dx \right] \end{align*}

The operations in this calculation are justified because the pieces which I move in and out of a integral do not involve that variable of integration. In this way, I can separate the integral into two single variable integrals.