In $L^2$ but not in $L^p$, $p \neq 2$. We consider Lebesgue measure space $(\mathbb{R} , \mathcal{L} , m)$ and let $f : \mathbb{R} \to \mathbb{R}$, $f(x) = \frac{1}{x^{\frac{1}{2}} (1 + |\log x|)} {\chi}_{(0 , \infty)}(x)$ for all $x \in \mathbb{R}$. Show that $f \in L^p$ if, and only if, $p = 2$. Obviously, $f \geq 0$. I have already shown that $f \in L^2$ with ${\|f\|}_2 = \sqrt{2}$ but I can't see that $f \notin L^p$, $p \neq 2$. Any help? Thank you very much.

$\int_1^{\infty} \frac{1}{x^{\frac{p}{2}}(1+log(x))^p}dx = \int_0^{\infty} \frac{1}{e^{x\frac{p}{2}}(1+x)^p}e^xdx = \int_0^{\infty} e^{x(1-\frac{p}{2})}(1+x)^{-p} dx$
What is inside the last integral diverges for any $p<2$.
and $\int_0^1\frac{1}{x^{\frac{p}{2}}(1-log(x))^p}dx= \int_{-\infty}^0 e^{x(1-\frac{p}{2})}(1-x)^{-p} dx$ and what is in the last integral diverges for any $p>2$ as $x \to -\infty$
