Question on Integration in a $\sigma$-finite space Let $(S,\mathcal A,\mu)$ be a $\sigma$-finite measure space and 
$f:S\rightarrow[0,\infty)$ a measurable function.Prove:
$\int_Sfd\mu =\int_0^{\infty}\mu(\{f\geq t\})dt$.
I would really appreciate some tips on how to approach this.
 A: The formula is true in general: no $\sigma$-finiteness is needed. 
Also, observe that there is a simple reduction to the case in which $f$ is bounded above; namely, replace $f$ by $x\mapsto M\wedge f(x)$, and then use monotone convergence to let $M$ increase to $\infty$.
So suppose $f$ is bounded above, say by $1$. The functions $f_n$ defined by
$$
f_n(x):=\sum_{k=1}^{2^n-1} k2^{-n}1_{\{k2^{-n}<f\le (k+1)2^{-n}\}}(x)
$$
increase pointwise to $f$. Thus $\int f\,d\mu=\lim_n\int f_n\,d\mu$. But
$$
\eqalign{
\int f_n\,d\mu 
&=\sum_{k=1}^{2^n-1} k2^{-n}\mu(\{k2^{-n}<f\le (k+1)2^{-n}\})\cr
&=\sum_{j=1}^{2^n-1}\mu(\{f>j2^{-n}\})2^{-n}.\cr
&=\int_{[0,1]}g_n(t)\,dt,}
$$
where $g_n(t)=\sum_{j=1}^{2^n}\mu(\{f>j2^{-n}\})1_{[(j-1)2^{-n},j2^{-n})}(t)$.
Because  $g_n$ increases pointwise to $t\mapsto\mu(\{f>t\})$, $\lim_n\int_{[0,1]} g_n(t)\,dt =\int_0^1 \mu(\{f>t\})\,dt$.
A: The set $E=\{(x,t) : 0≤t≤|f(x)|\}$ is measurable, and as the measure space is $\sigma$-finite, you can use Tonelli's theorem on
$$I=\int_0^{\infty} \mu(\{f>t\}) = \int_0^{\infty} dt \int_{\{x, |f(x)|>t\}}1 dx$$

 $$I=\int_{S^2}  \mathbb 1_E = \int_S dx \int_0^{|f(x)|} 1 dt = \int_S |f| $$

Alternatively, you can prove it first for simple functions, and then use the fact that there is a monotone sequence of simple functions converging pointwise (a.e.) to $f$.
A: By Fubini-Tonelli,
$$
\int_Sf\,d\mu =\int_S\int_0^\infty \chi_{\{(x,t):f(x)\geq t\}}\,dt\,d\mu(x)=\int_0^\infty\int_S \chi_{\{(x,t):f(x)\geq t\}}\,d\mu(x)\,dt=\int_0^{\infty}\mu(\{f\geq t\})dt
$$
