# Integrability of log of distance function

Let $$E\subset B_1(0)\subset \mathbb{R}^n$$ be a compact set s.t. $$\lambda(E)=0$$, where $$\lambda$$ is the Lebesgue measure, and $$B_1(0)$$ is the Euclidean unit ball centered at the origin. Is the following integral finite:

$$\int_{B_1(0)}-\log d(x,E)d\lambda(x)<\infty?$$

Although this question seems trivial, I have failed to find a reference to it or to variations of it in previous discussions. I was not able to come up with a counter-example nor a proof. I also asked in mathstackexchange a variation of it, but didn’t get a sufficient answer.

• Correct, thank you. – BOS Sep 17 at 14:24

The integral in question is finite for most sets of measure zero, but can diverge to $$\infty$$ for some sets. An example in one dimension is obtained by constructing a Cantor set where at stage $$k$$ the middle $$1/(k+1)$$ proportion is removed from each of the $$2^{k-1}$$ intervals obtained at stage $$k-1$$. Thus the $$2^k$$ intervals obtained at stage $$k$$ will each have length $$2^{-k}/(k+1)$$. Therefore, each of the $$2^k$$ middle intervals removed in the next stage will have length $$2^{-k}/[(k+1)(k+2)]$$, and each of these will contribute at least $$k/2$$ times its length to the integral. Summing over $$k$$ gives a harmonic series which diverges. The example can be lifted to higher dimensions by taking a Cartesian product with a $$n-1$$ dimensional box.
If $$E\ne\emptyset$$, then $$d(x,E)\le2$$ for all $$x\in B_1(0)$$. So, your integral is $$\le\lambda(B_1(0))\ln2<\infty$$.
• You answered the question somehow, but I think the problem occurs where $d(x,E)$ is small, so integrability is still an issue (i.e. the problem is if the integral exists since it may be $-\infty$ )… – Dirk Sep 17 at 14:16
• The integral is $>-\infty$ if $E$ is the Cantor set. Are there compact sets of zero Lebesgue measure that are much bigger than the Cantor set? – Iosif Pinelis Sep 17 at 14:24