I've encountered two similar statements that I don't know how to prove.
$1.$ let $(X,\Sigma,\mu)$ be a $\sigma$-finite measure space. let $f:X\to [0,\infty)$ be measurable. Show that:
$\int_X fd\mu =\int_{[0,\infty)}\mu(\{x|f(x)>t\})dm(t)$
$2.$ let $(X,\Sigma,\mu)$ be a complete measure space. let $f\in L^1(\mu)$ be non-negative. Show that:
$\int_X f d\mu=\int_{[0,\infty)}\mu(\{x|f(x)\ge t\})dm(t)$
I've tried to solve it but i'm not even sure what is $m(t)$ and how do I integrate over
$\int_{[0,\infty)}\mu(\{x|\chi_A>t\})dm(t)$, for $f=\chi_A$
how do I continue?
Assuming that $m$ is Lebesgue measure, we indeed get $$ \int_{(0, \infty)} \mu(\chi_A > t) dm(t) = \int_{(0, \infty)} \mu(A) \mathbf{1}_{t \in [0, 1)} dm(t) = \mu(A) = \int_X \chi_A d\mu. $$ By linearity and measure additivity, this result is valid for positive linear disjoint combinations of indicator functions, and we note that by pruning negative terms, the Lebesgue integral is approximated by these arbitrarily well, so that using monotonicity, we already obtain $$ \int_{(0, \infty)} \mu(f > t) dm(t) \ge \int_X f d\mu, $$ (similarly for the same formula with $\ge$ sign) with the reverse inequality following if we can prove that $$ \int_{(0, \infty)} \mu(f_n > t) dm(t) \to \int_{(0, \infty)} \mu(f > t) dm(t), $$ where $f_n \uparrow f$ is a sequence of simple functions (resp. a similar claim for the $\ge$ sign). In order to do that, we use eg. majorised convergence for 2; for 1., one would have to concoct a direct proof using a finite countable cover.
Of course, Mr. Murti's suggestion of using Fubini's theorem also leads to a proof.