I know that, for a domain of finite measure $X$, provided that $f$ is measurable, each of the Lebesgue integrals$$\int_X f(x)d\mu\quad\text{ and }\quad\int_X |f(x)|d\mu$$exists if and only if the other one does.
I read in Kolmogorov-Fomin's that the property also holds if $X$ is not of finite measure, but is the sum $X=\bigcup_n X_n$ of countable measurable sets $X_n$ of finite measure $\mu(X_n)<\infty$ such that $X_1\subset X_2\subset...$. In this case the integral is defined by $\int_Xf(x)d\mu=\lim_n\int_{X_n} f(x)d\mu$.
I have been able to prove that if $\int_X |f(x)|\,d\mu$ exists then $\int_X f(x)d\mu$ exists too, but I am not convinced that if $\int_X f(x)\,d\mu$ exists $\int_X |f(x)|\,d\mu$ also does.
Could anybody confirm that and, if it is true, explain how it can be proven? $\infty$ thanks!
EDIT: precised that $f$ must be measurable, thanks to KCd's comment.
The integral $$ \int_X f\,d\mu, $$ is by definition equal to $$ \int_X f^+\,d\mu-\int_X f^-\,d\mu, \tag{1} $$ where $f^+(x)=\max\{f(x),0\}$ and $f^-(x)=\max\{-f(x),0\}$, and this definition makes sense, as a real number, if and only if $\int_X \lvert\,f\lvert\,d\mu<\infty$.
Why? If $\int_X \lvert\,f\lvert\,d\mu<\infty$, then $\int_X f^+\,d\mu,\int_X f^-\,d\mu<\infty$, and hence $(1)$ is definable. On the other hand, if $(1)$ is definable as a real number, then $\int_X f^+\,d\mu,\int_X f^-\,d\mu<\infty$ and as $\lvert\,f\lvert=f^-+f^+$, then $\int_X \lvert\,f\lvert\,d\mu<\infty$.