Is it possible to find a continuous bounded function $f$ such that the integral \begin{equation} \int_{0}^{\infty}|f(x)|dx \end{equation} is finite and the integral \begin{equation} \int_{0}^{\infty}|f(x)|^2dx \end{equation} diverges?
Edit What happens if we drop the boundedness condition? Is it possible to find a function satisfying these two conditions?
If $f$ is bounded, then $\left\lvert f(x)\right\rvert^2\leqslant \left\lvert f(x)\right\rvert \sup_{t\geqslant 0}\left\lvert f(t)\right\rvert$ hence for a bounded function, integrability implies square integrability.
If $f$ is not bounded, everything can happen: let $f_n$ be the function whose graph is the polygonal line linking the points $(0,0)$, $ (n-1/n^2,0)$, $(n,\sqrt n)$, $(n+1/n^2,0)$ and $f_n(t)=0$ for $t>n+1/n^2$. Defining $f=\sum_{n\geqslant 1}f_n$, the uniform convergence of the series on $[0,R]$ holds for each $R$, hence $f$ is continuous. Since the support of the $f_n$ are disjoint, the following equality holds for $p\in\{1,2\}$: $$ \int_0^\infty \lvert f(t)\rvert^pdt=\sum_{n\geqslant 1}\int_0^\infty \lvert f_n(t)\rvert^pdt $$ and we can see that $f$ is integrable but not $f^2$.