Understanding the proof of the Poincaré's inequality This is from the text, finite method elements and their applications:

I am trying to understand how we integrate the right hand side over $\Omega$. In the one dimensional case, the right hand side is constant, but in this case, it depends on $x$ since as $x$ varies, $x_2,\ldots,x_d$ will vary. So integrating the right hand side over $\Omega$ would mean :
$$\int_\Omega\left(\int_{0}^{l}\left|\frac{\partial v}{\partial x_{1}}\left(y, x_{2}, \ldots, x_{d}\right)\right|^{2} d y\right)dx
$$
How would this give us the final inequality?
 A: The right side of the inequality above (1.35) has the variables $x_2,\dotsc,x_d$ still free, while the right side has all of the variables $x_1,\dotsc,x_d$ still free.  In this sense you can think of the inequality as being of the form $F(x) = F(x_1,\dotsc,x_d) \le G(x_2,\dotsc,x_d)$ for all $x \in \Omega$, where $\Omega$ is the cube $(0,\ell)^d$.  The nice thing about a cube is that if you forget about its first variable (or, really, any one of them) it still gives you a cube for the remaining variables.  So let's say that $\Omega = (0,\ell)^d = (0,\ell) \times \Omega'$, where $\Omega' = (0,\ell)^{d-1}$.  Then we first integrate the inequality over $\Omega'$ and use Fubini-Tonelli:
$$
\int_{\Omega'} |v(x_1,x_2,\dotsc,x_d)|^2 dx_2 \cdots dx_d \le \ell \int_{\Omega'} \int_0^\ell |\partial_1 v(y,x_2,\dotsc,x_d)|^2 dy dx_2 \cdots dx_d \\ 
=\ell  \int_0^\ell \int_{\Omega'} |\partial_1 v(y,x_2,\dotsc,x_d)|^2 dy dx_2 \cdots dx_d  = \ell \int_\Omega |\partial_1 v(w)|^2 dw
$$
where in the last integral $dw$ indicates Lebesgue measure in $\mathbb{R}^d$.  Now we're back in a situation similar to before in that the left side still has $x_1$ as a free variable but the right has no variable and is in fact a constant.  So we simply integrate once more with respect to $x_1$ and use Fubini-Tonelli again:
$$
\int_\Omega |v(w)|^2 dw = \int_0^\ell \int_{\Omega'} |v(x_1,x_2,\dotsc,x_d)|^2 dx_2 \cdots dx_d dx_1 \le \int_0^\ell \left(  \ell \int_\Omega |\partial_1 v(w)|^2 dw\right) \\
=  \ell^2 \int_\Omega |\partial_1 v(w)|^2 dw.
$$
As the final step we forget about the special role of $\partial_1$ and replace by the less-efficient inequality that uses the entire $H^1$ seminorm:
$$
\Vert v \Vert_{L^2(\Omega)}^2 = \int_\Omega |v(w)|^2 dw \le \ell^2 \int_\Omega |\partial_1 v(w)|^2 dw \le \ell^2 \sum_{j=1}^d  \int_\Omega |\partial_j v(w)|^2 dw = \ell^2 |v|_{H^1}^2.
$$
Take a square root, and we're done.
