Iterated integral

In multivariable calculus, an iterated integral is the result of applying integrals to a function of more than one variable (for example $$f(x,y)$$ or $$f(x,y,z)$$) in such a way that each of the integrals considers some of the variables as given constants. For example, the function $$f(x,y)$$, if $$y$$ is considered a given parameter, can be integrated with respect to $$x$$, $\int f(x,y)\,dx$. The result is a function of $$y$$ and therefore its integral can be considered. If this is done, the result is the iterated integral


 * $$\int\left(\int f(x,y)\,dx\right)\,dy.$$

It is key for the notion of iterated integrals that this is different, in principle, from the multiple integral
 * $$\iint f(x,y)\,dx\,dy.$$

In general, although these two can be different, Fubini's theorem states that under specific conditions, they are equivalent.

The alternative notation for iterated integrals
 * $$\int dy \int dx \, f(x,y)$$

is also used.

In the notation that uses parentheses, iterated integrals are computed following the operational order indicated by the parentheses starting from the most inner integral outside. In the alternative notation, writing $\int dy \, \int dx \, f(x, y)$, the innermost integrand is computed first.

A simple computation
For the iterated integral


 * $$\int\left(\int (x+y) \, dx\right) \, dy$$

the integral


 * $$\int (x+y) \, dx = \frac{x^2}{2} + yx$$

is computed first and then the result is used to compute the integral with respect to y.


 * $$\int \left(\frac{x^2}{2} + yx\right) \, dy = \frac{yx^2}{2} + \frac{xy^2}{2} $$

This example omits the constants of integration. After the first integration with respect to x, we would rigorously need to introduce a "constant" function of y. That is, If we were to differentiate this function with respect to x, any terms containing only y would vanish, leaving the original integrand. Similarly for the second integral, we would introduce a "constant" function of x, because we have integrated with respect to y. In this way, indefinite integration does not make very much sense for functions of several variables.

The order is important
The order in which the integrals are computed is important in iterated integrals, particularly when the integrand is not continuous on the domain of integration. Examples in which the different orders lead to different results are usually for complicated functions as the one that follows.

Define the sequence $$a_0=0<a_1<a_2<\cdots$$ such that $$a_n\to1$$. Let $$g_n$$ be a sequence of continuous functions not vanishing in the interval $$(a_n,a_{n+1})$$ and zero elsewhere, such that $\int_0^1 g_n=1$ for every $$n$$. Define
 * $$f(x,y)=\sum_{n=0}^\infty \left( g_n(x)-g_{n+1}(x)\right)g_n(y).$$

In the previous sum, at each specific $$(x,y)$$, at most one term is different from zero. For this function it happens that
 * $$\int_0^1 \left(\int_0^1 f(x,y) \,dy\right)\,dx =\int_0^{a_1}\left(\int_0^{a_1}g_0(x)g_0(y)\,dy\right)\,dx= 1\neq0 = \int_0^1 0\,dy = \int_0^1 \left(\int_0^1 f(x,y)\, dx\right)\,dy$$