$f$ is integrable over $Q$ iff $U(f,P)-L(f,P)<\epsilon$ for any partition $P$ of mesh less than $\delta$ What shown below is a reference from "Analysis on manifolds" by James R. Munkres

To follow a proof of the theorem I have found here.

So I don't understand why $L(f,P'')-L(f,P)\le2M(\text{mesh} P)(\text{width}Q)^{n-1}$

*

*Let be $P:=(P_1,...,P_n)$ and we create a refinement $P''$ of $P$ by adding a point $q$ at the $i$-th partition $P_i$ which is part of $P$ so that $P$ and $P''$ differ only for the subrectangles whose sides contain the newly added point, that is for the subrectangles of the form $R_S:=S\times[a_i,q]\times T$, $R_T:=S\times[q,b_i]\times T$ of $P''$ and $R':=S\times[a_i,b_i]\times T$ of $P$, where $S$ is a rectangle of $\Bbb{R}^i$ and $T$ is a rectangle of $\Bbb{R}^{n-i}$. So clearly $$L(f,P'')-L(f,P)=\sum\Big(m_{R_S}(f)\cdot v(R_S)+m_{R_T}(f)\cdot v(R_T)-m_{R'}(f)\cdot v(R')\Big)$$ because the rectangles of the form $R_S$ and $R_T$ and $R'$ are equal in number. Now for convenience we define $$\lambda:=\text{width} Q$$ and we observe that if $R=[\alpha_1,\beta_1]\times...\times[\alpha_n,\beta_n]$ is a subrectangle of $P$ then $R\subseteq Q$ and so if $Q=[a_1,b_1]\times...\times[a_n,b_n]$ then $[\alpha_j,\beta_j]\subseteq[a_j,b_j]$ for any $j=1,...,n$ so that $\beta_j-\alpha_j\le\lambda$; analogously we define $$\delta:=\text{mesh} P$$ so that clearly $\beta_j-\alpha_j\le\delta$ for any $j=1,..,n$. So is not difficult to see that $$v(R)\le\delta\lambda^{n-1}$$ for any subrectangle $R$ of $P$. Now if $|f(x)|\le M$ for any $x\in Q$ then $-M\le m_{R_S},m_{R_T},m_{R'}\le M$ so that $-m_{R'}(f)\cdot v(R')\le M\cdot v(R')$ and $m_{R_S}(f)\cdot v(R_S)\le M\cdot v(R_S)$ and $m_{R_T}(f)\cdot v(R_T)\le M\cdot v(R_T)$. Finally $$m_{R_S}(f)\cdot v(R_S)+m_{R_T}(f)\cdot v(R_T)-m_{R'}(f)\cdot v(R')\le M\big(v(R_S)+v(R_T)\big)+M\cdot v(R')=2Mv(R')\le 2M\delta\lambda^{n-1}$$ but this don't means that $L(f,P'')-L(f,P)\le 2M\delta\lambda^{n-1}$.

*Then how prove analogously that $U(f,P)-U(f,P'')\le  2M\delta\lambda^{n-1}?$
So could someone help me, please?
 A: With partition $P$, the edge $[a_i, b_i]$ is decomposed into nonoverlapping intervals as
$$[a_i,b_i] = \bigcup_{j=1}^m[\alpha_{ij},\beta_{ij}]$$
and the refinement $P''$ is formed by inserting the point $q$ into some interval $(\alpha_{ik}, \beta_{ik})$.
Both $P$ and $P''$ share common subrectangles of the form  $S\times [\alpha_{ij}, \beta_{ij}]\times T$ for $j \neq k$.  However, the $P$-subrectangles of the form  $R_{S,T,k} =S\times [\alpha_{ik}, \beta_{ik}]\times T$ are decomposed into $R'_{S,T,k} =S\times [\alpha_{ik}, q]\times T$ and $R''_{S,T,k} =S\times [q,\beta_{ik}]\times T$ in forming $P''$.
Denoting $m_R = \inf_{x \in R} f(x)$, we have
$$|m_{R'_{S,T,k}} -m_{R_{S,T,k}}| \leqslant 2M, \, |m_{R''_{S,T,k}} -m_{R_{S,T,k}}| \leqslant 2M,$$
which implies that  $m_{R'_{S,T,k}} \leqslant m_{R_{S,T,k}}+ 2M$ and  $m_{R''_{S,T,k}} \leqslant m_{R_{S,T,k}}+ 2M$.
Hence,
$$m_{R'_{S,T,k}}  \, v(R'_{S,T,k}) + m_{R''_{S,T,k}} \, v(R''_{S,T,k}) \leqslant m_{R_{S,T,k}}\,v(R_{S,T,k}) +2M \,v(R_{S,T,k}) \\  \leqslant m_{R_{S,T,k}}\,v(R_{S,T,k}) +2M \,\delta \, v(S)\, v(T)$$
The contribution to the lower sums $L(f,P'')$ and $L(f,P)$ from other subrectangles are the same.  Adding these to both sides and summing over all subrectangles we get
$$L(f,P'') \leqslant L(f,P) + 2M \delta \sum_{S,T}v(S)\, v(T) \leqslant L(f,P) + 2M \delta\, \lambda^{n-1}$$
Therefore, $$0 \leqslant L(f,P'') -  L(f,P) \leqslant 2M \delta\, \lambda^{n-1}$$
The left-hand inequality is obvious since $m_{R'_{S,T,k}}, \, m_{R''_{S,T,k}} \geqslant m_{R_{S,T,k}}$.
