Skip to content

5.28 Riemann Integral of two variables

\(R = [a,b] \times [c,d]\) rectangle in \(\mathbb{R}^2\). \(f: R \to \mathbb{R}\) bounded.
\(P_1 = \{a=x_0 < x_1 < \dots < x_k = b\}\), \(P_2 = \{c=y_0 < y_1 < \dots < y_e = d\}\)
Partitions of \([a,b]\) and \([c,d]\). \(P=P_1 \times P_2\) partition of \(R\) into subrectangles \(R_{ij} = [x_{i-1}, x_i] \times [y_{j-1}, y_j]\).
\(M_{ij} = \sup_{(x,y) \in R_{ij}} f(x,y)\), \(m_{ij} = \inf_{(x,y) \in R_{ij}} f(x,y)\).
\(U(f,P) = \sum_{i,j} M_{ij} \text{area}(R_{ij})\), \(L(f,P) = \sum_{i,j} m_{ij} \text{area}(R_{ij})\)

\(f\) integrable on \(R\) if there exists \(I\) such that \(L(f,P) \le I \le U(f,P)\) for every partition \(P\) of \(R\).
\(I = \int_R f dA\)

\(f\) bounded on \(R\). \(f\) integrable on \(R\) if and only if for any \(\varepsilon > 0\) there exists a partition \(P\) of \(R\) such that \(U(f,P) - L(f,P) < \varepsilon\).

\(I = \int_R f dA \ne \int_a^b \int_c^d f dy dx\)


Show that \(f(x,y) = \begin{cases} 1 & \text{if } x=y \\ 0 & \text{otherwise} \end{cases}\) is integrable on \(R=[0,1] \times [0,1]\). Find \(\int_R f dA\).

Solution

Let \(N\) be a positive integer.
Let \(P_{1} = \{0=x_{0} < x_{1} < \dots < x_{N}=1\}\) where \(x_{i} = \frac{i}{N}\).
\(P_{2} = \{0=y_{0} < y_{1} < \dots < y_{N}=1\}\) where \(y_{j} = \frac{j}{N}\).

Then \(P = P_1 \times P_2\) divides \(R\) into \(N^2\) subrectangles \(R_{ij}= [x_{i-1}, x_{i}] \times [y_{j-1}, y_{j}]\) each of area \(\frac{1}{N^2}\).

For each subrectangle \(R_{ij}\). image

On the line \(x=y\) the function is not \(0\).
If \(i=j\) then \(R_{ij}\) contains points where \(x=y\) and points where \(x \ne y\). So \(M_{ii}=1\), \(m_{ii}=0\).
Also if \(i=j+1\) or \(i=j-1\) it contains a point where \(x=y\) and points where \(x \ne y\). So \(M_{i,i+1}=M_{i+1,i}=1\), \(m_{i,i-1}=m_{i-1,i}=0\).
If \(i \ne j-1, j, j+1\) then \(M_{ij}=0 = m_{ij}\).

\(f\) takes the value \(1\) on \(N+(N-1)+(N-1)=3N-2\) subrectangles

Then \(U(f,P) = \sum_i \sum_j M_{ij} \text{area}(R_{ij})\) \(= \frac{3N-2}{N^2}\), \(L(f,P) = \sum_i \sum_j m_{ij} \text{area}(R_{ij})\) \(= 0\)

So \(U(f,P) - L(f,P) = \frac{3N-2}{N^2} \xrightarrow{N\to\infty} 0\)

Now, given \(\epsilon > 0\) consider \(N\) such that \(\frac{3N-2}{N^2} < \epsilon\) and the same partition as before.
We get \(U(f,P) - L(f,P) = \frac{3N-2}{N^2} < \epsilon\). Thus, \(f\) is integrable on \(\R\).

Since \(f\) is integrable on \(R\), we have that \(L(f,P) \leq I \leq U(f,P)\) for every partition of \(R\)
In particular \(0 \leq I \leq \frac{3N-2}{N^2} \longrightarrow 0\) as \(N \rightarrow \infty\), we have that \(I = 0 = \int_R f dA\).


\(f(x,y) = \begin{cases} 1 & \text{if } y < x \\ 0 & \text{otherwise.} \end{cases}\)

Show it is integrable on \(R = [0,1] \times [0,1]\). Find \(\int_R f \, dA\).

Consider \(P = P_1 \times P_2\) same partition as before.

For each \(R_{ij}\)

  • If \(j \le i\) then \(R_{ij}\) contains points where \(y < x\). So \(M_{ij} = 1\).
  • If \(j > i\) then \(R_{ij}\) contains only points where \(y \ge x\). So \(M_{ij} = 0\).
  • If \(j < i\) then \(R_{ij}\) is entirely above the line \(x=y\), so \(m_{ij}= 1\).
  • If \(j \ge i\) \(R_{ij}\) contains points where \(y \ge x\), so \(m_{ij}= 0\) on \(R_{ij}\).

So \(U(f, P) = \sum_{i} \sum_{j} M_{ij} \text{area}(R_{ij})\) \(= \sum_{i=1}^{N} \sum_{j=1}^{i} 1 \cdot \frac{1}{N^2} = \sum_{i=1}^{N} \frac{i}{N^2} = \frac{N(N+1)}{2N^2} = \frac{N+1}{2N}\)
\(L(f, P) = \sum_{i=1}^{N} \sum_{j=1}^{i-1} 1 \cdot \frac{1}{N^2} = \sum_{i=1}^{N} \frac{i-1}{N^2} = \frac{1}{N^2} \frac{N(N-1)}{2} = \frac{N-1}{2N}\)
Now \(U(f, P) - L(f, P) = \frac{N+1}{2N} - \frac{N-1}{2N} = \frac{1}{N} \underset{N \to \infty}{\longrightarrow} 0\)
Given \(\varepsilon > 0\), consider \(N\) such that \(\frac{1}{N} < \varepsilon\) and we get that \(U(f, P) - L(f, P) = \frac{1}{N} < \varepsilon\) and so \(f\) is integrable on \(R\).
Since \(f\) is integrable on \(R\). In particular \(\frac{N-1}{2N} \le I \le \frac{N+1}{2N}\)
Since \(\frac{N-1}{2N} \xrightarrow{N\to\infty} \frac{1}{2}\) and \(\frac{N+1}{2N} \xrightarrow{N\to\infty} \frac{1}{2}\), then \(\int_R f dA = \frac{1}{2}\)


\(f(x,y)=\begin{cases} 1 & \text{if } x \in \mathbb{Q}, y \in \mathbb{Q} \\ 0 & \text{otherwise} \end{cases} \quad \text{on } R = [0,1] \times [0,1]\)

So, for every \(R_{ij}\) we have \(M_{ij}=1, m_{ij}=0\)

Let \(P=P_1 \times P_2\) be a partition of \(R\) into subrectangles \(R_{ij}\).

Then \(U(f,P) = \sum_i \sum_j M_{ij} \text{area}(R_{ij})\) \(= \sum_i \sum_j \text{area}(R_{ij}) = 1\)
\(L(f,P) = \sum_i \sum_j m_{ij} \text{area}(R_{ij}) = 0\)

Since \(\mathbb{Q}\) is dense on \(\mathbb{R}\), then every \(R_{ij}\) contains points where \(x\) and \(y\) are rationals and points where at least one of them is not.

Then \(U(f,P) - L(f,P) = 1\)

So, given \(0 < \varepsilon < 1\), there is no partition of \(R\) such that \(U(f,P) - L(f,P) < \varepsilon\).

Then \(f\) is not integrable on \(R\).


  • \(f\) continuous on \(\mathbb{R} \implies f\) integrable on \(\mathbb{R}\). measure zero is countable union of points in one dimension
  • \(f\) bounded on \(\mathbb{R}\) and \(X = \{(x,y) \in \mathbb{R} : f \text{ is discontinuous in } (x,y)\}\) has measure zero, then \(f\) is integrable on \(\mathbb{R}\). points, union of countable points or curves are all measure zero

Let \(f(x,y) = \begin{cases} 1 & \text{if } x=0, y \in \mathbb{Q} \\ 0 & \text{otherwise} \end{cases}\) over \(R = [0,1] \times [0,1]\).

Is \(f\) integrable on \(R\) ? Do the iterated integrals exist?

\(f\) is bounded (by 1). The set of points on \(R\) where the function is discontinuous is the line \(x=0\) which has measure zero.

\(f\) is equal to zero \(\leadsto\) So \(f\) is integrable on \(\mathbb{R}\) and \(\int_{R}f dA = 0\).
"almost everywhere"
(\(f=0\) on \(\mathbb{R}\) except on a measure zero set)

(Since \(f\) is bounded and \(X\) has measure zero, then \(f\) is integrable on \(X\) and \(\int_X f dA = 0\))

(I) \(\int_0^1 \int_0^1 f(x,y) \,dx \,dy\)

Inner integral: \(\int_0^1 f(x,y) \,dx\) we fix \(y\) and integrate

  • If \(y \notin \mathbb{Q} \implies f(x,y) = 0 \implies \int_0^1 f(x,y) \,dx = 0 \implies \int_0^1 \int_0^1 f(x,y) \,dx \,dy = 0\)
  • If \(y \in \mathbb{Q} \implies f(x,y) = \begin{cases} 1 & \text{if } x=0 \\ 0 & \text{otherwise} \end{cases}\) discontinuous on a measure zero set and \(0\) almost everywhere.\(\implies \int_0^1 f(x,y) \,dx = 0 \implies \int_0^1 \int_0^1 f(x,y) \,dx \,dy = 0\)

Then \(\int_0^1 \int_0^1 f(x,y) \,dx \,dy = 0\), \(\int_{0}^{1}\int_{0}^{1}f \, dxdy\) exists and it's equal to \(\int_{R} f \, dA\)

\(\int_0^1 \int_0^1 f(x,y) dy dx\) Inner integral \(\int_{0}^{1} f(x,y) dy\)
Fix \(x\)
\(\text{If }x \neq 0 \sim f(x,y) = 0 \sim \int_{0}^{1}f(x,y) dy = 0\)
\(\text{If }x = 0 \sim f(x,y) = \begin{cases} 1, & \text{if } y \in \mathbb{Q} \\ 0, & \text{if } y \notin \mathbb{Q} \end{cases} \text{ is not integrable}\)
So \(\int_{0}^{1}f(x,y)dy\) doesn’t exist for every \(x\in[0,1]\), then \(\int_{0}^{1}\int_{0}^{1}f(x,y)dydx\) doesn't exists

In general. If \(f\) is integrable on \(R = [a,b] \times [c,d]\) and the iterated integral exist \(\int_a^b \int_c^d f \, dy \, dx\)
Then \(\int_R f \, dA = \int_a^b \int_c^d f \, dy \, dx\). Same if \(\int_c^d \int_a^b f \, dx \, dy\) exist (Fubini)


Integrate the function \(f(s,t) = e^s \ln(t)\) over the region in the first quadrant of the \(st\)-plane that lies below the curve \(s = \ln(t)\) from \(t=1\) to \(t=2\).

\(s = \ln(t)\) is continuous on \(D\) so integrable.

Describe the region of integration \(\begin{cases} 1 \le t \le 2 \\ 0 \le s \le \ln(t) \end{cases}\) or \(\begin{cases} 0 \le s \le \ln(2) \\ e^s \le t \le 2 \end{cases}\)

\(\int_{1}^{2}\int_{0}^{\ln(t)}e^{s}\ln(t)\,ds\,dt\) \(=\int_0^{\ln(2)}\int_{e^{s}}^2e^{s}\ln(t)\,dt\,ds=\frac14\)