# How to show that two equimeasurable functions are both integrable or both not integrable

Assume that $\mu$ is a positive measure on a $\sigma$-field $S$ of subsets of $X$. Assume that functions $f,g\colon X \to \mathbb{R_+}$ are measurable and satisfy for every $a \in \mathbb{R}$ the following condition: $$\mu \{x\in X: f(x)<a \}=\mu \{x \in X: g(x)<a \}.$$ I would like to ask how to show that either $f,g$ are both integrable and $\int_X f d \mu=\int_X g d\mu$ or $f,g$ are both not integrable.

-

$$\int_Xf(x)\mathrm d\mu(x)=\int_0^{+\infty}\mu\{x\in X\,:\,f(x)\geqslant t\}\,\mathrm dt$$