bass analysis exercise 6.9 The following problem comes from bass analysis for graduate student
Let $(X, A, \mu)$ be a finite measure space and suppose
$f$ is a non-negative, measurable function that is finite at each
point of $X$, but not necessarily integrable. Prove that there exists
a continuous increasing function $g : [0, \infty) \to [0, \infty)$ such that
$\lim_{x\to \infty} g(x) = \infty$ and $g \circ f$ is integrable.
Please help me, I have no ideal how to tackle this.
 A: I believe there might be a more elegant way to do. But here is my proof. Maybe it is too late for your homework.

Lemma Let $\left ( X, \mathcal{A}, \mu \right )$ be a finite measure space. Then $f$ is integrable if and only if 
  $$ \sum_{n=1}^{\infty} \mu \left ( \left \{ f \geq n\right \} \right ) < \infty$$

This lemma can be proved by invoking Abel summation. It is available online.
Now notice that $\mu \left ( \left \{ f \geq \alpha\right \} \right )$ decreases with $\alpha$ and it dies eventually since $f$ is finite at each point. 
This means we can pick $a_n $ increasing to $\infty$ and $$\mu \left ( \left \{ f \geq a_n\right \} \right ) < \frac{1}{2^n} \mu(X).$$
Also, we delete all the same $a_i$ so $i<j$ implies $a_i < a_j$. Now define $g$ to be the linear interpolation of the following sequence of points:
$$\left \{ \left ( 0, 0 \right ), \left ( a_1, 1 \right ), \left ( a_2, 2 \right ), \cdots \right \}.$$
$g$ is piecewisely linear, so it is continuous. Also, it goes to $\infty$ as $x$ goes to $\infty$. See that $$g\circ f \geq n \Leftrightarrow f\geq g^{-1}(n) = a_n.$$
Therefore,
$$\sum_{n=1}^{\infty} \mu \left ( \left \{ g\circ f \geq n\right \} \right )  = \sum_{n=1}^{\infty} \mu \left ( \left \{ f \geq a_n\right \} \right ) < \infty.$$
By the Lemma, $g\circ f$ is integrable.
