An example of a function in $L^1[0,1]$ which is not in $L^p[0,1]$ for any $p>1$ Title says most of it. Could you help me find an example?
It is easy obviously to show a function that would not be in $L^p[0,1]$ for a specific $p$ (say $(1/x)^{1/p}$, but I can't see how it would be done for all $p$. The reason I'm asking is because we proved in class that $L^p[0,1]$ is nowhere dense as a subset of $L^1[0,1]$, so there must be some $L^1[0,1]$ like this..
Thanks :)
Added: thanks for all the comments. there was some missing parts about how to use convergence theorems that i couldn't complete my own so i'd love assistance :)
 A: Take
$$f(x) = a_n \quad\text{ if }\quad x\in\left(\frac{1}{2^n},\frac{1}{2^{n-1}}\right]$$
for $n = 1, 2, \dots$ and for some $a_n$.
You'll get
$$\int_0^1 f(x)\, dx = \sum_{n=1}^{\infty}\frac{a_n}{2^n}$$
$$\int_0^1 f^p(x)\, dx = \sum_{n=1}^{\infty}\frac{a_n^p}{2^n}$$
Then choose the sequance $a_n$ so that the first sum is convergent, while the second one is divergent for any $p>1$. For example
$$a_n = \frac{2^n}{n^2}.$$
$$\sum_{n=1}^{\infty}\frac{a_n}{2^n} = \sum_{n=1}^{\infty}\frac{1}{n^2}<\infty$$
$$\sum_{n=1}^{\infty}\frac{a_n^p}{2^n} = \sum_{n=1}^{\infty}\frac{2^{n(p-1)}}{n^{2p}} = \infty$$
A: $$f = \sum_n \frac{1}{2^n \cdot \int_0^1 x^{-1+1/n} \, dx} \cdot x^{-1 + 1/n}$$
EDIT: The idea is that $x^{-1 + 1/n}$ is "barely integrable", but not integrable if taken to a power $p > \frac{-1}{-1 + 1/n} \to 1$. Hence, we sum all these functions in such a way that the result is still integrable (use monotone convergence).
But because of $f \geq C_n \cdot x^{-1 + 1/n}$ for all $n$ with $C_n > 0$, it is easy to see that $f^p$ is not integrable for any $p>1$.
A: How about this one?
$$f(x)=\frac1{x(1-\ln(x))^2}$$
Then $$\int f(x)\,dx=\frac1{1-\ln x},$$
and it quickly follows that $f\in L^1$.
If $p>1$, pick $r$ with $p>r>1$ and write
$$f(x)^p=\frac1{x^r}\cdot\frac1{x^{p-r}(1-\ln(x))^{2p}},$$
note that the first factor is non-integrable and the second factor is bounded below (it is continuous and positive on $(0,1]$ and unbounded near $x=0$), so $f(x)^p$ is non-integrable.
