[Math] An unbounded continuous function on $(0,1)$ that is in $L^p(0,1)$ for $1\le p <\infty$

analysisfunctional-analysis

So this is a question on an old qualifying exam I was going over. Give an example of a function $g$ such that $g$ is continuous and unbounded on $(0,1)$ and that $g \in L^p(0,1) $ for $1 \le p < \infty$. I haven't made any headway with this.

My roommate suggested perhaps doing some construction like enumerating the rationals in $(0,1)$ and putting a spike on the nth rational of height n and width $\frac{1}{n2^{n-1}}$. Then the sum of the areas is the geometric series so it should sum to 1. But there are a lot of details I'm unsure about, ie that end function would be a countable sum of continuous function which doesn't seem like it needs to be a continuous function (fourier series etc). And it isn't apparent that this would be bounded for all $p < \infty$.

Anywho, I am stumped. Does anybody have any ideas or would like to provide a hint?

Best Answer

Try $g(x)=\log x$. Then with $u=\log x$, $$\int_0^1 |\log x|^p dx = \int_{-\infty}^0 e^u |u|^p du = \Gamma(p+1) < \infty.$$

Related Question