How does the following equality hold? $f$ is nonnegative and integrable $$\int_{-\infty}^\infty f=\lim_{n\to\infty} \int_{-n}^nf=\lim_{n\to\infty} \int_{\{f\ge(1/n)\}}f=\lim_{n\to\infty} \int_{\{f\le n\}}f$$
I can see how all the equality hold but I am having trouble expressing it on paper.
For example $\int_{-\infty}^\infty f$=$\lim_{n\to\infty} \int_{\{f\ge(1/n)\}}f$ because as n approaches infinitely, {$ f\ge (1/n)$} eventuall become the whole domain of $f$ since $f$ is nonnegative.
For $\int_{-\infty}^\infty f$=$\lim_{n\to\infty} \int_{\{f\le n\}}f$ this holds since the set {$f \ge n$} is also eventually the whole domain of $f$.
Would this be ok? $\int_{-\infty}^\infty f$=$\int \lim_{n\to\infty}f \cdot X_{f \ge(1/n)}$=$lim_{n\to\infty} \int_{\{f\ge(1/n)\}}f$ by MCT?