Proving the existence of a continuous increasing function. Let $\left( {X,\mathcal{A},\,\mu } \right)$ 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 intergrable. Prove that there exists a continuous increasing function $g:\left[ {0,\infty } \right) \to \left[ {0,\infty } \right)$ such that $\mathop {\lim }\limits_{x \to \infty } g\left( x \right) = \infty $ and $g \circ f$ is integrable.
I am totally clueless about how to proceed with this. Any help?
 A: The result for $\mathrm{ess}\sup f(X)<\infty$ is trivial, so we assume that $\mathrm{ess}\sup f(X)=\infty$. Since your $\mu$ is finite, you can just divide your $X$ into $X=\cup A_i$, $A_i=\{x\in X:k_i\leq f(x)< k_{i+1}\}$, such that $\mu(A_i)>3\mu(A_{i+1})>0$ for all $i\in\mathbb{N}$. Now first define $\hat{g}(y)=\frac{1}{2^i\mu(A_i)}$ for $y\in [k_i,k_{i+1})$. Then $\hat{g}$ is increasing, since $\frac{1}{2^i\mu(A_i)}<\frac{1}{2^{i+1}\mu(A_{i+1})}$ by the previous condition. In particular, $\frac{1}{2^i\mu(A_i)}>\frac{3^{i-1}}{2^i\mu(A_1)}\rightarrow\infty$ as $i\rightarrow\infty$, so $\hat{g}\rightarrow\infty$. We also know that $\int \hat{g}\circ fd\mu=\sum\frac{1}{2^i}<\infty$. Now to get a continuous $g$, you can just combine your step function $\hat{g}$ near all non continuity point by a line which doesn't change the integral. Then the $g$ is your sought. 

There is still a little mistake at step 2, since I can not controll the distribution the values of $f$, so a changing by a line will also give a change to the integral. To fix this, we can use dominating convergence theorem: for the interval $[k_1,k_3]$, let $g_n$ be the continuous function which is combined by a line near the discontinuity of $[k_1,k_3]$, and the line converging to the line which is penparticular to the discontinuity. Then $\int_{A_1\cup A_2}g_n\circ f$ should converge to $\int_{A_1\cup A_2}\hat{g}\circ f$ due to dominating convergence theorem. We find a $n$ such that the gap is $\frac{1}{2}$. Then do it for the $i$-th discontinuity with a gap $(\frac{1}{2})^i$. At the end, the modificated function is our sought $g$.  
