There's an exercise in Stein's Real Analysis book that states the following:
The function $f$ given by $f(x) = |x|^{-a}$ if $|x| < 1$ and 0 otherwise, is integrable over $R^d$ if and only if $a < d$.
There's a revised version of this exercise that says the above function $f$ is integrable in $L^p(R^d)$ if, and only if, $pa < d$.
Each of these can be shown by considering sets of the form $E_{2^k} = \{x \colon f(x) > 2^k\}$ and summing over all integers $k$.
There's an adjustment where instead of $f$, we consider the function given by
\begin{equation*} f_0(x) = \begin{cases} |x|^{-a}/\log(2/|x|), &\text{if } |x|<1\\ 0, &\text{otherwise}. \end{cases} \end{equation*} Does anyone happen to have any suggestions for when to see that this function is in $L^p$?
Edit: I can see that this hold if $a \cdot p < d$; however what would happen if $ap=d$? Would it blow up?
Hint: Just compute. Observe you have \begin{align} \int_{\mathbb{R}^d} |f_0(x)|^p\ dx =& \int_{|x|<1} \frac{1}{|x|^{ap}|\log 2-\log |x||^p}\ dx = \int^1_0 \int_{|x|=r} \frac{dS(x)}{r^{ap}|\log 2-\log r|^p}\ dr\\ =&\ \int^1_0 \frac{C_d r^{d-1-ap}}{|\log 2-\log r|^p}\ dr \leq C_d\int^1_0 \frac{dr}{r^{ap-d+1}|\log r|^p} = \int^0_{-\infty} e^{(d-ap)u}|u|^{-p}\ du<\infty \end{align} provided $d-ap>0$ and $p<1$.