# Disentangling $\int_Af(\mathbf{x})\ d\mathbf{x}$, using Fubini Theorem.

Let $\mathcal{B}^n$ be the borel sigma algebra generated by the rectangles in $\mathbb{R}^n$. I can write $f(\mathbf{x})=g_1(x_1)\cdots g_n(x_n)$. Let $\mu=\mu_1\times \cdots \times \mu_n$ be the Lebesgue product measure.

Is it possible to write $\int_Af(\mathbf{x})\ d\mu(\mathbf{x})$, where $A \in \mathcal{B}^n$, as an expression of $\prod^n_{i=1}\int_{A_i}g_i(x_i) \, d\mu_i(\mathbf{x})$, where the $A_i$ are not dependent on each other?

So, I was thinking of using the fact that the $\mathcal{B}^n$ can be generated by rectangles of the form $I_1\times \cdots \times I_n$, where $I_i \subset \mathbb{R}$ are intervals; and then use the Fubini theorem, which is valid for rectangles, to reach the expression I desire. However, I don't know how to do this...

Any help would be appreciated.

P.S.: What if $\mu$ is not lebesgue?

No, you can't. Look at the following example: If $A$ is the unit disc in the $(x_1,x_2)$-plane then Fubini's theorem says that $$\int_A g_1(x_1) g_2(x_2)\>{\rm d}(x_1,x_2)=\int_{-1}^1 \int_{-\sqrt{1-x_1^2}}^{\sqrt{1-x_1^2}} g_1(x_1)\> g_2(x_2)\>dx_2\>dx_1\ ,$$ as you have learned in Calculus 102. (You are allowed to take the factor $g_1(x_1)$ out of the inner integral.)
Things are different if the domain of integration $B\subset{\mathbb R}^n$ is itself a cartesian product $$A=\prod_{i=1}^n A_i\tag{1}$$ with $A_i$ embedded in the $i^{\rm th}$ factor of ${\mathbb R}^n$. In this case the $n$-fold integral indeed "separates" as envisaged in your question.
A general subset $A\subset{\mathbb R}^n$, even a finite union of boxes $B:=\prod_{i=1}^n [a_i,b_i]$, cannot be presented in the form $(1)$, and this definitively forbids the simplification you desire.