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 \colon [0,1]^2 \to \R\) is a Riemann integrable function, it is not immediately clear if the three expressions
\begin{equation*}
\int_{[0,1]^2} f ,
\qquad
\int_0^1 \int_0^1 f(x,y) \, dx \, dy ,
\qquad \text{and}
\qquad
\int_0^1 \int_0^1 f(x,y) \, dy \, dx
\end{equation*}
are equal, or if the last two are even well-defined.
Then \(f\) is Riemann integrable on \(R \coloneqq [0,1]^2\) and \(\int_R f = 0\text{.}\) Moreover, \(\int_0^1 \int_0^1 f(x,y) \, dx \, dy = 0\text{.}\) However,
\begin{equation*}
\int_0^1 f(\nicefrac{1}{2},y) \, dy
\end{equation*}
does not exist, so strictly speaking, \(\int_0^1 \int_0^1 f(x,y) \, dy \, dx\) does not make sense. See Figure 10.5.
Proof: We start with integrability of \(f\text{.}\) Consider the partition of \([0,1]^2\) where the partition in the \(x\) direction is \(\{ 0, \nicefrac{1}{2}-\epsilon,
\nicefrac{1}{2}+\epsilon,1\}\) and in the \(y\) direction \(\{ 0, 1 \}\text{.}\) The corresponding subrectangles are
The upper and lower sums are arbitrarily close and the lower sum is always zero, so the function is integrable and \(\int_R f = 0\text{.}\)
For every fixed \(y\text{,}\) the function that takes \(x\) to \(f(x,y)\) is zero except perhaps at a single point \(x=\nicefrac{1}{2}\text{.}\) Such a function is integrable and \(\int_0^1 f(x,y) \, dx = 0\text{.}\) Therefore, \(\int_0^1 \int_0^1 f(x,y) \, dx \, dy = 0\text{.}\) However, if \(x=\nicefrac{1}{2}\text{,}\) the function that takes \(y\) to \(f(\nicefrac{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 \(\R^{n+m}\) into two parts: Write the coordinates on \(\R^{n+m} = \R^n \times \R^m\) as \((x,y)\) where \(x \in \R^n\) and \(y \in \R^m\text{.}\) For a function \(f(x,y)\text{,}\) write
when \(y\) is fixed and we want a function of \(x\text{.}\)
Theorem10.2.2.Fubini version A.
1
Named after the Italian mathematician Guido Fubini (1879–1943).
Let \(R \times S \subset \R^n \times \R^m\) be a closed rectangle and \(f \colon R \times S \to \R\) be integrable. The functions \(g \colon R \to \R\) and \(h \colon R \to \R\) defined by
\begin{equation*}
\int_R g = \int_R h = \int_{R \times S} f .
\end{equation*}
In other words,
\begin{equation*}
\int_{R \times S} f
=
\int_R \left(
\underline{\int_S} f(x,y) \, dy
\right) \, dx
=
\int_R \left(
\overline{\int_S} f(x,y) \, dy
\right) \, dx .
\end{equation*}
If \(f_x\) is integrable for all \(x\text{,}\) for example when \(f\) is continuous, we obtain the more familiar
\begin{equation*}
\int_{R \times S} f
=
\int_R \int_S f(x,y) \, dy \, dx .
\end{equation*}
Proof.
A partition of \(R \times S\) is a concatenation of a partition of \(R\) and a partition of \(S\text{.}\) That is, write a partition of \(R \times S\) as \((P,P') = (P_1,P_2,\ldots,P_n,P'_1,P'_2,\ldots,P'_m)\text{,}\) where \(P = (P_1,P_2,\ldots,P_n)\) and \(P' = (P'_1,P'_2,\ldots,P'_m)\) are partitions of \(R\) and \(S\) respectively. Let \(R_1,R_2,\ldots,R_N\) be the subrectangles of \(P\) and \(R'_1,R'_2,\ldots,R'_K\) be the subrectangles of \(P'\text{.}\) The subrectangles of \((P,P')\) are \(R_i \times R'_j\) where \(1 \leq i \leq N\) and \(1 \leq j \leq K\text{.}\)
Similarly, \(U\bigl((P,P'),f) \geq U(P,h)\text{,}\) and the proof of this inequality is left as an exercise. Putting the two inequalities together with the fact that \(g(x) \leq h(x)\) for all \(x\text{,}\)
and we can make the right-hand side arbitrarily small. As for any partition we have \(L\bigl((P,P'),f\bigr) \leq L(P,g) \leq U\bigl((P,P'),f\bigr)\text{,}\) we have \(\int_R g = \int_{R \times S} f\text{.}\)
As \(f\) is integrable, so is \(h\text{.}\) Moreover, \(L\bigl((P,P'),f\bigr) \leq L(P,h) \leq U\bigl((P,P'),f\bigr)\) implies \(\int_R h = \int_{R \times S} f\text{.}\)
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.
Theorem10.2.3.Fubini version B.
Let \(R \times S \subset \R^n \times \R^m\) be a closed rectangle and \(f \colon R \times S \to \R\) be integrable. The functions \(g \colon S \to \R\) and \(h \colon S \to \R\) defined by
\begin{equation*}
\int_S g = \int_S h = \int_{R \times S} f .
\end{equation*}
That is,
\begin{equation*}
\int_{R \times S} f
=
\int_S \left(
\underline{\int_R} f(x,y) \, dx
\right) \, dy
=
\int_S \left(
\overline{\int_R} f(x,y) \, dx
\right) \, dy .
\end{equation*}
Next suppose \(f_x\) and \(f^y\) are integrable. For example, suppose \(f\) is continuous. By putting the two versions together we obtain the familiar
\begin{equation*}
\int_{R \times S} f
=
\int_R
\int_S f(x,y) \, dy \, dx
=
\int_S
\int_R f(x,y) \, dx \, dy .
\end{equation*}
Often the Fubini theorem is stated in two dimensions for a continuous function \(f \colon R \to
\R\) on a rectangle \(R = [a,b] \times [c,d]\text{.}\) Then the Fubini theorem states that
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 \coloneqq [a_1,b_1] \times [a_2,b_2] \times \cdots \times [a_n,b_n] \subset
\R^n\) be a closed rectangle and let \(f \colon R \to \R\) be continuous. Then
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.
ExercisesExercises
10.2.1.
Compute \(\int_{0}^1 \int_{-1}^1 xe^{xy} \, dx \, dy\) in a simple way.
10.2.2.
Prove the assertion \(U\bigl((P,P'),f\bigr) \geq U(P,h)\) from the proof of Theorem 10.2.2.
Let \(R \coloneqq [a,b] \times [c,d]\) and \(f(x,y)\) is an integrable function on \(R\) such that for every fixed \(y\text{,}\) the function that takes \(x\) to \(f(x,y)\) is zero except at finitely many points. Show
\begin{equation*}
\int_R f = 0 .
\end{equation*}
10.2.5.
Let \(R \coloneqq [a,b] \times [c,d]\) and \(f(x,y) \coloneqq g(x)h(y)\) for continuous functions \(g \colon [a,b] \to \R\) and \(h \colon [c,d] \to \R\text{.}\) Prove
\begin{equation*}
\int_R f = \left(\int_a^b g\right)\left(\int_c^d h\right) .
\end{equation*}
10.2.6.
Compute (using calculus)
\begin{equation*}
\int_0^1 \int_0^1 \frac{x^2-y^2}{{(x^2+y^2)}^2} \, dx \, dy
\qquad \text{and} \qquad
\int_0^1 \int_0^1 \frac{x^2-y^2}{{(x^2+y^2)}^2} \, dy \, dx .
\end{equation*}
You will need to interpret the integrals as improper, that is, the limit of \(\int_\epsilon^1\) as \(\epsilon \to 0^+\text{.}\)
10.2.7.
Suppose \(f(x,y) \coloneqq g(x)\) where \(g \colon [a,b] \to \R\) is Riemann integrable. Show that \(f\) is Riemann integrable for every \(R = [a,b] \times [c,d]\) and
\begin{equation*}
\int_R f = (d-c) \int_a^b g .
\end{equation*}
10.2.8.
Define \(f \colon [-1,1] \times [0,1] \to \R\) by
\begin{equation*}
f(x,y) \coloneqq
\begin{cases}
x & \text{if } y \in \Q, \\
0 & \text{else.}
\end{cases}
\end{equation*}
Show \(\int_0^1 \int_{-1}^1 f(x,y) \, dx \, dy\) exists, but \(\int_{-1}^1 \int_0^1 f(x,y) \, dy \, dx\) does not.
Compute \(\int_{-1}^1 \overline{\int_0^1} f(x,y) \, dy \, dx\) and \(\int_{-1}^1 \underline{\int_0^1} f(x,y) \, dy \, dx\text{.}\)
Show \(f\) is not Riemann integrable on \([-1,1] \times [0,1]\) (use Fubini).
10.2.9.
Define \(f \colon [0,1] \times [0,1] \to \R\) by
\begin{equation*}
f(x,y) \coloneqq
\begin{cases}
\nicefrac{1}{q} & \text{if } x \in \Q, y \in \Q, \text{ and }
y=\nicefrac{p}{q} \text{ in lowest terms,} \\
0 & \text{else.}
\end{cases}
\end{equation*}
Show \(f\) is Riemann integrable on \([0,1] \times [0,1]\text{.}\)
Find \(\overline{\int_0^1} f(x,y) \, dx\) and \(\underline{\int_0^1} f(x,y) \, dx\) for all \(y \in [0,1]\text{,}\) and show they are unequal for all \(y
\in \Q\text{.}\)
Show \(\int_0^1 \int_0^1 f(x,y) \, dy \, dx\) exists, but \(\int_0^1 \int_0^1 f(x,y) \, dx \, dy\) does not.
Note: By Fubini, \(\int_0^1 \overline{\int_0^1} f(x,y) \, dy \, dx\) and \(\int_0^1 \underline{\int_0^1} f(x,y) \, dy \, dx\) do exist and equal the integral of \(f\) on \(R\text{.}\)
For a higher quality printout use the PDF versions: https://www.jirka.org/ra/realanal.pdf or https://www.jirka.org/ra/realanal2.pdf