# $\sum_n \int_{A_n} |f(x)| d\mu < \infty$

Let $A = \cup_n A_n$ be a finite or countable union of pairwise disjoint sets $A_n$, and suppose $f$ is integrable on each $A_n$, and satisfies the condition $$\sum_n \int_{A_n} |f(x)| d\mu < \infty$$

I have to prove that $f$ is integrable on $A$.

I can't prove this statement, I have tried first that If $f$ is simple, with values $y_1,y_2,\ldots,y_n,\ldots$ let the sets $B_k$ and $B_{nk}$ be $$B_k= \{x | x \in A \ , \ f(x)=y_k \}$$ and $$B_{nk} = \{x | x\in A_n \ , \ f(x)=y_k \}$$ and then how can I prove that

$$\int_{A_n} |f(x)| d\mu = \int_k |y_k| \mu(B_{nk})$$

Proving this with the absolute convergence given implies the convergence of $$\sum_n \sum_k |y_k| \mu(B_{nk}) = \sum_k |y_k| \sum_n \mu(B_{nk})= \sum_k |y_k| \mu(B_{k})$$ and hence the integrability of $f$ on $A$. Is it correct?

If someone could help me please. Thanks for your time and help.

$f_N (x) = |f(x)| {\bf 1}_{\cup_{n\le N} A_n}(x)$.
Now $0\le f_N\nearrow f$, because $A=\cup A_n$.
$$\sum_{n\le N} \int_{A_n} |f| d\mu = \int |f_n|d\mu.$$