For small $r$ the curvature of the surface $\partial D$ can be neglected, so $D \cap B(x,r)$ is half the $d$-dimensional ball with radius $r$. Choosing the origin of the coordinate system at position $x$ and orienting the $x_1$-axis along the inward normal, the integral is given by the vector $v$ with components
$$v_p=\frac{2}{V_{d}(r)}\int\cdots\int_{-\infty}^\infty \theta\biggl(r-\sum_{i=1}^d x_i^2\biggr)\theta(x_1)\frac{x_p}{r}\,dx_1dx_2\ldots dx_d$$
with $V_d(r)$ the volume of the $d$-dimensional ball of radius $r$ and $\theta$ the unit step function.
Only the $p=1$ component is nonzero because of symmetry, and this component evaluates to
$$v_1=\frac{\int_0^r d\rho\int_0^{\pi/2}d\theta\,\rho^{d} \cos \theta \sin^{d-2}\theta}{r\int_0^r d\rho\int_0^{\pi/2}d\theta\,\rho^{d-1} \sin^{d-2}}=\frac{\Gamma \left(\frac{d}{2}+1\right)}{\sqrt{\pi } \Gamma \left(\frac{d+3}{2}\right)}.$$
So it's an inward normal vector, but not a unit vector.
Carlo Beenakker
- 188.1k
- 18
- 448
- 651