Background. Let $V = (X,Y)$ be a random vector in 2-dimensions uniformly distributed over two disjoint regions $R_X \cup R_Y$ defined as follows:
$$ \begin{align} R_X &= ([0,1] \times [0,1]) \setminus \left(\bigcup A\right) \\ R_Y &= [1,2] \times [1,2], \end{align} $$
where $$ A = \{[.2,.4] \times [.2,.4], [.2,.4] \times [.6,.8], [.6,.8] \times [.2,.4], [.6,.8] \times [.6,.8]\}. $$ A plot of the regions (green is the density/area associated with each region) is:
I'm interested in how to find $E(XY)$. So, letting $\lambda$ be the Lebesgue measure the associated pdf is
$$ f_{XY}(x,y) = \begin{cases} \frac{1}{\lambda\left(R_X \cup R_Y\right)} = \frac{1}{\lambda([0,1] \times [0,1]) - \lambda\left(\bigcup A\right) + \lambda([1,2] \times [1,2])} \approx \frac{25}{46}, &(x,y) \in R_X\cup R_Y \\ 0, &\text{otherwise} \end{cases} $$
Using the traditional definition
$$E(XY) = \int_{R_X\cup R_Y} xyf_{XY}(x,y)d\lambda = \frac{25}{46}\int_{R_X\cup R_Y} xyd\lambda = \frac{25}{46}\left(\int_{R_X} xydxdy + \int_{R_Y} xydxdy\right).$$
Integrating over $R_Y$ is straightforward. But for the "non-simple" region $R_X$ would we calculate it as
$$\int_{R_X} xydxdy = \int_0^1\int_0^1 xydxdy - \sum_{a \in A} \int_a xydxdy~\text{?} \tag{1}$$
What if there were countably many boxes to remove from $R_X$ instead of 4 finite ones? Does the formula for (1) generalize (I'm assuming here we could use something like the MCT/DCT/etc. to evaluate the sum).
EDIT (after @whuber answer): Quick follow-up points:
- It's apparent now that $E(X)$ could be found using this mixture approach too, i.e.
$$\sum_i \omega_i p_i = \frac{21}{25}$$
and
$$E(X) = \frac{25}{21}\left(\frac{1}{2} - \frac{9}{2500} - \frac{21}{2500} - \frac{21}{2500} - \frac{49}{2500}\right) = \frac{23}{42}.$$
- For the case where instead of 4 finite regions removed, we have countably many, then we can generalize as
$$E(XY) = \frac{25}{46}\left(\iint_{[0,1]\times [0,1]} xydxdy + \iint_{[1,2]\times [1,2]} xydxdy - \sum_{j}^{\infty}g(x)\mathscr{I}_j(x)\right) = \frac{25}{46}\left(\frac{1}{4} + \frac{9}{4} - \sum_{j}^{\infty}g(x)\mathscr{I}_j(x)\right),$$
for $j > i$ and assuming that $\sum_{j}^{\infty}g(x)\mathscr{I}_{j}(x) < \infty$ (i.e. converges).