Let X be a locally compact Hausdorff space, and let be a regular Borel measure on $X$ such that $\mu(X) = +\infty$. Show that there is a nonnegative function $f\in C_0(X)$ such that $\int{fd\mu} = +\infty$.
I'm stuck on this problem. It seems I should construct the function, but I don't know how to start.
Since $\mu$ is inner regular and $\mu(X) = +\infty$, there is a sequence of compact subsets $\{K_n\}_{n=1}^{\infty}$ such that $\mu(K_n) \to +\infty$. Passing to a subsequence if needed, we may further assume that $\mu(K_i) \geq 2^i$ for all $i \geq 1$.
Also, since $X$ is locally compact and Hausdorff, the following is true:
Using these two ingredients, we construct such $f$ as follows:
Since $\sum_{i=1}^{\infty} \frac{1}{\mu(K_i)} < \infty$ and $C_0(X)$ is complete w.r.t. the supremum norm, Weierstrass M-test shows that $f$ is well-defined and is in $C_0(X)$. By construction, it is clear that $f \geq 0$ as well. Finally, by the Tonelli's theorem and the estimate $f_i \geq \mathbf{1}_{K_i}$, we have
$$ \int_X f \, d\mu = \sum_{i=1}^{\infty} \frac{1}{\mu(K_i)} \int_X f_i \, d\mu \geq \sum_{i=1}^{\infty} \underbrace{\frac{1}{\mu(K_i)} \int_X \mathbf{1}_{K_i} \, d\mu}_{=1} = +\infty. $$