# On functions in $L^p$

I am trying to solve the following problem. It seems easy, but for some reasons I am confused by the hint.

Suppose $0<p_0<p_1\leq\infty$. I need to find an example of functions $f$ on $(0,\infty)$ such that $f\in L^p$ if and only if $p_0<p<p_1$. The hint is to consider functions of the form $f(x)=x^{-a}|log\, x|^b$.

As I asked in this question:

functions of the form $f(x) = x^{-a}|log\, x|^b$ are never in $L^p$ for any value of $a$ and $b$.

So I am trying to modify this function a little bit, by translating the numerator or the denominator. Functions of this form go to $\infty$ near $0$ and near $\infty$. I need to find convergence criterions for integrals of functions of this form. That is, if I am able to say that the integral converges if and only if $a>1$ and $b<3$, for example, then I am done. My guess is that there is a condition for $a$ near $\infty$ and one for $b$ near $0$, or vice versa. But is seems that the $log$ will always be dominated by $x$, so I don't know how it is relevant to have it and how I can find a condition on $b$.

Any suggestions would be really appreciated!

-

Try functions of the form $$f(x) = \cases{x^{-a_1} & for 0 < x \le 1\cr x^{-a_2} & for 1 < x < \infty\cr}$$
Thanks! Do you know why they give this hint, if the answer is that simple? There is a second part of this question asking to find a function in $L^p$ if and only if $p_0\leq p \leq p_1$. Maybe it is useful for this second part? –  Zoltan Jan 13 '13 at 19:09