How to prove $\int_{\Omega} \sum_{i=1}^{N} f_i(x)dx$ is equivilant with $\sum_{i=1}^{N} \int_{\Omega} f_i(x)u_i(x)dx$

48 Views Asked by At

I have a 2D image in $\Omega$ space. Assume that the space can be separated into $N$ sub-regions $\Omega_i$ such that $\Omega_i \cap\Omega_j=\emptyset$; $\Omega_i \cup \Omega_j=\Omega, \forall i,j=1... N$

Let $u_i(x)=1$ if $x \in \Omega_i$, otherwise $u_i(x)=0$. Then we have that $\sum_{i=1}^{N}f_i(x)u_i(x)=f_i(x)$ if $x \in \Omega_i$

I have a energy function that is defined as following $$E_1(x)=\int_{\Omega} \sum_{i=1}^{N} f_i(x)dx$$

"Does the below equation $E_2(x)$ equate with above energy function $E_1(x)$?" How to prove it? $$E_2(x)=\sum_{i=1}^{N} \int_{\Omega} f_i(x)u_i(x)dx$$