$F$ is a closed set in $\mathbb{R}$ with $m(F^c)<\infty$ prove $\int_{\mathbb{R}}\frac{d(y)}{|x-y|^2}dy < \infty$ Let $F$ be a closed set in $\mathbb{R}$ with $m(F^c)<\infty$ and let $d(x)$ be the distance function to the set $F$:
$$d(x)=\inf\{|x-y|:y\in F\}$$
and consider:
$$I(x)=\int_{\mathbb{R}}\frac{d(y)}{|x-y|^2}dy$$
Show that $I(x)<\infty $ for a.e. $x\in F$.
There is also a hint: Investigate: $ I=\int_{F} I(x)dx$
I think that it is suffice to prove that $I<\infty$
I've proved that $d(x)$ is 1-Lipshitz. I've also noticed that $d(x)$ must be $0$ outside of some interval $[-M,M]$, but I'm not sure how to procceed.
Thanks.
EDIT: I've replaced $d(x)$ with $d(y)$ inside the integral
 A: *

*The question as you stated it has a trivial answer. For every $x\in F$, we have that $|x-x| = 0 \geq d(x) \implies d(x) = 0$. Hence for $x\in F$ we have $I(x) = 0 < \infty$ always. 

*A more plausible formulation of your question is that it is asking you to show that
$$ I(x) = \int_{\mathbb{R}} \frac{d(y)}{|x-y|^2} ~\mathrm{d}y < \infty ~, \qquad \text{a.e.} x\in F $$
You want to first split the integral up into $F$ and $F^c$. Over $F$ we have that $d(y) = 0$ and so the integral vanishes. Over $F^c$ we have that $d(y) / |x-y|^2 < \frac{1}{|x-y|}$. If $\mathrm{dist}(x,F^c) > 0$ then clearly this integral over $F^c$ is finite. So the only sets you need to worry about are those on the boundary of $F$ (that which have zero distance to $F^c$). 

*To deal with those points, you should follow the hint you were given: integrate $I(x)$ in $x$. You should check that


*

*Fubini can be used to interchange the order of integration

*Integrating in $x$ first. If $y\in F^c$, we have that its distance to $F$ is non-zero, and we have
$$ \left|\int_{F} \frac{d(y)}{|x-y|^2} \mathrm{d}x \right| \leq \left| \int_{|x-y| \geq d(y)} \frac{d(y)}{|x-y|^2} \mathrm{d}x \right| \leq 2 $$
If $y \in F$ we have that the above integral evaluates to 0. So 
$$ \int_F |I(x)| \mathrm{d}x \leq \int_{F^c} 2 \mathrm{d}y = 2 m(F^c) < \infty $$
Since $I(x)$ is absolutely integrable, it can only blow up at a measure-0 set of points. 


