For the iterated integral
the integral
is computed first and then the result is used to compute the integral with respect to y.
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 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 < ⋯ {\displaystyle a_{0}=0<a_{1}<a_{2}<\cdots } such that a n → 1 {\displaystyle a_{n}\to 1} . Let g n {\displaystyle g_{n}} be a sequence of continuous functions not vanishing in the interval ( a n , a n + 1 ) {\displaystyle (a_{n},a_{n+1})} and zero elsewhere, such that ∫ 0 1 g n = 1 {\textstyle \int _{0}^{1}g_{n}=1} for every n {\displaystyle n} . Define
In the previous sum, at each specific ( x , y ) {\displaystyle (x,y)} , at most one term is different from zero. For this function it happens that1
Rudin, W., Real and complex analysis, 1970 ↩