Skip to main content
Logo image

Section 10.2 Iterated integrals and Fubini theorem

Note: 1–2 lectures
The Riemann integral in several variables is hard to compute via the definition. For one-dimensional Riemann integral, we have the fundamental theorem of calculus, which allows computing many integrals without having to appeal to the definition of the integral. We will rewrite a Riemann integral in several variables into several one-dimensional Riemann integrals by iterating. However, if f:[0,1]2R is a Riemann integrable function, it is not immediately clear if the three expressions
[0,1]2f,0101f(x,y)dxdy,and0101f(x,y)dydx
are equal, or if the last two are even well-defined.

Example 10.2.1.

Define
f(x,y):={1if x=1/2 and yQ,0otherwise.
Then f is Riemann integrable on R:=[0,1]2 and Rf=0. Moreover, 0101f(x,y)dxdy=0. However,
01f(1/2,y)dy
does not exist, so strictly speaking, 0101f(x,y)dydx does not make sense. See Figure 10.5.

Figure 10.5. Left: [0,1]2 with the line x=1/2 marked dotted and 01f(x,y)dx marked as gray solid line for a generic y. Center: Similar picture but 01f(x,y)dy marked for some x1/2. Right: The three different rectangles in the partition used to integrate f in different grays.

Proof: We start with integrability of f. Consider the partition of [0,1]2 where the partition in the x direction is {0,1/2ϵ,1/2+ϵ,1} and in the y direction {0,1}. The corresponding subrectangles are
R1:=[0,1/2ϵ]×[0,1],R2:=[1/2ϵ,1/2+ϵ]×[0,1],R3:=[1/2+ϵ,1]×[0,1].
We have m1=M1=0, m2=0, M2=1, and m3=M3=0. Therefore,
L(P,f)=m1V(R1)+m2V(R2)+m3V(R3)=0(1/2ϵ)+0(2ϵ)+0(1/2ϵ)=0,
and
U(P,f)=M1V(R1)+M2V(R2)+M3V(R3)=0(1/2ϵ)+1(2ϵ)+0(1/2ϵ)=2ϵ.
The upper and lower sums are arbitrarily close and the lower sum is always zero, so the function is integrable and Rf=0.
For every fixed y, the function that takes x to f(x,y) is zero except perhaps at a single point x=1/2. Such a function is integrable and 01f(x,y)dx=0. Therefore, 0101f(x,y)dxdy=0. However, if x=1/2, the function that takes y to f(1/2,y) is the nonintegrable function that is 1 on the rationals and 0 on the irrationals. See Example 5.1.4.
We solve this problem of undefined inside integrals by using the upper and lower integrals, which are always defined for any bounded function.
Split the coordinates of Rn+m into two parts: Write the coordinates on Rn+m=Rn×Rm as (x,y) where xRn and yRm. For a function f(x,y), write
fx(y):=f(x,y)
when x is fixed and we want a function of y. Write
fy(x):=f(x,y)
when y is fixed and we want a function of x.
In other words,
R×Sf=R(Sf(x,y)dy)dx=R(Sf(x,y)dy)dx.
If fx is integrable for all x, for example when f is continuous, we obtain the more familiar
R×Sf=RSf(x,y)dydx.

Proof.

A partition of R×S is a concatenation of a partition of R and a partition of S. That is, write a partition of R×S as (P,P)=(P1,P2,,Pn,P1,P2,,Pm), where P=(P1,P2,,Pn) and P=(P1,P2,,Pm) are partitions of R and S respectively. Let R1,R2,,RN be the subrectangles of P and R1,R2,,RK be the subrectangles of P. The subrectangles of (P,P) are Ri×Rj where 1iN and 1jK.
Let
mi,j:=inf(x,y)Ri×Rjf(x,y).
Notice that V(Ri×Rj)=V(Ri)V(Rj) and hence
L((P,P),f)=i=1Nj=1Kmi,jV(Ri×Rj)=i=1N(j=1Kmi,jV(Rj))V(Ri).
Define
mj(x):=infyRjf(x,y)=infyRjfx(y).
For xRi, we have mi,jmj(x), and therefore,
j=1Kmi,jV(Rj)j=1Kmj(x)V(Rj)=L(P,fx)Sfx=g(x).
The inequality holds for all xRi, and so
j=1Kmi,jV(Rj)infxRig(x).
We obtain
L((P,P),f)j=1N(infxRjg(x))V(Rj)=L(P,g).
Similarly, U((P,P),f)U(P,h), and the proof of this inequality is left as an exercise. Putting the two inequalities together with the fact that g(x)h(x) for all x,
L((P,P),f)L(P,g)U(P,g)U(P,h)U((P,P),f).
Since f is integrable, it must be that g is integrable as
U(P,g)L(P,g)U((P,P),f)L((P,P),f),
and we can make the right-hand side arbitrarily small. As for any partition we have L((P,P),f)L(P,g)U((P,P),f), we have Rg=R×Sf.
Likewise,
L((P,P),f)L(P,g)L(P,h)U(P,h)U((P,P),f),
and hence
U(P,h)L(P,h)U((P,P),f)L((P,P),f).
As f is integrable, so is h. Moreover, L((P,P),f)L(P,h)U((P,P),f) implies Rh=R×Sf.
We can also do the iterated integration in the opposite order. The proof of this version is almost identical to version A (or follows quickly from version A). We leave it as an exercise.
That is,
R×Sf=S(Rf(x,y)dx)dy=S(Rf(x,y)dx)dy.
Next suppose fx and fy are integrable. For example, suppose f is continuous. By putting the two versions together we obtain the familiar
R×Sf=RSf(x,y)dydx=SRf(x,y)dxdy.
Often the Fubini theorem is stated in two dimensions for a continuous function f:RR on a rectangle R=[a,b]×[c,d]. Then the Fubini theorem states that
Rf=abcdf(x,y)dydx=cdabf(x,y)dxdy.
The Fubini theorem is commonly thought of as the theorem that allows us to swap the order of iterated integrals, although there are many variations on Fubini, and we have seen but two of them.
Repeatedly applying Fubini theorem gets us the following corollary: Let R:=[a1,b1]×[a2,b2]××[an,bn]Rn be a closed rectangle and let f:RR be continuous. Then
Rf=a1b1a2b2anbnf(x1,x2,,xn)dxndxn1dx1.
We may switch the order of integration to any order we please. We may relax the continuity requirement by making sure that all the intermediate functions are integrable, or by using upper or lower integrals appropriately.

Exercises Exercises

10.2.1.

Compute 0111xexydxdy in a simple way.

10.2.4.

Let R:=[a,b]×[c,d] and f(x,y) is an integrable function on R such that for every fixed y, the function that takes x to f(x,y) is zero except at finitely many points. Show
Rf=0.

10.2.5.

Let R:=[a,b]×[c,d] and f(x,y):=g(x)h(y) for continuous functions g:[a,b]R and h:[c,d]R. Prove
Rf=(abg)(cdh).

10.2.6.

Compute (using calculus)
0101x2y2(x2+y2)2dxdyand0101x2y2(x2+y2)2dydx.
You will need to interpret the integrals as improper, that is, the limit of ϵ1 as ϵ0+.

10.2.7.

Suppose f(x,y):=g(x) where g:[a,b]R is Riemann integrable. Show that f is Riemann integrable for every R=[a,b]×[c,d] and
Rf=(dc)abg.

10.2.8.

Define f:[1,1]×[0,1]R by
f(x,y):={xif yQ,0else.
  1. Show 0111f(x,y)dxdy exists, but 1101f(x,y)dydx does not.
  2. Compute 1101f(x,y)dydx and 1101f(x,y)dydx.
  3. Show f is not Riemann integrable on [1,1]×[0,1] (use Fubini).

10.2.9.

Define f:[0,1]×[0,1]R by
f(x,y):={1/qif xQ,yQ, and y=p/q in lowest terms,0else.
  1. Show f is Riemann integrable on [0,1]×[0,1].
  2. Find 01f(x,y)dx and 01f(x,y)dx for all y[0,1], and show they are unequal for all yQ.
  3. Show 0101f(x,y)dydx exists, but 0101f(x,y)dxdy does not.
Note: By Fubini, 0101f(x,y)dydx and 0101f(x,y)dydx do exist and equal the integral of f on R.
For a higher quality printout use the PDF versions: https://www.jirka.org/ra/realanal.pdf or https://www.jirka.org/ra/realanal2.pdf