Local integrability of two functions Why $\log|x|$ is a locally integrable function and $1/|x|$ is not? Id know how their graphs look like but I don't know what is the exact difference causing local integrability of the first one.
 A: First: there are two obstacles to global integrability here: behavior at $0$ and behavior at $\infty$. The function $1/|x|$ fails in both regards, that is
$$
\int_0^b 1/|x| \,dx = \infty
$$
for any $b$, and 
$$
\int_a^\infty 1/|x|\,dx = \infty
$$
for any $a$.
Since we're only concerned with local integrability, we only examine the first situation (indeed, $\log$ will fail global integrability). Further, since it is clear that $\int_a^b \,dx$ will be finite for any $a>0$, $b<\infty$ for either of these functions, we only have to look at the local integrability around $a = 0$.
Typically one evaluates improper integrals in the following way:
$$
\lim_{\epsilon \to 0} \int_\epsilon^b 1/|x|\,dx = \lim_{\epsilon \to 0}\log x|_\epsilon^b=  \log(b) - \lim_{\epsilon \to 0}\log\epsilon = \log b - (-\infty) = \infty
$$
so this failed to be integrable in a neighborhood of $0$.
On the other hand, for $\log$, 
$$
\lim_{\epsilon \to 0} \int_\epsilon^b \log x\,dx = \lim_{\epsilon \to 0}\left[x\log x - x\right]_\epsilon^b=  b\log b - b - \lim_{\epsilon \to 0}\left(\epsilon\log\epsilon - \epsilon\right) = b\log b - b - \lim_{\epsilon \to 0} \epsilon \log \epsilon$$
finally, you just need to prove (you can use L'Hopital's rule)
$$
\lim_{\epsilon \to 0} \epsilon \log \epsilon = 0
$$
to show that this integral converges.
A: To show that $\log|x|$ is locally integrable in $\mathbf R^d$ for $d \geqslant 2$, we can use a change of variables to spherical coordinates to deal with the singularity at $0$. Let $B$ be the ball of radius $1$ centered at $0$ in $\mathbf R^d$, and $\sigma$ the usual surface measure on the sphere $S^{d-1}\subset\mathbf R^d$. Then we have
\begin{align*}
\int_B\log|x|\,\mathrm dx &= \int_{S^{d-1}}\int_0^1\log (r)\, r^{d-1}\,\mathrm dr\,\mathrm d\sigma \\
&= \sigma\big(S^{d-1}\big)\int_0^1\log(r)\,r^{d-1}\,\mathrm dr.
\end{align*}
Because $d \geqslant 2$, we have $d-1 \geqslant 1$, hence $r^{d-1} \leqslant r$ for all $r\in [0,1]$. Hence for all $r\in (0,1]$, we have the upper bound
$$0\leqslant -\log(r)\,r^{d-1} \leqslant -\log(r)\,r,$$
so we can conclude that the integral $\log |x|$ converges absolutely on $B$, and quickly conclude that $\log |x|$ is locally integrable on $\mathbf R^d$ for $d\geqslant 2$.
