5-12

Question: Give an example of a bounded continuous f(x)on (0,\infty) such that \lim_{x\to\infty}f(x)=0 but f(x)\notin L_p(0,\infty) for any p>0.
Answer:
Define
f(x) = \begin{cases} 1, & \text{if }x \leq e \\ 1/{\ln x}, & \text{if }x \geq e \end{cases}
It is obvious that function is bounded by 1 and it is continuous since both 1 and 1/\ln x are continuous and the the function is continuous at x=e. Moreover, we have
\lim_{x\to\infty}f(x)=\lim_{x\to\infty}\frac{1}{\ln x}=0.
Now for any p>0, since ln(x)=O(x^{\frac{1}{p}}), we can find K_p such that for x\geq K_p, \ln x\leq x^{\frac{1}{p}}, then
\int_0^\infty |f(x)|^p\geq\int_{K_p}^\infty\left(\frac{1}{\ln x}\right)\geq\int_{K_p}^\infty\frac{1}{x}dx=+\infty 
this shows that f(x)\notin L_p(0,\infty).