Baby Rudin, chapter 10, problem 1 - independence of order in multiple integrals. In problem 1, Rudin asks for a generalization of example 10.4, which states that if $f$ is continuous in the standard k-simplex $Q^k$, then the integral $\int_{Q^k} f$ exists, and that the order of the $n$ separate integrations is immaterial. He proves that by approximating $f$ by a sequence of functions which are continuous in a k-cell containing $Q^k$.
In problem 1 we need to show that the same hold, if $Q^k$ is replaced by any compact and convex $H \subseteq \mathbb R^k$. There's a hint, suggesting that one should approximate $f$ by continuous functions in $\mathbb R^k$ with support $\subseteq H$.
For fixed $\delta>0,$I've introduced the function $\varphi_\delta(t)
=\begin{cases}
\frac{1}{\delta}t & 0 \le t \le \delta \\
1 & t>\delta
\end{cases}$ 
and approximating $f$ by $F(x)=f(x) \varphi_\delta(\rho_{H^c}(x))$, where $\rho_E(x)=\inf \{ d(x,y) : y \in E\}$ is the distance between $x$ and $E$.
I can't follow his proof, Namely the inequality (7) on page 247 is problematic for me.
Thanks in advance
EDIT: Lebesgue's theory is not allowed
 A: Inequality (7) is false for general $H$. And for a good reason. Recall that in Rudin's notation 
$$f_{k-1}(x_1,\dots,x_{k-1})=\int_{} f(x_1,\dots,x_k)\,dx_k$$
where I omit the limits of integration (they correspond to the size of some cube containing $H$). 
In Example 10.4 the function $f_{k-1}$ turned out to be continuous. But for general convex sets $H$ it 
is not. For example, consider some convex polygon in the plane: if one of its edges happens 
to be parallel to the axis $x_k$, and if $f\equiv 1$, the function $f_{k-1}$ will be discontinuous. 
Consequently, there is no hope to approximate it uniformly by $F_{k-1}$, which is what (7) was for. 
We must set a more modest goal. As $\delta\to 0$, the functions $F$ converge to $f$ in the following sense: 


*

*$F$ converges to  $f$, monotonically, at every point except possibly the boundary of $H$.

*$f$ is bounded above

*Outside of $H$, $F$ agrees with $f$. 

*On every compact set $K$ contained in the interior of $H$, the convergence $F\to f$ is uniform. 


Lemma. If $F$, $f$ and $H$ satisfy (1,2,3,4), then so do $F_{k-1}$, $f_{k-1}$ and $H_{k-1}$, where
$H_{k-1}$ is the orthogonal projection of $H$ along the $x_k$ axis. 
Assume the lemma for now. Apply it  first to $F$, $f$ and $H$, then to $F_{k-1}$, $f_{k-1}$ and $H_{k-1}$, etc. 
Eventually we arrive at $H_1$ being a closed interval, $F_1$ converging to $f_1$ in the sense described above. 
It is an easy exercise in one-dimensional integration to prove that
$$\int F_1\to \int f_1$$
Now we are done, because the integrals $\int F_1$ do not depend on the numbering of coordinates (this
was proved early in Chapter 10).  
It remains to prove the lemma, which is not super difficult but is quite boring... a good illustration of 
why people do not want to use Riemann integral in higher dimensions. It helps to draw pictures.
By a standard compactness argument, it suffices to prove that every point of the interior of $H_{n-1}$ has a
neighborhood on which convergence is uniform. Pick such a point 
$(a_1,\dots,a_{k-1})$. Consider the set $$T=\{t\in\mathbb R: (a_1,\dots,a_{k-1},t)\in H\}$$ which is a bounded interval.
Introduce the function
  $$d(t)=\operatorname{dist}((a_1,\dots,a_{k-1},t),\partial H)$$
Show that $d$ is concave (because $H$ is convex). We have $d(t_0)>0$ for some $t_0$. 
By concavity this implies a linear bound of the form 
$$d(t)>c \operatorname{dist}(t,\partial T)\tag{*}$$ where $\partial T$
is the boundary of the interval $T$. This gives you a version of (7): 
the length of the set $\{t \in T: d(t)<\delta\}$ is at most $c^{-1}\delta$. Moreover, since $d$ is uniformly (Lipschitz)
continuous, an
estimate  similar to (*) holds for segments parallel to $(a_1,\dots,a_{k-1},t)$ and near it. This gives a
uniform bound on $f_{k-1}-F_{k-1}$ in a neighborhood of $(a_1,\dots,a_{k-1})$. 
A: I was inspired by user53153 and pasted my solution as follows, any comment is appreciate.
Since $H$ is compact in $\mathbb{R}^{k}$, there exists a $k$-cell $I^{k}$ with $a_{i} \leq x_{i} \leq b_{i}$ for $i = 1,2,\ldots,k$ such that $H \subset I^{k}$, and define
\begin{equation*}
    \int_{H} f = \int_{I^{k}} f = \int_{\mathbb{R}^{k}} f
\end{equation*}
Now the problem is that $f$ may not be continuous in $I^{k}$ (because $f$ may have nonzero value on $\partial H$), the existence of $\int_{I^{k}} f$ needs proof.
The uniformly convergence of $F_{k-1}$ to $f_{k-1}$ in Example 10.4
is not true in a general compact convex $H$. For example, consider some convex polygon in the plane: if one of its edges happens to be parallel to the axis $x_{k}$, and if $f\equiv 1$, the function $f_{k-1}$ will be discontinuous. Consequently, there is no hope to approximate it uniformly by $F_{k-1}$, which is what Example 10.4 was for.
We must modify the definition of multivariate Riemann integral by Rudin, we still define it by iterative integral, but the continuity of $f_{i}$, $i = 1,2,\ldots,k$ is replaced by the Riemann integratability of $f_{i}$, $i = 1,2,\ldots,k$, and the result is required to be irrelevant to its order of integration.
Put $f = f_{k}$, and define $f_{k-1}$ on $I^{k-1}$ by
\begin{equation*}
    f_{k-1}(x_{1}, \ldots, x_{k-1}) = \int_{a_{k}}^{b_{k}} f_{k}(x_{1}, \ldots, x_{k-1}, x_{k}) d x_{k}
\end{equation*}
if $f_{k-1}$ is integratable iteratively, we can continue this process and after $k$ steps we arrive at a number $f_{0}$ and call it the integral of $f$ over $I^{k}$.
We must set a more modest goal. As $\delta \to 0$, the function $F$ converges to $f$ in the following sense:

*

*$F$ converges to $f$ at every point except possibly the boundary of
$H$.


*$f$ is bounded above and continuous on $H^{\circ}$.


*$F$ agrees with $f$ outside $H$.


*$F$ is continuous on the whole space.


*$H$ is compact convex set.
If $F$, $f$ and $H$ satisfy above conditions, then so do $F_{k-1}$, $f_{k-1}$ and $H_{k-1}$, where
\begin{equation*}
F_{k-1}(\mathbf{x}_{k-1}) = \int_{a_{k}}^{b_{k}} F(\mathbf{x}_{k-1},x_{k}) dx_{k} \qquad f_{k-1}(\mathbf{x}_{k-1}) = \int_{a_{k}}^{b_{k}} f(\mathbf{x}_{k-1},x_{k}) dx_{k}
\end{equation*}
and $H_{k-1}$ is the orthogonal projection of $H$ along the $x_{k}$ axis.
Note that $f_{k-1}$ is integratable because for the line $(x_{1},\ldots,x_{k-1},t)$, $a_{k} \leq t \leq b_{k}$, there exist only two points located at $\partial T$ defined below that make $f$ discontinuous and by Theorem 6.10, such a integral exists. And the order of the integrals $\int F_{1}$ is immaterial because the same statement in Example 10.4.
Now it suffices to prove that the conditions. Fix $\mathbf{x}_{k-1} = (x_{1},\ldots,x_{k-1})$. Consider the set
\begin{equation*}
T = \{t \in \mathbb{R}: (x_{1},\ldots,x_{k-1},t) \in H\}
\end{equation*}
which is a bounded interval.
Introduce the distance function
\begin{equation*}
   \rho_{\partial H}(t) = \operatorname{dist}((x_{1},\ldots,x_{k-1},t),\partial H)
\end{equation*}
Then $\rho$ is concave (because $H$ is convex) as follows,
Let $p \in H$, and $q$ be one of its closest points on $\partial H$. Since $H$ is convex, there exists a support hyperplane $h$ of $H$ which passes through $q$. Furthermore $h$ is orthogonal to the line $\overline{pq}$, since it supports the sphere $S_{p}$ centered at $p$ and passing through $q$. So $\rho_{\partial H}(p) = \rho_{H}(p)$. Clearly $\rho_{H}(p)$ is not bigger than $\rho_{h^{\prime}}(p)$ for any other support plane $h^{\prime}$ of $H$, because all these planes lie outside $S_{p}$. So $\rho_{\partial H}$ is the infimum of the distance functions to support hyperplanes of $H$. These functions are linear and therefore concave. So $\rho_{\partial H}$, as the minimum of a class of concave functions (linear is concave), is concave.
Because we have $\rho_{\partial H}(t_{0})>0$ for some fixed $t_{0}$ ($H^{\circ} \neq \emptyset$), by concavity, it implies a linear bound of the form
\begin{equation*}
\rho_{\partial H}(t) \geq c \operatorname{dist}(t,\partial T)
\end{equation*}
where $\partial T$ is the boundary of the interval $T$ and $c > 0$. This is because, by letting $\partial T = \{x_{k}^{1},x_{k}^{2}\}$ with $x_{k}^{1} < x_{k}^{2}$, the difference ratio is non-increasing (see Exercise 4.23), i.e.,
\begin{align*}
   \frac{\rho_{\partial H}(t) - \rho_{\partial H}(x_{k}^{1})}{t - x_{k}^{1}} &\geq \frac{\rho_{\partial H}(t_{0}) - \rho_{\partial H}(x_{k}^{1})}{t_{0} - x_{k}^{1}} \quad \text{if }t \leq t_{0} \\
   \frac{\rho_{\partial H}(t) - \rho_{\partial H}(x_{k}^{2})}{t - x_{k}^{2}} &\leq \frac{\rho_{\partial H}(t_{0}) - \rho_{\partial H}(x_{k}^{2})}{t_{0} - x_{k}^{2}} \quad \text{if }t > t_{0}
\end{align*}
which implies, since $\rho_{\partial H}(x_{k}^{1}) = \rho_{\partial H}(x_{k}^{2}) = 0$,
\begin{align*}
\frac{\rho_{\partial H}(t)}{t - x_{k}^{1}} &\geq \frac{\rho_{\partial H}(t_{0})}{t_{0} - x_{k}^{1}} \Longrightarrow \rho_{\partial H}(t) \geq \frac{\rho_{\partial H}(t_{0})}{t_{0} - x_{k}^{1}}(t - x_{k}^{1}) \geq \frac{\rho_{\partial H}(t_{0})}{t_{0} - x_{k}^{1}}\operatorname{dist}(t,\partial T)\\
\frac{\rho_{\partial H}(t)}{t - x_{k}^{2}} &\leq \frac{\rho_{\partial H}(t_{0})}{t_{0} - x_{k}^{2}} \Longrightarrow \rho_{\partial H}(t) \geq \frac{\rho_{\partial H}(t_{0})}{x_{k}^{2} - t_{0}}(x_{k}^{2}-t) \geq \frac{\rho_{\partial H}(t_{0})}{x_{k}^{2} - t_{0}}\operatorname{dist}(t,\partial T)\\
\end{align*}
and
\begin{equation*}
c = \max \bigg\{\frac{\rho_{\partial H}(t_{0})}{t_{0} - x_{k}^{1}}, \frac{\rho_{\partial H}(t_{0})}{x_{k}^{2} - t_{0}}\bigg\} > 0
\end{equation*}
Note that $c$ is a function of $\mathbf{x}_{k-1} = (x_{1},\ldots,x_{k-1})$.
Define
\begin{equation*}
\phi(t) = \left\{\begin{array}{ll}
1 & t \geq \delta \\
\frac{t}{\delta} & 0 < t < \delta \\
0 & t = 1
\end{array}\right.
\end{equation*}
where $0<\delta<1$, and
\begin{equation*}
F(\mathbf{x}_{k}) = \phi(\rho_{\partial H}(\mathbf{x}_{k}))f(\mathbf{x}_{k}) \in \mathscr{C}(I^{k})
\end{equation*}
This gives us a version of Example 10.4: the length of the set $\{t \in T: \rho_{\partial H}(t) \leq \delta\}$ is at most $c^{-1}\delta$. Since $0 \leq \phi \leq 1$, it follows that
\begin{equation}\label{eq:ch10:exe1b}
|F_{k-1}(\mathbf{x}_{k-1}) - f_{k-1}(\mathbf{x}_{k-1})| \leq c^{-1}\delta \|f\|\tag{$\dagger$}
\end{equation}
As $\delta \to 0$, \eqref{eq:ch10:exe1b} exhibits $f_{k-1}$ as a pointwise limit of a sequence of continuous functions. Furthermore, we claim $f_{k-1}$ is continuous (not necessarily uniformly continuous) on $H_{k-1}^{\circ}$. Since for any $\mathbf{y_{k-1}}$ such that $|\mathbf{y_{k-1}} - \mathbf{x_{k-1}}| < \delta^{\prime}$,
\begin{align*}
|f_{k-1}(\mathbf{y_{k-1}}) - f_{k-1}(\mathbf{x_{k-1}})| &\leq |f_{k-1}(\mathbf{y_{k-1}}) - F_{k-1}(\mathbf{y_{k-1}})|\\
&+ |F_{k-1}(\mathbf{y_{k-1}}) - F_{k-1}(\mathbf{x_{k-1}})|\\
&+ |F_{k-1}(\mathbf{x_{k-1}}) - f_{k-1}(\mathbf{x_{k-1}})|
\end{align*}
Note that $F_{k}$ is continuous on $H$, thus is uniformly continuous on $H$, i.e.,
\begin{equation*}
|F_{k-1}(\mathbf{y_{k-1}}) - F_{k-1}(\mathbf{x_{k-1}})| < \frac{\epsilon}{b_{k}-a_{k}}
\end{equation*}
for any $\epsilon>0$ if $\mathbf{y_{k-1}} - \mathbf{x_{k-1}} < \delta^{\prime\prime}$ for sufficiently small $\delta$. Hence $F_{k-1}$ is continuous. Thus, as $\delta^{\prime\prime},\delta^{\prime},\delta \to 0$, $|f_{k-1}(\mathbf{y_{k-1}}) - f_{k-1}(\mathbf{x_{k-1}})| \to 0$, $f_{k-1}$ is continuous at $\mathbf{x}_{k-1} \in H_{k-1}^{\circ}$, and the further integrations present no problem.
