Let $f$ be a function which is in $L^p = L^p((0, 1), \lambda)$ for each $p \ge 1$, where $\lambda$ is the Lebesgue measure on the interval $(0, 1)$. Give an example of such a function which is not in $L^\infty = L^\infty((0, 1), \lambda)$. Prove that if there is a constant $C$ so that $\|f\|_p \le C$ for all $p \ge 1$, then $f \in L^\infty$.
Does this work?
a) $f(x) = |\log(x)|^p$
b) $\lim_{p\to \infty} \|f\|_p= \|f\|_\infty \le C$ so $f \in L^\infty$.
(proof can be found here)
The proof already assumed that $f\in L^{\infty}$ before having the limit fact.
So some trick is needed. First of all, since $f\in L^{p}$, $|f|<\infty$ a.e.
The truncation $f_{n}=f\chi_{|f|\leq n}$ is such that $\|f_{n}\|_{L^{p}}\leq\|f\|_{L^{p}}$. And these $f_{n}$ belong to $L^{\infty}$, and hence by the limit fact, we have $\|f_{n}\|_{L^{\infty}}\leq C$ for all $n=1,2,...$
So we can find a measure zero set $N$ such that $|f_{n}(x)|\leq C$ for all $x\in N^{c}$ and $n=1,2,...$, this set $N$ can be chosen such that $|f(x)|<\infty$ for $x\in N^{c}$, now it is easy to see that $\|f\|_{L^{\infty}}\leq C$.