Recently, I asked a somewhat related question [here](https://mathoverflow.net/questions/380342/estimating-the-size-of-omega-r-x-in-omega-textdistx-partial-omegar). In the comment section, I found the formula
$$
\lim\_{r\to 0}\frac{1}{r}\int\_{\Omega\_r} f(x)\,dx = \int\_{\partial \Omega}f(\sigma)\,d\mathcal{H}^{n-1}(\sigma),
$$
where $\Omega\_r=\{x\in\Omega: \text{dist}(x,\partial\Omega)<r \}$ is the ring of thickness $r>0$ near the boundary of a (bounded) Lipschitz domain $\Omega\subset \Bbb R^n$. It appears that the formula holds at least for all $f\in C(\overline\Omega)$.


**Question:** Does similar formula hold for $f\in W^{1,p}(\Omega)$ ? In particular, do we have
$$
\lim\_{r\to 0}\frac{1}{r}\int\_{\Omega\_r} |f(x)|^p\,dx = \int\_{\partial \Omega}|f(\sigma)|^p \,d\mathcal{H}^{n-1}(\sigma) ?
$$


Of course, $f$ on the right-hand side should be thought of as the trace of $f$ in $L^p(\partial\Omega)$.



> 
> I notice that the coarea formula almost gives us the result. If I let $d(x) := \text{dist}(x,\partial\Omega)$, then the coarea formula implies that
> $$
> \int\_{\Omega\_r} |f(x)|^p\,dx = \int\_0^r \int\_{\{d=t\}} |f(\sigma)|^p \,d\mathcal{H}^{n-1}(\sigma) \,dt
> $$
> hence it follows that
> $$\lim\_{r\to 0}\frac{1}{r}\int\_{\Omega\_r} |f(x)|^p\,dx = \int\_{\{d=0\}} |f(\sigma)|^p \,d\mathcal{H}^{n-1}(\sigma) = \int\_{\partial\Omega} |f(\sigma)|^p \,d\mathcal{H}^{n-1}(\sigma) 
> $$
> *if we know that $t\mapsto \int\_{\{d=t\}} |f(\sigma)|^p \,d\mathcal{H}^{n-1}(\sigma) $ is approximately continuous at $t=0$*, which I do not know.
> 
> 
> 


**Edit:** I forgot to mention that I assume $p<n$ otherwise the solution follows easily from the first formula (and Morrey's theorem).



Averaging the mass of a Sobolev function $f\in W^{1,p}(\Omega)$ near $\partial\Omega$
In Evans & Gariepy's "Measure theory and fine properties of functions", Sec. 5.3., they construct the trace operator on a bounded Lipschitz domain $\Omega$ for BV-functions (and thus by inclusion for the subspaces $W^{1,p}$) in a similar fashion, using averages. In their case, they simply consider each part of the boundary locally as a graph $x\_n = \gamma(x\_1,...,x\_{n-1})$ and then average vertically in the form
$$Tf(x\_1,...,x\_{n-1}) = \lim\_{r\to 0} \frac{1}{r}\int\_0^r f(x\_1,...,x\_{n-1},\gamma(x\_1,...,x\_{n-1}))dr$$
but your construction should be close enough to allow for a similar proof.


They also prove the useful theorem 2 which says that for $\mathcal{H}^{n-1}$-almost all $x\in \partial \Omega$ we have
$$\lim\_{r\to 0} \frac{1}{|B\_r(x) \cap \Omega|} \int\_{B\_r(x) \cap \Omega} |f-Tf(x)| dy = 0 $$
which also might be helpful.


