Approximate Lebesgue measure of closed set Let $F \subseteq \mathbb{R}$ be a closed set and assume that it has finite Lebesgue measure. We know that the sequence $(f_n)$ where $f_n:\mathbb{R} \to \mathbb{R}$ is defined as $f_n(x) = \max(0, 1-n\cdot d(x, F))$ approximates the characteristic function of $F$, where $d(x, F)$ is the distance function defined as $d(x,F) = \inf\{|x - y| : y \in F\}$.
My question is, can we conclude that $\int_\mathbb{R} f_n \to m(F)$? For open sets, something similar holds but in that case we can prove it using the Monotone Convergence Theorem.
 A: The result, as stated, is false. Here is a simple counter-example.
Consider $F=\Bbb N $. Clearly, $m(F)=0$.
Let $(f_n)$ where $f_n:\mathbb{R} \to \mathbb{R}$ is defined as $f_n(x) = \max(0, 1-n\cdot d(x, F))$. It is clear that $(f_n)$ approximates the characteristic function of $F$.
However, for $n\in \Bbb N$, $n \geqslant 1$, let $A_n= f_n^{-1}\left(\left[\frac{1}{2},1 \right]\right)$. Then, we have
$$A_n= f_n^{-1}\left(\left[\frac{1}{2},1 \right]\right) = \left\{ x \in \Bbb R, d(x,F) \leqslant \frac{1}{2n} \right\} = \bigcup_{a \in \Bbb N} \left [a -\frac{1}{2n} , a+\frac{1}{2n}  \right ]$$
It follows that $m(A_n) = +\infty$, and for all $x\in A_n$, $f_n \geqslant \frac{1}{2}$. So, we have, for $n\in \Bbb N$, $n \geqslant 1$,
$$\int_\mathbb{R} f_n  \geqslant \int_{A_n}\frac{1}{2} = \frac{1}{2} m(A_n)=  +\infty  $$
So clearly, $\int_\mathbb{R} f_n$ does not converge to $m(F)$.
Remark: If you replace the condition "$F$ has finite Lebesgue measure" by the condition that "$F$ is bounded" then the result is true.
In fact, if $F$ is bounded, then there is $[c,d]$ compact interval such that $F \subseteq [c,d]$.
It follows that  for $n\in \Bbb N$, $n \geqslant 1$,
$$ |f_n| = f_n \leqslant \chi_{[c-1, d+1]} $$ and
$$\int_{\Bbb R}  \chi_{[c-1, d+1]}  < +\infty$$
So by the Dominated Convergence Theorem, we have that
$\int_\mathbb{R} f_n \to \int_\mathbb{R} \chi_F = m(F)$.
